Skip to content

fix(community/chat/booking): remaining wiring bugs from the completeness sweep#139

Merged
ma7moudalysalem merged 1 commit into
mainfrom
fix/sweep-community-chat-booking
Jul 7, 2026
Merged

fix(community/chat/booking): remaining wiring bugs from the completeness sweep#139
ma7moudalysalem merged 1 commit into
mainfrom
fix/sweep-community-chat-booking

Conversation

@ma7moudalysalem

Copy link
Copy Markdown
Owner

Five real bugs from a completeness sweep of the flows not yet audited (all client-only):

  • Community — a tag link inside a thread went to ?tag=X but the feed never read the param → unfiltered feed. Seed the tag filter from useSearchParams.
  • Chat — a message in a new/unopened conversation was silently missed while the recipient sat on /messages (push only reaches the joined thread; bell suppressed while connected). Poll the conversations list (15s + on focus).
  • Chat — the "…is typing" bubble stayed stuck after send (the TypingStop timer is cleared, not fired). Emit an explicit TypingStop.
  • AI chatbot — a turn rendered twice for the session when the prompt had PII (dedup compared the raw prompt vs the server's redacted PromptText). Anchor dedup on the verbatim assistant response.
  • Booking — a free (0-fee) booking polled every 4s forever while Requested (awaiting-webhook guard didn't require a Payment). Gate on paymentId != null.

tsc/eslint clean. The sweep verified student/provider surfaces, notification prefs, and remaining admin pages clean; dropped the review→application deep link (provider already sees PB-005 files); deferred admin payments detail (nav-hidden while payments off).

…ess sweep

Five real bugs surfaced by a sweep of the flows not yet audited (all client-only):

- COMMUNITY: a tag link inside a thread navigated to /student/community?tag=X but
  the feed never read the `tag` query param, so it landed on the unfiltered feed.
  Seed the tag filter from useSearchParams (the feed mounts fresh on that nav).

- CHAT: a message in a NEW/unopened conversation was silently missed while the
  recipient sat on /messages — the realtime push only reaches the joined
  conversation group and the bell is suppressed while they're connected. Poll the
  conversations list (15s + on focus) so the list + unread heal.

- CHAT: the "…is typing" bubble stayed stuck on the recipient after the sender
  sent — the scheduled TypingStop timer is cleared (not fired) on send. Emit an
  explicit TypingStop for persisted conversations.

- AI CHATBOT: a Q&A turn rendered twice for the rest of the session when the
  prompt contained PII — the optimistic dedup compared the raw prompt against the
  server's PII-redacted PromptText. Anchor the dedup on the verbatim assistant
  responseText instead.

- BOOKING: a free (0-fee) booking detail polled the server every 4s forever while
  Requested — the awaiting-webhook guard didn't require a Payment row. Gate on
  paymentId != null.

tsc + eslint clean. Sweep verified student/provider surfaces, notification prefs,
and the remaining admin pages CLEAN; dropped the review→application deep link
(provider already sees the PB-005 files); deferred admin payments detail (nav-
hidden while payments are off).
Copilot AI review requested due to automatic review settings July 7, 2026 11:59
@ma7moudalysalem ma7moudalysalem merged commit 4bf06d6 into main Jul 7, 2026
@ma7moudalysalem ma7moudalysalem deleted the fix/sweep-community-chat-booking branch July 7, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants