M1-12: hand the documents directory to the user #37
No reviewers
Labels
No labels
area/agent
area/capture
area/editor
area/geo
area/security
area/sync
area/transcription
area/ui
area/vault
area/voice-memos
blocked
milestone/M1
milestone/M2
milestone/M3
milestone/M4
needs-decision
needs-hardware
p0
p1
p2
type/bug
type/enhancement
type/feature
type/idea
type/infrastructure
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Stash/stash-ios!37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "m1-12-file-sharing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #12.
UIFileSharingEnabledandLSSupportsOpeningDocumentsInPlaceput every memo in Finder over acable and under On My iPhone in the Files app. The recordings already live in the documents
directory and the format is plain files, so nothing moved and nothing is exported.
UISupportsDocumentBrowseris deliberately not set: it lets the save location be re-pointed fromSettings, which would move memos out from under the one directory the list reads.
What the keys cost, and what it took
The folder is no longer only what the app put there, and two paths used to remove a capture's
.partsfolder recursively. They now share one rule —TranscriptAssembly.clearParts, used byfinalisation and by swipe-to-delete:
<the part>.sb-<hex>-<random>temporary aninterrupted atomic write leaves,
.DS_Store, and a._sidecar for a part are removed. Asidecar for somebody's document is part of their document.
unlink, the folder goes byrmdir, and neither can take a directory — so there isno window between deciding what a path is and removing it. Same for the audio, the transcript,
and the
.assemblingtemporary.memo is still deletable once the file has been moved out.
clearPartslists by path, not by URL. The URL enumerator does not return._entries —measured — so a sidecar could otherwise have made a memo permanently undeletable from its row
while
rmdirstill counted it.The launch sweep reads every part of every unfinished capture before anything is on screen, so a
part over 4 MB, or one taking the capture past 16 MB in total, is counted missing rather than
read. Recovery also now requires a regular file at the transcript's name; a directory there used
to read as "already finished" and skip the parts beside it silently, at every launch.
Reviews
Four Codex passes in
.agent/m1-12-file-sharing/, with every finding's disposition inSUMMARY.md. The one rejected three times is coordinating file access or staging in-flightartifacts outside Documents: staging puts a finished memo where the list does not read, which is a
second path through the thing this format keeps simple, and coordination buys nothing against
Finder, which does not coordinate. The reasoning, including what was rejected, is in
stash-docs.Validated
make lintclean, builds and launches in the simulator.UISupportsDocumentBrowserare asserted against the builtInfo.plist, read throughBundle.main.Not validated
acceptance and have not been run — the
needs-hardwarepass is still owed.._entries the way the simulator does.chflagsandchmodfixtures exercise the failure paths, not the device conditions that wouldproduce them.
Separately
The decision file for this is written but not committed — it is the first one in
stash-docs,which was empty, so it invents
decisions/YYYY-MM-DD-*.mdand a README line. Worth a look beforeit goes anywhere.