M2-05: A memo is up to three files #32
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#32
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Teach discovery, deletion and the docs about
<base>_track.gpxbefore anything writes one.Why this lands ahead of the writer
RecordingStoreandMemoLibrarycurrently encode "a memo is two files" —<base>_audio.m4aand<base>_transcription.vtt. M2-07 introduces a third. Landing the writer first means a build existswhere a track file is on disk and swipe-to-delete strands it, and #12 has already handed the
Documents directory to the user, so a stranded file is one they will see.
M1-10 established the pattern for testing this without the producer: plant files and exercise the
consumer. That is exactly what this issue does.
Scope
audio goes last and only if nothing else failed — the audio is what puts the row on screen,
so keeping it keeps the memo visible and the deletion retryable.
audio beside it is not a memo, the same way a transcript with no audio is not one.
README.mdandAGENTS.mdstop saying "two files and only two". The pair becomes a triple, withthe third optional, and the rename warning covers it —
<base>is what makes three files onememo, and renaming any of them breaks it.
.partstargeted-removal rule from #12 extends to whatever the track's part files are named,so finalisation still never removes a file it did not write.
Tests
Planted
<base>_track.gpxfiles againstRecordingStoreandMemoLibrary, synthetic —no real coordinates in fixtures. This repository is public and a location fixture with real
numbers in it is somebody's house.
Done when
Milestone 2 of the Stash v3 rebuild. M2 is still app-side — no sync, no account, no server. It
turns a list of memos into something you can open, listen to, read and see the route of. Sync
arrives in M3. There is no
milestone/M2label yet (creating org labels needs owner rights), sothe title carries the milestone.
Working agreement for every issue in this repo: feature branch, tested before the PR opens
(on-device where the label says so), then Wes reviews the PR and we walk the code together. Docs
update in the same commit. A PR that takes more than 20 minutes to review is too big — say so and
split it.
PR #46, and the decision record is Stash/stash-docs#7.
One thing in this issue's scope turned out to need a sharper answer than it was written with. The
.partstargeted-removal rule does extend to the track's part files, but not on both paths:clearPartsruns at transcript finalisation as well as at swipe-to-delete, so one list ofremovable names would have the ordinary stop unlink a capture's route on its way out of assembly
once #34 writes them — and the launch sweep would do the same to a capture nobody spoke into. So
clearing now takes what the caller owns: publishing a transcript owns transcript parts and the
tail, deleting a memo owns everything the capture wrote.
Two consequences for #34 to know about: a parts folder can outlive a clean stop and means nothing
on its own (a transcript part left behind is the signal), and the launch sweep still looks for a
folder with no transcript beside it, so track recovery is #34's to answer.
Track parts are
<base>_track.NNN.gpxin the existing folder, under the transcript's numbering.Validated: 372 unit tests, lint clean, and a simulator check that a planted three-file memo is one
row while a lone
_track.gpxis none. Not validated: swipe-to-delete against a three-file memothrough the UI — that path is covered by unit tests against a temporary directory, not by a tap.