The assistant lives on its own page today. Make it reachable from anywhere: a slide-over panel (right-side sheet) openable on every page via a header button and a hotkey, hosting the same chat the assistant page hosts (same conversation store, same streaming run — the page remains the full-screen view of the same conversations).
The second half is page context: the chat request currently carries only {messages, id}, so the assistant has no idea what the user is looking at. When the panel is opened from a page, inject the active context into the run as a system-note line (alongside the existing planning-horizon note in api.chat.ts): the route, and the focused entity — block id on a block page, good on a browse detail, tech/TURD master on the TURD page, task on the Tasks page. Then "why does this block need so much power?" and "what's the best recipe for this?" resolve without the user restating what "this" is.
Scope notes:
- Panel UI follows the design system (
docs/design.md): components/ui primitives, square corners, loading/empty states; readable text sizes.
- The context note should name the entity by internal name so the assistant's existing backtick-chip rendering and tools can use it directly.
- Context is advisory: the user may ask about something unrelated; the note says what page is open, it doesn't constrain the question.
- Mobile: the panel should degrade to a full-screen sheet at phone widths (no sideways scroll).
- E2E: a mutating spec covering open-panel → ask → context reaches the request, per the repo rule that user-facing features ship with e2e coverage of the main flow.
The assistant lives on its own page today. Make it reachable from anywhere: a slide-over panel (right-side sheet) openable on every page via a header button and a hotkey, hosting the same chat the assistant page hosts (same conversation store, same streaming run — the page remains the full-screen view of the same conversations).
The second half is page context: the chat request currently carries only
{messages, id}, so the assistant has no idea what the user is looking at. When the panel is opened from a page, inject the active context into the run as a system-note line (alongside the existing planning-horizon note inapi.chat.ts): the route, and the focused entity — block id on a block page, good on a browse detail, tech/TURD master on the TURD page, task on the Tasks page. Then "why does this block need so much power?" and "what's the best recipe for this?" resolve without the user restating what "this" is.Scope notes:
docs/design.md):components/uiprimitives, square corners, loading/empty states; readable text sizes.