Open
Conversation
Contributor
Author
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
58d2715 to
a689858
Compare
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.
a689858 to
d3a35f0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Periodic auto-cleanup PR. Each commit is an independent,
behavior-preserving refactor found by scanning recent
maincommits.Current cleanups
Remove unused
PageStateSourcetype frombrowserBridgeTypes.ts— Thetype alias
PageStateSource = "bootstrap" | "command" | "poll"was added in4fc857b (browser navigation controls) but is never imported or referenced by
any file. The backend (
BrowserSessionStateHub) defines the same union inlinein its
PageStateinterface. Removed the dead export to keep the frontendtypes module clean.
Remove dead renderer tokenizer cache module — The file
src/browser/utils/tokenizer/rendererClient.tsexported three functions(
getTokenCountPromise,countTokensBatchRenderer,clearRendererTokenizerCache) that were never imported or called anywhere inthe 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
isWorktreeRuntimere-export —worktreeLifecycleHooks.tsre-exportedisWorktreeRuntimefrom@/common/types/runtimevia an alias, andworkspaceService.tsimported itthrough that indirection despite already importing other functions from
@/common/types/runtime. Consolidated the import at the canonical source andremoved the re-export.
Checkpoint
Auto-cleanup checkpoint: 5d4a802