You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`codemux browser viewport <mobile|tablet|desktop|...|WxH|reset>` — resize viewport for responsive testing (CSS media queries fire at the new width); use this instead of iframe-wrapping the page for mobile preview. `codemux browser viewport-presets` lists available presets.
43
44
44
45
Always get a snapshot before interacting so you know what elements exist.
-`codemux browser viewport <mobile|tablet|desktop|...|WxH|reset>` — resize viewport for responsive testing (CSS media queries fire at the new width); `codemux browser viewport-presets` lists available presets
42
43
43
44
Always get a snapshot before interacting so you know what elements exist.
Copy file name to clipboardExpand all lines: docs/core/STATUS.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ The repo structure is clean and domain-split:
46
46
- Neutral dark shell theming with Omarchy accent sync
47
47
- Sans-serif shell chrome, monospace terminals
48
48
- Built-in file editor with CodeMirror, syntax highlighting, and markdown preview
49
-
- MCP server exposing 29 tools via JSON-RPC 2.0 (browser, workspace, pane, git, notification)
49
+
- MCP server exposing 31 tools via JSON-RPC 2.0 (browser, workspace, pane, git, notification, viewport presets)
50
50
- Cross-provider MCP server runtime (Claude-side): Codemux hosts user-installed MCP servers, discovers configs across Codemux / Claude / Cursor paths, spawns each child once, dedupes identical configs, exposes tools to the Claude SDK via an in-process facade with dynamic `setMcpServers` refresh. Settings panel and `+` popup both surface enable/disable + status badges + tool list modal + 50-tool cap warning. Codex MCP support planned for Step 11 via HTTP gateway (see `docs/plans/step-9-codex-mcp-spike.md`).
51
51
- Session persistence: terminal scrollback saved/restored across restarts, adapter-based resume for CLI tools (Claude Code)
52
52
- Multi-provider chat (Step 12, Stages 1-9 shipped): the chat composer's model picker drives session creation across Claude + Codex + OpenCode in one unified popover (provider rail + searchable model list). OpenCode federates 100+ upstream providers behind a single rail entry; only the connected upstreams surface (filtered at the data layer). New OpenCode adapter is Rust-direct-HTTP against a managed `opencode serve` child (`kill_on_drop`, generated `OPENCODE_SERVER_PASSWORD`). `ChatModelInfo.sub_provider` threads upstream provider id through the harvest so federated models render with `OpenCode · {sub_provider}` subtitles + namespaced `${provider_id}/${model_id}` slugs. Codex finally selectable in the GUI (was hidden behind a stale `ENABLE_PROVIDER_PICKER` flag pre-Step-12). Favorites persist via zustand + `localStorage` and bubble to the top of search results across all surfaces. Live-tested against OpenCode 1.14.31 (116 providers / 4,354 models). Multi-instance per provider + picker keyboard shortcuts deferred to v2; OpenFlow capabilities convergence tracked as future cleanup. See `docs/features/multi-provider-chat.md`.
@@ -61,6 +61,7 @@ The repo structure is clean and domain-split:
61
61
- OpenFlow: orchestration works but large-run reliability and intervention flow still maturing
62
62
- AI merge resolver: backend and frontend working, needs testing depth and live validation
63
63
- Browser automation depth: DOM commands, coordinate commands, and OS-level input work; wait conditions and JS evaluation added in v0.24.0
64
+
- Browser viewport presets: `codemux browser viewport <mobile|tablet|desktop|WxH|reset>` resizes the actual viewport via CDP so CSS media queries fire and screenshots capture at the simulated dimensions. Names are size buckets (not specific device models) so they don't go stale across hardware refreshes. MCP exposes `browser_viewport` + `browser_viewport_presets`. Replaces the older "wrap the page in a 375px iframe" workaround.
Copy file name to clipboardExpand all lines: docs/features/browser.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ The browser pane uses a screenshot-driven Chromium session backed by `agent-brow
23
23
- dynamic stream ports (9223-9299) for concurrent workspace browsers
24
24
- browser data management in Settings (clear cookies, clear all data, view data size)
25
25
- inspector panel for debugging web content
26
+
- viewport presets for mobile / tablet / desktop responsive testing via `codemux browser viewport <preset>` (e.g. `mobile`, `tablet`, `desktop-large`, `reset`) or custom `WxH` dimensions — applies real viewport resize + DPR through CDP, so CSS media queries fire and screenshots capture at the simulated dimensions (replaces the older iframe trick)
26
27
27
28
## Expected Operating Model
28
29
@@ -45,8 +46,11 @@ The browser pane uses a screenshot-driven Chromium session backed by `agent-brow
45
46
46
47
## Important Touch Points
47
48
48
-
-`src-tauri/src/agent_browser.rs` — `AgentBrowserManager`, stealth flags, stream port allocation, spawning
-`src-tauri/src/browser_viewport.rs` — preset table (`PRESETS`, `RESET_SPEC`) and `parse_spec` for preset / `WxH` / `reset` parsing
49
51
-`src-tauri/src/commands/browser.rs` — Tauri commands for pane creation, URL navigation, automation
50
-
-`src/components/browser/BrowserPane.tsx` — screenshot rendering, toolbar, address bar
52
+
-`src-tauri/src/cli.rs` — `BrowserCommand::Viewport` and `BrowserCommand::ViewportPresets` CLI subcommands
53
+
-`src-tauri/src/mcp_server.rs` — `browser_viewport` and `browser_viewport_presets` MCP tools
54
+
-`src/components/browser/BrowserPane.tsx` — screenshot rendering, toolbar, address bar, auto-syncs viewport on pane resize via legacy `width`/`height` payload (which the new socket handler accepts unchanged)
codemux browser viewport mobile --dpr 2 # preset with DPR override
99
+
codemux browser viewport reset # restore default
100
+
codemux browser viewport-presets # list available presets
101
+
```
102
+
103
+
Resizes the actual browser viewport so CSS media queries fire, `window.devicePixelRatio` reflects the simulated device, and subsequent screenshots capture at the new dimensions. Use this instead of wrapping the page in a 375px iframe — viewport resizing gives true mobile rendering (responsive layout, retina assets, real touch-target sizes) and produces clean screenshots without surrounding desktop chrome.
104
+
105
+
Available presets (use `viewport-presets` to see the live list):
When both `preset` and `width`/`height` are present, `preset` wins. When neither is set, dimensions default to 1280×720×1.0 (backwards-compat with the pre-preset shape that `BrowserPane.tsx`'s ResizeObserver emits when the user manually resizes the pane).
0 commit comments