Skip to content

chore(cleanup): Wave 1 — remove 20 orphaned files in mission-control#680

Open
usamaB wants to merge 2 commits into
builderz-labs:mainfrom
usamaB:chore/wave1-dead-code-openclaw
Open

chore(cleanup): Wave 1 — remove 20 orphaned files in mission-control#680
usamaB wants to merge 2 commits into
builderz-labs:mainfrom
usamaB:chore/wave1-dead-code-openclaw

Conversation

@usamaB
Copy link
Copy Markdown

@usamaB usamaB commented May 15, 2026

Summary

Wave 1 dead-code cleanup. Removes 20 grep-verified zero-reference orphaned files from the mission-control package. All files were confirmed to have zero importers before deletion.

Files deleted (20)

  • src/nav-rail.tsx — duplicate of src/components/layout/nav-rail.tsx (live one); the only importer (page.tsx) uses @/components/layout/nav-rail
  • src/styles/design-tokens.ts
  • src/plugins/hyperbrowser-example.ts
  • update-db-port.js — one-shot DB patch script with hardcoded port (was untracked)
  • src/components/layout/promo-banner.tsx
  • src/components/ui/online-status.tsx
  • src/components/panels/documents-panel.tsx
  • src/components/panels/token-dashboard-panel.tsx
  • src/lib/plugin-loader.ts — all init was commented out
  • src/components/dashboard/agent-network.tsx
  • src/components/ui/agent-core-node.tsx — only imported by agent-network.tsx (co-deleted)
  • src/components/dashboard/sessions-list.tsx
  • src/components/dashboard/sidebar.tsx
  • src/components/dashboard/stats-grid.tsx
  • src/components/hud/connection-status.tsx
  • src/components/panels/agent-cost-panel.tsx
  • src/components/panels/agent-history-panel.tsx
  • src/components/panels/session-details-panel.tsx
  • ops/mc-provisioner-daemon.js
  • scripts/smoke-staging.mjs

Dependency cleanup (chained from agent-network + agent-core-node removal)

After deleting agent-network.tsx and agent-core-node.tsx, grep confirmed zero remaining importers of @xyflow/react and reactflow. Both packages removed from package.json and pnpm-lock.yaml refreshed.

Config cleanup

Removed stale src/lib/plugin-loader.ts entry from the vitest.config.ts coverage exclude list.

Validation results

  • tsc --noEmit — exit 0, zero type errors
  • vitest run — 712/713 tests pass; 1 pre-existing failure in session-transcript.test.ts due to better-sqlite3 native bindings not compiled (unrelated to this PR, caused by ERR_PNPM_IGNORED_BUILDS for native modules)
  • next build — succeeded, zero errors

Deferred to follow-up PR

~90 unused-exports and ~73 unused-types findings (MEDIUM confidence, inside live files) are deferred to a separate follow-up PR to keep this one reviewable.


DO NOT self-merge. QA agent merges after validation.

@usamaB usamaB requested a review from 0xNyk as a code owner May 15, 2026 01:12
Usama Kaleem and others added 2 commits May 15, 2026 03:14
- Add compose-level healthcheck using node healthcheck.js (hits
  /api/status?action=health, same as Dockerfile HEALTHCHECK)
- Document docker-compose.hardened.yml overlay differences as comments
  in the base docker-compose.yml for discoverability
- Add .env.production to .gitignore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deletes 20 grep-verified zero-reference dead files identified in the
Wave 1 audit. All files confirmed no importers before deletion.

Files deleted:
- src/nav-rail.tsx (duplicate; live one is src/components/layout/nav-rail.tsx)
- src/styles/design-tokens.ts
- src/plugins/hyperbrowser-example.ts
- update-db-port.js (one-shot DB patch, hardcoded port, untracked)
- src/components/layout/promo-banner.tsx
- src/components/ui/online-status.tsx
- src/components/panels/documents-panel.tsx
- src/components/panels/token-dashboard-panel.tsx
- src/lib/plugin-loader.ts (all init was commented out)
- src/components/dashboard/agent-network.tsx
- src/components/ui/agent-core-node.tsx (only imported by agent-network, co-deleted)
- src/components/dashboard/sessions-list.tsx
- src/components/dashboard/sidebar.tsx
- src/components/dashboard/stats-grid.tsx
- src/components/hud/connection-status.tsx
- src/components/panels/agent-cost-panel.tsx
- src/components/panels/agent-history-panel.tsx
- src/components/panels/session-details-panel.tsx
- ops/mc-provisioner-daemon.js
- scripts/smoke-staging.mjs

Dep cleanup (chained from agent-network + agent-core-node deletion):
- Removed @xyflow/react and reactflow from package.json (zero remaining importers)
- Refreshed pnpm-lock.yaml

Config cleanup:
- Removed stale src/lib/plugin-loader.ts entry from vitest.config.ts coverage exclude list

Validation: tsc --noEmit ✓ | vitest run ✓ (1 pre-existing better-sqlite3 native binding failure, unrelated) | next build ✓

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@usamaB usamaB force-pushed the chore/wave1-dead-code-openclaw branch from de979ce to 46328a4 Compare May 15, 2026 01:20
@usamaB
Copy link
Copy Markdown
Author

usamaB commented May 15, 2026

QA Validation — PASS (ready to merge)

Branch rebased on main, conflicts resolved (package.json + pnpm-lock.yaml had @xyflow/react vs xterm additions in main — kept xterm, dropped xyflow as intended).

Fix applied during rebase: docker-compose.yml had a hardcoded absolute path /Users/d509243/bubblu/openclaw-dual-stack/runtime/openclaw-state:/run/openclaw:ro introduced by this PR's commit. Reverted to the original commented-out env-var form (${OPENCLAW_HOME:-~/.openclaw}:/run/openclaw:ro). Fix is included in the pushed branch.

Validation results:

  • tsc --noEmit → exit 0, 0 errors
  • pnpm test → 994/995 pass. 1 failure: task-dispatch-reconciliation.test.ts > existing-session deferred dispatch > does not send heuristic model overridesconfirmed pre-existing on main (identical failure, same line)
  • pnpm build → succeeded
  • @xyflow/react + reactflow grep across src/ → zero remaining importers
  • Deleted files: 19 orphaned components/scripts as described

Branch is pushed and GitHub shows MERGEABLE. Needs a maintainer with merge permission to squash-merge.

@usamaB
Copy link
Copy Markdown
Author

usamaB commented May 15, 2026

QA verified PR is mergeable. Validation passed. Awaiting builderz-labs maintainer merge — cannot merge from contributor account.

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.

1 participant