Skip to content

feat(passenger): show what I reported and how it ended - #45

Merged
catomean merged 1 commit into
masterfrom
feat/my-reports-on-passenger-app
Sep 1, 2026
Merged

feat(passenger): show what I reported and how it ended#45
catomean merged 1 commit into
masterfrom
feat/my-reports-on-passenger-app

Conversation

@catomean

@catomean catomean commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

What was missing

#44 got the crew's answer to the passenger — but only as a four-second toast. Look away, or have the phone asleep when the crew presses Gefunden, and there was no way to find out afterwards: the answer sat in the handover and the passenger app never showed it.

What changed

  • components/passenger/MyReports.tsx (new) — "Meine Verlustmeldungen" in the Reisen tab, under the trips: what was reported, where, when, the status badge (from NOTIFICATION_STATUS_CONFIG, the same SSOT the crew cards use), and the crew's note when they left one. "Unter Sitz 42 gefunden, liegt beim Zugpersonal" is worth more to a passenger than the word "Gefunden".
  • It reads the same handover the toast reads — no second copy of the answer — and updates live: an answer landing in the crew tab flips the badge without a reload.
  • Nothing renders before the first report. An empty box explaining its own emptiness has no business on a screen opened to see trips.
  • lib/hooks/useDemoReports.ts (new) holds the read, so the component stays render-only and the storage subscription isn't duplicated per consumer. It starts empty and fills after mount — localStorage doesn't exist on the server, and reading during render would make the first paint disagree with the HTML Next sent.
  • Three strings added to lib/labels.ts; no new literals in components.

Verification

npm run verify green: prettier clean, tsc clean, lint 0 errors (22 pre-existing warnings), 71 tests pass, tenant SSOT ok.

Browser against the dev server with no backend: reported "Kopfhörer, weiss, in Ladecase", saw it listed as Neu, answered Gefunden with a note from /staff in a second tab, watched the badge and note appear without a reload — then reloaded / and the record was still there, which is the whole point.

No new tests: the status-badge lookup is already proven exhaustive by the compiler (NOTIFICATION_STATUS_CONFIG[report.status] fails to typecheck if a status is unmapped), and the rest is render-and-subscribe plumbing covered by the browser pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_014MT1aaWfJeDUZpTxZ3DfHg

7cbc326 got the crew's answer to the passenger, but only as a four-second
toast. Look away, or have the phone asleep when the crew presses Gefunden, and
there was no way to find out afterwards — the answer existed in storage and the
passenger app never showed it.

The Reisen tab now carries "Meine Verlustmeldungen" under the trips: what was
reported, where, when, the status badge, and the crew's note when they left one
("Unter Sitz 42 gefunden, liegt beim Zugpersonal" is worth more to a passenger
than the word Gefunden). It reads the same handover the toast reads, so there
is no second copy of the answer, and it updates live — an answer landing in the
crew tab flips the badge without a reload.

Nothing renders before the first report: an empty box explaining its own
emptiness has no business on a screen opened to see trips.

lib/hooks/useDemoReports.ts holds the read, so the component stays render-only
and the storage subscription is not duplicated per consumer. It starts empty
and fills after mount — localStorage does not exist on the server, and reading
during render would make the first paint disagree with the HTML Next sent.

Verified in a browser against the dev server, no backend: reported "Kopfhörer,
weiss, in Ladecase", saw it listed as Neu, answered Gefunden with a note from
/staff in a second tab, watched the badge and note appear without a reload —
then reloaded / and the record was still there, which is the whole point.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014MT1aaWfJeDUZpTxZ3DfHg
@catomean
catomean merged commit ed98e9d into master Sep 1, 2026
1 check passed
@catomean
catomean deleted the feat/my-reports-on-passenger-app branch September 1, 2026 23:19
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.

1 participant