Skip to content

Fix cross-tab project integrity and autosave ordering#343

Merged
Flow-Fly merged 8 commits into
developfrom
dev-337-project-integrity
Jul 11, 2026
Merged

Fix cross-tab project integrity and autosave ordering#343
Flow-Fly merged 8 commits into
developfrom
dev-337-project-integrity

Conversation

@Flow-Fly

Copy link
Copy Markdown
Owner

Summary

Closes #337
Closes #338
Closes #339
Closes #340
Closes #341
Closes #342

This project-integrity wave removes the remaining ways one drawing could mutate, save, or export another open tab.

  • isolate empty and soft-linked cels through one frame-explicit copy-on-write boundary while preserving deliberate hard links
  • serialize autosaves per project context, capture storage identity before async work, retain dirty revisions through failures, and wait for in-flight writes before deletion
  • bind rename, duplicate, delete, PWA restart, PixelForge/image/spritesheet, and Aseprite export to the initiating project
  • route project-scoped shortcuts, transform auto-selection, and brush capture through the active context
  • bind undo history, revert, and selective patching to the captured context and frame

Root causes

Several commands still held raw canvas references or singleton stores from the original one-project editor. Autosave also allowed serialize/thumbnail/repository work to overlap and read the project id after asynchronous work. With multiple tabs, those assumptions allowed shared blank canvases, default stores, and stale save completions to cross project boundaries.

Verification

  • npm test -- --run — 98 files, 562 tests passed
  • npm run build — TypeScript, Vite, and PWA build passed
  • npm run lint — 0 errors; 5 existing no-explicit-any warnings
  • git diff --check
  • local two-tab browser smoke:
    • non-default export used that tab's name and 32×32 dimensions
    • switching and reopening export used the newly active tab
    • no console errors

@Flow-Fly
Flow-Fly merged commit 30c0b94 into develop Jul 11, 2026
1 check passed
@Flow-Fly
Flow-Fly deleted the dev-337-project-integrity branch July 11, 2026 17:36
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