Repository navigation
fix(tui): omit desktop-only release highlights - #61455
HaiYangBG1 wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
The fix works at the build-input level. I couldn't check it end to end in the TUI: builds run from source embed no highlights, so the dialog doesn't appear there.
How I checked it
- The 4 new tests fail on the base and pass with this change. The
packages/scripttests and type-check pass. - I ran
parsewith and without"tui"on every release inCHANGELOG.mdfrom v2.0.26 to v2.2.5. For v2.2.5 the TUI keeps only Percentage Compaction Buffer. Older releases drop only desktop items (e.g. Persistent Desktop Terminals, Faster Long Sessions in Desktop) and keep the shared and TUI ones. - Basing the filter on the detailed sections fits the release prompt, which already requires every highlight to appear in them and fixes the section names.
Public API: unchanged. The only change is an optional audience argument on an internal build-script helper.
One thing worth fixing: script/release.ts still calls parse(releaseNotes) and prints "TUI highlights will show:" with the full, unfiltered list. After this change, the preview a releaser checks before triggering the release would no longer match what the build embeds. Please switch it to parse(releaseNotes, "tui") so the preview and embed() agree.
If #61275 also lands, its history() call needs the same "tui" argument, as you noted.
Related: #56432
There was a problem hiding this comment.
The earlier point is fixed: the release preview in script/release.ts now uses parse(releaseNotes, "tui"), so it lists the same highlights the build embeds. The packages/script tests (9/9) and type-check pass at the new head. The public API is unchanged. Nothing new to raise.
There was a problem hiding this comment.
The new commit only merges dev into the branch. Your changes are the same as in the version I last reviewed, the CLI build scripts on dev still use embed(), and the packages/script tests (9/9) and type-check still pass. The public API is unchanged. Nothing new to raise.
There was a problem hiding this comment.
The new commit only merges dev into the branch again. Your changes are the same as in the version I last reviewed, the CLI build scripts on dev still use embed(), and the packages/script tests (9/9) and type-check pass. The public API is unchanged. Nothing new to raise.
Issue for this PR
Fixes #61237
Type of change
What does this PR do?
The TUI's v2.2.5 highlights advertise desktop-only worktree, shell-mode and quote shortcuts. Its build currently embeds every highlight, including those whose source PRs appear only under Desktop.
Use the existing detailed release sections to exclude a highlight from the TUI only when all its extracted OpenCode PR/issue references are Desktop-only. Shared, unclassified and unlinked items stay. Filtering happens before the five-item limit.
parse(notes)still returns the full list;embed()usesparse(notes, "tui"). The release-review preview inscript/release.tsuses the same TUI audience so its printed list matches the build.With the actual v2.2.5 notes, the TUI keeps Percentage Compaction Buffer and drops the two desktop-only entries. No shortcut, dialog layout or published release is changed. Missing or misclassified release details can still leave unsuitable entries visible.
How did you verify your code works?
macOS ARM64, Bun 1.4.4, frozen install, base
5c4983d5e2e2:DialogHighlightscomponent with the actual release data at 100 and 56 columns, before/after filtering; Enter closed all four dialogs.bun run check: lint has no errors (existing warnings remain), 35/35 typecheck tasks passed.git diff --checkpassed.Focused commands:
After the review identified the release-preview call site, I updated it and reran the Script suite (9/9 passed) and the normal pre-push check (35/35 typecheck tasks passed, cached). The release-triggering command itself was not executed.
Not verified: a complete stable Bun/Node release build, full CLI interaction in a real PTY, Linux/Windows, upstream CI, or the entire repository's test suites. The full Core suite was not rerun for this build-parser change.
Integration with #61275: that open PR adds
history(), which callsparse(section). When combining the changes, useparse(section, "tui")there so each historical release is filtered before its item limit and the release-history limit. Leaving the default call would reintroduce the desktop entries. I inspected its current source atf3faae353bd5; the combined branch has not been built or tested. This PR does not implement its history navigation.Visual
Screenshots / recordings
The comparison uses the real component's OpenTUI test-renderer output (
captureSpans()), exported to PNG with its captured text, colors and positions. These are component fixture renders, not screenshots of a released CLI or a real terminal window.56-column comparison
Checklist
Added by the opencode bot (AI-generated).
Related: #56432
Upstream sync on 2026-11-05
Head
4c35bd6517c47b2ebec4d5c19fa4a15f93e7187amergesdevat8a12d6b4207a2bef758a20fa922a189fe9dea78dand preserves the PR's existing behavior. The Script suite passed 9 tests and the TUI highlights suites passed 5 tests. On macOS ARM64 with Bun 1.4.4 and frozen dependencies,bun run checkpassed lint with no errors and all 35 typecheck tasks. The normal pre-push hook passed, and the fork branch SHA was read back after the fast-forward push.Earlier runtime and visual evidence above remains tied to its stated commits. These local results do not establish hosted CI approval or release validation.