fix(mobile-chat): show history-load error banner even when partial history loaded (mc#2908 F5) #3030
Reference in New Issue
Block a user
Delete Branch "fix/mobile-chat-f5-history-error-banner"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes F5 from mobile-chat audit #2908.
The history-load error banner in MobileChat was gated on
messages.length === 0, so a partially successful history load (or any error state with existing messages) hid the failure state and left users without a retry affordance. Remove that guard so the banner renders wheneverhistoryErroris set.Validation
npm run buildincanvas/passes.npx vitest run src/components/mobile/__tests__/MobileChat.test.tsxpasses (40/40).Relates-to: #2908
5-axis review on head
e62b136a: APPROVED. Correctness: removingmessages.length === 0makes the history-load error banner render wheneverhistoryErroris set, including partial-history cases, while still respectingtab === "my"and!historyLoading. Robustness: preserves retry/error affordance with existing messages. Security/performance: no material change. Readability: minimal targeted fix. Visible gate failures are review/SOP related; diff is sound.APPROVED after independent 5-axis review.
Correctness: the mobile chat history error banner now renders whenever history loading fails, even if partial messages are present, which matches the F5 issue. The existing empty-state guard remains
!historyError && messages.length === 0, so partial history is not hidden and the empty prompt does not conflict with the error. Robustness/security/performance: no meaningful risk from this render-condition-only change. Readability: minimal and clear.