Skip to content

🤖 refactor: auto-cleanup#3085

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

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

Conversation

@mux-bot
Copy link
Copy Markdown
Contributor

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

Summary

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

Current cleanups

Remove unused PageStateSource type from browserBridgeTypes.ts — The
type alias PageStateSource = "bootstrap" | "command" | "poll" was added in
4fc857b (browser navigation controls) but is never imported or referenced by
any file. The backend (BrowserSessionStateHub) defines the same union inline
in its PageState interface. Removed the dead export to keep the frontend
types module clean.

Remove dead renderer tokenizer cache module — The file
src/browser/utils/tokenizer/rendererClient.ts exported three functions
(getTokenCountPromise, countTokensBatchRenderer,
clearRendererTokenizerCache) that were never imported or called anywhere in
the codebase. The backend tokenizer API is used directly; this renderer-side
caching wrapper was left behind during the oRPC migration. Removed the file
and its empty parent directory.

Remove unnecessary isWorktreeRuntime re-export
worktreeLifecycleHooks.ts re-exported isWorktreeRuntime from
@/common/types/runtime via an alias, and workspaceService.ts imported it
through that indirection despite already importing other functions from
@/common/types/runtime. Consolidated the import at the canonical source and
removed the re-export.

Checkpoint

Auto-cleanup checkpoint: 5d4a802

@mux-bot
Copy link
Copy Markdown
Contributor Author

mux-bot bot commented Mar 28, 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 3 commits March 29, 2026 08:09
The PageStateSource type alias was added in 4fc857b but never imported
or referenced anywhere — not even within its own file. The backend
(BrowserSessionStateHub) defines the same union inline. Remove the
dead export to keep the frontend types module clean.
Remove `src/browser/utils/tokenizer/rendererClient.ts` and its
containing directory. The module exported three functions
(`getTokenCountPromise`, `countTokensBatchRenderer`,
`clearRendererTokenizerCache`) that were never imported or called
anywhere in the codebase. The backend tokenizer API
(`client.tokenizer.countTokens/countTokensBatch`) is used directly;
this renderer-side caching wrapper was left behind during the oRPC
migration.
workspaceService.ts imported isWorktreeRuntime from
worktreeLifecycleHooks.ts, which just re-exported it from
@/common/types/runtime. workspaceService already imports other
functions from @/common/types/runtime, so consolidate there and
drop the indirection.
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