Skip to content

🤖 refactor: auto-cleanup#3060

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

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

Conversation

@mux-bot
Copy link
Contributor

@mux-bot mux-bot bot commented Mar 24, 2026

Summary

Periodic auto-cleanup PR. Each commit is an independent,
behavior-preserving refactor found by scanning recent main commits.

Current cleanups

Extract resolveGlobalRuntime into shared helper — Both agentDefinitionsService and agentSkillsService duplicated the same shouldUseHostGlobalMuxFallback → LocalRuntime fallback pattern. Extracted a shared resolveGlobalRuntime() function in hostGlobalMuxHome.ts.

Remove dead UIPermissionMode and SDKPermissionMode type aliases
These two exported type aliases in src/common/types/global.d.ts were
never imported or referenced anywhere in the codebase. Removing the unused
types and their comments.

Remove unused export from deriveQueuedPreview
deriveQueuedPreview in QueuedMessage.tsx was exported but only used
within the same file. Removed the export keyword to keep the module
surface minimal.

Validation

  • make static-check (ESLint, TypeScript, Prettier all pass)
  • Whole-repo grep confirms zero references outside the definition site

Auto-cleanup checkpoint: e7efeab


Generated with mux • Model: anthropic:claude-opus-4-6 • Thinking: xhigh • Cost: N/A

@mux-bot
Copy link
Contributor Author

mux-bot bot commented Mar 24, 2026

@codex review

@chatgpt-codex-connector
Copy link

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

@mux-bot mux-bot bot force-pushed the auto-cleanup branch 3 times, most recently from ed81868 to fd4a961 Compare March 25, 2026 16:30
mux-bot bot added 5 commits March 26, 2026 00:10
These two type aliases in global.d.ts were never imported or referenced
anywhere in the codebase. They appear to be remnants of an earlier
permission system design that was superseded.
The status_set tool was removed in 9ef71ed (derive workspace status
from todo list), but its STATUS_MESSAGE_MAX_LENGTH constant was left
behind with zero remaining consumers.
…helper

Both agentDefinitionsService and agentSkillsService duplicated the same
shouldUseHostGlobalMuxFallback → LocalRuntime fallback pattern with
identical comments. Extract a shared resolveGlobalRuntime() function in
hostGlobalMuxHome.ts and use it from both services, removing the
per-service LocalRuntime imports and inline logic.
deriveQueuedPreview is only used within QueuedMessage.tsx itself.
Removing the export keyword keeps the module surface minimal.
…rJsonCommand

listAgentBrowserSessionNames had its own spawn+timeout+collect+JSON-parse
loop identical to the generic runAgentBrowserJsonCommand helper introduced
in the same file. Rewrite it as a thin wrapper that calls the helper and
extracts session names from the result.

Removes ~65 lines of duplicated process-management code with no behavior
change.
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