Repository navigation
Improve startup animations, slash-command menus and quota accounting - #82
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
A missing cumulative token total can corrupt accounting, and startup intercepts Shift-modified shortcuts.
2 open findings
What changed in this PR
This PR adds startup entrances to the terminal and browser dashboards, simplifies session-speed selection, and makes quota accounting distinguish synthetic context fills from response usage.
Changes:
- Add animated block-logo entrances and an SVG browser header.
- Show advertised speed tiers in a picker with explicit application.
- Refine usage diagnostics and quota-learning restart reasons.
| File | Description |
|---|---|
| web/tests/browser.spec.ts | Tests startup and speed-picker behavior. |
| web/src/wordmark.ts | Defines logo artwork and entrance timing. |
| web/src/style.css | Hides the dashboard during startup and sizes the header logo. |
| web/src/Startup.svelte | Runs the browser entrance. |
| web/src/SessionCommands.svelte | Adds the speed picker and selection styling. |
| web/src/BlockLogo.svelte | Renders the SVG block logo. |
| web/src/App.svelte | Integrates startup and the new header logo. |
| README.md | Documents startup, speed controls, and accounting. |
| main_test.go | Extends accounting comparisons in tests. |
| internal/web/server.go | Prints terminal pairing hyperlinks. |
| internal/web/server_test.go | Tests hyperlink and plain-output behavior. |
| internal/web/dist/index.html | References rebuilt frontend assets. |
| internal/web/dist/assets/index-l8TP2B-n.css | Adds rebuilt frontend styles. |
| internal/web/dist/assets/index-ED7GoxW0.css | Removes superseded frontend styles. |
| internal/web/control.go | Marks prepared speed actions. |
| internal/web/control_commands.go | Reports verified speed-change success. |
| internal/web/control_commands_test.go | Tests bound, single-use speed commits. |
| internal/ui/view.go | Renders the terminal entrance before the dashboard. |
| internal/ui/startup.go | Implements terminal entrance animations. |
| internal/ui/startup_test.go | Tests entrance timing, rendering, and input. |
| internal/ui/quota_api_eq.go | Tracks new quota-accounting restart reasons. |
| internal/ui/quota_api_eq_test.go | Tests restart reasons and observation bracketing. |
| internal/ui/monitor_commands.go | Adds terminal speed selection and highlights. |
| internal/ui/monitor_commands_test.go | Tests terminal picker controls and styling. |
| internal/ui/model.go | Integrates terminal startup state. |
| internal/codex/session_commands.go | Adds picker metadata to command menus. |
| internal/codex/session_commands_unix.go | Lists advertised tiers and verifies writes. |
| internal/codex/session_commands_unix_test.go | Tests tier selection and write verification. |
| internal/codex/service_tier.go | Records pricing and usage issues. |
| internal/codex/live_usage.go | Classifies context fills and usage problems. |
| internal/codex/live_usage_test.go | Updates an accounting expectation. |
| internal/codex/live_usage_accounting_test.go | Tests synthetic fills and usage classification. |
| go.mod | Makes the terminal dependency direct. |
| docs/slash-command-support.md | Documents the speed picker. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.


The terminal and browser previously opened directly into their dashboards. Startup now randomly chooses one of three full-width CODEXOMETER entrances, then shrinks the completed wordmark into the header before revealing the dashboard. The browser header also uses the terminal's block lettering, rendered as SVG so it scales independently of installed fonts.
All three use the same letter slots and completed bitmap, followed by a 180 ms hold and 800 ms eased shrink/dock. Total playback is approximately 1.9 seconds for slide, 2.2 seconds for shuffle and 3.1 seconds for typing. Choice and shuffle order are retained throughout resizes, and elapsed-time progress catches up after delayed frames.
Data loading continues during the intro: terminal fetches and saved-view loading keep their handlers, while browser pairing and live snapshots start immediately. A key or left click skips, with input consumed to avoid activating hidden controls. In the terminal, q or Ctrl+C quits; inline mode and terminals smaller than 68 columns or eight rows open directly. The browser preserves modified browser shortcuts, including Shift+Tab, opens directly for reduced-motion preferences, honours a reduced-motion change during playback, and keeps the dashboard hidden and inert until the intro finishes. Navigation and stream reconnects never replay it; a fresh page load makes a new random choice. The responsive header remains a link to Quota → Bars and follows the saved theme. The browser animation sizes the SVG viewport directly at each frame and aligns its geometry with physical pixels, avoiding blurred compositor magnification of a tiny raster during entrance or docking.
The --web terminal launcher prints the complete private pairing URL as an explicit, underlined OSC 8 hyperlink, avoiding reliance on terminal URL detection. The visible text and target both include the full pairing fragment. Pipes, redirected files, non-terminal writers and TERM=dumb keep plain output. Ghostty on macOS still uses Cmd-click.
Speed commands such as /fast previously hid their choices behind a review screen, where arrows scrolled help instead of changing the speed. Both interfaces now show Standard (default) and every tier advertised for the current model in one list. Opening highlights the current speed; Up/Down moves a single bright, bold selection, while a separate CURRENT marker identifies the applied value. Enter stages the highlighted option without changing live settings, and C or the visible C CONFIRM button applies it. All model, reasoning, speed and other session-setting slash commands use this review/confirmation flow; repeated Enter never commits a change. The speed list remains visible during review; choosing another speed, cancellation or expiry invalidates its confirmation. Clicks select without applying, and the footer offers ENTER REVIEW and C CONFIRM controls. The backend uses advertised IDs, preserves model/reasoning and other sessions, and verifies the new settings before reporting success. Browser application retains bound, single-use prepare/commit tokens, with keyboard C scoped to the command panel so ordinary composer typing is preserved. Cancellation retains the draft, errors never automatically retry the write, and handled picker keys cannot trigger page navigation or copy actions. Other slash-command lists use the same selected/subdued styling.
Quota accounting previously treated every positive cumulative token increase as a completed response. Codex's synthetic context-window fill could therefore produce fake token/graph activity and restart API-equivalent learning as UNPRICED MODEL MIX, even for supported Astra/Fast usage. The reader now recognises the exact synthetic shape only with the advertised window, all explicit core token fields, zero token classes and the matching counter delta. It rebases without a response cost, observed-token increase or graph pulse, and conservatively restarts learning as LOCAL ACCOUNTING REBASED. Missing input/output data and inconsistent response/cumulative usage have separate monotonic counters and restart reasons; unavailable pricing uses UNPRICED USAGE. Per-call diagnostics retain the underlying issue. Token-count events without an explicit cumulative total are rejected before live, historical or inherited baseline handling, preventing missing/null data from being treated as a zero reset. Quota observation bracketing includes the new counters, so accounting changes cannot enter a clean sample. No model prices, tier premiums or subscription assumptions change.
Validation:
Accounting regression tests cover Astra xhigh Fast, upward/downward context fills, duplicate updates, pricing after a rebase, strict rejection of partial/ambiguous records, missing/null cumulative counters in live and historical scans and both inherited-child formats, genuine unknown model/tier pricing, missing/inconsistent usage, daemon schema errors, observation bracketing and recovery after five clean quota points, including a pro_500 plan key. The final core Go suite passes with race detection and coverage; go vet and Windows application/UI-test cross-builds pass. Local executable rebuilt.