Skip to content

🤖 fix: add compact bash summary mode#3349

Open
ibetitsmike wants to merge 6 commits into
mainfrom
mike/chat-tool-command-labels
Open

🤖 fix: add compact bash summary mode#3349
ibetitsmike wants to merge 6 commits into
mainfrom
mike/chat-tool-command-labels

Conversation

@ibetitsmike
Copy link
Copy Markdown
Contributor

@ibetitsmike ibetitsmike commented May 21, 2026

Mux is updating this PR on Mike's behalf.

Summary

Rebases the bash header work onto latest main and adds a new collapsed bash summary setting: Compact. The default Intent and command mode keeps main's stacked intent plus raw command layout, Command keeps the raw command-only mode, and Compact shows only parsed command names like cd, git.

Implementation

  • Restores a persisted collapsed bash summary preference with three values: Intent and command, Compact, and Command.
  • Adds the setting to General settings.
  • Adds compact-mode rendering in BashToolCall that omits intent, raw script text, and command metadata so the row stays minimal.
  • Adds best-effort shell command-name extraction with handling for wrappers, redirections, heredocs, arithmetic clauses, grouping delimiters, case arms, and shell negation.
  • Keeps main's default two-line intent plus raw command rendering unchanged.
  • Adds a one-entry compact summary cache for repeated renders of the same script.
  • Hardens unit-test browser global and runtime-factory mocks so full-suite CI keeps isolated test state.

Validation

  • bun test src/browser/features/Tools/bashCollapsedSummary.test.ts src/browser/features/Settings/Sections/GeneralSection.test.tsx
  • bun test src/browser/features/Tools/bashCollapsedSummary.test.ts
  • bun test src/browser/stores/GitStatusStore.test.ts
  • bun test src/browser/utils/ui/keybinds.test.ts src/browser/utils/commands/sources.test.ts
  • bun test src/browser/utils/ui/keybinds.test.ts src/browser/components/WorkspaceHeartbeatModal/WorkspaceHeartbeatModal.test.tsx src/browser/features/Messages/InlineSkillMarkdown.test.tsx src/node/services/tools/task_apply_git_patch.test.ts
  • bun test src/browser/utils/ui/keybinds.test.ts src/browser/stores/GitStatusStore.test.ts src/node/services/utils/forkOrchestrator.multiProject.test.ts src/node/services/tools/task_apply_git_patch.test.ts
  • TEST_INTEGRATION=1 bun x jest tests/ui/review/undo.test.ts tests/ui/chat/sendModeDropdown.test.ts --runInBand
  • bun test src
  • make static-check
  • Simplify and deslop sub-agent reviews were run. The simplify follow-up patch was applied.

Risks

Low. This only changes collapsed bash header display and test-only mock cleanup. The expanded Script section still shows the full command.


Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: $223.75

@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Mux is requesting review on Mike's behalf.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df517cb8e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts
@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from df517cb to 80a9a57 Compare May 21, 2026 11:34
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Addressed the attached leading redirection parsing feedback and added coverage for >/tmp/mux.log make, 2>/dev/null git, and 2>&1 gh.

Mux is requesting another review on Mike's behalf.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from 80a9a57 to 232b055 Compare May 21, 2026 12:52
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Updated the command-label spacing after visual validation so comma-separated labels render more compactly in mono text.

Mux is requesting another review on Mike's behalf.

@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from 232b055 to 307953a Compare May 21, 2026 12:52
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Updated the attribution and spacing-only diff on the latest SHA. Please review this head.

Mux is requesting another review on Mike's behalf.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 307953a8c1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts
@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from 307953a to 77cd0d3 Compare May 21, 2026 13:10
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Addressed the heredoc parser feedback by skipping heredoc bodies before command extraction, added coverage for quoted and tab-stripping heredocs, and kept the visual spacing fix.

Mux is requesting another review on Mike's behalf.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 77cd0d367d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts
@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from 77cd0d3 to 1617728 Compare May 21, 2026 13:17
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Addressed the arithmetic bit-shift feedback by skipping arithmetic expressions while scanning for heredocs and added coverage for $((1<<2)) plus ((x<<=1)).

Mux is requesting another review on Mike's behalf.

@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Please review the latest head after the arithmetic bit-shift fix.

Mux is requesting another review on Mike's behalf.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1617728eaa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts Outdated
@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from 1617728 to a9fd5c8 Compare May 21, 2026 13:53
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Addressed the env option feedback by skipping options that take required arguments before extracting the wrapped command, with coverage for env -C /repo -u FOO git status and long-option forms.

Mux is requesting another review on Mike's behalf.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a9fd5c8839

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts Outdated
Comment thread src/browser/features/Tools/bashCollapsedSummary.ts
@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from a9fd5c8 to 15ff82d Compare May 21, 2026 14:05
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Addressed the noclobber redirection and brace group feedback, with coverage for printf hi >|/tmp/out && git status and { git status; } && gh pr view 1.

Mux is requesting another review on Mike's behalf.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 15ff82d95f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts
@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from 15ff82d to 9940fdf Compare May 21, 2026 14:11
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Addressed the subshell grouping feedback by stripping grouping delimiters before command-name normalization, with coverage for (git status) && ( gh pr view 1 ).

Mux is requesting another review on Mike's behalf.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9940fdfa34

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts
@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from 9940fdf to 632e195 Compare May 21, 2026 14:18
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Addressed the wrapper-flag feedback by skipping simple wrapper options before command extraction, with coverage for time -p git status, exec -c bash -lc, and command -p make test.

Mux is requesting another review on Mike's behalf.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 632e1951c8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts
Comment thread src/browser/features/Tools/bashCollapsedSummary.ts
@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from 632e195 to 9784939 Compare May 21, 2026 14:29
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Addressed the case-arm feedback by skipping case labels before command extraction, including foo|bar) and spaced foo | bar | baz ) alternatives.

Mux is requesting another review on Mike's behalf.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e1c414206

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts Outdated
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Addressed the variable-backed case-label feedback by treating $pattern) as a case arm label before command extraction, with a focused regression test.

Mux is requesting another review on Mike's behalf.

@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

The latest head is e9cd63d70. Please review the variable-backed case-label fix.

Mux is re-requesting Codex review on Mike's behalf after the previous request did not receive a response.

@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Mux is making a minimal Codex review request on Mike's behalf.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from e9cd63d to 0465151 Compare May 21, 2026 19:37
@ibetitsmike ibetitsmike changed the title 🤖 fix: show bash command labels 🤖 fix: add compact bash summary mode May 21, 2026
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Rebased the branch onto latest main and changed the feature into a separate Compact collapsed bash summary setting. Please review the new head.

Mux is requesting Codex review on Mike's behalf.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from 0465151 to 00f5407 Compare May 21, 2026 20:14
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Updated the branch with a focused CI test mock hardening after the unit job exposed a partial window mock without event methods. Please review the new head.

Mux is requesting Codex review on Mike's behalf.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Mux requested this review on Mike's behalf after pushing a unit-test isolation fix.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9cccd6340e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Mux requested this review on Mike's behalf after addressing the shell negation parser feedback.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Mux requested this review on Mike's behalf after pushing full-suite mock isolation fixes.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `3738256{MUX_COSTS_USD:-unknown}`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=190.47 -->
Keep browser global overrides scoped to each keybind test so later unit tests keep their expected DOM and event APIs.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$223.75`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=223.75 -->
Treat the shell negation operator as prefix syntax so compact command extraction shows the command that runs instead of `!`.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$223.75`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=223.75 -->
Keep test-only window and runtime factory overrides from leaking into later unit files during full suite runs.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$223.75`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=223.75 -->
Extract shared browser test helpers for window and navigator mocking, then use them in GitStatusStore and keybind tests to remove duplicate descriptor cleanup logic.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$223.75`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=223.75 -->
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike ibetitsmike force-pushed the mike/chat-tool-command-labels branch from cea59b2 to bd406de Compare May 21, 2026 21:39
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Mux requested this review on Mike's behalf after rebasing onto latest main and revalidating locally.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd406deb19

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/browser/features/Tools/bashCollapsedSummary.ts
Stop heredoc detection at unquoted shell comments so compact command extraction does not hide real commands after commented heredoc syntax.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$223.75`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=223.75 -->
@ibetitsmike
Copy link
Copy Markdown
Contributor Author

@codex review

Mux requested this review on Mike's behalf after addressing the commented heredoc parser feedback.

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant