Record the floating-window decisions in the plan

Pages open inside their window, windows get minimize and X closes, one
server for now with room for more; bottom sheets versus menus is still
open.
This commit is contained in:
2026-11-10 19:00:53 +00:00
parent 132bd11fc6
commit f29efc0fc9
+33 -16
View File
@@ -251,6 +251,9 @@ neighbours.
### Phase 2: chats on the window system
(Per decision 4.1, Phase 1.3 already gives each window its own page
`Navigator` and the root-popup helpers.)
1. **Extract `ChatRuntime`;** `ChatScreen` uses it. Behaviour identical; existing
chat tests stay green. May need 2-3 changes (state, then callbacks, then
caches).
@@ -290,23 +293,37 @@ neighbours.
`run` (run detail), `pipeline` (definition or graph), artifacts. Each is a new
`WindowKind` with a `build` and a codec; no changes to the host.
## 4. Decisions to make before Phase 2
## 4. Decisions (answered 2026-11-10)
1. **Pages pushed from a window** (image viewer, file viewer, diffs, shell
output): open as full-app root routes (simplest, readable), or inside the
window (needs a window-local `Navigator`, and then transient popups need a
root helper).
- Recommendation: root routes now, in-window later per kind.
2. **Sheets opened from a window** on desktop: keep bottom sheets for now (they
become root routes and are readable), and convert to anchored menus or
dialogs as part of the desktop-polish work.
3. **What the window's X does:** close this window (the chat goes back to the
tiling? closed?) versus hide the group, which is what it does today.
- Recommendation: X closes (docks) this window; the chord or menu hides the
group.
4. **Windows across servers:** with saved servers, do chat windows from several
servers coexist?
- Recommendation: yes, keyed by server; the runtime is per server scope.
1. **Pages open inside the window.** Opening an artifact list in a window and
clicking an artifact opens that artifact in the same window, with Back inside
the window. The same goes for image and file viewers, diffs and shell
output.
- Each window gets its own `Navigator` for pages (it owns the window's
content and back stack).
- Transient popups (menus, tooltips, dialogs, sheets) must still appear
above every window and must not be clipped to the window. Window content
opens them through one set of app helpers that target the root
Navigator/Overlay, and `Tooltip`/`MenuAnchor` need a root-targeting
wrapper because `RawTooltip` only uses the nearest overlay.
- Layering tests (Phase 1.4) cover both: pages inside, popups above.
2. **Bottom sheets vs menus: open.** Proposal (explained to the user):
- On desktop, short choice lists (mode, sort, add pane, turn options) become
menus anchored to their button.
- Richer content (chat details, file details) becomes a dialog or a popover
beside the button.
- Phones keep bottom sheets.
- Waiting for the user's answer; not needed before Phase 1.
3. **Window chrome: minimize and close.**
- Every window gets a minimize button (the window hides; it stays in the
window list and its group's show/hide chord).
- X closes that window. For a chat, closing returns nothing to the tiling;
Dock stays a separate action.
- Group show/hide stays on the chords and the window menu.
4. **One server for now.** Windows (and `ChatRuntime`) are built for the
current server only, but window entries and stores carry a server key, and
the runtime is looked up by server, so several servers can be added later
without changing the model.
## 5. How to run this