Skip to content

Session Chat: show v2 timeline notices (moved, agent, model, instructions, restart) #702

Closed

Description

@ivanfenenko

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 (Android projectV2, iOS messages(fromV2:)) uses agent-switched / location-switched / model-switched only to carry agent/model context and draws no row; system falls through to nothing.
  • synthetic is projected as a synthetic user text message, so a restart notice would read like a user bubble instead of a notice.
  • Live: EventDomainAdapter maps session.next.moved / session.moved and session.next.agent.switched / session.next.model.switched to session.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 synthetic messages (metadata.source subagent / shell), and skill messages, 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 synthetic no 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 synthetic as 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

  1. added
    enhancement
    ios
    android
    shared
    todo
    priority: medium
    on Oct 16, 2026
  2. changed the title [-]Session Chat: show "Moved to" divider for v2 location switches[/-] [+]Session Chat: show v2 timeline notices (moved, agent, model, instructions, restart)[/+] on Oct 16, 2026
  3. added
    in-progress
    and removed
    todo
    on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    androidenhancementin-progressiospriority: mediumshared

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions