Upload places: a draft without a place preselects another ticket's place; renewed links and Export after relaunch

Aperta
#352 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react-native, typescript

Direzione di ricerca

Start with src/features/upload/pairing/upload-choice.ts, export-screen.tsx, and upload-manager.ts, then read the referenced issues #335, #349, and #347 for the unresolved design decisions. Compare the upload and relaunch flows on iOS and Android. Done means the F13 and F14 options are chosen and documented, renewed links behave as decided, delivered drafts show a delivered state after relaunch, and token-bearing Watch links remain session-only.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Found while validating #335 on the iPhone 17e simulator, Galaxy S24 Ultra (Android 17) and Android emulator (API 36) (2026-11-30). Build: Pulse 2.8.0, main 0ec70e18 + #349.

Three gaps in how a draft relates to the place (ticket) link it was made for. Two of them (F13, F14) are design questions with options below. The third (F24) is a confusing end state that follows from two rules that are each by design.

1. A draft without its own place preselects another ticket's place (F13) — design question

Origin: this has been the default since #290. src/features/upload/pairing/upload-choice.ts says: "Any other draft defaults to the newest destination, as it always has."

Repro (iOS sim):

  1. Pair several place links (each names a ticket), then record and upload a project for one of them.
  2. Home → that project → Draft options → Duplicate.
  3. Open the copy → Export.

Expected: a destination that belongs to a different ticket isn't preselected, or Upload asks before using it.
Actual: "Upload to Ticket 42 on localhost:8767" is preselected (one of five place destinations). One tap on Upload sends the copy to that ticket's link.

From code-reading, the same applies to any draft without a place (place ? ownDestination : pool[0]): duplicates, imported .pulse files and Blank projects. Only the duplicate was run.

Options:

  • A. Preselect nothing for a draft without a place; the person picks.
  • B. Preselect only the newest destination that isn't a place (a plain server pairing), and never preselect a place for a draft that isn't its own. This keeps one-tap upload for plain-server users.
  • C. Keep the default, but when it's a place, show the place's label and confirm before uploading.

2. A renewed link for a delivered place (F14) — design question

Origin: the #349 flow (open; issue #347). The #335 acceptance item reads "Renewing the link keeps the first approved address."

Repro (iOS sim, local signed-token PulseVault):

  1. Open a place link (ref user1:ticket:ticket42) with return timehuddle://open/app/tickets/ticket42?team=team7 → Connect & allow return → record → Upload. The single-use link is now used up and its destination row is removed.
  2. Open a new link for the same ref with a different return (…/tickets/other99).

Actual: the return sheet asks again. Approving it stores other99 on the new destination, while the delivered draft keeps ticket42. The new link opens an empty recorder, not the delivered draft.
Expected: not decided. "Keeps the first approved address" holds only while the place's destination row exists.

Options:

  • A. Remember place → delivered draft (and its approved return) after the link is used. A renewed link then opens that draft in its delivered state, and a matching return isn't asked for again.
  • B. Treat a renewed link as a new take for the place: open an empty recorder (as today), but say the earlier project was already delivered and link to it.
  • C. Keep today's behaviour, and reword the #347/#335 item to "while the link is unused".

3. After a relaunch, Export for a delivered project drops Watch (F24)

Repro:

  1. Pair with return → record → Upload. Export shows Watch and Back to TimeHuddle.
  2. Force-stop, relaunch, open the project → Export.

Actual: Back to TimeHuddle is still there, but Watch is gone.

  • Emulator and sim: the UPLOAD carousel lists other saved destinations, none selected, with Upload disabled.
  • S24: Share / Photos / Back to TimeHuddle / X.

Why (code-reading):

  • export-screen.tsx shows Watch only for an upload that finished while the screen was open ("no persistent buttons").
  • A watch link that carries the upload token is held in memory for the session only (upload-manager.ts, WatchLink), because that token can also delete the video. Only shareable links are saved and restored.
  • Back to TimeHuddle (#349) is stored on the draft, so it survives the relaunch.

Expected: a delivered project's Export reads as delivered, for example "Uploaded to Ticket 42" with Back to TimeHuddle, plus Share link when a shareable link was saved. It shouldn't show a disabled Upload over unrelated destinations.

Direction: for an uploaded draft whose own destination is gone, replace the destination carousel with a delivered summary. Keep token-bearing links session-only. Watch links are a later phase of #252.

Acceptance

  • F13 option chosen. A Duplicate, an imported .pulse and a Blank project never upload to another ticket's place with a single tap.
  • F14 option chosen, and the #347/#335 renewal wording matches the behaviour.
  • A renewed link for a delivered place behaves as chosen on iOS and Android, including after a force-stop.
  • After a relaunch, a delivered project's Export shows a delivered state (no disabled Upload over unrelated destinations) on iOS and Android.
  • Token-bearing watch links are still never saved or offered for sharing.

Refs: #335 (F13, F14, F24), #349, #347, #290, #252.

Lingua principale
TypeScript
Stelle
1
Fork
2
Merge medio
18h 17m
PR unite (30g)
51

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mieweb/pulse

Tutte le issue di mieweb/pulse

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.