Repository navigation
Show v2 timeline notices in Session Chat - #707
Merged
Merged
Conversation
A quiet single-line row for a session change: label in the weak text tone, value in the info tint, end-ellipsized and expandable in place. The Move variant leads with the return glyph. Registered in the Component Gallery. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A v2 move, agent or model switch, instructions update, or restart resume is now its own quiet row (a Notice message with one TimelineNotice part), from REST history and live over SSE. Live notices take the server's id (evt_ to msg_), so a reload keeps one row. Notices carry no agent, model, text or context estimate; REST switch notices still feed the running agent and model. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Moved, agent and model switches, instruction updates and restart resumes become notice rows from REST history and from live SSE; a live notice takes the message id the server derives from its event, so the REST copy replaces it in place. Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 tasks done
Collaborator
Author
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit cda053f. Configure here.
A notice is never a reply, so Changes no longer targets a prompt still waiting on one, and a notice at the top of a page no longer reads as a split turn that needs an older page. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Moved to,Agent changed,Switched to/Switched variant to,Instructions updated, andContinuing after restart.OpenCodeTimelineNotice(Change/Movevariants, collapsed / expanded state). Label in the weak text tone, value in the info tint, one line; tap expands the value. Component Gallery entries and light/dark previews included.TimelineNoticecarried by a new notice message role and part, projected from the v2location-switched,agent-switched,model-switched,systemand restartsyntheticmessages. Notices are their own rows: they do not join tool groups, count as user messages, or change context totals.evt_swapped formsg_, the same id the server gives the REST message, so a reload replaces the live row instead of duplicating it.syntheticno longer projects as a user message. v1 is unchanged.Screenshots
Against a local v2 dev server (scenario harness). Agent, model, move and instruction changes were made from another client while the session was open.
Plan → Build,core/instructions)Checks
./gradlew :app:testDebugUnitTestpassed (2149 tests, 0 failures, 1 skipped).:app:assembleDebugpassed. ktlint is clean on changed lines. All three ran locally withcompileSdkforced to 36 by a local Gradle init script, because platform 37 is not installed on this machine. CI runs with 37.STORE_SCREENSHOT_OUT, and a server seeded with a big session.Issue
Risks / Follow-ups
previous, so a variant-only change first reads "Switched to ". It changes to "Switched variant to …" after the next REST load.my-agent→ "My Agent"). Official opencode shows "My-agent".systemmessages show theirdescription, or "Instructions updated" when there is none, and never the model-facing text. The TUI does the same; the web client falls back to the text.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmithwith what you need.Note
Medium Risk
Broad changes across live event projection, REST transcript mapping, message store, and timeline UI on both platforms; behavior is heavily tested but live/REST id sync and running-context edge cases could still mis-order or mis-label switches.
Overview
Session Chat on Android and iOS now renders v2 session changes as quiet inline timeline rows (directory moves, agent/model switches, instruction updates, restart), aligned with official opencode v2 behavior.
The change introduces a client-only
noticemessage role and part carrying aTimelineNoticemodel. REST v2 session items (location-switched,agent-switched,model-switched,system, restartsynthetic) project into their own transcript rows instead of silently updating context or showing as user text. Live SSE for the same events emits matchingmessage.updated/message.part.updatedrows whose ids swapevt_→msg_so reload replaces live rows without duplicates.UI adds
OpenCodeTimelineNotice(label/value, move glyph, tap-to-expand) plus gallery entries; timeline block building treats notices as standalone rows that do not merge with assistant tool groups or complete user turns. Session cache and running agent/model context are updated so switches recorded only as notices still stamp the next prompt after reload (notably on Android).Restart synthetics become notice rows instead of hidden user messages; v1 is unchanged.
Reviewed by Cursor Bugbot for commit cda053f. Bugbot is set up for automated code reviews on this repo. Configure here.