Skip to content

fix(editor): improve recovery and interaction responsiveness - #296

Merged
chaxus merged 15 commits into
mainfrom
fix/reliability_and_responsiveness
Oct 26, 2026
Merged

chaxus merged 15 commits into
mainfrom
fix/reliability_and_responsiveness

Conversation

@chaxus

@chaxus chaxus commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Merge Verdict

[APPROVE] — Focused fixes preserve editable documents and recoverable conversations, with separate functional commits and regression coverage.

Summary

  • Keep editable originals unsaved after other-format exports; restore usable controls after failed opens; preserve history search focus and reject stale results.
  • Recover chat conflicts without overwriting either version, and finish healthy dictation gracefully at its duration limit.
  • Move spreadsheet parse/write work into cancellable local workers and avoid repeated serialization of unchanged chat conversations.

Risk Analysis

Risk Mitigation
Save completion hides unsaved source edits PDF-export regression plus subsequent ordinary-save verification; existing source/version guards retained
Conflict recovery overwrites another tab or a late controller writes into restored originals Preserve all local variants, invalidate old history handles, keep saving disabled until explicit opt-in, retain database revision checks
Worker cancellation or offline loading strands an open Per-operation timeout/abort/cleanup; no failure-time synchronous retry; precache worker and local SheetJS; legacy Worker-absent compatibility path
Cached serialization misses external mutations Cache only owned deeply frozen plain-data snapshots; mutable/exotic inputs remain uncached

Design Decisions

  • Functional commits remain separate as requested.
  • Conflict recovery leaves local copies in memory and requires re-enabling saving; it never silently changes the user's persistence preference.
  • Spreadsheet decoding remains on the main thread for encoding compatibility; SheetJS parsing and writing run in a worker.
  • Conversation schema, first-load behavior, CPU-model teardown and full-format offline preparation remain unchanged.

Code Concerns

No outstanding blocking findings from the completed source/caller review. Physical microphone accuracy and actual GPU generation latency are outside this change's verification scope.

Verification

  • 6,844 unit tests across 256 files passed, including configured coverage thresholds.
  • Workspace lint/types, formatting and production build passed; 1,511 immutable evaluation artifacts verified.
  • Targeted regression probes failed before the fixes; real vendored SheetJS round trips Chinese CSV and HTML tables without a DOM.
  • 3 additional checks passed on the immutable Cloudflare preview (search focus, large conversion responsiveness and first offline conversion).
  • 37 Chromium production-build tests passed: four-editor dictation, conversation history, document history keyboard focus, failed-open recovery, CSV encodings, responsive large conversion and first offline conversion.
  • Controlled fake-IndexedDB benchmark (1,000 conversations, 20 approximately 1 KB messages each): repeated single-conversation saves measured 11.09 ms median before prepared snapshots versus 0.60 ms with preparation. Initial preparation is excluded; these are not browser storage or model-latency claims.

Conclusion basis

Verified: unit regressions, coverage, static checks, production build and the measurements above. Remaining limits: physical speech recognition, real GPU latency, full-history lazy loading and weak-network offline preparation redesign.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Deploying document with  Cloudflare Pages  Cloudflare Pages

Latest commit: bce998d
Status: ✅  Deploy successful!
Preview URL: https://cf952787.document-7hm.pages.dev
Branch Preview URL: https://fix-reliability-and-responsi.document-7hm.pages.dev

View logs

chaxus and others added 6 commits October 26, 2026 19:03
public/libs/** was ignored wholesale, which also took this repo's own
convert.worker.js out of oxlint. Ignore only the vendored SheetJS bundle,
and check that sw.js and the worker match no ignore pattern; the check
fails against the old configuration.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-coupled files

convert.worker.js has a fixed name but a message protocol that changes with
the app bundle posting to it. It was precached into the runtime cache and
served stale-while-revalidate, so the first CSV or HTML-table conversion
after a deploy that changed the protocol ran against the previous worker.
List it in DEPLOY_COUPLED and the no-cache header group, and precache it
with this build's core, where the network-first offline fallback reads.
The routing and precache tests fail without the change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
xlsx.full.min.js was precached into the runtime cache, but it is not under
the vendor trees, so when a deploy that leaves vendor unchanged activates with
no window open, pruneAppAssets deleted it and the first offline CSV or
HTML-table conversion failed. Precache it with the worker in core; the
stale-while-revalidate branch reads through caches.match and still finds it.
The precache test fails with the runtime-cache placement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chaxus
chaxus merged commit 2c26ad7 into main Oct 26, 2026
19 checks passed
@chaxus
chaxus deleted the fix/reliability_and_responsiveness branch October 26, 2026 13:01
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