Skip to content

feat(settings): accept collapsed as alias for default tool-collapse mode (#3256)#3695

Merged
Hmbown merged 1 commit into
Hmbown:mainfrom
findshan:feat/tool-collapse-collapsed-alias
Jun 27, 2026
Merged

feat(settings): accept collapsed as alias for default tool-collapse mode (#3256)#3695
Hmbown merged 1 commit into
Hmbown:mainfrom
findshan:feat/tool-collapse-collapsed-alias

Conversation

@findshan

Copy link
Copy Markdown
Contributor

What

Issue #3256 proposes that the default tool-call verbosity mode be named collapsed (opposite expanded), and made configurable. The collapse/expand behavior, the tool_collapse setting, the failure-auto-expand path, and the Alt+V removal already shipped — the canonical setting value is compact. The one remaining gap: the issue's own proposed name collapsed was not a recognized value, so tool_collapse=collapsed was stored verbatim and only behaved correctly by falling through to the default match arm (never round-tripping to a canonical name, and absent from the help text).

This PR closes that vocabulary gap:

  • normalize_tool_collapse_mode now accepts collapsed / collapse as aliases that normalize to the canonical compact.
  • Settings help text lists collapsed (alias compact).
  • ToolCollapseMode::from_setting documents the intent.
  • Round-trip coverage added to the existing tool_collapse_mode_is_configurable test.

Backward compatible — existing compact/expanded/calm configs are unchanged.

Note on scope

I verified the rest of #3256 is already implemented on main:

  • collapse-on-success / auto-expand-on-failure: crates/tui/src/tui/history.rs (should_collapse + the Failed → Transcript override).
  • configurable verbosity: tool_collapse setting + ToolCollapseMode (compact/expanded/calm).
  • the broken Alt+V affordance is already gone (replaced by the bare v details key); no dead "Alt+V for details" hint remains.

So this is intentionally a small alignment PR rather than a reimplementation. Happy to also fold in the batched-call rollup from the issue as a follow-up if useful.

Test

cargo test -p codewhale-tui --bin codewhale-tui settings::tests::tool_collapse_mode_is_configurable passes; cargo fmt --all -- --check and cargo clippy -p codewhale-tui --all-features --locked (CI flags) clean.

Refs #3256

… mode

Issue Hmbown#3256 proposes naming the default tool-call verbosity `collapsed`
(opposite `expanded`). The implementation shipped the canonical name as
`compact`, so a user following the issue/docs and setting
`tool_collapse=collapsed` was stored verbatim and only worked by falling
through to the default match arm.

Accept `collapsed`/`collapse` as explicit aliases that normalize to the
canonical `compact`, align the settings help text, and document the intent
in ToolCollapseMode::from_setting. Backward compatible; adds round-trip
coverage to the existing tool_collapse_mode_is_configurable test.

Refs Hmbown#3256

Signed-off-by: findshan <224246733+findshan@users.noreply.github.com>
@findshan findshan requested a review from Hmbown as a code owner June 27, 2026 12:53
@github-actions

Copy link
Copy Markdown

Thanks @findshan for taking the time to contribute.

This repository is observing a maintainer-managed PR intake gate in dry-run mode, so this pull request is staying open. This note helps maintainers prepare the allowlist before any enforcement is considered.

Please read CONTRIBUTING.md for the expected contribution shape. A maintainer can grant recurring PR access by commenting /lgtm on a pull request.

@Hmbown Hmbown merged commit 7a70455 into Hmbown:main Jun 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants