fix(crew): prevent duplicate ASK bubble for new question #84

Merged
salmaelsoly merged 2 commits from development_fix_crew_duplicate_ask into integration 2026-06-03 14:15:13 +00:00
Member

Summary

Fixes the duplicate ASK bubble shown when an operator asks a crew agent a new question via "Ask this agent". The optimistic ask placeholder was only cleared on a reply, so it lingered next to the real ask once refresh() re-fetched it.

Closes #72

Changes

  • CrewPage.tsx: clear pendingAsk as soon as the real ask is present in re-fetched messages (matched by kind + trimmed text), in addition to the existing reply trigger.
  • CrewPage.tsx: focusedThread() no longer appends the optimistic ask when the real one is already in the thread; the "working..." indicator stays until a reply lands.
  • Regenerated Vite bundle (static/index.html, static/assets/app.D6QRCr1C.js).

No backend changes — the ask is persisted exactly once.

Test Results

  • Production build (vite build): PASS.
  • Typecheck of the changed file: 0 errors.
  • No regressions introduced.
## Summary Fixes the duplicate ASK bubble shown when an operator asks a crew agent a new question via "Ask this agent". The optimistic ask placeholder was only cleared on a reply, so it lingered next to the real ask once `refresh()` re-fetched it. ## Related Issue Closes https://forge.ourworld.tf/lhumina_code/hero_shrimp/issues/72 ## Changes - `CrewPage.tsx`: clear `pendingAsk` as soon as the real ask is present in re-fetched messages (matched by kind + trimmed text), in addition to the existing reply trigger. - `CrewPage.tsx`: `focusedThread()` no longer appends the optimistic ask when the real one is already in the thread; the "working..." indicator stays until a reply lands. - Regenerated Vite bundle (`static/index.html`, `static/assets/app.D6QRCr1C.js`). No backend changes — the ask is persisted exactly once. ## Test Results - Production build (`vite build`): PASS. - Typecheck of the changed file: 0 errors. - No regressions introduced.
fix(crew): prevent duplicate ASK bubble for new question
All checks were successful
Verify / verify (push) Successful in 41m38s
Verify / verify (pull_request) Successful in 38m39s
dad7d45ad6
The optimistic ask bubble was only cleared when a reply arrived, so
after refresh() re-fetched the persisted ask it rendered alongside the
optimistic copy during the in-flight window. Clear pendingAsk once the
real ask is present in fetched messages, and guard focusedThread() from
appending a duplicate ask while keeping the working indicator.

#72
salmaelsoly changed target branch from development to integration 2026-06-03 13:11:12 +00:00
salmaelsoly force-pushed development_fix_crew_duplicate_ask from dad7d45ad6
All checks were successful
Verify / verify (push) Successful in 41m38s
Verify / verify (pull_request) Successful in 38m39s
to 171226b4ae
All checks were successful
Verify / verify (push) Successful in 40m51s
Verify / verify (pull_request) Successful in 40m39s
2026-06-03 14:03:57 +00:00
Compare
salmaelsoly merged commit fae1d20b9a into integration 2026-06-03 14:15:13 +00:00
salmaelsoly deleted branch development_fix_crew_duplicate_ask 2026-06-03 14:15:30 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_shrimp!84
No description provided.