Skip to content

Rebuild the control centre around where the project stands - #74

Merged
00PrabalK00 merged 2 commits into
mainfrom
feat/gui-rebuild
Aug 4, 2026
Merged

00PrabalK00 merged 2 commits into
mainfrom
feat/gui-rebuild

Conversation

@00PrabalK00

Copy link
Copy Markdown
Owner

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. branch and merge appeared in app.js only as Git worktree branches.

Four tabs

  • Now — where the project stands, in the biggest type on the page, with age, drift against the recorded commit, decisions, and unresolved questions.
  • History — checkpoints, a diff between any two, blame search.
  • Notes — decisions, hypotheses and facts, with open ones marked.
  • Advanced — everything else, demoted rather than deleted.

Backed by /api/now, /api/checkpoints, /api/diff, /api/blame, /api/notes and /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.js renders every view against fixtures through a stub DOM. My first version let a TypeError escape the async body, which skipped the reporting and exited 0 against a completely broken app.js. It now fails on any throw. Verified by emptying app.js (exit 1) and by removing the escaping (exit 1), then restoring (exit 0).

test_app_js_escapes_user_controlled_trust_values asserted 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 without esc(). 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.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread continuum/ui/app.js Resolved
Comment thread continuum/ui/app.js Resolved
Comment thread continuum/control_center.py Resolved
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
@00PrabalK00

Copy link
Copy Markdown
Owner Author

All three fixed, and the first one exposed a hole in the test I added with it.

Empty History view. Correct. renderHistory returns an empty state with no search controls, and wireHistory ran unconditionally, so getElementById("blame-go").addEventListener threw and the catch replaced the guidance with an error. Wired only when there are checkpoints now.

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 getElementById succeeded where a browser returns null, and the empty state inherited controls the populated view had drawn. The stub now returns null for an id absent from the current render, and caches nothing across renders. I verified the fix by restoring the unconditional wiring and watching the test fail on exactly this.

Tab race. Correct. Each load() takes a generation and drops its result if another has started, so a slow response cannot overwrite the tab you moved to.

The resetting age. This is the one I am glad you caught, because it made the freshness claim itself dishonest. history.switch() rewrites latest_handoff.md, so returning to a branch whose last real work was weeks ago reported it as recorded today. Freshness that resets itself is worse than none, since it is the one number here whose entire job is to be doubted. The age comes from the newest checkpoint's created_at, with the file mtime kept only as a fallback for a handoff with no checkpoint behind it.

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.

@00PrabalK00
00PrabalK00 merged commit 23bfb11 into main Aug 4, 2026
12 checks passed
@00PrabalK00
00PrabalK00 deleted the feat/gui-rebuild branch August 4, 2026 16:40
@00PrabalK00 00PrabalK00 mentioned this pull request Aug 4, 2026
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