Keep right-canvas surface rail docked
Route right-canvas rail clicks through the explicit canvas opener so Browser, Editor, Files, and Desktop open in the canvas even after a modal session. Preserve modal-header surface switches as floating modal entry points, and document/test the entry-point split.
Alessandro committed
Jun 23, 2026 at 11:28 UTC
cc13586f7b9bf15bf6400d7938be58a1ab6f83b9
3 files changed
+5
-4
tests/test_browser_agent_regressions.py
+3
-3
@@ -803,7 +803,7 @@ def test_browser_entry_points_prefer_canvas_and_modal_dock_handoff():
803
assert "Alpine.store" not in js
804
805
806
-def test_browser_and_desktop_surface_buttons_remember_latest_window_mode():
806
+def test_surface_buttons_keep_modal_and_canvas_entry_points_separate():
807
canvas_store = (PROJECT_ROOT / "webui" / "components" / "canvas" / "right-canvas-store.js").read_text(
808
encoding="utf-8"
809
)
@@ -852,8 +852,8 @@ def test_browser_and_desktop_surface_buttons_remember_latest_window_mode():
852
assert "this.mountedSurfaces = {}" not in open_modal_block
853
assert "failed to close before modal open" not in open_modal_block
854
855
- assert '@click="$store.rightCanvas.openLatest(surface.id)"' in canvas_html
856
- assert '@click="$store.rightCanvas.open(surface.id)"' in canvas_html
855
+ assert '@click="$store.rightCanvas.openLatest(surface.id)"' not in canvas_html
856
+ assert canvas_html.count('@click="$store.rightCanvas.open(surface.id)"') == 2
857
858
assert "recordMode(metadata.surfaceId, SURFACE_MODE_FLOATING)" in surfaces_js
859
assert "configureModalSurfaceSwitcher" in surfaces_js
webui/components/canvas/AGENTS.md
+1
@@ -14,6 +14,7 @@
14
15
- Keep registered surfaces compatible with WebUI extension hooks.
16
- Preserve responsive layout and avoid overlapping the chat/sidebar shells.
17
+- Right-canvas rail and tab buttons are explicit canvas entry points; they must open surfaces in the canvas even when the same surface was last used as a floating modal.
18
19
## Work Guidance
20
webui/components/canvas/right-canvas.html
+1
-1
@@ -46,7 +46,7 @@
46
:class="{ 'is-active': $store.rightCanvas.isSurfaceActive(surface.id) && $store.rightCanvas.isOpen }"
47
:title="surface.title"
48
:aria-label="surface.title"
49
- @click="$store.rightCanvas.openLatest(surface.id)"
49
+ @click="$store.rightCanvas.open(surface.id)"
50
>
51
<template x-if="surface.image">
52
<img class="right-canvas-surface-image" :src="surface.image" alt="" aria-hidden="true">