Repository navigation
Rebuild the control centre around where the project stands - #74
Conversation
The page had eight nav views, an inspector and an activity drawer, all competing for the same attention, and none of them answered the question someone opens it to ask. It was a control panel for orchestration: teams, providers, worktrees, ROI, flight records. Meanwhile everything Continuum is actually for had no UI at all. The words branch and merge appeared in app.js only as Git worktree branches. Probing the running server first showed the API was healthy: all eleven endpoints returned data. The problem was entirely the front end. Four tabs now. Now answers where the project stands, in the biggest type on the page, with the age, the drift against the recorded commit, the decisions and the unresolved questions. History lists checkpoints, diffs any two, and searches blame. Notes shows decisions, hypotheses and facts. Advanced holds everything else, demoted rather than deleted. Five endpoints back it: /api/now, /api/checkpoints, /api/diff, /api/blame, /api/notes and /api/branches. A bad checkpoint reference returns 400 with the message the CLI gives rather than a 500. Empty sections say what would fill them. Several old panels rendered blank because their data is empty by design, which reads as broken. Two tests that could not fail, both fixed: tests/ui_smoke.js renders every view against fixtures through a stub DOM. Its first version let a TypeError escape the async body, so it exited 0 against a completely broken app.js. It now fails on any throw, and I verified that by emptying app.js and by removing the escaping. test_app_js_escapes_user_controlled_trust_values asserted a list of interpolations from the old views, so deleting those views made it pass for the wrong reason. It checks the rule instead: no data field may be interpolated without esc(). Verified by unescaping one and watching it fail. 768 tests, plus the smoke test wired into both workflows, because parsing is not rendering. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S5AfgnF6gZnJxdMEfGrEPc
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3fbefcd970
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Three findings from review. A project with no checkpoints yet showed "Could not load this view" on History. renderHistory returns an empty state with no search controls, and wireHistory was called unconditionally, so getElementById(...) .addEventListener threw and the catch replaced the guidance with an error. It is wired only when there are checkpoints. Switching tabs mid-request let the slower response overwrite the tab you had already moved to, while the highlight and the URL said otherwise. Each load takes a generation and drops its result if another has started. The age was read from latest_handoff.md's mtime, and history.switch() rewrites that file, so returning to a branch whose last work was weeks old reported it as recorded today. Freshness that resets itself is worse than no freshness, because it is the one number here whose whole job is to be doubted. It comes from the newest checkpoint's created_at, with the file's timestamp kept as the fallback for a handoff with no checkpoint behind it. The smoke test could not catch the first of these, and fixing that mattered as much as the bug. Its stub returned a node for any id, so every getElementById succeeded and the empty state inherited controls the populated view had drawn. It now returns null for an id that is not in the current render, and does not cache across renders. Verified by restoring the unconditional wiring and watching it fail. Two freshness tests aged the file, which is the mechanism this removes. They age the checkpoint now, and a new test asserts a branch switch does not reset the age. It fails on the previous commit. 769 tests. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S5AfgnF6gZnJxdMEfGrEPc
|
All three fixed, and the first one exposed a hole in the test I added with it. Empty History view. Correct. The part worth flagging: my smoke test did not catch this even after I added an empty-project pass. Its stub returned a fresh node for any id, so every Tab race. Correct. Each The resetting age. This is the one I am glad you caught, because it made the freshness claim itself dishonest. Two existing freshness tests aged the file, which is the mechanism this removes, so they age the checkpoint now. A new test asserts a branch switch does not reset the age, and it fails on the previous commit. 769 tests. |
The page had eight nav views, an inspector and an activity drawer, and none of them answered the question someone opens it to ask.
I probed the running server before changing anything. The API was healthy: all eleven endpoints returned data. So "a lot not working" was the front end, plus panels that render blank because their data is empty by design.
The deeper problem: the GUI was a control panel for orchestration (teams, providers, worktrees, ROI, flight records) while everything Continuum is actually for had no UI at all.
branchandmergeappeared inapp.jsonly as Git worktree branches.Four tabs
Backed by
/api/now,/api/checkpoints,/api/diff,/api/blame,/api/notesand/api/branches. A bad checkpoint reference returns 400 carrying the same message the CLI gives, not a 500.Empty sections now say what would fill them.
Two tests that could not fail
Worth reading even if you skim the rest, because both are the failure mode I keep flagging in review.
tests/ui_smoke.jsrenders every view against fixtures through a stub DOM. My first version let aTypeErrorescape the async body, which skipped the reporting and exited 0 against a completely brokenapp.js. It now fails on any throw. Verified by emptyingapp.js(exit 1) and by removing the escaping (exit 1), then restoring (exit 0).test_app_js_escapes_user_controlled_trust_valuesasserted a list of specific interpolations from the old views. Deleting those views would have made it pass for the wrong reason. It checks the rule instead: no data field may be interpolated withoutesc(). Verified by unescaping one field and watching it fail.Escaping matters here because every string on the page is recorded by an agent or typed by a person, so none of it is trusted markup.
Verification
Served the repository's own code and drove it, rather than trusting the installed copy, which shadowed the rewrite twice and made the new endpoints look like 404s.
768 Python tests. The smoke test is wired into both workflows next to
node --check, since parsing is not rendering.