Skip to content

gut(discord): delete orphaned src/discord/monitor/model-picker + native-command (~3.4k LoC dead code) #2414

@alexey-pelykh

Description

@alexey-pelykh

Summary

Four files in src/discord/monitor/ have zero external importers on HEAD (2026-04-19). They survived the #2337 cascade as orphaned code — their sole entry points were deleted, but the files themselves were left behind. Delete after zombie-import confirmation.

Files

File LoC External importers (grep)
src/discord/monitor/model-picker.ts 940 0
src/discord/monitor/model-picker.test.ts 631 0 (self-imports only)
src/discord/monitor/model-picker.test-utils.ts 5 0
src/discord/monitor/native-command.ts 1826 0

Context: src/discord/monitor/ remains live (presence-cache.js, thread-bindings.js, etc. are actively imported). Only these 4 files are orphaned. Last touched by #2398 (sync: upstream to v2026.3.13-1) — upstream-only updates to dead code in this fork.

Protocol

  1. Re-confirm zero external importers:
    • git grep -nE "from ['\"].*discord/monitor/model-picker|from ['\"].*discord/monitor/native-command" src/ extensions/
    • Should return zero (excluding the picker test-file pair self-imports)
  2. Delete all 4 files.
  3. Confirm pnpm check + pnpm test + node scripts/check-no-zombie-imports.mjs all green.
  4. Update scripts/data/zombie-import-allowlist.json if any stale entries reference these paths.

AC

  • Zombie-import check run before deletion — confirms zero external references
  • All 4 files deleted
  • scripts/data/zombie-import-allowlist.json cleaned of stale entries (if any)
  • pnpm check passes
  • pnpm test passes
  • node scripts/check-no-zombie-imports.mjs passes
  • CI zombie-import gate passes

Relation to #2337

Addresses the orphaned-picker artifacts left behind by the #2337 cascade. Part of #2337.

Note on Discord interactive pickers

This deletes ONLY the files in src/discord/monitor/. If Discord UI picker functionality is needed in the future, it would be rebuilt in extensions/discord/ following the extension-based channel architecture.

Metadata

Metadata

Assignees

Labels

gutRemoving dead upstream subsystems

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions