Skip to content

F8.2: open project files through the installed PWA#334

Merged
Flow-Fly merged 8 commits into
developfrom
dev-f8-file-handling
Jul 11, 2026
Merged

F8.2: open project files through the installed PWA#334
Flow-Fly merged 8 commits into
developfrom
dev-f8-file-handling

Conversation

@Flow-Fly

@Flow-Fly Flow-Fly commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • import .pf, legacy .json, .ase, and .aseprite files as new durable library projects without replacing the active drawing
  • register installed-PWA file handlers so desktop Chromium can open Pixel Forge and Aseprite files in the existing app window
  • route File-menu selection, operating-system launches, and drag-and-drop through one serialized import path with polite, dismissible feedback
  • preserve Aseprite frame links and indexed pixels across immediate persistence/reopen
  • validate malformed project data before persistence and roll back imports that fail during hydration
  • keep capped imports non-destructive and make tab-limit feedback dismissible and temporary
  • isolate palette events per project and serialize the visible pixels instead of stale indexed data

Linked work

Implements #123.

Each child issue has its own implementation commit; the final commits contain the independent-review and integrity repairs.

Verification

  • npm run test:run — 96 files, 533 tests passed
  • npm run lint -- --quiet
  • npm run build
  • generated-manifest integration test for file_handlers and launch_handler
  • npm run fallow:audit — no new findings
  • local browser smoke: workspace restored, editor rendered normally, no new console errors

Manual installed-PWA gate

Run:

npm run pwa:preview

Then uninstall and reinstall Pixel Forge so Chromium refreshes file associations.

  • Finder Open With → Pixel Forge opens .pf, .ase, and .aseprite
  • opening another file focuses the existing app window and creates a new internal tab
  • multiple files retain their launch order
  • an import beyond the eight-tab limit remains in Project Library with clear feedback
  • drag-and-drop behaves like File-menu import
  • denying the browser-owned permission leaves current work unchanged
  • Firefox/Safari still start quietly; File-menu import and drag-and-drop remain available

The full repeatable procedure is in docs/verification/pwa.md.

Boundaries

  • .json remains a manual/drop import format and is not registered with the operating system
  • file handles are not retained
  • no write permission is requested
  • imported projects never write back to their source files

Copy link
Copy Markdown
Owner Author

I reproduced the important distinction behind the report:

The follow-up commits also fixed deterministic sources of the “previous drawing” artifacts:

  • old cels surviving a sequential project load
  • temporary/import contexts broadcasting palette remaps into every open tab
  • shared hard-linked buffers being remapped repeatedly
  • canvas-only edits being saved beside stale indexed pixels

Verification is green: 96 test files / 533 tests, lint, build, and local editor smoke.

Please accept Update ready → Restart (or reinstall the PWA) before retesting the eight-tab case. The expected result is: the active tab is unchanged, the imported project is retained in Project Library, and the feedback disappears after six seconds or via Dismiss.

The remaining broader save-integrity hazards are tracked in #337 rather than silently expanding this PR further.

@Flow-Fly Flow-Fly merged commit a9288aa into develop Jul 11, 2026
1 check 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.

1 participant