Repository navigation
fix(session-ui): drop stale todowrite tool label - #53966
Merged
Merged
Conversation
Clear the anti-slop lint debt that blocks changes to tool-renderer.tsx: decode the tool input and metadata fields each renderer reads with Effect Schema instead of typeof checks, reduce the context group label to a tool title, and use Maps for agent tone lookups.
opencode-agent
Bot
force-pushed
the
todowrite-tool-title
branch
from
October 13, 2026 06:26
c5a1d5f to
d35aeaf
Compare
Brendonovich
enabled auto-merge (squash)
October 13, 2026 06:58
3 of 6 tasks
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.
Opening a session that has an old
todowritetool part crashes the Desktop renderer whenever the UI language isn't English.getToolInfostill had atodowritecase that returnedi18n.t("ui.tool.todos"). That key was removed with the todo tool in #35989. In the app, a missing key resolves toundefined, so the context tool-group label passedundefinedintoi18n.list. For English locales,listusesjoin(", "), which quietly drops the value. For every other locale it callsIntl.ListFormat#format, which throws (Iterable yielded undefined which is not a string) and takes down the renderer. A failedtodowritepart can still reach a context group, becauserenderablereturnstruefor failed tools before thetodowritefilter runs.The first commit removes the stale case, so
todowritefalls back to its tool name like any other unknown tool.lint:changedrequires every touched GUI file to be lint-clean, andtool-renderer.tsxhad 91 existing anti-slop problems, so the second commit clears them:toolInput/toolMetadata), nottypeofchecks. Each field decodes on its own, so one malformed value only drops that field.ToolPropskeeps the raw open records (with a SAFETY suppression) becauseGenericToolshows arbitrary input keys andexecuteToolFailed/patchFileGroupsread the raw metadata.getToolInfowas only ever called with no input to label context groups, so it's nowtoolTitle, which returns just the title. The unused icons, subtitles and theToolInfotype are gone.Maps, and the file-group patch entries are typed asFileDiffInfo.map/filterchains and chained literal ternaries were rewritten.Seen in a Windows Desktop 2.0.25 debug export: the fatal renderer error fired on every launch.
Verification:
bun run lint:changed(0 problems),bun run typecheckinpackages/session-uiandpackages/app,bun test srcinpackages/session-ui(250 pass), andprettier --check.Requested by: @Brendonovich (Brendan via Slack)