Skip to content

fix(web): harden recovery and preview reliability - #893

Merged
tt-a1i merged 23 commits into
mainfrom
codex/web-acceptance-fixes
Oct 23, 2026
Merged

tt-a1i merged 23 commits into
mainfrom
codex/web-acceptance-fixes

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Real Web acceptance exposed recovery paths that could leave controls blocked, restore stale state, lose a queued refresh, or hide incomplete content. Examples include a failed archive refresh losing Undo, a focus refresh arriving during Git pagination being dropped, and XLSX preview limits silently displaying omitted cells as blank. Large subagent details could also lose the identity needed to render their result card.

The Web UI lacked a way to distinguish the backend's startup source from the currently loaded page build when diagnosing these failures.

Value

Users retain their current Session, confirmed settings, and retry paths after delayed or failed operations. Previews report their limits, and operators can inspect the runtime and page identities used for acceptance. Terminal dependencies load only when the terminal is opened.

Approach

  • Preserve bounded subagent display identity when detailed evidence is truncated.
  • Extract transcript reconciliation and thinking coordination, then enforce Session, request, revision, and generation ownership through asynchronous recovery, cancellation, and pending writes.
  • Repair provider-login reads, appearance rollback, automatic read acknowledgements, archive Undo, live-stream connection recovery, and Git refreshes queued behind pagination.
  • Make document, Mermaid, image, PDF, and terminal loading failures recoverable; report XLSX cell and row clipping without warning on an exactly complete budget.
  • Add authenticated, read-only startup diagnostics and a content-derived production page build identity, with a settings view and documented limits. Rebuild the committed distribution.

Validation

  • Acceptance head: e5dba44faa0a16f57fc19b3a6b62f20d25c1c559; base: ea4dfb993793ccdb093229588b6ccd3467afd90a (main), with no intervening base commits at PR preparation.
  • bun run check passed, including Web build, formatting, lint, and type checks.
  • bun run test passed: 2,367 Node tests, 8 skipped; 1,583 Web tests across 103 files.
  • Targeted regressions and independent review accompanied the fixes. The final XLSX regressions fail on the previous implementation and pass with the fix, including an exactly complete 20,000-cell control.
  • Ego Lite acceptance was performed during the corresponding fix batches using current-source WebHost instances and persisted Pi Sessions. Covered document/Mermaid recovery, archive Undo, live connection recovery, and real Git pagination with 205 modified files and revision drift.
  • Final-build XLSX acceptance covered long-cell clipping, a partially read final row, and complete-sheet controls. Browser-served application and worker hashes matched the local build. Downloads matched the original XLSX bytes and retained the omitted content.
  • Raw local acceptance evidence is retained outside Git; no private Session data or raw logs are included. These controlled fixtures do not establish provider-backed model execution or full cross-browser E2E acceptance.

Latest CI follow-up: ce08a149 replaces string equality for real package paths with platform-aware path.relative, and exercises a lower-case Windows drive spelling. Terminal-loading fixtures preload the real terminal once and wait for the loader factory event, avoiding repeated cold graph loads and the 1-second DOM polling race while retaining focus, unmount, failure and close assertions. Local bun run check, runtime diagnostics tests (2), and terminal-loading tests (5) passed. Follow-up 4b0a084b uses native realpath to resolve Windows 8.3 aliases (such as RUNNER~1) before comparison. Local runtime tests passed again, and the previously failing Windows parallel 2/2 and Ubuntu Node 22 UI jobs now pass on the latest head. All checks on 4b0a084b subsequently passed, including both browser shards and Windows UI; the failed provisioning step and Windows test timeout were rerun without weakening tests.

Latest-main integration: 31bb7b9c merges main a218ded6 (#895). Source files merged automatically; the generated application bundle was rebuilt from both source trees. Local bun run check and bun run test passed again (UI: 103 files, 1584 tests); remote checks on this updated head are in progress.

Impact

  • User-visible: More reliable recovery and result cards, explicit partial-table warnings, on-demand terminal loading, and a read-only runtime information panel.
  • Model-visible context/tools: No new tools or model instructions. Subagent display projection retains bounded identity fields without expanding the detailed evidence budget.
  • Runtime/lifecycle: Client operations reject stale results and preserve ownership. /api/diagnostics adds startup metadata; it samples the package source once and does not attest to every loaded module or refresh after reload.
  • Persisted config/data: No new preference schema, Session format, or data migration. Production distribution gains build-info.json and embedded build identity.
  • Compatibility/risk: Existing authority and trust boundaries remain. Non-Git installations and unavailable Git report unknown provenance; development builds have no production build ID. Async UI and chunk-loading behavior remain the main regression surfaces covered by the targeted tests and acceptance.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 22, 2026
@tt-a1i
tt-a1i merged commit faec93e into main Oct 23, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant