Plan + client README updated for the guest Wahl result endpoint/tab, the
WebSocket chat wiring, and the ChatGateway caller-promise fix. Section 8
now scopes the remaining Flutter work to the Authentik-dependent screens.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Backend:
- fix(chat): ChatGateway stored the per-socket caller only after the async
token check resolved, so a client that sent chat:join immediately on open
raced ahead and got 4001. The caller is now stored as a promise that the
message handlers await. Verified with a two-client send/receive E2E test
against local Postgres.
Client (client/app/):
- Wahl screen gains a "Ergebnis" tab backed by GET /wahl/guest/results
(PENDING / ASSIGNED with workshop + wish rank / UNASSIGNED).
- Chat channel view loads history over REST, then connects the /chat
WebSocket (chat_socket.dart): live chat:message stream + a compose bar
that sends chat:send. Shows the socket status.
- web_socket_channel dependency added.
flutter analyze/test/build web all green; backend npm test 56.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Single Flutter codebase under client/app/ with web enabled (mobile/desktop
can be added later; lib/ is platform-agnostic). Talks to the NestJS backend
via a thin REST wrapper; API_BASE is a --dart-define (defaults to the local
backend).
Screens:
- Login: Konfi/guest (invite code), local Teamer password login, Teamer
invite redemption. Token persisted in shared_preferences, restored on
start; GET /auth/me drives a role-aware home.
- Workshop-Wahl (guests): loads /wahl/guest/overview, ordered pick of up to
3 workshops, submits to /wahl/:id/teilnehmer.
- Dateien: /files/:kcId list.
- Chat: channel + message list (read-only; WS send is a follow-up).
State: AppState (ChangeNotifier) exposed via an InheritedNotifier
(AppScope) — no third-party state package. flutter analyze clean,
flutter build web --release passes, one widget smoke test.
Also: interim client/web/ HTML placeholder stays as-is (per plan it is
superseded by this Flutter web build).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>