You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found while implementing objectui#7421 (deleting the taskListWidth_LEGACY_REMOVED tombstone, PR objectui#7511). Filed unassigned, deliberately not fixed in that PR — same file, same defect class, but a separate unit of work and a separate reverse verification.
What is there
Measured on origin/maina27d153c2, all in packages/plugin-gantt/src/GanttView.tsx. Three bindings, none read anywhere in the repo:
constHEADER_HEIGHT=50;// line 43constCOLUMN_WIDTH=100;// Time column width // line 44
const[currentDate,setCurrentDate]=React.useState(()=>tzShift.now());// line 873
Per-symbol readings, taken with a declaration-form probe and a read-site probe run separately, never a bare word count:
symbol
declaration
read sites, repo-wide
HEADER_HEIGHT
1, line 43
0 — git grep -l returns exactly one file, its own
COLUMN_WIDTH (the module const)
1, line 44
0 in GanttView.tsx; the 3 other files that spell the name each declare their own local const COLUMN_WIDTH = 110 for a test and import nothing
currentDate
1, line 873
0
setCurrentDate
1, line 873
0
Controls that fired in the same runs: taskListWidth → 20 read sites, rowHeight → 360. So the zeros above are readings, not a broken grep.
Neither module const is exported (grep -E 'export .*(HEADER_HEIGHT|COLUMN_WIDTH)' returns nothing), so there is no consumer outside the file either. ESLint already sees all four — @typescript-eslint/no-unused-vars, four of the 16 warnings this file carries — but unused vars are at warning severity here, so nothing fails.
Why it is worth a card rather than a silent tidy
Each one is a false signal of the same shape objectui#7421 recorded, and the two module consts are the more expensive kind because they carry plausible values:
COLUMN_WIDTH = 100 sits two lines from where a reader looks for the column width, and the value the gantt actually renders is 110, from columnWidthForContainer (see objectui#7228). A reader who trusts the constant reads the wrong number, and it is a different wrong number from the live one — the most costly kind of stale.
HEADER_HEIGHT = 50 reads as the header geometry contract; the real header height comes from elsewhere.
git grep -n 'HEADER_HEIGHT' # one hit, the declaration
git grep -n 'COLUMN_WIDTH' # GanttView.tsx has one hit; the 3 test files each declare their own
git grep -n 'setCurrentDate' # one hit, the useState destructure
Suggested directions — none proposed as decided
A. Delete all four. Nothing reads them; the two module consts state values that are wrong as well as unread.
B. Delete the two module consts; keep the useState pair only if some in-flight work intends to wire a "current date" cursor (nothing in the tree suggests it does).
C. Leave them and lift @typescript-eslint/no-unused-vars to error for src/ so the class cannot regrow — a bigger change than this card, and it would need the existing warning backlog cleared first.
Related: objectui#7421 (the tombstone, same file, same class), objectui#7228 (columnWidthForContainer's three identical arms — the live 110 that makes COLUMN_WIDTH = 100 misleading), objectui#7332 (the change that put unused imports at error and left vars at warning).
Found while implementing objectui#7421 (deleting the
taskListWidth_LEGACY_REMOVEDtombstone, PR objectui#7511). Filed unassigned, deliberately not fixed in that PR — same file, same defect class, but a separate unit of work and a separate reverse verification.What is there
Measured on
origin/maina27d153c2, all inpackages/plugin-gantt/src/GanttView.tsx. Three bindings, none read anywhere in the repo:Per-symbol readings, taken with a declaration-form probe and a read-site probe run separately, never a bare word count:
HEADER_HEIGHTgit grep -lreturns exactly one file, its ownCOLUMN_WIDTH(the module const)GanttView.tsx; the 3 other files that spell the name each declare their own localconst COLUMN_WIDTH = 110for a test and import nothingcurrentDatesetCurrentDateControls that fired in the same runs:
taskListWidth→ 20 read sites,rowHeight→ 360. So the zeros above are readings, not a broken grep.Neither module const is exported (
grep -E 'export .*(HEADER_HEIGHT|COLUMN_WIDTH)'returns nothing), so there is no consumer outside the file either. ESLint already sees all four —@typescript-eslint/no-unused-vars, four of the 16 warnings this file carries — but unused vars are at warning severity here, so nothing fails.Why it is worth a card rather than a silent tidy
Each one is a false signal of the same shape objectui#7421 recorded, and the two module consts are the more expensive kind because they carry plausible values:
COLUMN_WIDTH = 100sits two lines from where a reader looks for the column width, and the value the gantt actually renders is 110, fromcolumnWidthForContainer(see objectui#7228). A reader who trusts the constant reads the wrong number, and it is a different wrong number from the live one — the most costly kind of stale.HEADER_HEIGHT = 50reads as the header geometry contract; the real header height comes from elsewhere.currentDateuseStatepair is not merely inert like the finding(plugin-gantt):taskListWidth_LEGACY_REMOVEDis a declared-and-never-readconst nullleft behind by a finished refactor #7421 tombstone: the call still allocates state and still runs itstzShift.now()initializer on every mount. Nothing reads the value and nothing calls the setter, so the state exists purely to be allocated.Reproduction
Suggested directions — none proposed as decided
useStatepair only if some in-flight work intends to wire a "current date" cursor (nothing in the tree suggests it does).@typescript-eslint/no-unused-varsto error forsrc/so the class cannot regrow — a bigger change than this card, and it would need the existing warning backlog cleared first.Related: objectui#7421 (the tombstone, same file, same class), objectui#7228 (
columnWidthForContainer's three identical arms — the live 110 that makesCOLUMN_WIDTH = 100misleading), objectui#7332 (the change that put unused imports at error and left vars at warning).Generated by Claude Code