Skip to content

feat(ui): make mobile navigation a draggable drawer - #130319

Merged
vyctorbrzezowski merged 20 commits into
mobile-chat/topbarfrom
mobile-chat/global-drawer
Aug 27, 2026
Merged

vyctorbrzezowski merged 20 commits into
mobile-chat/topbarfrom
mobile-chat/global-drawer

Conversation

@vyctorbrzezowski

Copy link
Copy Markdown
Member

What Problem This Solves

Mobile navigation previously opened as a generic modal and could only be summoned from explicit buttons. It did not track a rightward drag, and its modal wrapper produced clipped edges, excess padding, and less natural motion across phone aspect ratios.

Why This Change Was Made

This PR moves the mobile navigation surface into the application shell as a real drawer. A neutral-area right swipe now pulls the actual sheet with the finger, direction-locks before taking over the gesture, preserves interactive and horizontally scrollable content, and settles from the current drag position. Focus trapping, inert background content, Escape, backdrop dismissal, toast ownership, reduced motion, and responsive handoff remain shell-owned.

The implementation deliberately avoids a duplicate preview rectangle: the visible surface during the gesture is the same navigation sheet that remains open afterward.

User Impact

  • The drawer can be pulled open from neutral content on any mobile page.
  • Vertical scrolling and nested horizontal scrollers retain their gestures until a deliberate rightward drag is recognized.
  • The sheet has consistent rounded geometry, compact menu density, and safe-area spacing across portrait and landscape phones.
  • Desktop navigation remains on its existing rail path.

Evidence

This PR is stacked on #130318 and must be reviewed/merged after that base. The screenshots compare #130318 (Before) with this PR (After), using the sanitized mobile-transcript fixture at 360x800, 375x667, 393x852, 430x932, and 852x393 landscape.

Light

Mobile drawer before and after in light mode

Dark

Mobile drawer before and after in dark mode

  • Stack base SHA: 29c4ded14bbfd1640bdc21388e405c9f0a8c8e54
  • After SHA: 4e907f5f9a6259cc678dede9ac806aebef947110
  • Local test, lint, formatting, and build gates were intentionally deferred to landing per the approved closeout plan.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Aug 26, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 26, 2026 19:34
@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Aug 26, 2026
@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 26, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 26, 2026
@clawsweeper

clawsweeper Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 5:49 AM ET / 09:49 UTC.

ClawSweeper review

What this changes

The PR moves mobile navigation from a generic modal to a shell-owned drawer that opens by controls or a deliberate rightward touch drag, with accompanying focus, overlay, toast, and responsive-layout handling.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open for maintainer review: this MEMBER-authored, maintainer-labeled PR is a stacked mobile-navigation feature, and current main still uses the modal presentation it replaces.

Priority: P2
Reviewed head: 43494ef6ac55c95f9e09dcdafbc154ce27cb1dfb
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The implementation and focused browser coverage are coherent, but the stacked branch still needs exact-head browser and CI confirmation before it is ready to land.
Proof confidence 🦐 gold shrimp (3/6) Not applicable: Not applicable to the contributor-proof gate because the author association is MEMBER; the PR body supplies screenshot evidence, while exact-head browser validation remains part of merge readiness.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable to the contributor-proof gate because the author association is MEMBER; the PR body supplies screenshot evidence, while exact-head browser validation remains part of merge readiness.
Evidence reviewed 6 items Current-main baseline: Current main still renders mobile navigation through an openclaw modal dialog, so the central drawer behavior is not already implemented there.
Changed owner boundary: The PR centralizes mobile drawer open/close, responsive handoff, focus restoration, and keyboard routing in the application-shell owner.
Gesture implementation: The lazy swipe runtime direction-locks a single touch, excludes interactive and horizontally scrollable content, then opens only after its reveal threshold.
Findings None None.
Security None None.

Live Verification

Command: pnpm test:ui:e2e -- ui/src/e2e/native-nav-sidebar-toggle.e2e.test.ts

Result: FAIL (failed) — step 1 expect_output opens the mobile drawer by swipe across the full mobile-layout range: expected terminal output was not visible within 30 seconds: "opens the mobile drawer by swipe across the full mobile-layout range"

$ node --import tsx scripts/ensure-playwright-chromium.mts && node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner
 -- ui/src/e2e/native-nav-sidebar-toggle.e2e.test.ts
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
2.3 MiB [====================] 100% 0.0s
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-130319-PmYXdu/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.11 /tmp/clawsweeper-live-proof-130319-PmYXdu/target

Assertions:

  • FAIL expect_output: opens the mobile drawer by swipe across the full mobile-layout range

How this fits together

The Control UI shell hosts navigation alongside chat, overlays, and utility panels. On mobile, the shell decides when navigation becomes a modal drawer and must keep touch input, keyboard focus, background interactivity, and transient UI surfaces coordinated.

flowchart LR
  A[Mobile page content] --> B[Shell touch and keyboard handling]
  B --> C[Navigation drawer]
  C --> D[Sidebar navigation]
  C --> E[Focus and transient surfaces]
  E --> F[Main content and overlays]
  C --> G[Toast feedback]
Loading

Decision needed

Question Recommendation
After the stacked mobile-topbar base lands, should OpenClaw adopt this shell-owned draggable drawer as the mobile navigation interaction model? Accept the drawer model: Land the rebased PR after exact-head UI checks and browser evidence confirm gestures, focus, overlays, and responsive handoff.

Why: The patch adds a product-visible interaction model rather than repairing an established defect, and its acceptance requires maintainer judgment after the stacked UI settles.

Before merge

  • Resolve merge risk (P1) - This PR is stacked on the open base at feat(ui): refine the mobile chat topbar #130318; it needs an exact-head rebase and UI validation after that base lands.
  • Resolve merge risk (P1) - The custom drawer now owns interactions formerly provided by the modal component, so the exact merged head needs browser confirmation of touch, focus, nested-overlay, and breakpoint behavior before landing.
Agent review details

Security

None.

PR surface

Source +503, Tests +62, Other 0. Total +565 across 31 files.

View PR surface stats
Area Files Added Removed Net
Source 24 669 166 +503
Tests 5 128 66 +62
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 3 3 0
Total 31 800 235 +565

Review metrics

Metric Value Why it matters
Production versus test delta production +669/-166, tests +128/-66, baselines +3/-3 The feature introduces a substantial shell-owned interaction path while adding focused browser coverage for its touch, focus, overlay, and responsive behaviors.

Merge-risk options

Maintainer options:

  1. Validate the rebased stack (recommended)
    Land the base first, rebase this PR, and require its exact head to pass the focused mobile drawer browser flow before merge.
  2. Accept the interaction risk
    A maintainer may accept the custom drawer contract without fresh exact-head browser evidence if it is intentionally preferred over modal behavior.

Technical review

Best possible solution:

Retain one shell-owned mobile drawer using the existing navigation content, then land the stack in order after exact-head browser evidence confirms the interaction contract.

Do we have a high-confidence way to reproduce the issue?

Not applicable as a bug reproduction: this PR proposes a new mobile navigation interaction, while its browser E2E test provides a concrete validation path for the proposed behavior.

Is this the best way to solve the issue?

Likely yes: current main’s modal wrapper cannot provide a continuous finger-tracked drawer, and the shell is the shared owner of navigation, focus, overlays, and responsive handoff; final browser confirmation remains necessary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 46ca7d1f2791.

Labels

Label justifications:

  • P2: This is a bounded, user-visible mobile Control UI feature rather than an urgent runtime regression.
  • merge-risk: 🚨 other: Replacing modal behavior with custom shell touch, focus, inertness, and overlay coordination has user-interaction risk not settled by static review alone.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable to the contributor-proof gate because the author association is MEMBER; the PR body supplies screenshot evidence, while exact-head browser validation remains part of merge readiness.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Not applicable to the contributor-proof gate because the author association is MEMBER; the PR body supplies screenshot evidence, while exact-head browser validation remains part of merge readiness.

Evidence

What I checked:

  • Current-main baseline: Current main still renders mobile navigation through an openclaw modal dialog, so the central drawer behavior is not already implemented there. (ui/src/app/app-shell-view.ts:563, 46ca7d1f2791)
  • Changed owner boundary: The PR centralizes mobile drawer open/close, responsive handoff, focus restoration, and keyboard routing in the application-shell owner. (ui/src/app/app-shell-chrome.ts:194, 43494ef6ac55)
  • Gesture implementation: The lazy swipe runtime direction-locks a single touch, excludes interactive and horizontally scrollable content, then opens only after its reveal threshold. (ui/src/app/nav-drawer-swipe.runtime.ts:117, 43494ef6ac55)
  • Behavior coverage: The browser E2E coverage exercises mobile swipe opening, focus containment, nested Inbox and debug overlays, Escape, backdrop dismissal, breakpoint handoff, and toast ownership. (ui/src/e2e/native-nav-sidebar-toggle.e2e.test.ts:528, 43494ef6ac55)
  • Feature history: Mobile chat navigation originated in the current-main history with the mobile-title-bar feature, while recent shell and modal work is also concentrated in this area. (ui/src/app/mobile-nav-layout.ts:5, 9ce8ac94b97e)
  • Stack dependency: The supplied PR context identifies the still-open mobile-topbar PR as this branch’s base; the two PRs address adjacent, not duplicate, mobile shell behavior. (04bd1af3b2b7)

Likely related people:

  • Peter Steinberger: Introduced the mobile navigation/title-bar direction and has recent main-history ownership of the application shell and modal keyboard behavior. (role: mobile navigation feature-history owner; confidence: high; commits: 9ce8ac94b97e, e4b36f2e971c, 72adefbca06c; files: ui/src/app/mobile-nav-layout.ts, ui/src/app/app-shell-chrome.ts, ui/src/app/app-shell-view.ts)
  • vyctorbrzezowski: Current history attributes adjacent shell/sidebar work to this author, including the stacked mobile-topbar base and prior sidebar-structure work. (role: recent adjacent Control UI contributor; confidence: medium; commits: 04bd1af3b2b7, aed4510bd094; files: ui/src/app/app-shell-chrome.ts, ui/src/app/app-shell-view.ts, ui/src/e2e/native-nav-sidebar-toggle.e2e.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • After feat(ui): refine the mobile chat topbar #130318 lands, rebase and run the focused mobile drawer browser flow on this exact head.
  • Attach or retain a redacted exact-head mobile interaction capture if available, showing the drawer opening and settling.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (7 earlier review cycles)
  • reviewed 2026-08-26T19:41:59.892Z sha 4e907f5 :: found issues before merge. :: [P2] Use the drawer breakpoint for swipe eligibility
  • reviewed 2026-08-27T00:27:59.937Z sha 88fde00 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T01:40:41.794Z sha bb179c2 :: found issues before merge. :: [P1] Isolate every root panel while the drawer is open | [P3] Use a runtime suffix for the lazy drawer module
  • reviewed 2026-08-27T03:57:59.363Z sha 56dde01 :: found issues before merge. :: [P1] Close the drawer before opening the Debug overlay | [P3] Use a runtime-suffixed module for the lazy drawer
  • reviewed 2026-08-27T07:29:14.917Z sha b1ef9735015d6af06ef596d871d7148515198389 :: found issues before merge. :: [P2] Remove the capturing keydown listener on teardown | [P3] Rename the lazy swipe module as a runtime boundary
  • reviewed 2026-08-27T09:05:39.078Z sha 703bb9b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-27T09:29:49.167Z sha b98a8cb :: needs maintainer review before merge. :: none

@vyctorbrzezowski
vyctorbrzezowski force-pushed the mobile-chat/global-drawer branch from 4e907f5 to 88fde00 Compare August 27, 2026 00:22
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 27, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the mobile-chat/global-drawer branch from 88fde00 to bb179c2 Compare August 27, 2026 01:32
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 27, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the mobile-chat/global-drawer branch from bb179c2 to 56dde01 Compare August 27, 2026 03:51
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Aug 27, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the mobile-chat/global-drawer branch from 56dde01 to b1ef973 Compare August 27, 2026 07:22
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Aug 27, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 27, 2026
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vyctorbrzezowski
vyctorbrzezowski merged commit f15b825 into main Aug 27, 2026
110 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the mobile-chat/global-drawer branch August 27, 2026 10:06
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 28, 2026
* feat(ui): make mobile navigation a draggable drawer

* fix(ui): align drawer gesture with mobile layout

* refactor(ui): isolate drawer startup owners

* perf(ui): keep drawer opening in lazy chunk

* fix(ui): harden drawer modal lifecycle

* fix(ui): complete drawer modal lifecycle

* fix(ui): preserve drawer modal ownership

* fix(ui): keep drawer modal controls reachable

* fix(ui): own drawer shortcuts in capture phase

* fix(ui): defer drawer escape to nested controls

* fix(ui): suppress shell shortcuts under modals

* refactor(ui): isolate drawer key handling

* fix(ui): preserve drawer modal ownership

* fix(ui): defer picker escape to drawer

* fix(ui): scope inbox modal semantics

* fix(ui): dismiss inbox across breakpoints

* fix(ui): preserve overlay escape ownership

* fix(ui): mark drawer swipe runtime boundary

* fix(ui): separate shell key phases

* chore(ui): shrink assertion baseline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant