Skip to content

EPBDS-16211 H1: delete the dead weight, 26 files - #53

Merged
AlexSamBY merged 1 commit into
masterfrom
h1-dead-weight-rebased
Sep 17, 2026
Merged

AlexSamBY merged 1 commit into
masterfrom
h1-dead-weight-rebased

Conversation

@AlexSamBY

Copy link
Copy Markdown
Member

Replaces #52, which conflicted after #51 was squash-merged: this is the same single H1 commit, rebased onto master. Identical diff — 32 files, +61 −3150.

What went

12 orphan components Avatar, Badge, Carousel, Collapse, ErrorContent, ErrorTable, FloatNumber, ImageSwatch, MenuButton, Square, TabList, Tags
10 LESS files the whole src/style/unused/ tree
4 icomoon artifacts demo.html, demo-files/, Read Me.txt
2 functions formatTime, toHours in time.js, with the imports that existed only for them

What deliberately stayed

The engine TabList (pages/main/components/TabList.js) — mapper.js:33 resolves it, and it is not interchangeable with the pack copy: both import './Tabs', and those two Tabs differ by ~100 lines. Swapping them would have silently regressed tab behaviour. The pack Tabs.js also stays, so H6's duplicate pair is only half resolved.

icomoon's selection.json and style.cssselection.json is the project file you re-upload to regenerate the icon set, the only round-trip path back to it. Dead to every build, but its loss is not recoverable the way a demo page's is.

FIELD.TYPE.DATE, which H1 also lists — delete it, or give it a view: 'Date' branch? That is an owners' call, so it was left alone.

One decision this forced

ErrorTable could not go alone (ErrorContent imported it), and it was also the last in-repo caller passing inverted/striped to Table. SUPPORTED-PROPS.md recorded that step 1 deferred their fate to exactly this deletion.

They are kept. Both are genuinely styled (table:not(.as-layout).inverted, table.striped tr:nth-child(2n)), Table.js still destructures them, and a consumer meta can still set them. Dropping a supported prop because our own last caller went away would be a breaking change bought for nothing. The generated "Attributes at the call sites" table no longer lists them — which is correct, since that table reports what the codebase passes, not what the component accepts — so wrapper-prop-curation.js now says so explicitly.

Verified before deleting

One agent per target, each asked to refute that its target was safe: mapper registration, the components barrel, the published entry, every import spelling, tracked metas, docs, schema, CSS, the sibling checkouts. src/style/unused/ was cleared by compiling index.less through the repo's own less-options and reading less's resolved import list (44 files, none under unused/) — not by grepping basenames, which would have been wrong here: avatar.less and carousel.less exist elsewhere too.

Measured after

before after
suites / tests 166 / 2539 166 / 2527
statements 94.83% 97.04%
branches 90.19% 94.06%
functions 93.28% 96.88%
lines 95.36% 97.76%

The −12 tests are exactly the two time suites (−9, −3); a per-suite diff confirms no other suite's count moved. Coverage thresholds green. static/all.css sha256 unchanged at dcdb0a40a6d8ee79… — deleting unused/ and the icomoon page touched no byte a consumer downloads. lint:js, lint:css, css:fixture:check, both docs checks, build-lib and build-css all green.

Side effects worth naming

  • moment is now imported nowhere in src/core/utils/ — progress on §9.7-F2.
  • Workstream A loses 4 class components and 3 UNSAFE_* sites (29/14 → 26/12, re-measured).
  • The third function-component defaultProps site is resolved by deletion.

The plan is updated in the same commit — 28 places closed or corrected, including the orphan counts, which are now a historical record rather than a list of files to go looking for.

🤖 Generated with Claude Code

§9.9-H1 has been "cheap, do first" since the plan was written. Doing it.

WHAT WENT

  12 orphan components (src/core/components/): Avatar, Badge, Carousel,
     Collapse, ErrorContent, ErrorTable, FloatNumber, ImageSwatch,
     MenuButton, Square, TabList, Tags.
  10 LESS files: the whole src/style/unused/ tree.
   4 icomoon demo artifacts: demo.html, demo-files/, "Read Me.txt".
     formatTime and toHours in src/core/utils/time.js, with the imports
     that existed only for them.

WHAT DELIBERATELY STAYED

  The ENGINE TabList (pages/main/components/TabList.js) — mapper.js:33
  resolves it, and it is a different component from the pack copy: both
  import './Tabs', and those two Tabs differ by ~100 lines. Swapping them
  would have silently regressed tab behaviour.

  The pack Tabs.js, so H6's duplicate pair is only HALF resolved.

  icomoon's selection.json and style.css — selection.json is the project
  file you re-upload to regenerate the icon set, the only round-trip path
  back to it. Dead to every build, but its loss is not recoverable the way
  the demo page's is.

  FIELD.TYPE.DATE, which H1 also lists. Deleting it versus giving it a
  `view: 'Date'` branch is an owners' decision, so it was left alone.

ONE DECISION THIS FORCED

  ErrorTable could not go alone — ErrorContent imported it — and it was
  also the last in-repo caller passing `inverted`/`striped` to Table.
  SUPPORTED-PROPS.md said step 1 deferred their fate to exactly this
  deletion. They are KEPT: both are genuinely styled
  (table:not(.as-layout).inverted, table.striped tr:nth-child(2n)), Table.js
  still destructures them, and a consumer meta can still set them. Dropping
  a supported prop because our own last caller went away would be a
  breaking change bought for nothing. The generated "Attributes at the call
  sites" table no longer lists them, which is correct — that table reports
  what the codebase passes, not what the component accepts — so
  wrapper-prop-curation.js now says so in as many words.

VERIFIED BEFORE DELETING

  One agent per target, each asked to REFUTE that its target was safe:
  mapper registration, the components barrel, the published entry, every
  import spelling, tracked metas, docs, schema, CSS, the sibling checkouts.
  src/style/unused/ was cleared by compiling index.less through the repo's
  own less-options and reading less's resolved import list (44 files, none
  under unused/) rather than by grepping basenames.

MEASURED AFTER

  suite      166 suites, 2539 -> 2527 tests. The -12 is exactly the two
             time suites (-9, -3); no other suite's count moved.
  coverage   94.83 -> 97.04 stmts, 90.19 -> 94.06 branch, 93.28 -> 96.88
             funcs, 95.36 -> 97.76 lines. Thresholds green.
  CSS        static/all.css sha256 UNCHANGED at dcdb0a40a6d8ee79...
  gates      lint:js, lint:css, css:fixture:check, both docs checks,
             build-lib, build-css all green.

SIDE EFFECTS WORTH NAMING

  moment is now imported nowhere in src/core/utils/ — progress on §9.7-F2.
  Workstream A loses 4 class components and 3 UNSAFE_* sites (29/14 -> 26/12).
  The third function-component defaultProps site is resolved by deletion.

The plan is updated in the same commit: 28 places closed or corrected,
including the orphan counts, which are now a historical record rather than
a list of files to go looking for.
@AlexSamBY
AlexSamBY merged commit 8e4a9e7 into master Sep 17, 2026
5 checks passed
@AlexSamBY
AlexSamBY deleted the h1-dead-weight-rebased branch September 17, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant