# Tasks

Live checklist. `[x]` done, `[ ]` open. Update it as work finishes or is added, and refresh "Next up" so the next agent knows where to start. Open questions that block work are numbered in `DECISIONS.md`.

## Next up (start here)

1. Get Austin's answers to the top open questions in `DECISIONS.md` (Q1 to Q6). Several tasks below change depending on them, especially accepted audio formats (Q5), where it is hosted (Q1) and how he is notified (Q8).
2. Review the mock-up with Austin on his phone and write down what feels wrong (Phase 1, first item).
3. Build the "walk mode" prototype in the inbox: one message at a time, big play button, next and previous, mark responded. This is the screen he will actually use on walks.
4. Spike a real backend in a new repository following `PLAN.md` (Phase 2), once Q1 is answered.

## Phase 0 — the mock-up (done)

- [x] Folder, `meta.json`, card thumbnail (`shell/images/thumbs/mailbox.svg`), `ti-mail` sprite icon, app icon
- [x] Documents: README, CLAUDE, TASKS, DECISIONS, PLAN, ANTI-SPAM, DATA-MODEL, info
- [x] Intake form: name, email, subject, text with counter, one MP3, permissions, reply preference, disclaimers and consent, result screen
- [x] MP3 checks: name, reported type, size, header bytes (rejects a renamed PNG), duration as the browser reads it
- [x] Bot-defense illustrations: honeypot, time-to-fill, link count, placeholder for a real bot check, a Held state
- [x] Developer · Inbox tab: cards, states, filters with counts, search, sorts, manual order by drag (mouse and touch), keyboard and buttons, bump to top
- [x] Per-message title, date, notes, transcript, reply draft, reply MP3, where it went, responded, done, hold, delete
- [x] Audio player with skip and a shared speed button; audio keeps playing while editing
- [x] Developer tools: simulate mail, sample data, backup and import, erase, "what is connected" table
- [x] Unit tests for the pure modules, and a Playwright test on desktop and phone

## Phase 1 — iterate the design with Austin

- [ ] Review on a phone: list what feels wrong (form length, wording, inbox density, drag feel)
- [ ] Walk mode: one message at a time, large controls, next and previous, swipe or button, mark responded and done without leaving the screen
- [ ] Media Session API (lock-screen play, pause, skip) and check that audio continues with the screen off on his actual phone
- [ ] Undo for the actions that remove a card from the current view (mark done, hold, release): a toast with an Undo button
- [ ] Decide what "add a date" means (respond-by, follow-up, or the date it was responded) and rename the field (DECISIONS Q10)
- [ ] Tags or colors for grouping messages, if he wants them
- [ ] Bulk actions (select several, mark done or hold)
- [ ] In-browser recording for senders (MediaRecorder gives WebM or M4A, not MP3): decide with Q5
- [ ] Accept M4A and other formats if Q5 says so: change `checkAudioFile` and `sniffMp3` (M4A starts with an `ftyp` box), tests, copy and the data model
- [ ] A reply-by-email button that opens `mailto:` with the subject and a draft prefilled (zero infrastructure, fits "send it manually")
- [ ] Copy-friendly export of a message and its reply (text, plus a download link for each MP3) for pasting into a post or podcast notes
- [ ] A short, plain-language privacy and terms page linked from the form (needs Q9)
- [ ] Review the wording of the disclaimers (emergency line, content rights, spam deletion) with Austin
- [ ] Accessibility pass: screen-reader labels on the drag grip are in place; check focus order, the error summary, the audio controls and color contrast in both themes
- [ ] Include audio files in the backup (zip or base64) with a size warning
- [ ] Optional: install as a home-screen app (manifest and icons) once the design settles

## Phase 2 — a real backend (new repository)

See `PLAN.md` for the recommended stack and the alternatives. Do the first item before anything else.

- [ ] Create the new repository and project; copy this folder in as the front end
- [ ] Decide hosting and domain (Q1) and the stack (Q2); record them in `DECISIONS.md`
- [ ] Database with the schema sketched in `DATA-MODEL.md`; a migration, not hand-made tables
- [ ] Private file storage for MP3s; uploads go straight from the browser to storage with a short-lived upload token (a Vercel function cannot take a body over 4.5 MB)
- [ ] `POST /submit` endpoint: verify the bot check on the server, validate everything again, rate limit, store the message, return only "received"
- [ ] Repeat all `validate.js` checks on the server, including the MP3 header check, a byte cap and a content-type that the server sets itself
- [ ] Login for the Developer tab and every inbox endpoint; the tab stops being public (Q7)
- [ ] Inbox endpoints (list, update fields, reorder, bump, delete) replacing `store.js`; keep `normalizeMessage` as the shape contract; ordering with a fractional `position` so one drag updates one row
- [ ] Signed, short-lived URLs to play audio in the inbox; never a public MP3 URL; always `Content-Disposition` and a fixed content type
- [ ] A "new message" notification to Austin by the channel from Q8, with no message content in an insecure channel
- [ ] Remove the "mock-up" banners only when everything above is true, and update `CLAUDE.md` honesty rule 3

## Phase 3 — the reply workflow

- [ ] Reply audio recorded on a walk lands in the message (upload from the phone) and plays back in the inbox
- [ ] Transcription of a message or a reply: pick a provider (see `PLAN.md`), a "transcribe" button that fills the transcript box, and a review step before anything is used
- [ ] Share a reply: copy text, download the MP3, and later push to a podcast host or a social post; always a manual confirmation, only for messages whose `share` allows it
- [ ] Respect `share`: messages marked private must never be offered for publishing; show a warning if he tries
- [ ] Send a reply by email from `inbox@austinpranger.com` (or another sender) as a deliberate, manual action, with a link to the audio rather than an attachment

## Phase 4 — hardening and launch

- [ ] Run through `ANTI-SPAM.md` end to end with a real bot-check key; try to break it
- [ ] Retention: how long messages and audio are kept, automatic deletion of held messages, and a way to honor a deletion request (Q9)
- [ ] Backups of the database and the file storage; test a restore
- [ ] Monitoring: an alert for a spike in submissions or in held messages, and a kill switch that turns the form into "closed for now" without a deploy
- [ ] Load and abuse test: large files, many files, malformed MP3s, script in every text field, very long names
- [ ] A quick check of privacy rules that apply to collecting emails and voice recordings from the public
- [ ] Cost check against the expected volume (Q3)
