fix(mobile-chat): send cursor matches attach-only enabled state (#2762 residual) #2779
Reference in New Issue
Block a user
Delete Branch "fix/2762-attach-cursor-residual"
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?
Refs #2762.
Problem
The #2762 multi-send fix removed
sendingfrom the send button disabled prop and background/color styles, but left the cursor expression usingpendingFiles.length === 0. With files attached and no draft text, the button was enabled but showed anot-allowedcursor.Fix
(draft.trim() || pendingFiles.length > 0) && reachable && !uploading, matching the disabled prop and visual state.Test plan
npx vitest run src/components/mobile/__tests__/MobileChat.test.tsx— 34/34 pass.npx vitest run src/components/mobile— 256/256 pass.APPROVED on head
d04145cd.5-axis review: correctness looks good for the #2762 residual. The Send button cursor predicate now matches the actual enabled/disabled state: draft text OR pending files, plus reachable and not uploading. That fixes the attach-only case where the button was enabled but still showed not-allowed.
Robustness/security/performance: no new data flow or backend surface, no credential handling, and no meaningful runtime cost. The change stays scoped to mobile composer presentation state.
Readability/test coverage: the predicate is consistent with the adjacent background/color conditions and the regression test covers empty draft + attached file with disabled=false and pointer cursor. CI/all-required is green on this head.
APPROVED on head
d04145cd.Independent review focused on the #2762 residual in the attach-only send state. The send button was already functionally enabled when
pendingFiles.length > 0with an empty draft, and its background/color also used that predicate; this patch fixes the remaining cursor predicate so the UI no longer showsnot-allowedfor a valid attach-only send.The change does not reintroduce
sendinginto the send button gate, so mobile multi-send remains available while an agent turn is in flight. The new regression test drives a file selection with an empty draft and asserts the Send button is enabled withcursor: pointer, which covers the stale mismatch directly.CI / Canvas (Next.js),CI / Platform (Go), andCI / all-requiredare green on this head. Remaining red statuses are review/security/checklist ceremony gates.SOP ACK: genuine independent 5-axis review complete; no correctness, security, performance, test, or maintainability blockers found.