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:
Roland 2026-05-28 15:14:58 -06:00
parent 4e25459d50
commit 2e950b85ad
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680

View file

@ -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.