Skip to content

gut(ui): strip residual skills state + types + i18n (#2521)#2536

Merged
alexey-pelykh merged 1 commit intomainfrom
gut/skills-state-types-i18n
Apr 24, 2026
Merged

gut(ui): strip residual skills state + types + i18n (#2521)#2536
alexey-pelykh merged 1 commit intomainfrom
gut/skills-state-types-i18n

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

Strips the last shadow fields left behind when #2240 / #2245 removed the skills UI code tree. None of these had readers; this is a pure type-narrowing cleanup.

Removed:

  • "skills" from AgentsPanel + agentsPanel union types
  • agentSkills{Loading,Error,Report,AgentId} — 4 dead view-state fields
  • skillsReport in the host-interface intersection
  • SkillStatusReport type + its import in app-view-state.ts
  • tabs.skills + subtitles.skills i18n entries across all 6 locales (en, de, es, pt-BR, zh-CN, zh-TW)

Safety

Read-only orphans. The TypeScript compiler surfaces any missed consumer (it did not), and the browser-mode smoke suite (ui/src/ui/app.smoke.test.ts) asserts required host-interface fields on the RemoteClawApp instance — those assertions auto-narrow when AppViewState is narrowed.

AC verification

  • grep -rn 'agentSkills|SkillStatusReport|skillsReport' ui/src/ — zero hits ✅
  • grep -rn '"skills"' ui/src/ui/views/agents.ts ui/src/ui/app-view-state.ts — zero hits ✅
  • grep -rn 'agents\.\(panels\|tabs\)\.skills' ui/src/i18n/ — zero hits ✅
  • pnpm check — green (format + typecheck + oxlint + CSS class drift audit) ✅
  • pnpm test — 7014 passed, 3 skipped across 800 files ✅
  • pnpm test:ui:smoke — 12 passed across 2 suites ✅

Issue body notes

Evidence table in the issue said "7 locales" (there are 6) and named the i18n keys as agents.panels.skills / agents.tabs.skills; the actual key paths are tabs.skills / subtitles.skills at lines 32 / 46 in en.ts. Line numbers and intent are unambiguous — deleted the intended two entries per locale.

Out-of-scope findings (deferred)

  1. Locale drift: cards.skills. pt-BR.ts, zh-CN.ts, zh-TW.ts carry a cards.skills key absent from the en.ts baseline. Also dead (no readers). Separate cleanup — not part of this issue's explicit evidence table.
  2. Adjacent dead weight from gut(ui): remove dead skills UI code tree #2240/gut(ui): strip residual skills stubs from shared UI files #2245. Polish subprocess flagged ~6 handlers + ~6 view-state fields (skills* outside the agentSkills* prefix) + ~13 CSS rules in ui/src/styles/components.css with zero consumers. Candidates for a successor gut wave.

Test plan

  • pnpm check green
  • pnpm test green (7014 passed)
  • pnpm test:ui:smoke green (12 passed)
  • Three AC grep checks all return zero hits

Closes #2521.

🤖 Generated with Claude Code

 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 alexey-pelykh enabled auto-merge (squash) April 24, 2026 12:13
@alexey-pelykh alexey-pelykh merged commit 80d311d into main Apr 24, 2026
16 checks passed
@alexey-pelykh alexey-pelykh deleted the gut/skills-state-types-i18n branch April 24, 2026 12:19
alexey-pelykh added a commit that referenced this pull request Apr 24, 2026
…follow-up (#2539)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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
…follow-up (#2539) (#2542)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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
Audit `ui/src/**/*.test.ts` for fixtures referencing gutted features
(skills marketplace + thinking-level state drivers per #2336 Area 7/8).

Result: zero hits across all 7 target tokens — `skills`, `Skills`,
`agentSkills`, `autoAllowSkills`, `thinkingLevel`, `chatThinkingLevel`,
`thinkLevel`. Cross-verification with case-insensitive sweep of the
full `ui/src/` tree confirms prior gut sweeps (#2524, #2536, #2539,
#2480) purged the tokens at the source, not just in tests.

No DEAD FIXTURE, no MOCK SHIELD, no follow-up issues needed. All 15
UI `vi.mock` call sites target live modules only — no analog to the
`runPreparedReply` shield that motivated this spike.

Typed exception: SPIKE — AC is the audit inventory, not code changes.
Deliverable lives at `docs/refactor/ui-test-fixture-audit-2528.md`.

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
Audit `ui/src/**/*.test.ts` for fixtures referencing gutted features
(skills marketplace + thinking-level state drivers per #2336 Area 7/8).

Result: zero hits across all 7 target tokens — `skills`, `Skills`,
`agentSkills`, `autoAllowSkills`, `thinkingLevel`, `chatThinkingLevel`,
`thinkLevel`. Cross-verification with case-insensitive sweep of the
full `ui/src/` tree confirms prior gut sweeps (#2524, #2536, #2539,
#2480) purged the tokens at the source, not just in tests.

No DEAD FIXTURE, no MOCK SHIELD, no follow-up issues needed. All 15
UI `vi.mock` call sites target live modules only — no analog to the
`runPreparedReply` shield that motivated this spike.

Typed exception: SPIKE — AC is the audit inventory, not code changes.
Deliverable lives at `docs/refactor/ui-test-fixture-audit-2528.md`.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

gut(ui): strip residual skills state + types + i18n

1 participant