Repository navigation
Description
Session Chat shows the v2 timeline notices that official opencode v2 shows — a working-directory move, an agent or model change, updated instructions, and a resume after a server restart — as quiet inline lines at the point they happened.
Design
Variant A · Inline line from the prototype: one left-aligned, single-line row per notice. Label in the weak text tone, value in the info tint, end-ellipsized; tapping a row expands the value in place. The same Design System component serves every notice kind; only the copy changes.
Prototype: http://ivan-m2.local:8787/2026-10-16/2256-v2-timeline-notices-702/ (LAN artifact server; scenario "All v2 notices", variant A)
Notices
| v2 session message | Row |
|---|---|
location-switched |
↳ Moved to + location.directory (accessibility label and expanded state carry the full path) |
agent-switched |
Agent changed + Previous → Agent (just Agent when previous is absent) |
model-switched |
Switched to + model display name; same model with only the variant changed → Switched variant to <variant> / Switched variant to Default |
system with metadata.notice == "instructions" |
Instructions updated + instruction sources (metadata.instructionSources, else parsed from description); other system → description, else Instructions updated (never the model-facing text, as in the TUI) |
synthetic with metadata.notice == "restart" (or description Continuing after restart) |
Continuing after restart |
Copy and rules follow opencode origin/beta: TUI SessionSwitchMessageV2 / SessionNoticeMessageV2 in packages/tui/src/routes/session/index.tsx, web notice() and the notice rows in packages/session-ui/src/timeline/session-timeline-row.tsx, strings ui.sessionTimeline.notice.* in packages/ui/src/i18n/en.ts. Schemas: packages/schema/src/session-message.ts.
Current gap
MessageDomainAdapter(AndroidprojectV2, iOSmessages(fromV2:)) usesagent-switched/location-switched/model-switchedonly to carry agent/model context and draws no row;systemfalls through to nothing.syntheticis projected as a synthetic user text message, so a restart notice would read like a user bubble instead of a notice.- Live:
EventDomainAdaptermapssession.next.moved/session.movedandsession.next.agent.switched/session.next.model.switchedtosession.updated(+ running context) only, so no row appears until a REST reload — and REST does not draw one either.
Scope
- v2 only. v1 has no equivalent messages; v1 behavior stays unchanged and there is no v1/v2 UI fork — notices are a product-level timeline item behind the domain adapters.
- Out of scope: subagent / shell completion
syntheticmessages (metadata.sourcesubagent/shell), andskillmessages, which Session Chat already renders. - Keep the existing agent/model context tracking those messages feed.
Acceptance
- Each notice in the table renders as a variant A row in Session Chat on iOS and Android, from REST history.
- Each appears live over SSE when it happens, without waiting for a REST refresh.
- Long values truncate on one line and expand on tap; the full value is in the accessibility label.
- One Design System notice-line component (iOS + Android), used for every kind.
- A restart
syntheticno longer shows as a user bubble. - Unit tests on both platforms cover projection of every kind and the timeline block.
Remaining:
- Design System inline notice-line component on iOS and Android (variant A)
- Project the five notice kinds into a product timeline notice in the v2 message adapters (iOS + Android)
- Stop projecting restart
syntheticas a user message - Emit notices live from the v2 SSE events (move, agent/model switch, instructions updated, synthetic)
- Render notice rows in the Session Chat timeline on iOS and Android
- Unit tests on both platforms
- Verify against a local v2 server on simulator and emulator (restart notice covered by unit tests only)
PR: #707
Activity
[-]Session Chat: show "Moved to" divider for v2 location switches[/-][+]Session Chat: show v2 timeline notices (moved, agent, model, instructions, restart)[/+]