feat(app): Mobile Touch Optimization#18766
Conversation
Add a toggleable auto-accept mode that automatically accepts all incoming permission requests with a 'once' reply. This is useful for users who want to streamline their workflow when they trust the agent's actions. Changes: - Add permission_auto_accept keybind (default: shift+tab) to config - Remove default for agent_cycle_reverse (was shift+tab) - Add auto-accept logic in sync.tsx to auto-reply when enabled - Add command bar action to toggle auto-accept mode (copy: "Toggle autoaccept permissions") - Add visual indicator showing 'auto-accept' when active - Store auto-accept state in KV for persistence across sessions
…rtcut support Rename 'Toggle autoaccept permissions' to 'Toggle permissions' for clarity and move the command to the Agent category for better discoverability. Add permission_auto_accept_toggle keybind to enable keyboard shortcut toggling of auto-accept mode for permission requests.
…hable by 'toggle permissions'
…rent state in toggle titles
…orkflow interruptions while still requiring confirmation for bash commands
…t and message rendering When the client clock is ahead of the server, user message IDs (generated client-side) sort after assistant message IDs (generated server-side). This broke the prompt loop exit check and the UI message pairing logic. - Extract shouldExitLoop() into a pure function that uses parentID matching instead of relying on ID ordering - Extract findAssistantMessages() with forward+backward scan to handle messages sorted out of expected order due to clock skew - Remove debug console.log statements added during investigation - Add tests for both extracted functions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…uch the container edge
…t-loop-exit # Conflicts: # packages/ui/src/components/session-turn.tsx
…t-loop-exit # Conflicts: # packages/ui/src/components/session-turn.tsx
…lers Use Node's createServer for MCP OAuth callback and Codex plugin OAuth servers instead of Bun.serve, making them work under Node.js.
Use npm-install:${pkg} instead of a global npm-install lock so
concurrent installs of different packages can run in parallel.
When the lockfile exists but .bin is empty or absent, add() would read the lockfile via loadVirtual() and return early without calling reify(). Delete the lockfile before calling add() so it proceeds with a full install.
Replace tsx dependency with explicit 'node' invocation for the compiled ESLint server. Remove all BUN_BE_BUN env var references which are no longer needed after the Bun-to-Node migration.
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
- Add mobilePanel state to layout context for tracking active panel - Create MobileFullscreenPanel component for mobile fullscreen overlays - Connect overflow menu items to mobile panel switching - Panels display as fixed fullscreen overlays on mobile (< 768px)
- Remove unused Icon import - Remove unused 'session' panel type - Extract shared panel content rendering to useFileTreePanel hook
On touch devices, show a '+' button near selected text that allows adding comments. This replaces the hover behavior used on desktop. - Create TouchSelectionToolbar component in @opencode-ai/ui - Add useTouchSelection hook to detect text selection on touch devices - Integrate with file-tabs.tsx to show toolbar on touch devices - Disable hover utility on touch devices (hover: none)
- Replace DropdownMenu with ContextMenu for file context menu - Left-click now correctly opens files (original behavior) - Context menu only appears on right-click (desktop) or long-press (touch) - Remove unused useLongPress hook and createSignal - Simplify component by using native ContextMenu behavior
…dering for prompt loop exit and message rendering
…nal 1.25+ with kitty keyboard
…sing @npmcli/arborist
…createServer in OAuth handlers
…bSub + InstanceState
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my comprehensive search, I found potential related PRs (not counting PR #18766 itself): Potentially Related PRs:
However, none of these appear to be direct duplicates. PR #18766 seems to be a comprehensive mobile optimization effort that may complement or supersede some previous efforts, but the search results indicate this is a distinct PR addressing multiple unified mobile/touch improvements. |
Summary
This PR optimizes the OpenCode App for mobile/touch devices while preserving the existing desktop experience. It addresses 5 key pain points for mobile users:
Changes
Files Changed
packages/app/src/components/session/toolbar-overflow-menu.tsxpackages/app/src/components/session/session-header.tsxpackages/app/src/pages/session/mobile-fullscreen-panel.tsxpackages/app/src/pages/session/file-tabs.tsxpackages/app/src/components/file-tree.tsxpackages/app/src/hooks/use-long-press.tspackages/app/src/context/layout.tsxpackages/ui/src/components/selection-toolbar.tsxpackages/app/src/i18n/en.tspackages/app/src/i18n/zh.tsTesting
All features tested on mobile viewport (720×1920):
Screenshots
Mobile toolbar with overflow menu and back button visible. File tree in fullscreen mode with file content displayed.
Commits