Skip to content

gut(ui): remove dead skills UI code tree#2240

Merged
alexey-pelykh merged 1 commit intomainfrom
gut/skills-ui-dead-code
Apr 10, 2026
Merged

gut(ui): remove dead skills UI code tree#2240
alexey-pelykh merged 1 commit intomainfrom
gut/skills-ui-dead-code

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

  • Remove ~240 lines of unreachable skills UI dead code across 5 files
  • Dead code includes no-op stubs, @ts-expect-error render branch, orphaned state/type properties, and skill-related types
  • The "skills" tab was never reachable (not in Tab union), making all skill render paths, state, and types dead

Files changed

File Removals
ui/src/ui/app-render.ts No-op stubs (loadAgentSkills, installSkill, loadSkills, saveSkillApiKey, updateSkillEdit, updateSkillEnabled, renderSkills), dead state.tab === "skills" render branch with @ts-expect-error, dead skills wiring in agents view
ui/src/ui/app.ts Dead agentSkills* and skills* @state() properties, SkillMessage type stub
ui/src/ui/app-view-state.ts Dead agentSkills* and skills* type properties, SkillMessage type stub
ui/src/ui/views/agents.ts Dead skill props in AgentsProps interface, "skills" from AgentsPanel union
ui/src/ui/types.ts SkillStatusReport, SkillStatusEntry, SkillInstallOption, SkillsStatusConfigCheck types (no consumers outside dead code)

Test plan

  • Build passes (pnpm build)
  • Type-check passes (pnpm tsgo via pre-commit hook)
  • Lint passes (oxlint --type-aware via pre-commit hook)
  • Format passes (oxfmt --check via pre-commit hook)
  • No remaining skill references in ui/src/ui/ (verified via grep)
  • CI passes

Closes #2224

🤖 Generated with Claude Code

Remove ~240 lines of unreachable skills UI dead code across 5 files:
- No-op stubs (loadAgentSkills, installSkill, loadSkills, etc.)
- Dead "skills" tab render branch behind @ts-expect-error
- Dead agentSkills*/skills* state and type properties
- Dead skill callback handlers in agents view wiring
- Orphaned SkillStatusReport/SkillStatusEntry/etc. types

The "skills" tab was never reachable since it was not in the Tab
union (navigation.ts), making all skill-related render paths,
state properties, and type definitions dead code.

Closes #2224

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh enabled auto-merge (squash) April 10, 2026 13:53
@alexey-pelykh alexey-pelykh merged commit 25dd250 into main Apr 10, 2026
9 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/skills-ui-dead-code branch April 10, 2026 13:59
alexey-pelykh added a commit that referenced this pull request Apr 10, 2026
Remove dead skills-related code left after PR #2240 gutted the skills
UI subsystem: 6 orphaned skill handler method types from AppViewState,
and the never-populated debugModels state field + its "Models" card in
the debug view.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
alexey-pelykh added a commit that referenced this pull request Apr 10, 2026
)

Remove dead skills-related code left after PR #2240 gutted the skills
UI subsystem: 6 orphaned skill handler method types from AppViewState,
and the never-populated debugModels state field + its "Models" card in
the debug view.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
alexey-pelykh added a commit that referenced this pull request Apr 24, 2026
…ead control after #2240/#2245 (#2520)

The Tools tab in the Agents view rendered in the tab bar but its panel
body was empty (placeholder `${nothing /* tools panel removed */}`).
Clicking Tools showed a highlighted tab with no content — only
user-visible dead control remaining from the post-#2336 audit sweep.

Changes:
- ui/src/ui/views/agents.ts: drop "tools" from `AgentsPanel` type
  union; delete `{ id: "tools", label: "Tools" }` tab entry; delete
  empty placeholder.
- ui/src/ui/app.ts, app-settings.ts, app-view-state.ts: narrow each
  `agentsPanel` literal union to drop "tools" (the only consumer was
  the deleted tab).
- ui/src/ui/app-render.ts: delete two now-impossible
  `panel === "tools"` blocks that lazy-loaded the tools catalog on
  tab activation. Eager `loadToolsCatalog` callers (gateway connect,
  settings apply, refresh handler) preserved — `toolsCatalog*` state
  is still live and asserted by the smoke suite.

Out-of-scope (deferred): orphan `onToolsProfileChange` /
`onToolsOverridesChange` props/handlers in `views/agents.ts` and
`app-render.ts` — distinct dead-code pattern from the visible tab,
warrants its own gut wave. `"skills"` literal in the type union also
preserved (no consumer, but AC silent).

AC verification:
- `grep -rn '"tools"' ui/src/ui/views/agents.ts` → no matches
- `grep -rn 'id: "tools"' ui/src/` → no matches
- `pnpm check` green (oxfmt, tsgo, oxlint, fork-integrity gates)
- `pnpm test` green (7014 + 288 tests)
- `pnpm test:ui:smoke` green (12 tests, browser-mode Chromium)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alexey-pelykh added a commit that referenced this pull request Apr 24, 2026
…ead control after #2240/#2245 (#2520) (#2533)

The Tools tab in the Agents view rendered in the tab bar but its panel
body was empty (placeholder `${nothing /* tools panel removed */}`).
Clicking Tools showed a highlighted tab with no content — only
user-visible dead control remaining from the post-#2336 audit sweep.

Changes:
- ui/src/ui/views/agents.ts: drop "tools" from `AgentsPanel` type
  union; delete `{ id: "tools", label: "Tools" }` tab entry; delete
  empty placeholder.
- ui/src/ui/app.ts, app-settings.ts, app-view-state.ts: narrow each
  `agentsPanel` literal union to drop "tools" (the only consumer was
  the deleted tab).
- ui/src/ui/app-render.ts: delete two now-impossible
  `panel === "tools"` blocks that lazy-loaded the tools catalog on
  tab activation. Eager `loadToolsCatalog` callers (gateway connect,
  settings apply, refresh handler) preserved — `toolsCatalog*` state
  is still live and asserted by the smoke suite.

Out-of-scope (deferred): orphan `onToolsProfileChange` /
`onToolsOverridesChange` props/handlers in `views/agents.ts` and
`app-render.ts` — distinct dead-code pattern from the visible tab,
warrants its own gut wave. `"skills"` literal in the type union also
preserved (no consumer, but AC silent).

AC verification:
- `grep -rn '"tools"' ui/src/ui/views/agents.ts` → no matches
- `grep -rn 'id: "tools"' ui/src/` → no matches
- `pnpm check` green (oxfmt, tsgo, oxlint, fork-integrity gates)
- `pnpm test` green (7014 + 288 tests)
- `pnpm test:ui:smoke` green (12 tests, browser-mode Chromium)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alexey-pelykh added a commit that referenced this pull request Apr 24, 2026
 sweep

Shadow fields outlived the skills UI code tree after #2240/#2245 gutted it —
no readers remain for any of:

- `AgentsPanel` / `agentsPanel` union `"skills"` member
- `agentSkills{Loading,Error,Report,AgentId}` view-state fields
- `skillsReport` in the host-interface intersection
- `SkillStatusReport` type + its import
- `tabs.skills` + `subtitles.skills` i18n entries across all 6 locales

Type-narrowing deletions only. Smoke suite's host-interface-field assertions
auto-update when `AppViewState` is narrowed — validates the contract stays
coherent post-deletion.

(#2521)
alexey-pelykh added a commit that referenced this pull request Apr 24, 2026
 sweep (#2536)

Shadow fields outlived the skills UI code tree after #2240/#2245 gutted it —
no readers remain for any of:

- `AgentsPanel` / `agentsPanel` union `"skills"` member
- `agentSkills{Loading,Error,Report,AgentId}` view-state fields
- `skillsReport` in the host-interface intersection
- `SkillStatusReport` type + its import
- `tabs.skills` + `subtitles.skills` i18n entries across all 6 locales

Type-narrowing deletions only. Smoke suite's host-interface-field assertions
auto-update when `AppViewState` is narrowed — validates the contract stays
coherent post-deletion.

(#2521)
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.

chore: GUT skills UI dead code tree (~160 lines, 5 files)

1 participant