Skip to content

🤖 refactor: auto-cleanup#3165

Open
mux-bot[bot] wants to merge 2 commits intomainfrom
auto-cleanup
Open

🤖 refactor: auto-cleanup#3165
mux-bot[bot] wants to merge 2 commits intomainfrom
auto-cleanup

Conversation

@mux-bot
Copy link
Copy Markdown
Contributor

@mux-bot mux-bot bot commented Apr 13, 2026

Summary

Long-lived auto-cleanup PR that accumulates low-risk, behavior-preserving refactors picked from recent main commits.

Current cleanup

Deduplicate identical normalizeAdvisor* helpers (src/browser/features/Settings/Sections/AdvisorToolExperimentConfig.tsx)

normalizeAdvisorMaxUsesPerTurn and normalizeAdvisorMaxOutputTokens had byte-for-byte identical function bodies (coerce a nullable number to a positive integer or return null). Replaced both with a single normalizePositiveIntOrNull helper.

Previous cleanups

Remove dead toLiveBashOutputView function (src/browser/utils/messages/liveBashOutputBuffer.ts)

toLiveBashOutputView was exported but never imported or called anywhere in the codebase. Since LiveBashOutputInternal extends LiveBashOutputView, the WorkspaceStore.getBashToolLiveOutput returns the internal object directly for reference stability with useSyncExternalStore, making this converter function unnecessary dead code.

Validation

  • TypeScript compilation passes (both renderer and main configs)
  • ESLint passes
  • Advisor experiment settings tests pass (4/4)
  • Formatting check passes

Auto-cleanup checkpoint: 7a2d18f


Generated with mux • Model: anthropic:claude-opus-4-6 • Thinking: xhigh • Cost: $-

@mux-bot
Copy link
Copy Markdown
Contributor Author

mux-bot bot commented Apr 13, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

mux-bot bot added 2 commits April 13, 2026 12:17
toLiveBashOutputView was exported but never imported or called anywhere.
Since LiveBashOutputInternal extends LiveBashOutputView, the WorkspaceStore
returns the internal object directly (for reference stability with
useSyncExternalStore), making this converter unnecessary.
…izePositiveIntOrNull

normalizeAdvisorMaxUsesPerTurn and normalizeAdvisorMaxOutputTokens in
AdvisorToolExperimentConfig.tsx had byte-for-byte identical bodies.
Replace both with a single normalizePositiveIntOrNull helper.
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.

0 participants