Repository navigation
fix(ios): open and close the sidebar drawer without a pause or chat scrolling - #200677
Conversation
…during swipes Toggling the iPhone drawer re-evaluated the sidebar shell and RootTabs, which re-ran the chat, composer and sidebar before the animation could start (about 115 ms per toggle on an iPhone 16 Pro). Sidebar visibility now lives in an observable that only small leaf views and modifiers read, and content that pauses behind the drawer follows a settled copy after the animation ends. The drawer gesture also cancels scrolling under the finger once it claims a swipe, so the transcript no longer follows the swipe's vertical drift. The header menu button stays mounted and dims while the drawer is open.
|
🦞👀 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. |
The previous commit kept the destination's sidebar control mounted and dimmed while the drawer was open, which changed the header layout and the navigation bar visibility of Desktop, Terminal, Agent and Files pages. The control now hides itself, and those pages read whether it is shown in small views and modifiers, so the layout matches main again without re-evaluating the destination on every toggle.
|
Updated after the header-layout fix (843a8c5): drawer open, same layout as |
|
Codex review: needs real behavior proof before merge. What this changesThis PR isolates sidebar visibility updates and cancels underlying scrolling when the drawer claims a swipe. Example: Swipe right from the left edge of an iPhone chat with slight vertical thumb drift.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep this useful iOS repair open; current main retains the reported invalidation path, and source review found no definite introduced defect. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe native iOS navigation shell receives menu taps and drag gestures, positions the sidebar and destination, and supplies covered-chat and session-observer visibility. flowchart LR
A[Menu taps and swipes] --> B[RootTabs presentation state]
B --> C[Sidebar shell modifiers]
C --> D[Drawer and destination]
A --> E[Scroll cancellation]
B --> F[Settled visibility readers]
F --> G[Chat pacing and session observer]
Technical reviewBest possible solution: Keep presentation reads at small observation boundaries within the existing sidebar owner, while preserving destination identity and established gesture arbitration. Do we have a high-confidence way to reproduce the issue? Current-main source supports both mechanisms: visibility changes invalidate the root presentation, and the simultaneous drawer gesture permits underlying scrolling; device observations are contributor-reported rather than independently reproduced. Is this the best way to solve the issue? The change addresses those mechanisms at their existing owners, and the extracted views serve necessary observation boundaries rather than parallel implementations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7b0a97a4c96e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +188, Tests +113. Total +301 across 12 files. Added test files: 1. 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. Review metrics
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 17, 2026, 11:32 AM ET / 16:32 UTC. |
|
Fixed a native accessibility regression in c9d2ba3: the observation-only background now has zero size. The unchanged Settings UI test passes on main, fails on the incoming PR, and passes with this fix; crossed simulator controls confirmed the comparison. The 64 affected tests still pass, including the no-rebuild checks. The body now includes the final inspected before/after captures, native interaction results, and the limits of the simulator/performance evidence. @clawsweeper re-review |
…crolling (openclaw#200677) Isolate drawer presentation reads and cancel underlying pan scrolling after a drawer gesture is claimed. Keep the settled visibility observer outside native accessibility hit targets. Co-authored-by: Michael N <[email protected]> Co-authored-by: Vyctor H. Brzezowski <[email protected]> Co-authored-by: Vyctor H. Brzezowski <[email protected]>

What Problem This Solves
On iPhone, opening or closing the sidebar drawer pauses for about a tenth of a second before the drawer starts to move, so the swipe feels laggy. While you swipe the drawer open, the chat behind it also scrolls along with any up-or-down drift of your thumb.
User Impact
User impact: the drawer starts moving as soon as you release or tap, and the chat stays put while you swipe the drawer. The layout is unchanged; the header's menu button still leaves while the drawer is open, now with a fade.
Why This Change Was Made
Every open or close re-ran the whole root screen, which rebuilt the chat, the composer and the sidebar before the animation could begin. Sidebar visibility now lives in a small observable object that only the views that need it read: the card position, the sidebar layer, the tap-to-close area, the header menu button and the navigation bar visibility of pages that depend on it. Work that pauses content behind the drawer (the chat's covered state, the sidebar's dismiss button, the session observer) follows a settled copy that updates after the animation ends, so it never delays the motion. In the shared chat view, only a small modifier reads the covered state, so covering or revealing the chat no longer re-runs the transcript.
Once the drawer claims a swipe, any scroll view under the finger has its current pan cancelled. A few points of drift before the drawer recognizes the swipe can still move the chat; stopping that would mean delaying every scroll that starts at the left edge.
Evidence
Maintainer verification
Additional repair in
c9d2ba3d538223dfe9e51ab409ec7f1070f879c1: the invisible session-observer background occupied the navigation area for native accessibility hit testing. The existing Settings screenshot test could see “Reset Onboarding” but considered it non-hittable after scrolling. Giving that observation-only background a zero-size frame keeps its task mounted and fixes the obstruction.The unchanged
testReleaseSettingsScreenshotpassed on baselinef1d40db4d99bca224aac35d4f71a7d5dc925c216, failed on incoming head843a8c596d41c6cc0be7c1576406347ae3ce0cc3, and passes with the repair. Swapping the two simulator devices repeated the baseline pass and incoming failure. No assertion was weakened and no new permanent test was needed.These checks used the actual iOS app on isolated iPhone 18 Pro / iOS 27.2 simulators with its built-in synthetic conversation transport. The simulator drags did not independently reproduce the contributor's unwanted-scroll symptom on the baseline, so they establish interaction compatibility, not a new before/after claim for that symptom. Physical-device latency was not remeasured; the contributor's measurements and their limits remain below.
Before/after on the final candidate
Same built-in long-conversation fixture, drawer open. The model label alone is redacted. These static frames demonstrate preserved layout, not animation latency.
Contributor evidence
Layout is unchanged
Drawer open on the iPhone 18 Pro simulator, light mode, built-in demo chat (
--openclaw-screenshot-mode). Before:mainat f1d40db. After: 843a8c5. With the drawer closed the two captures are pixel-identical; with it open they differ only in the animated mascot's frame. There is no layout change to annotate; the visible difference is that the menu button now fades instead of disappearing abruptly.Drawer responsiveness on a device
Main-thread stalls while repeatedly opening and closing the drawer, Time Profiler on an iPhone 16 Pro (iOS 27.2.1), Debug build:
In the before trace, each toggle stalled 106–177 ms rebuilding the root screen, sidebar, chat and composer and re-measuring chat text. Limits: one recording per build rather than repeated alternating runs; the before build was an earlier branch state whose stall is in code this PR changes, not a clean
mainbuild; the after trace is of f807f45, before the header-layout commit; the two remaining long stalls in it could not be attributed because the app launched after recording started. Both commits were also checked by hand on the device: the drawer settles without a pause, the chat no longer scrolls during the swipe, and the menu button fades out and back in.Tests and checks
RootSidebarShellInvalidationTests:SwiftUIRenderSmokeTests"managed assistant media starts its artifact load with the playback route", times out the same way withmain's versions of every file this PR touches, so it is not caused by this change.ChatObscuredStreamPacingTestspassed (covered chat still slows live text and recovers when revealed).scripts/format-swift.sh iosandscripts/lint-swift.sh iosclean;pnpm native:i18n:verifyreportschanged=false.origin/main(f1d40db) to 843a8c5, findings up to P1:scoped-clean, no findings. The reviewer saw the diff only, without running the app.Follow-ups, not in this PR