Skip to main content

Dashboard performance and Codex paging delivery

This record covers every source change developed after baseline commit e632b13 (merge: desktop UI polish and canonical docs). It joins two independent optimizations in one release candidate:

  • the browser Dashboard keeps Three.js display-refresh rendering while moving telemetry presentation and status work onto a change-aware 10 Hz path; and
  • the native Codex source paints bounded task and transcript pages immediately, then uses explicit continuation and App Server-backed search for older data.

Neither change alters the telemetry schema, simulation contract, Codex settings schema, backend, database, dependency set, shader, particle buffers, or native Chat ownership rules. The browser remains Three.js plus Rust/WASM. The desktop remains native Rust/GPUI.

Delivered browser behavior

Rendering and telemetry

The animation loop still advances the Rust/WASM simulation, renders WebGL, updates Stats.js, and accounts for frames inside requestAnimationFrame. Presentation work now has a separate cadence:

  1. brain-ui.ts samples the public telemetry snapshot every 100 ms.
  2. The sample always updates shared Chat/context state.
  3. Dashboard, Chat, and lil-gui branches render only when their owning surface is visible.
  4. Shared DOM helpers compare the old and new text, attribute, class, or style value before mutating the element.
  5. exepert:workbench-view-change forces one immediate refresh when a hidden surface becomes visible.

The Brain status bar retains per-frame FPS accounting but formats and writes its visible status no more than once per 100 ms. It reuses resize-owned dimensions, cached number formatters, and its last rendered string. It no longer performs a per-frame getBoundingClientRect() call. Hidden Brain surfaces receive no status mutations.

lil-gui no longer combines per-frame controller refreshes with duplicate .listen() polling. Its three live information controllers refresh from the same 10 Hz telemetry tick and write only changed values.

Rust/WASM rolling windows

Frame-level telemetry samples remain unchanged. The simulation no longer scans the retained history three times on every simulation frame. A snapshot request now computes the 1 s, 3 s, and 15 s windows together in one reverse traversal, anchored to the newest sample timestamp. Paused behavior, empty-history zeros, all serialized field names, and the JavaScript contract remain unchanged.

Responsive shell

The browser activity rail now uses one 36px width token, 32x32 controls, 18px glyphs, and 4px spacing while preserving IDs, tab semantics, roving focus, arrow navigation, titles, labels, settings behavior, and the lime active indicator.

At 960 px and below, the top navigation is a fixed 56 px non-wrapping row. Below 720 px, the EXEPERT wordmark stays visible while the AI LAB subtitle hides. Below 380 px, only the wordmark hides; Explain, account, version, and FPS controls remain. Account and version popovers use viewport-clamped dimensions, including short landscape viewports, and the shell prevents document-level horizontal overflow.

Workbench initialization is detached from expensive WebGL/WASM startup so the activity rail becomes interactive as early as possible. Concurrent anonymous session requests are coalesced into one in-flight operation, preventing early Chat and Arcade setup from racing each other.

Delivered native Codex behavior

Bounded catalog and mirror paging

Stored-task discovery requests the newest 50 tasks and publishes that first page immediately. Foreground and background polling refresh only page one. LOAD MORE TASKS is the only path that follows an opaque continuation cursor. Explicit Refresh replaces page one while preserving the last good catalog on failure.

A read-only mirror likewise paints one descending 50-item page before metadata or older history completes. The runtime continues to poll the live head with the existing 25-item overlap. LOAD OLDER HISTORY prepends one validated page without moving the reader's row bookmark. The newest contiguous 500-item cap, deduplication key, one-second/five-second polling cadence, and read-only ownership boundary remain intact.

Task search uses the typed thread/search read contract and presents 50 sanitized results per page. When the method is unavailable, the UI falls back truthfully to title-only matching over the loaded catalog.

Mirror search uses thread/searchOccurrences. A hit already present in the loaded mirror jumps to its stable row. An unloaded hit is hydrated through a single inclusive thread/turns/list request using the runtime-owned turnCursor; the returned thread, turn, and item IDs must match before focused context is shown. BACK TO LATEST restores the still-live mirror and its bookmark. Unsupported occurrence search falls back to the loaded window only. That fallback is capped and labeled as a 50-result loaded-window view rather than complete server coverage.

Result controls use stable server/task/turn/item identities rather than result indexes. A background hydration produces one pending focus jump, consumed only for its exact server and task, so revisiting a server cannot replay an old jump or replace a restored scroll bookmark. Mirror-search drafts are likewise keyed by server and task instead of leaking between mirrored tasks.

Protocol, state, and privacy hardening

The protocol adapter adds typed task-search, occurrence, and UTF-16 range parsers. It preserves opaque cursor bytes internally, rejects empty or oversized cursors and pages above 50 rows, validates IDs, bounds snippets, remaps match ranges after sanitization, and drops untyped or hidden content.

Runtime-owned server, selection, query, and request epochs reject stale responses. Repeated continuation commands coalesce, repeated cursors fail safely, queue failures roll back loading state, and capability failures degrade only the requested search or paging surface. The established fallback order is unchanged:

  1. thread/items/list;
  2. thread/turns/list with full items; and
  3. a bounded thread/read snapshot.

Every fallback binds the raw response to the requested thread, turn, and item before presentation. Duplicate focused items and malformed pages are rejected; the last good rows and fidelity remain visible, while a head-refresh error is surfaced separately. When the 500-row resident cap drops older content, the UI reports that omission instead of implying a complete mirror.

Cursors, snippets, results, focused context, and mirror pages remain process-local. Diagnostics redact cursor- and search-shaped content and never persist raw pages, credentials, hidden reasoning, or transcript text.

Complete source inventory

Browser application and Rust/WASM

PathResponsibility
css/app.cssShared 36 px rail, compact controls, fixed mobile header, breakpoint branding, popover containment, focus styling, and overflow guards
rust/brain_sim/src/lib.rsSnapshot-time single-pass 1 s/3 s/15 s rolling windows and deterministic fixtures
src/auth/session.tsOne in-flight anonymous-sign-in operation shared by concurrent callers
src/brain-ui.ts100 ms sampling, visible-surface presentation, cached formatting, and immediate view-change refresh
src/gui.tsTick-driven information-controller refresh without .listen() or per-frame updates
src/main.tsEarly, independent activity-rail initialization
src/run.tsRemoval of per-frame GUI presentation work while preserving simulation/render/stats work
src/scene.tsCached stage dimensions, status visibility, 100 ms status writes, and change-aware status text
src/ui/dom-updates.tsShared change-aware DOM mutation primitives
src/ui/workbench-events.tsStable workbench view types and exepert:workbench-view-change contract
src/ui/workbench.tsIdempotent setup, shared view definitions, and post-transition event publication
src/__tests__/auth-anonymous-dedupe.test.tsConcurrent authentication and retry contracts
src/__tests__/dom-updates.test.tsNo-op and changed-value DOM mutation contracts
tests/e2e/arcade.spec.tsAuthentication-attribution stability during shared shell startup
tests/e2e/journals.spec.tsCurrent six-tab ordering and roving-focus contract
tests/e2e/responsive-workspace.spec.tsRequested viewport matrix, popovers, keyboard focus, 10 Hz cadence, hidden-surface mutations, and status-write bounds

Native Codex client

PathResponsibility
desktop/exepert-desktop/src/app.rsNative task/mirror search inputs, explicit paging controls, loading/error/empty states, focused occurrences, bookmark restoration, and stable accessibility IDs
desktop/exepert-desktop/src/codex/diagnostics.rsRedaction of cursor- and search-shaped diagnostic values
desktop/exepert-desktop/src/codex/protocol.rsTyped search DTOs, cursor/page/range validation, snippet sanitization, and read-firewall additions
desktop/exepert-desktop/src/codex/runtime.rsFirst-page publication, explicit continuations, server search, focused hydration, cursor ownership, epochs, coalescing, and local fallbacks
desktop/exepert-desktop/src/codex/state.rsBase/search catalogs, mirror paging/search state, focused transcript scope, bounded reducers, and stale-event rejection
desktop/exepert-desktop/src/ui/codex_transcript.rsSearch-focused row kind and scroll targeting
desktop/exepert-desktop/src/ui/transcript.rsExplicit bookmark restoration helpers and tests
desktop/exepert-desktop/tests/codex_replay.rsMulti-page, search, deep-hit, stale-response, and sanitization replay coverage
desktop/exepert-desktop/tests/codex_ux_contract.rsStable IDs, labels, loading states, explicit controls, and privacy contracts
desktop/exepert-desktop/tests/fixtures/codex/lazy_paging_search.jsonlDeterministic first-page, continuation, search, and focused-occurrence protocol fixture

Specifications and maintained documentation

PathResponsibility
_bmad-output/implementation-artifacts/spec-web-dashboard-performance-responsive-shell-polish.mdApproved web intent, acceptance matrix, verification evidence, and review order
_bmad-output/implementation-artifacts/spec-codex-mirror-lazy-paging-server-search.mdApproved native intent, review repairs, acceptance evidence, and review order
docs-site/docs/architecture/native-codex-client.mdCurrent lazy discovery, mirror paging, search, fallback, and privacy architecture
docs-site/docs/ui-guide/overview.mdCurrent browser telemetry cadence and compact shell behavior
docs-site/docs/desktop/dashboard-codex-paging-delivery.mdThis exhaustive delivery and validation record
docs-site/docs/desktop/overview.mdDesktop delivery-record entry point
docs-site/docs/index.mdProject-knowledge retrieval link
docs-site/sidebars.tsDesktop Delivery records navigation entry

Current documentation is updated in place. The frozen 0.2 documentation, generated WASM package, build outputs, packaging, dependencies, database, deployment configuration, and reference repositories are not changed.

Compatibility and security invariants

  • WebGL remains classic, synchronous, and display-refresh driven.
  • Telemetry remains accurate at 10 Hz and keeps every existing public field.
  • Hidden presentation is skipped; telemetry sampling itself never stops.
  • Workbench IDs, data-workbench-view values, keyboard behavior, and ARIA state remain compatible.
  • Codex automatic reads never resume, fork, mutate, approve, steer, interrupt, or take ownership of a task.
  • Take Control, Fork, and Stop Mirror retain their acknowledged behavior.
  • Search and pagination state is process-local and server-qualified.
  • No transcript, query, snippet, cursor, credential, or hidden reasoning is written to settings, diagnostics, Supabase, or another persistent store.

Verification record

The browser candidate passed strict TypeScript, deterministic Vitest, Rust workspace tests, the production Vite/WASM build, the changed production Playwright suites, and whitespace validation. The new responsive/telemetry contracts passed at 320, 360, 390, 417, 768, and 1440 px. A broad offline development Playwright run also exposed five existing structured-research tests that require an authenticated global fixture; they are not represented as offline passes.

After the final reviewer repairs, the native Codex candidate passed 128 focused Codex tests, 3 deterministic replay tests, 17 UX contracts, strict Clippy, and Rustfmt. The release task then repeated the full locked desktop workspace: 434 library tests plus every integration suite passed. The optimized Windows release build and both ignored native GPUI renderer/virtualization smoke tests also passed again against the frozen files, with the smoke tests run serially.

The documentation candidate passed Docusaurus typecheck/build using direct commands so the activity calendar was not regenerated.

These automated checks do not certify a physical GPU frame rate or every native input device. A warmed interactive browser trace is still required before claiming Dashboard median 60 FPS, 80% of the same-session Arcade median, or 16.67 ms main-thread p95. Native mouse, precision-touchpad, and keyboard review of deep Codex search and older-history anchoring remains a manual release check.

Maintainer review order

  1. Read the two implementation specifications for accepted intent and review history.
  2. Review src/brain-ui.ts, src/scene.ts, and src/ui/dom-updates.ts together before the CSS and browser contracts.
  3. Review rust/brain_sim/src/lib.rs to confirm snapshot-time aggregation keeps the public telemetry shape.
  4. Review codex/protocol.rs, then codex/runtime.rs, then codex/state.rs before the GPUI integration in app.rs.
  5. Compare the deterministic Codex fixture with replay and UX contracts.
  6. Read the current architecture/UI pages and this delivery record before accepting release or performance claims.