Skip to content

feat: add named held pages with conflict-safe saving - #48

Merged
nkanf-dev merged 3 commits into
mainfrom
dev/reading-workspace-continuity
Oct 4, 2026
Merged

nkanf-dev merged 3 commits into
mainfrom
dev/reading-workspace-continuity

Conversation

@nkanf-dev

@nkanf-dev nkanf-dev commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

User-facing changes

  • Add a separate pencil editor for held-page names and notes, planned in the original P1 reading workflow. Chinese IME, 80/500 Unicode-code-point limits, blank-name reset, save/cancel/Escape and accessible descriptions are covered.
  • Preserve drafts while consulting other pages/cards/windows. Retire only obsolete document/list/page ownership or explicitly dismissed surfaces; preserve legacy over-limit data and original PDF bytes.
  • Prevent an older browser tab from silently replacing a newer reading scene. Conflicts keep both local and stored content, pause saving/transitions and keep exit warnings. Reload and overwrite each require an explicit choice bound to the displayed stored revision.

Persistence and integration

  • IndexedDB read/compare/write plus lightweight metadata update are one transaction. Same-opening queued writes advance their cursor only after success; identical owned saves are no-ops. Optional record revision needs no database-version migration or PDF rewrite.
  • Late PDF links and held-page clicks cannot override an accepted restored scene. Newer link activation retires older held reads before asynchronous resolution. Rollback restores content while ownership generations remain monotonic.
  • Shared contracts: heldStore.updatePageMetadata, PersistenceService.saveWorkspace(snapshot, expectedVersion), and workspaceStore.resolveWorkspaceConflict. App wiring and inline editor stay within these boundaries.
  • Main 78ad266 CJK/font assets, long-filename layout, pointer/keyboard link handling, full-contrast header controls and all quality gates are retained.

Validation

  • Current tree 5fda2020d3bc44392f8cbe0454fc5c373551c6ae passed lint, TypeScript/build (including isolated forced check), 226 unit tests, 370 UI tests and deployment dry-run.
  • Separate and integration reviews found and verified fixes for exact-version reload, draft retention through real card actions, stale reference/held intent after restore, rollback token retirement and inert-card focus recovery.
  • New normal browser coverage uses generated fixtures and real competing tabs: metadata save/reopen/source hashing across six projects; stale auto/manual/hidden saves; exact-version reload/overwrite/cancel; interrupted reads; different-book scope; 390/768px Chinese controls and screenshots. The competing scenes now include separately edited names and notes.
  • Initial normal gate 37182421126 exposed two obsolete save expectations and Firefox driver composition ordering. The follow-up retains all assertions of intact PDF/rendering, explicitly proves no-op workspace writes=0, changed-save put then rollback/no-commit, and unread comparison failure preserving live and stored scenes until fresh consent.
  • Failed comparison recovery now offers an actionable fresh confirmation; narrow-screen conflict guidance gets its own text row. Native IME event order is attached even on failure, with normal Enter/Escape prevention and post-end legacy code 229 checked using native Enter default actions.
  • Gate 37183837843 passed with zero retries: 226 unit, 369 UI, Chromium/tablet/mobile 320, Firefox 159 + 10 stability, WebKit/mobile 225 + 20 stability. Visual inspection then identified a short-screen WebKit flex/ancestor-scroll issue clipping the Return reading row.
  • The narrow containment follow-up sizes the held panel to remaining flex space, fixes the return/header rows, and adds actual clipping-bound/outer-scroll/hit-target checks after scrolling plus repeated cancel/save/return at 320×568. Independent review and local 370 UI checks pass. Final exact-head gate 37185313360 passed every job with zero retries: 226 unit, 370 UI, Chromium/tablet/mobile 323, Firefox 160 + 10 stability, WebKit/mobile 227 + 20 stability. All 39 platform/feature-specific skips retained. Final short/narrow Chromium and WebKit screenshots visually confirm the return row stays fully visible, with editor scrolling confined to content. Cloudflare preview build also succeeded; no expected-failure/diagnostic push.

Scope and limits

35 files: production App, held-page editor/panel and metadata utility/store, persistence/workspace/window ownership, narrow existing navigation integration; shared domain/contracts, README and unit/UI/browser evidence. No dependencies, cloud sync, PDF upload, delete operation, thumbnail renderer change or reduced checks.
Existing pre-fix tabs can still run their old blind-write code; modern tabs detect those changes but cannot control old code. Browser execution here uses normal CI because local launch/loopback restrictions remain. Mobile coverage is emulation rather than physical-device certification. No personal document is in the repository or evidence.

Add accessible local names and notes with IME-safe editing, Unicode limits, legacy preservation and session-owned drafts. Compare workspace revisions atomically across tabs and preserve both scenes until an exact-version recovery choice. Retire obsolete reading intent across accepted scene replacement and verify metadata through competing saves.

Co-authored-by: Codex <noreply@openai.com>
@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
leafspace 6608286 Commit Preview URL

Branch Preview URL
Oct 04 2026, 07:17 AM

nkanf-dev and others added 2 commits October 4, 2026 14:47
Preserve live edits and require renewed replacement confirmation after failed comparison reads. Verify no-op and changed-save transaction outcomes separately, and exercise native IME key suppression after recording completed Firefox insertion.

Co-authored-by: Codex <noreply@openai.com>
Size the held panel to the remaining flex space and keep its return and heading rows fixed. Verify clipped text bounds, outer scroll offsets, hit targets and repeated editing at narrow short viewports.

Co-authored-by: Codex <noreply@openai.com>
@nkanf-dev
nkanf-dev marked this pull request as ready for review October 4, 2026 07:40
Copilot AI balanced review requested due to automatic review settings October 4, 2026 07:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@nkanf-dev
nkanf-dev merged commit fb8356d into main Oct 4, 2026
6 checks passed
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.

2 participants