Skip to content

feat(workspaces): floating mobile windows, default size preferences, and touch UX - #65

Merged
funnycups merged 6 commits into
funnycups:releasefrom
xzhouzhou758:feat/mobile-floating-run-dock
Nov 22, 2026
Merged

funnycups merged 6 commits into
funnycups:releasefrom
xzhouzhou758:feat/mobile-floating-run-dock

Conversation

@xzhouzhou758

@xzhouzhou758 xzhouzhou758 commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Why

After #58 unified the Workbench platform and shared Run Dock, desktop viewports already use floating small/large windows, whereas narrow mobile screens still forced both the Run Dock and the Workbench shell into edge-to-edge bottom sheets over dark scrims. On mobile this obscured most of the chat while search or multi-agent orchestration ran, offered no setting for whether windows should open small or large by default, and kept desktop-sized 24-30px controls that were easy to mis-tap with one thumb.

Changes

  • Mobile floating Run Dock & synced default size preference:

    • Replaced the narrow-screen bottom sheet in public/scripts/run-panel/dock.js and dock.css with a rounded floating window across both small (compact header + live round card above the input/quick-reply bar, no backdrop scrim) and large (centered floating modal with both Shrink and Collapse buttons) modes, unifying the compact breakpoint with Workbench at <= 640px and removing legacy bottom-sheet dead nodes/branches.
    • Kept mobile drag coordinates (mobilePos / mobilePillPos) separate from desktop coordinates (pos / pillPos) and tracked visualViewport offsets so the card stays visible when mobile keyboards open.
    • Added account-scoped defaultSize ('small' | 'large', defaulting to 'small') and exposed getRunDockPrefs, setRunDockPrefs, resetRunDockPosition, and subscribeRunDockPrefs on run-panel and Luker.getContext().runPanel.
    • Wired live two-way sync across four places: the Run Dock ... menu, Search Tools extension settings (search-tools/settings-ui.js with clean teardown and Node-safe globalThis.window?.addEventListener), Orchestrator workspace settings (orchestrator/lens/views/settings-view.js), and Workbench Settings -> Window (workbench/pages/settings.js).
  • Mobile floating Workbench window & default size setting:

    • Replaced the <640px bottom sheet and unreachable .wb-scrim in workbench/ui/window.js, workbench/model/geometry.js (compactDefaultBox / clampCompactBox, keeping top + height <= vh and left + width <= vw), and workbench/css/shell.css with a centered rounded floating window, preserving independent mobileBox persistence, persisted prefs.maximised across reloads and fold/reopen cycles, and the Maximize/Restore control on mobile.
    • Added defaultSize: 'small' to DEFAULT_SETTINGS in workbench/source-luker.js and Workbench default size (Small window / Large window) in Settings -> Window, and made Reset position restore both Workbench and Run Dock positions immediately without requiring a page reload.
  • Thumb-friendly mobile touch UX, host-theme isolation & tri-lingual docs:

    • Enlarged .is-compact touch targets (34-36px header icon buttons, 38px tabs/selects/buttons/check rows, 40px menu items and collapsed Run Dock pill with a 36x36 close target), auto-scrolling the active compact Workbench tab into view.
    • Added a 6px pointer deadzone before titlebar dragging starts and touch double-tap (<320ms) on both Workbench and Run Dock headers to toggle between small and large window modes cleanly on iOS/Android.
    • Added a full-width bottom-edge vertical resize strip (.wb-resize-y) on compact Workbench windows, made the collapsed Run Dock pill draggable without triggering accidental click-to-open on release, and auto-flipped the Run Dock ... menu upward (.is-up) when opened near the bottom of the screen.
    • Hardened .lw-surface button (box-shadow: none) and .lw-select (white-space: nowrap) isolation in lens-shared/tokens.css against custom host themes.
    • Updated EN / zh-CN / zh-TW user & extension-API documentation (run-panel.md, orchestrator/index.md, workbench.md), E2E helpers, and 05-panel-mobile.png screenshot.

Verification

  • npm run lint:plugin-imports -> 0 violations
  • npx eslint --quiet across all touched files -> 0 errors
  • Jest unit suites (search-tools-extension-api.test.js, search-tools/, i18n-lens-audit.test.js, run-panel/, workbench/, orchestrator/lens/, memory-graph/, sd-workbench-lens.test.js) -> 111 / 111 suites passed (1103 tests)
  • cd docs && npx vitepress build -> passed cleanly
  • Verified interactively in a real browser across 390x844 mobile and 1280x800 desktop viewports in both light and dark themes

@funnycups
funnycups merged commit 79eee73 into funnycups:release Nov 22, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants