fix(codemode): simplify activity cards and retain command previews - #680
Merged
Merged
Conversation
Collaborator
Author
独立子代理审查审查范围: 安全、正确性与设计
验证与覆盖限制
本次没有修改代码;不自动批准、不自动合并。 |
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.
Problem
Collapsed Code Mode cards still show script output and spill paths, hiding useful activity behind noise. They only show a few nested calls and replace the others with
more calls, while running rows add status dots and repeatedrunninglabels. Long Bash commands disappear when Pi's 200-character JSON argument preview cuts through the command string; short-enough commands can instead fill a very wide terminal row.Value
Make every recorded call visible and identifiable at a glance, using the same tool icons as ordinary OpenPI tools. Keep the default view quiet and compact horizontally, with detailed script/output evidence available through native expansion.
Approach
more callsplaceholders.runninglabels. Expanded evidence retains explicit running status....argument previews, dropping incomplete escapes/dangling high surrogates and marking the missing suffix rather than guessing it.Validation
Head:
6cd057a6d74092945e06dda57092e0bb635d467b; based onmainatd96b9fcc7ed4116b090c300b103b612056e34fc3.bun run check: passed on the final working tree.node --test --experimental-strip-types tests/extensions/codemode-display/*.test.ts: 22 passed. The repository SDK exercises the older-host safe no-op fallback for renderer registration.git diff --check: passed.Latest
bun run testrun: not green — 2,303 tests, 2,292 passed, 2 failed, 0 cancelled, 9 skipped. Both remaining failures are intests/extensions/plan-mode/result-rendering.test.ts(a rich plan renders without throwing and keeps its content,expanded survives edge-content plans at extreme widths); both also failed before these changes. Other earlier runs additionally reported setup/workflow/worktree timing failures, which this change does not claim to fix. The final test-only lint adjustment replaced an expression-bodied assertion callback with a block; check and targeted/native tests were rerun afterward.The full runner stopped on its Node-test failures, so this is not a claim that every later runner phase passed. Final interactive TUI appearance after
/reloadhas not yet been manually verified.Impact