Skip to content

TL-20: driver sees the delivery address until release (A view + D phone) - #54

Merged
gholapksh merged 1 commit into
mainfrom
TL-20-driver-address
Nov 8, 2026
Merged

gholapksh merged 1 commit into
mainfrom
TL-20-driver-address

Conversation

@SJAryan

@SJAryan SJAryan commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Closes #40. Both halves of TL-20: A's view (done by D with Ira's OK) and D's driver phone.

A — driver_stops view (spacetimedb/src/index.ts)

  • A driver sees { jobId, householdId, onFile, address, backupDevice } for each of their own jobs in their incident, until a coordinator releases it.
  • Never the medical need, preferred contact or anything else from profile.
  • No profile → onFile: false with empty fields.
  • driver_jobs is unchanged, so existing clients and checks are unaffected.

D — live driver phone (src/live/LivePhone.tsx)

  • The job card shows Address and Equipment, or "No address on file; call the coordinator." Hidden once delivered.

Check: npm run stdb:reset:local && npm run check:tl20 (new)

  • Ana sees H17's synthetic address and device after reserve.
  • Ben, the resident, the coordinator and a no-role session see 0 stops.
  • Still shown through arrived/delivered, gone after releaseJob (the job itself stays in driver_jobs).
  • H22 (no profile) shows onFile: false to Ben.

Ran on a local SpacetimeDB: check:tl20 PASS; check:tl05/06/09/11/15/18 all still PASS on this module. Fixtures 32/32, tsc clean, npm run build OK. Driver phone checked in Chrome for both the address card and the no-profile message.

Not done: not published to Maincloud. This adds a view only (no table change), so a normal publish is enough.

🤖 Generated with Claude Code

A (view): driver_stops gives a driver the address and backup device of
each of their jobs in their incident, until a coordinator releases it.
Never the medical need or contact details. A household without a profile
returns onFile false with empty fields.

D (driver phone): the live job card shows Address and Equipment, or
"No address on file; call the coordinator." It hides after delivery.

Proof (local SpacetimeDB): check:tl20 passes (Ana sees H17's synthetic
address after reserve; Ben, the resident, the coordinator and a no-role
session see nothing; gone after release; H22 shows onFile false).
check:tl05/06/09/11/15/18 still pass. Driver phone checked in Chrome.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@gholapksh
gholapksh merged commit 03265cb into main Nov 8, 2026
@gholapksh
gholapksh deleted the TL-20-driver-address branch November 8, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TL-20 | Driver sees the registered address for the assigned job

2 participants