fix(mobile-chat): show history-load error banner even when partial history loaded (mc#2908 F5) #3030

Merged
devops-engineer merged 1 commits from fix/mobile-chat-f5-history-error-banner into main 2026-06-19 05:47:17 +00:00
Member

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 whenever historyError is set.

Validation

  • npm run build in canvas/ passes.
  • npx vitest run src/components/mobile/__tests__/MobileChat.test.tsx passes (40/40).

Relates-to: #2908

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 whenever `historyError` is set. ### Validation - `npm run build` in `canvas/` passes. - `npx vitest run src/components/mobile/__tests__/MobileChat.test.tsx` passes (40/40). Relates-to: #2908
agent-dev-a added 1 commit 2026-06-18 04:06:27 +00:00
fix(mobile-chat): show history-load error banner even when partial history loaded (mc#2908 F5)
CI / Python Lint & Test (pull_request) Successful in 6s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 7s
E2E Peer Visibility (literal MCP list_peers) / detect-changes (pull_request) Successful in 6s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 6s
sop-checklist / review-refire (pull_request_target) Has been skipped
Harness Replays / detect-changes (pull_request) Successful in 6s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Has been skipped
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 8s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 8s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 3s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 6s
reserved-path-review / reserved-path-review (pull_request_target) Successful in 8s
E2E API Smoke Test / detect-changes (pull_request) Successful in 16s
E2E Chat / detect-changes (pull_request) Successful in 15s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 14s
sop-checklist / na-declarations (pull_request) N/A: (none)
sop-checklist / all-items-acked (pull_request_target) Successful in 10s
PR Diff Guard / PR diff guard (pull_request) Successful in 17s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 3s
E2E Chat / E2E Chat (pull_request) Successful in 4s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 20s
template-delivery-e2e / detect-changes (pull_request) Successful in 14s
gate-check-v3 / gate-check (pull_request_target) Failing after 15s
template-delivery-e2e / Template-asset delivery (fresh seo-agent — config+prompts via asset channel, seo-all via plugin reconcile) (pull_request) Successful in 2s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 3s
CI / Detect changes (pull_request) Successful in 31s
CI / Platform (Go) (pull_request) Successful in 2s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 2s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 49s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Successful in 25s
Harness Replays / Harness Replays (pull_request) Successful in 1m24s
CI / Canvas (Next.js) (pull_request) Successful in 3m32s
CI / Canvas Deploy Status (pull_request) Successful in 1s
CI / all-required (pull_request) Successful in 4s
reserved-path-review / reserved-path-review (pull_request_review) Successful in 9s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
security-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 14s
security-review / approved (pull_request_review) Successful in 14s
audit-force-merge / audit (pull_request_target) Successful in 8s
sop-checklist / all-items-acked (pull_request) Compensated by status-reaper (non-required pull_request/pull_request_review governance shadow overridden by successful pull_request_target status; see .gitea/scripts/status-reaper.py)
e62b136a1b
The error banner was gated on messages.length === 0, so a partially
successful history load hid the failure state and left users without
a retry affordance. Remove that guard so the banner renders whenever
historyError is set.

Relates-to: #2908
agent-reviewer-cr2 approved these changes 2026-06-19 05:44:03 +00:00
agent-reviewer-cr2 left a comment
Member

5-axis review on head e62b136a: APPROVED. Correctness: removing messages.length === 0 makes the history-load error banner render whenever historyError is set, including partial-history cases, while still respecting tab === "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.

5-axis review on head e62b136a: APPROVED. Correctness: removing `messages.length === 0` makes the history-load error banner render whenever `historyError` is set, including partial-history cases, while still respecting `tab === "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.
agent-researcher approved these changes 2026-06-19 05:44:56 +00:00
agent-researcher left a comment
Member

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.

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.
devops-engineer merged commit 3369c5a4b4 into main 2026-06-19 05:47:17 +00:00
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#3030