FEAT: read-only web Sessions command centre and quota trails - #51
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Trail identity can mix distinct quota windows, and session controls contain incorrect or incomplete behavior.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds read-only session navigation, persistent browser preferences, and server-memory quota trails.
Changes:
- Introduces bounded quota observation trails.
- Expands session detail, selection, attention, and responsive navigation.
- Persists validated browser preferences and updates documentation/tests.
File summaries
| File | Description |
|---|---|
web/tests/browser.spec.ts |
Adds browser regression coverage. |
web/src/style.css |
Adds session layouts and attention styling. |
web/src/state.svelte.ts |
Adds trails and restored landing routes. |
web/src/Sessions.svelte |
Implements session command-centre navigation. |
web/src/Quota.svelte |
Connects persisted views and trails. |
web/src/preferences.svelte.ts |
Adds validated preference persistence. |
web/src/ConsumptionZone.svelte |
Renders quota trails and gaps. |
web/src/App.svelte |
Tracks primary-tab preferences. |
README.md |
Documents behavior and boundaries. |
intro-post.md |
Summarizes new web features. |
internal/web/zone_test.go |
Tests trail lifecycle and bounds. |
internal/web/state.go |
Collects in-memory quota trails. |
internal/web/dist/index.html |
References rebuilt assets. |
internal/web/dist/assets/index-DvsGTQlj.css |
Removes obsolete stylesheet. |
internal/web/dist/assets/index-CNZdZr3a.css |
Adds rebuilt stylesheet. |
internal/web/dist/assets/index-C0ckR7Cr.js |
Adds rebuilt application bundle. |
internal/web/dist/assets/index-BsZ4bZdB.js |
Removes obsolete application bundle. |
Review details
- Files reviewed: 12/17 changed files
- Comments generated: 4
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Full-detail links violate the documented Back behavior, and quota trails lack an equivalent accessible representation.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
web/src/Sessions.svelte:257
- Browser Back does not return this session to wide detail as promised: this link enters full-page detail without changing a graph-only or split layout, so going back restores the old level. Set level 2 before navigating, as the Escape and “ALL SESSIONS” paths already do.
<a
class="button"
href={'#/sessions/' + encodeURIComponent(session.id)}
onclick={() => select(session.id)}>FULL DETAIL →</a
web/src/Sessions.svelte:275
- This approval link can be opened from split detail, but it does not promote the row to wide detail first. Consequently browser Back returns to split detail rather than the documented wide detail state; update the layout in the click handler before navigation.
{#if !stale && session.status === 'APPROVAL NEEDED'}<a
class="attention-badge"
href={'#/sessions/' + encodeURIComponent(session.id)}
>APPROVAL IN CODEX ↗</a
- Files reviewed: 12/17 changed files
- Comments generated: 2
- Review effort level: Balanced
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.
Why
Build on the merged experimental web interface with a more useful read-only Sessions command centre and a record of observed quota movement, before introducing any browser actions. Keep terminal behaviour and the existing security boundary unchanged.
Included
Boundaries and caveats
--web.--web-portis needed to reliably retain them across launches. Stored layout/selection IDs are documented; replies, commands, trails and Codex credentials are not stored in localStorage.Validation
make -j4 web-test: production frontend check/build, embedded Go build and all 20 Playwright tests passed (18 browser + 2 calendar), including aggregate totals, agent double-count prevention, live updates, disappearing sessions, stale/empty lists, narrow-screen layout, global detail controls for 105 sessions, keyboard-accessible trail tables and browser Back from every full-detail entry control.go test -race -cover ./...passed (web coverage 95.3%). Additional uncached web/launch tests passed; new tests cover trail bounds, reset/duration/counter/time changes, account changes, failed reads and removed windows. Review regressions cover identically labelled limits and windows, renamed labels, primary-window removal and server-only identity disclosure prevention.Review fixes
Commit
fd1a0b8addresses all four initial review findings: server-only LimitID/kind/primary-secondary trail identity, global detail defaults independent of the 100-entry per-session history, approval-specific instructions and singular observation captions. Global show/hide clears overrides and also sets the default for newly observed sessions; documented and tested.Commit
86e45acaddresses the follow-up review: an expandable accessible observation table exposes timestamps, consumption, elapsed time and gaps; central full-detail route entry records the selected wide row so browser Back matches Escape/All Sessions regardless of entry control.-race;go vet ./...passed.Try it
./codexometer --web --demo --web-port 8765 # Or with your existing local/shared-daemon Codex observations: ./codexometer --web --web-port 8765Open the private pairing URL printed by the process. Try Quota → Consumption Zone and Sessions → row arrow controls. Let quota polling run to grow a trail. Stop the process before launching the other command on the same port.