mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Drop spammy console.debug from Drive Ratio render/keystroke paths
Address Greptile review: remove the per-render and per-keystroke console.debug calls (they fired on every React render and every field edit). Keep the single strategic solveTrain log, which fires only on a settled (debounced) solve. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4e25459d50
commit
2e950b85ad
1 changed files with 0 additions and 2 deletions
|
|
@ -307,7 +307,6 @@ function driveReducer(state, action) {
|
|||
const elements = state.elements.map((el, i) =>
|
||||
i === index ? {...el, [field]: clamped} : el);
|
||||
const lastUpdated = [index, ...state.lastUpdated.filter((i) => i !== index)];
|
||||
console.debug('[DriveCalc] field', {index, field, value: clamped, lastUpdated: [...lastUpdated]});
|
||||
// Only update the field the user is actively typing. Solving is debounced in the component.
|
||||
return {...state, elements, lastUpdated};
|
||||
}
|
||||
|
|
@ -423,7 +422,6 @@ export function DriveCalculator() {
|
|||
const {sizeLabel, button, toothed} = MODES[mode];
|
||||
const {elements} = state;
|
||||
const twoElements = elements.length === 2;
|
||||
console.debug('[DriveCalc] render', elements.map((e, i) => ({i, size: e.size, rpm: e.rpm})), 'lastUpdated:', state.lastUpdated);
|
||||
const lengthUnit = metric ? 'mm' : 'in';
|
||||
const torqueUnit = metric ? 'N·m' : 'lb·ft';
|
||||
// Pulley diameters carry a length unit; gear/sprocket teeth are unitless.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue