Skip to content

chore: remove dead legacy entity-selection component tree (#688)#696

Open
grzanka wants to merge 2 commits into
masterfrom
claude/code-complexity-architecture-29w6a
Open

chore: remove dead legacy entity-selection component tree (#688)#696
grzanka wants to merge 2 commits into
masterfrom
claude/code-complexity-architecture-29w6a

Conversation

@grzanka
Copy link
Copy Markdown
Contributor

@grzanka grzanka commented Jun 3, 2026

Closes #688.

What

Removes the pre-Stage-8 entity-selection implementation that was superseded by
the entity-selection/ subtree (entity-selection.svelte, wired into both the
calculator and plot pages) but never deleted.

Deleted (4 components + 4 tests, ~1,250 LOC of dead code):

  • src/lib/components/entity-combobox.svelte
  • src/lib/components/entity-selection-comboboxes.svelte
  • src/lib/components/entity-selection-panels.svelte
  • src/lib/components/entity-panel.svelte
  • src/tests/components/entity-combobox.test.ts
  • src/tests/components/entity-panel.test.ts
  • src/tests/unit/entity-selection-comboboxes.test.ts
  • src/tests/unit/entity-selection-panels.test.ts

Also repointed the stale doc comment in src/lib/utils/program-kind.ts — it
cited the (now-deleted) entity-selection-comboboxes.svelte as the "source of
truth" for program grouping; it now describes the grouping rule directly, with
the feature spec remaining the canonical reference.

Why

These files were not imported anywhere in the app. The only non-test references
were the dead components importing each other and that one stale comment, which
was itself a maintenance trap (a fix to grouping made there would have had zero
effect). They also inflated test coverage with code no user can reach. See #688
for the full rationale.

Verification

  • pnpm format / pnpm run format:check — clean
  • pnpm lint — 0 errors
  • pnpm check (svelte-check + tsc) — 0 errors, 0 warnings
  • pnpm test — 1639 passed. The only failures are 3 tests in
    guard-forbidden-files.test.ts, which are pre-existing and unrelated: the
    test creates a temp git repo and runs git commit, which fails on this
    sandbox's commit-signing server (signing server returned status 400: missing source); reproduced identically with a plain git commit in a throwaway repo.
    The test does not reference entity-selection.

Notes

AI logging

  • CHANGELOG-AI.md entry added; detailed log at
    docs/ai-logs/2026-06-03-entity-selection.md; docs/ai-logs/README.md index
    updated.

https://claude.ai/code/session_01HTEUmMLhvekjFKT6JimhAV


Generated by Claude Code

The pre-Stage-8 entity selector (entity-combobox, entity-selection-comboboxes,
entity-selection-panels, entity-panel) was superseded by the entity-selection/
subtree and is no longer imported by the app — only referenced by its own tests
and one stale comment. Delete the four components and their four test files
(~1,250 LOC), and repoint the program-kind.ts comment to describe the grouping
logic directly instead of a deleted component.

https://claude.ai/code/session_01HTEUmMLhvekjFKT6JimhAV
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes an obsolete, pre-Stage-8 entity-selection component/test tree that is no longer used by the running app (superseded by the src/lib/components/entity-selection/ subtree), and updates related documentation/logging references.

Changes:

  • Deleted 4 legacy entity-selection components and 4 associated test files (~1,250 LOC) that were no longer imported by the app.
  • Updated src/lib/utils/program-kind.ts doc comment to describe program-grouping logic directly (instead of pointing at a deleted UI file).
  • Added AI session logging updates (new log file, changelog entry, and log index update).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/lib/components/entity-combobox.svelte Deleted dead legacy combobox component.
src/lib/components/entity-selection-comboboxes.svelte Deleted dead legacy compact-mode wrapper component.
src/lib/components/entity-selection-panels.svelte Deleted dead legacy panel-mode wrapper component.
src/lib/components/entity-panel.svelte Deleted dead legacy panel component.
src/tests/components/entity-combobox.test.ts Deleted tests for removed legacy combobox.
src/tests/components/entity-panel.test.ts Deleted tests for removed legacy panel.
src/tests/unit/entity-selection-comboboxes.test.ts Deleted unit tests for removed legacy combobox wrapper.
src/tests/unit/entity-selection-panels.test.ts Deleted unit tests for removed legacy panels wrapper.
src/lib/utils/program-kind.ts Replaced stale “source of truth” reference with an inline grouping-rule description.
docs/ai-logs/README.md Added the new session log to the AI logs index table.
docs/ai-logs/2026-06-03-entity-selection.md Added detailed AI session log for the dead-code removal.
CHANGELOG-AI.md Added a new changelog entry linking to the session log.

Comment thread src/lib/utils/program-kind.ts
Resolve CHANGELOG-AI.md and docs/ai-logs/README.md conflicts (keep both the
#688 dead-code removal and the #687/#631 docs-sync entries).

Address PR #696 review: remove now-dangling references to the deleted
entity-selection components from the authoritative current-state docs and the
e2e comment that cited them:
- docs/03-architecture.md: legacy picker paragraph -> note removal in #688
- docs/04-feature-specs/entity-selection.md: label-sharing text now points at
  the live entity-selection/ subtree; version note marks the components removed
- tests/e2e/particle-unit-switching.spec.ts: drop the dead-file citation from
  the omitted-electron-scenario comment

https://claude.ai/code/session_01HTEUmMLhvekjFKT6JimhAV
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.

Remove dead legacy entity-selection component tree (~1,250 LOC + 4 test files)

3 participants