RE: unbuilt stages honest, app.js split, and its test fallout fixed - #115
Merged
Merged
Conversation
DEFECT-UNBUILT-STAGES-RENDER-AS-BUILT.md's fix, exactly as specified: three sites in next/app.js tested `unbuilt`, which no STAGES entry ever sets (every entry declares `built`). Inverted all three to read `built` so a stage added without it is honest by default: - the intent-nav item (:581) - the sub-tab strip, now also gated on the STAGE's own built-ness, not just the tab's (:3001) -- previously all four built:true SUB_TABS advertised working panes on all six unbuilt stages - the pane message that explains why an unbuilt stage has nothing to show, never shown before this (:5053) Also flips `understanding` to built:true -- it renders real charts via loadChartsPane() unconditionally already; the flag was never added when that landed. The other "Start here" item (renderWorkListPane never called) is not a real defect -- traced end to end and it's fully wired. See UNBUILT-STAGES-IMPLEMENTED.md for the trace. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…art 2 §1) Pure refactor, no behavior change. app.js (6,861 lines) had every future stage's work colliding in one file; this extends the worklist.js/feedback.js/ format.js pattern with one module per canonical stage id under next/stages/: - enrichment.js, curate.js, understanding.js carry the real pane code that existed for those three stages (renderEnrichment/renderEnrichmentEvidence, renderCurate + the component-tree/verdict review, loadChartsPane). - investigation.js, scouting.js, discovery.js, assessment.js, analysis.js, automate.js are stub modules — there is no stage-specific rendering code for any of them yet (STAGES marks none `built`, so loadPane() renders the shared placeholder); each stub says what a future session touches to build it. - activity.js added too, matching the task's own example list, though Activity is not one of the nine canonical stage ids in STAGES. app.js keeps routing (loadPane() and its stage dispatch), shared state, the chrome, and the generic Questions-checklist engine every built stage shares (Scouting today; Discovery/Assessment/Analysis once built) — that engine is shared infrastructure, not any one stage's own code, so it did not move. Chart-rendering internals (drawChart/chartLayout/tokens/etc.) stayed for the same reason: promoteToPane()'s chat-promoted-chart feature depends on them too, not just Understanding. Every new/modified file passes `node --input-type=module --check`. See docs/design-notes/APP-JS-SPLIT-IMPLEMENTED.md for the full file-by-file account, what was scoped out (no browser testing available here — no Egeria credentials in this environment), and the done-test traced through Enrichment. Signed-off-by: Claude Sonnet 5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
APP-JS-SPLIT-IMPLEMENTED.md moved renderCurate/renderComponentTree/ verdictBadge/curateRowHtml (curate) and proposedFrom/renderEnrichment (enrichment) out of app.js into stages/curate.js and stages/enrichment.js. 15 tests across four files located these functions by string search against app.js's raw text and broke -- ValueError (marker not found) or an empty slice (a start/end marker pair split across two files, so the end appeared before the start in the concatenated text). - test_next_component_review.py, test_next_curate_pane.py, test_next_rail_states.py: `_app()` now concatenates app.js with every stages/*.js file, so a marker search doesn't need to know which file a function ended up in. - Several slices still used `rowKey(i)` (stayed in app.js) as an end boundary for content now in curate.js -- rebound each to the actual next function in curate.js (portsWords/recordVerdicts/ curateWritesHtml/renderCatalogueDepthOffer as appropriate; two needed renderCatalogueDepthOffer specifically because the checked content spans from renderCurate/curateRowHtml through the click-handler wiring in renderCurate itself, not just the row-HTML builder). - test_next_enrichment_fidelity.py's proposedFrom/renderEnrichment slice now reads stages/enrichment.js directly. Its test_all_shell_modules_ parse discovers stages/*.js via glob rather than a hardcoded file list, so a future new stage module is covered without remembering to add it here too. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
…-SPLIT-IMPLEMENTED.md Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
re/honest-stages branched before #116 merged, so its CI ran against the old byte-window assertion and failed on the same pre-existing bug #116 fixes — not a regression from this branch's own changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Dan Wolfson <dan.wolfson@pdr-associates.com>
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
Full suite: 4812 passed, 1 pre-existing unrelated failure (fixed separately on re/diagram-test-ordering-fix), 103 skipped.
See docs/design-notes/UNBUILT-STAGES-IMPLEMENTED.md and docs/design-notes/APP-JS-SPLIT-IMPLEMENTED.md (with addendum) for details.
Test plan
uv run pytest tests/ -q -k "not Postgres"🤖 Generated with Claude Code