Repository navigation
Show a steer waiting between steps as pending - #1100
Conversation
There was a problem hiding this comment.
Automated review: 1 finding(s) that 2+ of 3 passes agreed on.
4 finding(s) from a single pass, not posted
ios/OpenCode Mobile/OpenCode Mobile/UI/SessionChat/Timeline/SessionChatSteer.swift:24high: Late busy status swallows first output, steer never pending (muse-spark-1.3-contributor)android/app/src/main/java/dev/opencode/mobile/ui/sessionchat/region/SessionChatTimeline.kt:180medium: "session-run" re-apply expires pending prompt patches, unlike iOS and sibling Android re-applies (glm-5.3-flash)ios/OpenCode Mobile/OpenCode Mobile/UI/SessionChat/Region/SessionChatTimeline.swift:114low: Unbound re-projection Task can repaint a previous session's messages (deepseek-v4.1-flash)android/app/src/main/java/dev/opencode/mobile/ui/sessionchat/region/SessionChatTimeline.kt:167low: Pending steer mark is never removed on the busy->idle edge (deepseek-v4.1-flash)
opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.115
| if (!isResolved) return | ||
| if (isBusy && !this.isBusy) { | ||
| // Opening a session mid-run: everything loaded may belong to this run. | ||
| baselineAssistantId = if (hasResolvedStatus) newestAssistantId(messages) else null |
There was a problem hiding this comment.
high: Late busy status swallows first output, steer never pending
Baseline is captured from whatever messages happen to be loaded when the busy status arrives. If the message refresh lands first, the new run's first assistant output is already in the list and becomes the baseline, so hasOutput() stays false for the rest of the run.
Failure scenario: Idle history [u1,a1-done] with resolved idle status; run starts and messages refresh to [u1,a1,u2-delivered,a2-done] while status is still stale-idle; status then flips to busy with those messages, so update() sets baselineAssistantId=a2. A later steer u3 waiting between steps has newest=a2 == baseline, hasOutput()=false, and runIsActive(frame)=false (a2 finished), so markSteers leaves steer null and the waiting steer renders as a normal sent message.
Found by 3 of 3 passes.












Summary
Checks
Run on this branch merged with
mainat 3d9a903.mainhas since gained only Server Health changes, which do not touch these files.:app:testDebugUnitTestfordev.opencode.mobile.ui.sessionchat.*, 978 tests passed.sendPrompt_attachmentInFlight_showsSendingPercent. That test is timing-sensitive and also fails onmain.SessionChatViewModelTestsrun 25 times each, alternating:mainhad 6 failing runs and this branch 3. Every test that failed on this branch also failed onmain.sendPrompt_postSendReloadMatchingUser_dropsOptimisticdid not fail again.Evidence
Screenshots in the evidence comment.
Issue
Follow-up to #902.
Risks / Follow-ups
main, not changed here: on v1, iOS draws a steer before the step it was sent during, while the server and Android place it after.main, not changed here: other iOS timeline re-applies use an unbound task that can outlive a session switch.mainand this branch, on v2.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.