chore(web): remove frontend code and styles nothing reaches

The frontend JS is outside ESLint and knip, so this pass used an AST scan
(every method, function and top-level constant in src/web/public, counted
against identifiers, strings and index.html) plus a selector scan of both
stylesheets. Each hit was confirmed by text search before it went.

JavaScript
- The ten run<Cli>() one-line wrappers and the quickStart() alias: run()
  has dispatched to _runCliMode(mode) since the launcher consolidation and
  nothing called the wrappers except tests, which now call the launcher.
- The Agent Teams panel code that lost its event listeners in February:
  the team tasks panel, the teammate pane window, rebuildTeammateMap and
  the three maps that nothing filled any more.
- Unreferenced methods: redockSession, refreshOrchestratorStatus,
  toggleSubagentPanel, minimizeSubagentWindow,
  openAllActiveSubagentWindows, pickBetterPath, getTodoIcon, deletePreset,
  closeRunSummary, saveSessionOptions, getAgentParentSessionId,
  _isUltracodeAgentMinimized.
- Six unused constants and a few unused locals (an unused frame-time
  computation in the touch scroll loop among them).

CSS
- 62 classes and one id that no markup, script or test names: the old
  settings-item / settings-section layout, the pre-redesign respawn and
  context-settings rows, the existing-wizard card and others. 116 rules
  and about 770 lines. A dead class inside an :is() list only loses that
  alternative; the rule stays.

Checked in a browser against an isolated instance: no console errors on
desktop or phone, a shell session runs, and 96 screenshots (desktop,
tablet and phone; settings, session options, add case, panels) are
pixel-identical before and after, apart from clock times.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-11-13 14:18:13 +01:00
1 parent f604deba3e
commit 6fb8b27768
17 files changed
+48 -1298

No files matched your search

+6 -53
View File
@@ -21,13 +21,12 @@
* own no-id-branching rule exists to prevent server-side.
*
* Deliberately a LOCAL table rather than a server-injected catalogue: several
* unit tests exercise these run*() methods inside a bare `vm.createContext()`
* unit tests exercise the launcher inside a bare `vm.createContext()`
* sandbox with no `window` global at all (see test/run-mode-ui.test.ts) —
* referencing `window` there unguarded would throw, not degrade. `buildConfig`
* returns the CLI's top-level legacy config field for a LOCAL launch, or
* `null` for a CLI that sends none (pi: no bypass flag exists, so there is
* nothing to send — see runPi's own history below for why that must stay
* true).
* nothing to send, and that must stay true).
*/
const RUN_MODE_LAUNCH = {
opencode: {
@@ -677,10 +676,6 @@ Object.assign(CodemanApp.prototype, {
return this._caseSyncChain;
},
async quickStart() {
return this.run();
},
/** Ensure a newly-created session is visible without waiting for the SSE event.
* The POST response and session:created can arrive in either order, so the
* normal idempotent SSE handler remains the single state-upsert path.
@@ -2484,7 +2479,7 @@ Object.assign(CodemanApp.prototype, {
}
if (remoteIds[0]) {
// Don't pre-set activeSessionId — selectSession early-returns when the
// IDs match, skipping the buffer load, tab activation, and focus (see runCodex).
// IDs match, skipping the buffer load, tab activation, and focus (see _runCliMode).
await this.selectSession(remoteIds[0]);
}
this.terminal.focus();
@@ -2536,7 +2531,7 @@ Object.assign(CodemanApp.prototype, {
// Switch to first session. Don't pre-set activeSessionId — selectSession
// early-returns when the IDs match, skipping the buffer load, tab
// activation, and focus (see runCodex), which left the new shell tab
// activation, and focus (see _runCliMode), which left the new shell tab
// created but not shown until the user manually clicked it.
if (sessionIds.length > 0) {
await this.selectSession(sessionIds[0]);
@@ -2601,10 +2596,8 @@ Object.assign(CodemanApp.prototype, {
* Shared launcher for every RUN_MODE_LAUNCH entry (every run mode except
* claude/shell, which have their own flows — claude for its remote/docker
* branching and parallel-create path, shell for needing no CLI probe at
* all). The eight run<Mode>() methods below are thin named wrappers: their
* names stay because index.html's welcome-screen buttons and the run-mode
* menu call them directly by name (`app.runOpenCode()` etc.), and several
* tests assert on that name directly too.
* all). `run()` reaches it for every mode in the table; there is no per-CLI
* wrapper method any more.
*/
async _runCliMode(mode, options = {}) {
const catalogEntry = registryCliById(mode);
@@ -2690,46 +2683,6 @@ Object.assign(CodemanApp.prototype, {
}
},
async runOpenCode() {
return this._runCliMode('opencode');
},
async runCodex() {
return this._runCliMode('codex');
},
async runGemini() {
return this._runCliMode('gemini');
},
async runAntigravity() {
return this._runCliMode('antigravity');
},
async runPi() {
return this._runCliMode('pi');
},
async runOmp() {
return this._runCliMode('omp');
},
async runGrok() {
return this._runCliMode('grok');
},
async runDeepSeek() {
return this._runCliMode('deepseek');
},
async runCopilot() {
return this._runCliMode('copilot');
},
async runJcode() {
return this._runCliMode('jcode');
},
// ═══════════════════════════════════════════════════════════════
// Session Options Modal