Skip to content

fix: preserve Viewed session marks when storage writes fail - #519

Draft
BunsDev wants to merge 1 commit into
mainfrom
viewed-storage-recovery
Draft

BunsDev wants to merge 1 commit into
mainfrom
viewed-storage-recovery

Conversation

@BunsDev

@BunsDev BunsDev commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

When localStorage rejects a Viewed write, the next toggle currently reconstructs state from stale storage: marking B loses A, and a later toggle can resurrect an unmarked file. This retains only failed writes in a storage-object-scoped session fallback, persists accumulated changes on the next successful write, then resumes ordinary storage reads. Account/repository/PR/revision boundaries and the existing 200-PR/3000-path bounds remain. This follows the reproduced #506 review finding and keeps #324’s remaining acceptance gates open.

Four new unit cases and an actual-controls Electron quota case were observed failing against unchanged production code, then passed after the repair. The 22 workspace tests cover session marks/unmarks, denied reads, persistence recovery, separate storage objects, account/revision isolation and bounds. Both Viewed Electron cases passed. One independent read-only review found no Critical or Important code finding; the interim receipt wording has been refreshed with actual results.

Build and typecheck passed; full units passed with 2,583 passes, 36 skips and zero failures/cancellations. The first canonical local desktop E2E run failed: 522 passed, 17 skipped and one existing draft/account-isolation case returned unexpected extra text after an exact fill. Its cause remains unestablished, and its log/trace are retained. The unchanged failed case then passed once in 4.9 seconds; the complete actions/diff specs passed 50 cases in 2.0 minutes, followed by separate site eight and web four passes. Those additional results do not turn the first canonical run green or establish a causal repair. The dated receipt preserves all first failures and scope limits.

Signed source a92560cfa9be18fde213878b670a2c41955f3246 has now passed all twelve source checks, including macOS, Linux/Windows installer builds and the source iPhone suite. The complete source macOS job passed 2,583 units with 36 skips, 526 desktop cases with fourteen skips in 33.1 minutes, eight site cases and four web cases, with zero failures/cancellations or observed retry annotations. All four downloaded artifacts match their API SHA-256 digests and pass ZIP integrity. The tested preview tree b32cf180ef158e58622c40433c61e597a8b597bd is independently reproduced from its recorded parents. A clean projection onto current main b6e3026 changes only two documentation files from that tested source. The original local draft/account anomaly remains unexplained and retained; the fresh complete hosted suite qualifies the current behavior without establishing a causal repair or turning the old run green. The source signature and independently restored recovery bundle remain verified. This PR is still draft; the ready transition and protected queue/actual merge remain pending, and no queue request has been made. Local session fallback does not survive renderer restart while persistence fails, and concurrent-writer convergence is not promised. Native/live/human acceptance, release and default activation remain separate.

Preserve failed local writes per storage object until persistence recovers, without changing revision or account boundaries. Add RED-to-GREEN unit and Electron regressions. Retain the first full E2E failure and subsequent unchanged affected-suite results; draft publication awaits full hosted qualification.
@vercel

vercel Bot commented Nov 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Nov 12, 2026 10:37pm UTC
modex-app Ready Ready Preview Nov 12, 2026 10:37pm UTC

Request Review

@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main e6e644e viewed-storage-recov... a92560c +/-
65% 65% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

This branch was successfully deployed

1 active deployment
Preview – modex — a92560cf Deployed Nov 12, 2026 by vercel[bot]
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