Repository navigation
Description
Problem
Browser-only mode's save-back story is "Export files to your computer" (README, Three ways to use it), but the only bulk path — Save files to folder — is showDirectoryPicker, which exists on desktop Chrome and Edge only (folderExportSupported, ui-packages/web/src/utils/file-system-access.ts:27). Everywhere else the control above Files sits disabled with a tooltip (folder-export-control.tsx:23,37), and the one fallback that does work, Save as…, is a plain one-at-a-time download (saveBlobAs, file-system-access.ts:90-97). A Safari, Firefox or iOS reader with a 100-file project backs up their library through 100 separate downloads, or not at all.
The gap is sharpest at the moment of loss. The delete-project dialog's rescue is canExport = exporter.supported && fileCount > 0 (delete-project-dialog.tsx:48), and the button is rendered only inside {canExport && …} (:68). On every browser without the directory picker, the dialog that announces "This deletes 50 files…" offers no export and no pointer to one — the reader crosses the line with no way out. Nothing else produces an archive: no zip code ships outside tests, though jszip is already a runtime dependency (ui-packages/web/package.json:32).
Proposal
- Where the folder save is unsupported, the control above Files becomes Download project (.zip): one zip through the existing
downloadBlobfallback path, recreating the project tree from the samepaths the folder save writes. - Scope equals the folder save's: the Files tree (
filescollection,use-file-export.ts:73-75); attachments stay out, per the line Let Save to folder write chat attachments out with the files — today each one leaves only one by one, through Save as… #225 settled. - The delete dialog's rescue becomes this download where the folder save is unsupported, so a way out exists at the deletion moment on every browser instead of a hidden button.
- Where
showDirectoryPickerexists, the folder save stays the preferred path (remembered folder, changes only); the zip is the everywhere path and needs no permissions.
Goal
After this, a reader on Safari, Firefox or iOS can take a whole project out of the browser as one .zip — from above Files and from the delete dialog — and no export path in browser-only mode is gated on desktop Chrome or Edge.
Verification
grep -rqi "zip" ui-packages/web/src/features/resources/
grep -q "Download" ui-packages/web/src/features/projects/delete-project-dialog.tsx
pnpm --filter @gamma-reader/web test --silent
pnpm checkRefs
- ui-packages/web/src/utils/file-system-access.ts:27,90-97 — folder support is the directory picker; the fallback downloads one file
- ui-packages/web/src/features/resources/folder-export-control.tsx:23,37 — disabled control, tooltip-only explanation
- ui-packages/web/src/features/projects/delete-project-dialog.tsx:48,68 — rescue hidden where the picker is missing
- ui-packages/web/package.json:32 — jszip already a runtime dependency
- README.md Three ways to use it; tutorial/guide/Files and projects.md Keep copies and remove files ("Requires desktop Chrome or Edge")
- Say why Save to folder is greyed out — on Safari and iOS the control is disabled, and its only explanation is a hover tooltip touch screens never show #176 — explained the greyed-out control; this gives the action itself
- Say at project deletion what the rescue saves — the dialog counts attachments among the files it deletes, while Save to folder first writes only the Files tree #183, Let Save to folder write chat attachments out with the files — today each one leaves only one by one, through Save as… #225 — the delete-rescue and attachment scope this follows
- Tell Safari readers the library expires with disuse — WebKit deletes an unused site's storage after 7 days, and every durability sentence names only disk pressure or cleared data #252 — Safari readers are first-class, not an afterthought
- Give conversations an export path — weeks of questions and answers live and die with the browser profile #50 — conversations were decided separately (not planned); this zip covers the Files tree only and does not reopen that
Activity
bencode commentedon Nov 5, 2026
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
First independent review @ d05b6b6 — evidence confirmed; valid, stays open.
file-system-access.ts:27(folderExportSupported=showDirectoryPicker) ✓;:90-95saveBlobAsfalls back to a plaindownloadBlob✓;folder-export-control.tsx:23tooltip +:37!exporter.supportedincontrolDisabled✓;delete-project-dialog.tsx:48canExport = exporter.supported && fileCount > 0✓ — the gated button block is at:69, one line off the cited:68(Refs-only drift, nothing to repair in the Verification block, whose anchors are paths and greps);package.json:32jszip ✓; scope anchoruse-file-export.ts:73-75filters to thefilescollection ✓. README:24and guideFiles and projects.md:48("Requires desktop Chrome or Edge") ✓.docx-unconverted.ts:123,xlsx-package.ts:119); everyzip.file(writer lives in tests. A producer adds no new dependency.features/resources/, no "Download" in the delete dialog), so the block discriminates; correct not-implemented verdict.grep -rq "Download project" ui-packages/web/src/features/resources/and the dialog's actual button label, so green means the control and the rescue exist as proposed.bencode commentedon Nov 6, 2026
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
Second review @ d05b6b6 (no commits since the first) — evidence re-confirmed; valid, stays open.
file-system-access.ts:27/:90-97,folder-export-control.tsx:23/:37,delete-project-dialog.tsx:48with the gated block at:68({canExport && (),package.json:32(jszip),use-file-export.ts:73-75(files-collection filter), README Three ways to use it,tutorial/guide/Files and projects.md:48.zip.file(writer lives in tests"):docx-unconverted.ts:133-134is a production zip writer —markUnconvertedContentrewritesword/document.xmland regenerates the package (zip.generateAsync,compression: 'STORE'). It never leaves memory, so the issue's substance holds (no zip reaches the reader as an export; jszip is already a runtime dependency), and the implementer has in-repo prior art to mirror.features/resources/, no "Download" in the delete dialog, on unfixed main. Still discriminates.Download projectlabel underfeatures/resources/, the dialog's actual button text) so green means both controls exist as proposed.bencode commentedon Nov 10, 2026
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
Third review @ d05b6b6 (still no commits since the second) — evidence re-confirmed; valid, stays open.
file-system-access.ts:27/:90-97,folder-export-control.tsx:23,37,delete-project-dialog.tsx:48with the{canExport && (block at:68,package.json:32(jszip),use-file-export.ts:73-75(Files-tree scope).features/resources/, no "Download" in the delete dialog, on unfixed main. Still discriminates.Download project-style label underfeatures/resources/and the dialog's actual button text) so green means both controls exist as proposed.bencode commentedon Nov 13, 2026
Posted by the scheduled issue-reviewer loop, independent of the authoring session.
Fourth review @
d05b6b6(still HEAD — no commits since 2026-10-28) — valid, stays open.folderExportSupported=showDirectoryPicker(file-system-access.ts:27) andsaveBlobAs's plain-download fallback (:90-97); the tooltip atfolder-export-control.tsx:23with!exporter.supportedincontrolDisabled(:37);canExport = exporter.supported && fileCount > 0(delete-project-dialog.tsx:48) with the{canExport && (block at:68;jszipatpackage.json:32; thefiles-collection filter atuse-file-export.ts:73-75; "Requires desktop Chrome or Edge" verbatim attutorial/guide/Files and projects.md:48; README:24's "Export files to your computer". Nothing new produces a zip for export (the in-memory writer atdocx-unconverted.ts:133-134is the known prior art, on record since review 2).features/resources/, no "Download" in the delete dialog. Still discriminates.grep -rq "Download project" ui-packages/web/src/features/resources/plus the dialog's actual rescue-button label, so green means both controls exist as proposed.