refactor: consolidate result-table folders into results/ (#691)#705
Open
grzanka wants to merge 1 commit into
Open
refactor: consolidate result-table folders into results/ (#691)#705grzanka wants to merge 1 commit into
grzanka wants to merge 1 commit into
Conversation
Merge the two confusingly-named, near-identical result-table locations into a single canonical results/ directory: - result-table.svelte -> results/table-multi-program.svelte - result-table/ partials -> results/multi-program/ (footer.svelte renamed from result-table-footer.svelte) Update all imports, the calculator page, the moved component tests, and the component tree in docs/03-architecture.md. Pure move + rename; no logic changes. The data-testid="result-table" DOM attribute is intentionally kept. https://claude.ai/code/session_01AQB6xXACbSPK2DePe2QSoT
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates the previously split multi-program result table implementation (formerly result-table.svelte + result-table/ partials) into the canonical src/lib/components/results/ subtree, aiming to make the component tree self-describing and remove ambiguous folder naming.
Changes:
- Updated calculator page + unit/component tests to import the multi-program table from
src/lib/components/results/table-multi-program.svelte. - Moved/renamed the multi-program table partials under
src/lib/components/results/multi-program/and updated internal imports (including simplifyingStpUnitHeaderMenuimports). - Updated architecture documentation and AI session logging to reflect the new component tree.
Reviewed changes
Copilot reviewed 10 out of 17 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/components/table-multi-program.test.ts | Updates test import to the new multi-program table path under results/. |
| src/tests/components/table-multi-program-advanced.test.ts | Updates advanced-mode test import to the new multi-program table path under results/. |
| src/routes/calculator/+page.svelte | Updates calculator page import to use results/table-multi-program.svelte. |
| src/lib/components/results/table-multi-program.svelte | Updates internal imports to use ./multi-program/* partials and moved types import. |
| src/lib/components/results/multi-program/types.ts | Introduces/relocates ColumnDef typing for the multi-program table. |
| src/lib/components/results/multi-program/multi-entity-header.svelte | Simplifies StpUnitHeaderMenu import to a sibling-relative path. |
| src/lib/components/results/multi-program/multi-entity-cells.svelte | Relocates/introduces multi-entity comparison cell rendering for the multi-program table. |
| src/lib/components/results/multi-program/input-row-cells.svelte | Relocates/introduces row input cell rendering for the multi-program table. |
| src/lib/components/results/multi-program/footer.svelte | Relocates/renames the multi-program table footer component. |
| src/lib/components/results/multi-program/basic-result-cells.svelte | Relocates/introduces basic-mode result cell rendering for the multi-program table. |
| src/lib/components/results/multi-program/basic-header.svelte | Relocates/introduces basic-mode table header rendering for the multi-program table. |
| src/lib/components/results/multi-program/advanced-result-cells.svelte | Relocates/introduces advanced-mode result cell rendering for the multi-program table. |
| src/lib/components/results/multi-program/advanced-header.svelte | Simplifies StpUnitHeaderMenu import to a sibling-relative path. |
| docs/ai-logs/README.md | Adds an index entry for the AI session log covering this refactor. |
| docs/ai-logs/2026-06-04-issue-691-consolidate-result-tables.md | Adds the detailed AI session log for the consolidation work. |
| docs/03-architecture.md | Updates the component tree documentation to reflect the new results/ structure. |
| CHANGELOG-AI.md | Adds the changelog entry linking to the new AI session log. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #691. Consolidates the two confusingly-named, near-identical result-table
locations under
src/lib/components/into a single canonicalresults/directory, so the component tree is self-documenting and contributors no longer
have to open files to learn which table is which.
Moves (all via
git mv, history preserved)result-table.svelte→results/table-multi-program.svelte(the multi-program comparison table)result-table/partials →results/multi-program/:advanced-header,advanced-result-cells,basic-header,basic-result-cells,input-row-cells,multi-entity-cells,multi-entity-header,typesresult-table-footer.svelte→footer.svelte(drops the lastresult-tablefilename)result-table.test.ts→table-multi-program.test.ts,result-table-advanced.test.ts→table-multi-program-advanced.test.tsOther changes
../stp-unit-header-menu.svelte(now siblings underresults/), the calculator page import, and the test imports.docs/03-architecture.md.CHANGELOG-AI.mdentry + session log + index update.Pure move + rename — no logic changes. The
data-testid="result-table"DOMattribute is intentionally kept (behavioural contract relied on by E2E specs).
Acceptance criteria
results/directory; noresult-table.svelte/result-table/left behind.pnpm check(svelte-check + tsc) passes — 0 errors.pnpm lintclean; moved table tests pass (21/21). (The only failing unit tests are inguard-forbidden-files.test.ts, failing because git commit signing is unavailable in the sandbox — unrelated to this change.)docs/03-architecture.mdupdated.Test plan
pnpm check→ 0 errors, 0 warningspnpm lint→ cleanpnpm format:check→ cleanpnpm vitest runfor the two moved table specs → 21/21 passhttps://claude.ai/code/session_01AQB6xXACbSPK2DePe2QSoT
Generated by Claude Code