Repository navigation
feat(session-view): render finished Code Mode scripts and <background-result> notices - #252
Merged
Merged
Conversation
…-result> notices Complete the notice pipeline for background work (ports anomalyco/opencode#64741 and #64971): - crates/opencode-kit/src/model/notice.rs: wire parse_background_result into synthetic notice parsing so both unified <background-result kind="..."> blocks (#64971) and legacy <shell>, <subagent>, <codemode>, <image>, and <video> blocks decode cleanly even with sparse metadata. Unknown notice kinds fall back to NoticeKind::Job or NoticeKind::Text and are never dropped or crashed on. - crates/opencode-kit/src/model/preview.rs: preserve tag 8 backward compatibility for existing previews and add tags 9/10 for script and required failed job notices (older builds safely decode unknown tags as None and fall back to the server). - crates/opencode-runtime/src/detail.rs: treat failed background job notices (including failed Code Mode scripts) as required (Placement::Separate) even when Notices are hidden, matching timelineNoticeRequired. - crates/session-view/src/turn_errors.rs: render finished, failed, and cancelled background Code Mode scripts ("Script finished · cm_...") with outcome marks and ink (using p.cancelled for light/dark yellow parity). - apps/desktop: animate waiting Code Mode script notices arriving in the inbox and add finished/failed/cancelled script notices to Event marks.
|
PR test build retired — merged into |
Hona
added a commit
that referenced
this pull request
Nov 20, 2026
…ing (#266) - Fold verified fleet PRs #247, #251, #252, #253, #254, #255, #256, #257, #258, #260, #261, #262, #263, #264, and #265 (Rune #1290 PRE-11 / #1296) into docs/upstream-sync/ledger.{json,md} - Audit upstream anomalyco/opencode through 92d35f8e18 (+9 commits past bf683129fa), adding UP-107..UP-113 and assigning UP-106/UP-108/UP-111 to BROWSER-UI - Update scripts/upstream-sync-check.ts to skip pure *.fixture.* test files and route browser UI/history vs extensions commits to BROWSER-UI and WS-9
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
Completes the background-work timeline notice pipeline (ports anomalyco/opencode#64741 and #64971):
crates/opencode-kit/src/model/notice.rs: Wiresparse_background_resultinto synthetic notice decoding so both unified<background-result kind="...">blocks (#64971) and legacy<shell>,<subagent>,<codemode>,<image>, and<video>blocks parse cleanly even with sparse metadata. Unknown<background-result kind="...">notice kinds fall back cleanly toNoticeKind::JoborNoticeKind::Text— never crashing or dropping messages.crates/opencode-kit/src/model/preview.rs: Keeps tag8backward-compatible for existing boot previews and adds tags9(Code Mode script outcome) and10(required failed job notice); older builds safely decode unknown tags asNoneand load from the server.crates/opencode-runtime/src/detail.rs: Marks failed background job notices (including failed Code Mode scripts) as required (Placement::Separate) even when Notices are hidden, matchingtimelineNoticeRequired.crates/session-view/src/turn_errors.rs: Renders finished, failed, and cancelled Code Mode scripts ("Script finished · cm_…") with outcome marks and ink (p.cancelledusesyellow-900in light andstate-fg-warningin dark, matching officialoutcomeNoticeColor).apps/desktop: Animates waiting Code Mode script notices arriving in the inbox (waiting_finish) and adds finished/failed/cancelled script notices toTimeline/Event marks.Screenshots
Expanded

<background-result>notices (dark 1x — finished/failed/cancelled Code Mode scripts, subagent report, unknownfuture_agentnotice, video job notice):Expanded

<background-result>notices (light 1x — verifyingp.cancelledyellow-900parity):Live

opencode-ref @ e51247f626dev server rendering a real<background-result kind="codemode">synthetic notice:Verification
pwsh scripts/guardrails.ps1: 5/5 passed.cargo check --workspaceandpwsh scripts/web.ps1 -Check: passed (web clock: 997 files in 46 crates).cargo clippy -p opencode-kit -p opencode-runtime -p session-view -p opencode-desktop: 0 warnings in all WS-4 files.<background-result kind="subagent">,<background-result kind="video">, and unknown<background-result kind="future_agent">(empty metadata, no description) all render cleanly with 0 stale-region warnings.opencode-ref @ e51247f626dev server: realPOST /api/session/:id/synthetic<background-result kind="codemode">notice renders cleanly with 0 error toasts and 0 stale-region warnings.harness/older-server.tsv2.2.6andv2.3.0profiles): 0 error toasts, shells & subagents still show, legacy<shell>&<subagent>notices still render, 404 cached per connection.new write -> new reopen -> old baseline downgrade): all 3 launches exited 0, zero damaged-storage notices, session loaded cleanly.