Repository navigation
fix(ios): keep connection messages from flashing when chat reopens - #207233
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: passed. What this changesThis PR resets connection-message waits after backgrounding and preserves their deadline when connection wording changes. Example: Return from Settings to an iPhone chat that reconnects within one second.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored draft open: the focused timing repair is useful, and no introduced correctness defects were found; it remains part of an unmerged iOS stack. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe iOS chat modifier translates connection state and scene lifecycle into statuses; the shared strip owns their visibility deadlines and supplies the message rendered above the composer. flowchart LR
A[Gateway connection state] --> C[Chat connection modifier]
B[Scene lifecycle] --> C
C --> D[Shared status strip]
D --> E[Visibility deadline]
E --> F[Composer status row]
Technical reviewBest possible solution: Keep lifecycle handling in the iOS modifier and deadline continuity in the existing shared strip, then land this repair with its prerequisite stack. Do we have a high-confidence way to reproduce the issue? The stacked base counts background time toward visibility and restarts the deadline for changed wording; supplied simulator comparisons demonstrate the flash, but this behavior is absent from fetched main and was not independently executed during this read-only review. Is this the best way to solve the issue? The patch restores the strip's intended no-flash behavior using its existing lifecycle and timer owners, preserves inactive-state visibility, and introduces no competing timing mechanism. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9c9e3c74e3c6. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +13, Tests +72. Total +85 across 4 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 27, 2026, 11:45 PM ET / November 28, 2026, 04:45 UTC. |
31da591 to
6b06fb4
Compare
85135ac to
7f25cbf
Compare
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits) fix(ui): remove redundant type argument from Board browser test (#207352) test(channels): distinguish status and batch fixtures (#207232) fix(ui): type the Board drop test mock as void (#207348) fix(ui): break the Skill Workshop import cycle (#207345) test(channels): expose label guard regressions (#207195) fix: explain when a previous automation run keeps the agent from starting (#207180) refactor(test): consolidate loader proof and repair rollback coverage (#207152) fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101) test(plugins): verify staged SDK named exports (#207170) fix(ui): truncate empty Compose hints on narrow screens (#207301) fix: keep unsent Cmd+K Compose drafts when reopened (#207307) fix: explain chat update errors when a session changes (#206419) fix(ios): keep consecutive commands on one line in chat (#207242) fix(ios): keep connection messages from flashing when chat reopens (#207233) fix(ios): give Sessions groups more breathing room (#207221) fix(ui): show chat completions as activity rows (#201891) fix(ui): make empty composer hints look distinct from drafts (#207295) fix: explain why chat won’t attach an empty file (#206402) fix(agents): show Doctor's restore-first warning before deleting a held store (#207290) test(channels): fix join failure proof and trim probe fixture (#207264) ...
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits) fix(ui): remove redundant type argument from Board browser test (#207352) test(channels): distinguish status and batch fixtures (#207232) fix(ui): type the Board drop test mock as void (#207348) fix(ui): break the Skill Workshop import cycle (#207345) test(channels): expose label guard regressions (#207195) fix: explain when a previous automation run keeps the agent from starting (#207180) refactor(test): consolidate loader proof and repair rollback coverage (#207152) fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101) test(plugins): verify staged SDK named exports (#207170) fix(ui): truncate empty Compose hints on narrow screens (#207301) fix: keep unsent Cmd+K Compose drafts when reopened (#207307) fix: explain chat update errors when a session changes (#206419) fix(ios): keep consecutive commands on one line in chat (#207242) fix(ios): keep connection messages from flashing when chat reopens (#207233) fix(ios): give Sessions groups more breathing room (#207221) fix(ui): show chat completions as activity rows (#201891) fix(ui): make empty composer hints look distinct from drafts (#207295) fix: explain why chat won’t attach an empty file (#206402) fix(agents): show Doctor's restore-first warning before deleting a held store (#207290) test(channels): fix join failure proof and trim probe fixture (#207264) ...
* commit '262f14aab89ca286633992760fa45aeeded998f9': (207 commits) fix(ui): remove redundant type argument from Board browser test (#207352) test(channels): distinguish status and batch fixtures (#207232) fix(ui): type the Board drop test mock as void (#207348) fix(ui): break the Skill Workshop import cycle (#207345) test(channels): expose label guard regressions (#207195) fix: explain when a previous automation run keeps the agent from starting (#207180) refactor(test): consolidate loader proof and repair rollback coverage (#207152) fix(agents): one tool-result bound on every route, untrusted-content wrapper intact (#207101) test(plugins): verify staged SDK named exports (#207170) fix(ui): truncate empty Compose hints on narrow screens (#207301) fix: keep unsent Cmd+K Compose drafts when reopened (#207307) fix: explain chat update errors when a session changes (#206419) fix(ios): keep consecutive commands on one line in chat (#207242) fix(ios): keep connection messages from flashing when chat reopens (#207233) fix(ios): give Sessions groups more breathing room (#207221) fix(ui): show chat completions as activity rows (#201891) fix(ui): make empty composer hints look distinct from drafts (#207295) fix: explain why chat won’t attach an empty file (#206402) fix(agents): show Doctor's restore-first warning before deleting a held store (#207290) test(channels): fix join failure proof and trim probe fixture (#207264) ...
What Problem This Solves
When you return to an iPhone chat, “Connecting to…” can already be above the composer and disappear a moment later. A cold launch with no reply can have the opposite problem: switching between “Connecting” and “Not connected” restarts the wait, even though the chat never connected.
User Impact
A quick return no longer flashes a connection message. A disconnected message that is already visible stays visible when the app is temporarily inactive. On a cold launch, chat waits three seconds from its first pending connection status, even if the wording changes. Foreground reconnects still wait one second. The connection itself and its wording are unchanged.
Why This Change Was Made
Time in the background is not time spent waiting in chat. The strip ends its wait when the app enters the background and starts a fresh one when it returns to the foreground, without waiting for the app to become active. While the connection is still pending, the existing strip timer keeps the deadline from the first post; other messages keep their existing behavior.
Evidence
Before the fix, the light-appearance recording showed “Connecting to…” on the first readable chat frame after returning from Settings. It disappeared about 0.77 seconds later. After the fix, neither the light nor the dark recording showed a connection message on return.
On a cold launch with no reply, the revised app showed the message 3.06 seconds after the composer became readable, or 3.89 seconds after the header. It stayed visible for the rest of the recording. Holding a local test server’s handshake for 0.5 or 2 seconds showed no message; a 5-second hold showed the message until the connection recovered. An ordinary cold launch against a local test server did not reproduce the return flash.
The clock-controlled background test failed before the fix for both first connections and reconnects. The updated test also covers a visible disconnected message through an inactive interruption, and a wording change without a new deadline. All 11 iOS connection-status tests and all 9 shared status-strip tests passed. The iOS build passed SwiftFormat and strict SwiftLint.
I used an iPhone simulator and a local test server. I did not test a physical iPhone, a real slow network, or a physical Control Center gesture.
Stacked on #206685. The connection strip this change builds on comes from #206678.
🦞 Made with OpenClaw