# Stale / deprecated inventory

Review list for Sam — **do not delete blindly**. Items marked "candidate remove" have no known runtime imports; items marked "deprecated" are still referenced or documented.

Last updated: 2026-05-26 (stale cleanup batch)

---

## Resolved in stale cleanup (2026-05-26)

| Item | Resolution |
|------|------------|
| `ProviderPicker.tsx` | **Removed** — replaced by `AgentComposerBar` |
| `SkillSlashCommand.tsx` | **Removed** — inlined `SlashCommandPicker` in `ChatInput` |
| `Provider` type + `api.coder.providers()` | **Removed** |
| `GET /api/providers` (flat list) | **Removed** — snapshot is canonical |
| `ssh.ts` + worktree SSH | **Removed** — `worktrees.ts` uses local `host-exec.ts` |
| `ProviderCommand` vs `AgentCommand` | **Consolidated** — `AgentCommand` in `provider-types.ts` |
| `pty-dispatch` `AgentCommand` | **Renamed** — `PtySpawnSpec` / `buildPtySpawnSpec` |
| `ProviderSnapshotStatus: 'unavailable'` | **Dropped** — only `'ready'` \| `'error'` |
| Skill invoke duplication | **Extracted** — `@boocode/server/skill-invoke` |
| `resolveChatId` duplication | **Extracted** — `apps/coder/src/routes/chat-resolve.ts` |
| Qwen settings parse | **Shared** — `qwen-settings.ts` with `readFile` |
| ChatInput slash regex | **Shared** — `lib/slash-command.ts` |

---

## Frontend (apps/web)

_No open stale items from the 2026-05-26 review._

---

## BooCoder backend (apps/coder)

| Item | Status | Notes |
|------|--------|-------|
| [`apps/coder/web/`](../apps/coder/web/) | **Fallback SPA** | Standalone BooCoder UI at `:9502`. Primary UI is `CoderPane` in BooChat SPA. Keep unless host-only access is dropped. |

---

## Large files (refactor when touched, not delete)

| File | ~Lines | Split suggestion |
|------|--------|------------------|
| [`CoderPane.tsx`](../apps/web/src/components/panes/CoderPane.tsx) | 660+ | Extract `useCoderMessages`, pending changes hook, composer footer |
| [`ChatInput.tsx`](../apps/web/src/components/ChatInput.tsx) | 670+ | Extract slash/mention hooks |
| [`dispatcher.ts`](../apps/coder/src/services/dispatcher.ts) | 480+ | Split native vs external paths |
| [`AgentComposerBar.tsx`](../apps/web/src/components/AgentComposerBar.tsx) | 320+ | Optional: prefs vs picker UI |
| [`acp-dispatch.ts`](../apps/coder/src/services/acp-dispatch.ts) | 300+ | Stream setup now in `acp-stream.ts`; session lifecycle could split further |

---

## Docs / plans superseded by v2.2

| Item | Notes |
|------|-------|
| [`docs/superpowers/plans/2026-05-25-provider-picker-backend.md`](../docs/superpowers/plans/2026-05-25-provider-picker-backend.md) | Pre-v2.2 flat `/api/providers` plan; header marks superseded. |
| Roadmap / CHANGELOG mentions of `ProviderPicker` | Historical truth for v2.1.0 — leave as release record. |

---

## Already cleaned in simplify pass (2026-05-26)

- Extracted [`acp-stream.ts`](../apps/coder/src/services/acp-stream.ts) (shared ACP NDJSON bridge)
- Deduped `mergeCommands` → [`provider-commands.ts`](../apps/coder/src/services/provider-commands.ts)
- Parallel ACP probes + singleflight in [`provider-snapshot.ts`](../apps/coder/src/services/provider-snapshot.ts)
- Removed dead `getPendingSessionId` from [`permission-waiter.ts`](../apps/coder/src/services/permission-waiter.ts)
- CoderPane: WS message dedup, slash helpers, poll only when WS disconnected

---

## Skipped (needs product decision)

- **Task cancel → abort external ACP/PTY child** — `AbortController` in dispatcher not wired to cancel route
- **Skip ACP cold probe when DB models fresh** — perf; changes snapshot semantics
- ~~**Unified `packages/types`** for provider snapshot JSON~~ — **shipped as `@boocode/contracts`** (`packages/contracts/`); all duplicated contracts are now single-sourced there
