Skip to content

🤖 refactor: auto-cleanup#3036

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

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

Conversation

@mux-bot
Copy link
Contributor

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

Periodic low-risk, behavior-preserving cleanups to the codebase.

Current change

Deduplicate isPathInsideDir into shared pathUtils.

Four files (router.ts, workspaceService.ts, task_apply_git_patch.ts,
AgentBrowserSessionDiscoveryService.ts) each defined an identical
isPathInsideDir(dirPath, filePath) function that checks whether a file path
is equal to or nested inside a directory. Extracted the function into
src/node/utils/pathUtils.ts and replaced the four copies with imports.

Validation

  • make typecheck — pass
  • make lint — pass
  • make fmt-check — pass (shfmt missing in CI env, pre-existing)

Auto-cleanup checkpoint: c5bf52b

@mux-bot
Copy link
Contributor Author

mux-bot bot commented Mar 19, 2026

@codex review

mux-bot bot added 3 commits March 20, 2026 20:05
compareSets was exported from useStableReference.ts but never called anywhere in the codebase — not in production code, not in tests. Its sibling comparators (compareMaps, compareRecords, compareArrays) are all actively used and tested; compareSets was speculatively added but never wired up.
The asyncEventIterator async generator function was exported but never imported anywhere in the codebase. Only its sibling createAsyncEventQueue is actively used (by router.ts and withQueueHeartbeat.test.ts). Remove the dead function to reduce surface area.
Four files (router.ts, workspaceService.ts, task_apply_git_patch.ts, AgentBrowserSessionDiscoveryService.ts) each defined an identical isPathInsideDir function. Extract it into src/node/utils/pathUtils.ts and replace the copies with imports.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

0 participants