feat(webview): surface inline-subtask transitions as distinct chat banners - #17
Merged
Merged
Conversation
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.
feat(webview): surface inline-subtask transitions as distinct chat banners
Problem
When
new_taskhits the nesting limit, two things happen that are currently invisible to the user:autoFlattenOnLimit, an over-limit subtask runs inline in the current conversation instead of opening a child tab. The model sees it via the tool result ([auto-flattened: ...]), but the webview renders nothing — tool results are not chat rows.new_taskwhile an inline phase is already active (or over-limit with auto-flatten off) returns only a tool error, again invisible in the UI.So "reject create subtask and back to inline mode" had no visual affordance — confirmed by live task
01a00a40, where both the flatten and the reject appeared as plain model text rather than anything the user could recognize at a glance.Change
Emit two new
ClineSaynotice types fromNewTaskTooland render them as distinct banners:inline_subtask_started(auto-flatten) → amber banner,Spliticon: "Subtask flattened to inline" + the limit detail.inline_subtask_rejected(nested-in-progress / over-limit-reject) → red banner,OctagonXicon: "Nested subtask rejected" + reason.Both are emitted via
task.say(...)in addition to the existing tool result (the model still gets it), so nothing changes for the agent — only the user now sees the transition.packages/types: add both toclineSays.NewTaskTool.ts: emit in the three non-delegate branches (flatten,reject-nested,reject-limit).ChatRow.tsx: two new cases rendering themed banners (VS Code tokens, matchingWarningRowstyling). Each banner carries a settings hint link that deep-links straight into the task-tree settings (switchTab → settings,values.section = "contextManagement") so the user can adjustmaxNestingDepth/autoFlattenOnLimitwithout hunting for them.chatBatchingPredicates.ts: mark both as batching boundaries so they render as their own rows.subtasks.inlineStarted/subtasks.inlineRejected/subtasks.inlineConfigureplus three localized detail strings (inlineStartedDetail,inlineRejectedLimitDetail,inlineRejectedNestedDetail) across all 18 locales.Also fixed (found while reviewing the live UI)
ContextManagementSettingsreferencedsettings:taskTree.*, but the translations live undercontextManagement.taskTree.*. Corrected all six references; added a regression test asserting the nested path resolves.{ maxDepth }/{ reason, maxDepth? }) and the webview renders localized detail strings with interpolation; non-JSON payloads fall back to raw text.Tests
newTaskInlineFlatten.spec.ts): the Task double now carries asaymock; each branch asserts the right say type + message. 6/6 pass.ChatRow.inline-subtask.spec.tsx): both banners render localized title + detail (both reject reasons covered); the settings-hint link deep-links into the task-tree section on click; unrelated say types render neither. 6/6 pass.ContextManagementSettings.spec.tsx): regression test asserting the nestedcontextManagement.taskTree.*key path resolves. 36/36 pass.check-types11/11. Per-file eslint clean.find-missing-translations.jsgreen across all locales.