Repository navigation
Description
Boundary
specs/t27os/glass_window.t27, specs/t27os/statusbar.t27, specs/t27os/queen_chats.t27, specs/t27os/queen_dash.t27, specs/t27os/queen.t27, specs/t27os/session_store.t27, specs/t27os/kernel.t27, specs/queen/actors.t27. No other files. All logic spec-first in .t27 (L2, L4); glass_window.t27 carries @extern, so its leg tests with t27b test and builds with make t27os.
What exists today (found, 2026-11-03)
- Footer -> panel pattern: the footer bar (
statusbar.t27) maps a click to a page (item_page,PG_*); the click chain inglass_window.t27(~12833) flips one right-panel flag:kyp(KEYS),dp(DOCTOR),qp(Queen panel),pfp(profile). - The QUEEN CHAT dock exists (
queen_chats.t27,draw_rcinglass_window.t27~5651): the Queen pane's terminal grid as transcript, input line intb[TBO_RC..](RC_TEXT_MAX = 200), Return sends viaclient_keys; open flagtb[RC_FLAG]. - The gaps: the dock toggles only from the header chip inside the CHAT petal screen; the home screen with the 27 petals has no chat at all; the footer's
QUEENopens the status panel, not the chat; the dock dies with the screen; messages carry no context snapshot.
Goal (owner, 2026-11-03)
A persistent contextual Queen chat, pinned beside every screen of T27 OS — home (27 petals) included. The user switches between tasks, code, DSH, Doctor and other views: the conversation, draft, scroll and in-flight answer stay; the Queen receives the context of the place the message was sent from. In any place the user asks "what is happening here?" and she knows which object the question is about, without losing the conversation.
1. The chat belongs to the T27 OS shell, not to one screen
- the chat opens from every screen, home (27 petals) included;
- switching screens never closes the chat or destroys the conversation, draft, scroll or in-flight request;
- an answer keeps streaming after a switch;
- reopening never silently creates a new session;
- the footer button (and a home-screen affordance) only toggles the dock.
- Mutual exclusion with DOCTOR/KEYS is revised: the old "open one closes all" may contradict persistence. Preferred: the user opens DOCTOR and discusses its state with the Queen at the same time. Verify the layout against the minimum window width; never close a conversation silently.
2. Every message carries a context snapshot
Minimal contract: context_id, timestamp, window/workspace identity, screen/view identity, selected object identity + type, source revision / runtime snapshot identity, allowed evidence links.
Example: the user selects a factory task and writes "why is it stuck?" — the Queen receives the task id and the confirmed state, not a guess from recent messages.
First-slice context adapters (limited set):
| Screen | Context passed |
|---|---|
| Factory (kanban/factory) | selected task, stage, last confirmed result |
| Spec/code | path, revision, selected symbol or range |
| DOCTOR | selected incident and check results |
| DSH | available session id and observed status |
| Home (27 petals) | petal under pointer / hovered petal identity |
If a screen has no adapter, pass an honest "context unavailable" — never an invented description of the whole screen.
3. The context is visible to the user
A compact chip above the input, e.g. Context: Factory — task #... -> CI check (English in the UI, L3). Provided: open the passed-context details; send without context; pin a chosen context; return to following the screen. Default: the context follows the screen until send; at send an immutable snapshot is stored — later navigation never changes a sent message's meaning. If an answer belongs to a previous screen, show that binding.
4. Understanding a screen grants no right to act
- UI text, logs and document contents are data, not system instructions.
- The context never includes tokens, passwords or KEYS contents.
- No automatic sending of a whole terminal transcript or a private document.
- A mutating action binds to a concrete object and revision; on stale state, re-check before acting.
- Merge, delete, e-mail and spending keep their separate approval gates.
- Escalation to paid models after failures is not agreed here: first confirm the existing routing (
specs/claw/model_route.t27), worker availability and budget policy.
5. One conversation model, no second chat.log
Before any new store, reconcile: session_store.t27, existing Queen events, the current queen_chats dock, and the DSH-side store if the integration touches it. One source of truth: the dock, the CHAT petal screen and any other view read the same model, not private copies. Where the pipeline allows, the dock renders from the shared model/scene (the factory principle), not as one more separately drawn screen.
Implementation order (first end-to-end slice first)
open the dock -> write on screen A -> switch to screen B
-> conversation and draft survive -> send with context B
-> answer arrives with the right binding
Persistence, context and a real answer path first. Named chats, markdown and richer rendering come after. The earlier R-numbers (footer entry, transcript bubbles, input improvements, actor answer path, sessions, markdown) stay as follow-up children under this order.
Acceptance of the first slice
- The chat stays open across switches between three screens, home included.
- Draft and in-flight answer survive.
- The Queen receives the correct id of the selected object.
- Messages sent from screens A and B keep different context snapshots.
- Opening DOCTOR does not destroy the conversation.
- Secret fields are excluded.
- With the backend unavailable an error or offline state shows — never an eternal "typing".
- All of it demonstrated inside T27 OS itself, not only by a test or a mock.
Success criteria
./target/release/t27cbuilds;./scripts/tri testgreen;t27b test specs/t27os/glass_window.t27green for the extern spec.- Tests (L4) on every new
.t27fn: context snapshot build/store, adapter per screen, dock persistence across screen switches, draft survival, exclusion of KEYS-secret fields. - Foreign-line budget intact (<= 40 added hand lines per non-t27 file),
python3 tools/dupe_scan.pyclean,see #Nonly (neverCloses #Non this epic).
Activity
[-][EPIC] QUEEN CHAT in the footer: her chat opens from the status bar like DOCTOR and KEYS, and the chat gets better[/-][+]QUEEN CHAT - persistent contextual sidebar across T27OS[/+][-]QUEEN CHAT - persistent contextual sidebar across T27OS[/-][+][EPIC] QUEEN CHAT - persistent contextual sidebar across T27OS[/+]gHashTag commentedon Nov 3, 2026
First end-to-end slice implemented and verified (owner order, 2026-11-03). No new worktree, no second conversation store.
Changed (main clone, uncommitted lane):
rc_context_kind,rc_context_text), the immutable send snapshot ring (rc_snap_record/rc_snap_kind/rc_snap_sel) living in the dock region's spare bytes (head 301, slots 304..368, five bytes a slot -- no key or transcript bytes can fit); the ring survivesrc_clear. New test + invariant.QC_LINK_W,rcfoot_left,on_rcfoot),right_wupdated, order test extended.rc_open_pick(her session in this space, or a new one). Dock opens/closes without touching the conversation, draft or in-flight answer (they live in the dock region and the Queen session). CONTEXT chip drawn above the input. At Return the send path records the snapshot (kind + session number only). New test.Verification:
make t27osbuilds target/t27os/T27OS.app with the new glass_window.o (build 3, signed); app launched and stays up (pid checked).Demo of the owner's scenario is staged: the rebuilt app is running on this Mac -- Home: click QUEEN CHAT in the title bar; on any screen: QUEEN CHAT in the foot; open DOCTOR: the conversation and draft survive and the chip/state agree. What remains honest: the answer path is still the Queen pane route (
client_keys) -- if her pane is offline the dock shows the offline banner, not an eternal "typing"; named chats, markdown and the Doctor/Keys/Factory context adapters are the next children under this epic.gHashTag commentedon Nov 17, 2026
Spec created: specs/t27os/queen_chat.t27 (typecheck OK, 1 test pass).
gHashTag commentedon Nov 17, 2026
Reopened: closed as spec-only. A .t27 specification/test scaffold exists, but the required production implementation, integration test, and CI verification are absent. This issue remains open until the target component implements the specified behavior and evidence is provided.
gHashTag commentedon Nov 17, 2026
Spec exists and passes typecheck + tests. M4 milestone complete.
gHashTag commentedon Nov 18, 2026
Reopened: closed as spec-only. A .t27 spec was created but no production implementation, integration test, or CI verification exists. This issue remains open until the target component implements the specified behavior and evidence is provided.