Disable followup clicks after freebuff session ends#531
Conversation
Greptile SummaryThis PR fixes a UX bug where suggested-followup buttons remained interactive after a freebuff session ended. The server's 30-minute grace period meant clicks would still succeed, so the fix extends the existing Changes:
Confidence Score: 5/5Safe to merge — single-line gate change that correctly mirrors an existing pattern used elsewhere in the codebase. The change is minimal (one new selector + one boolean OR in the No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User hovers / clicks FollowupLine] --> B{disabled?}
B -->|!inputFocused| C[Block interaction]
B -->|isFreebuffSessionOver| C
B -->|neither| D[Allow interaction]
D --> E[dispatch codebuff:send-followup event]
E --> F[chat.tsx global handler sends message]
subgraph isFreebuffSessionOver
G[IS_FREEBUFF build flag] -->|false| H[always false — dead-code eliminated]
G -->|true| I{session?.status === 'ended'?}
I -->|yes| J[true — disable buttons]
I -->|no| K[false — buttons active]
end
Reviews (1): Last reviewed commit: "Disable followup clicks after freebuff s..." | Re-trigger Greptile |
Summary
After a freebuff session ends, the chat input is swapped out for a
SessionEndedBanner, but the suggested-followup buttons from earlier in the transcript stayed clickable (the server grants a 30-minute grace period, so clicks still went through). This extends thedisabledgate onFollowupLineto also coverIS_FREEBUFF && session.status === 'ended'— the same conditionchat.tsxalready uses to show the session-ended banner.Test plan