Commit b0d820a
Remove unused files in @kbn/observability-ai-assistant-app-plugin (dead code cleanup) (elastic#266813)
## Summary
Removes **10 unused source files** (168 LoC) from
`@kbn/observability-ai-assistant-app-plugin`, owned by
`@elastic/obs-ai-team`. All verified to have **zero static importers**
anywhere in the repo.
This is one slice of a broader sweep across the codebase removing **399
files / 18.5k LoC** of dead code. Co-PRs cover the other ~28 teams'
slices. The methodology is in elastic#266635 (skill PR).
## Files removed
See the diff. Removals span the package — common shapes include:
- Orphan barrel `index.ts` files where consumers consistently
deep-import the sibling modules directly.
- Dead React components, hooks, route handlers, or test helpers no
longer referenced anywhere.
## Verification
For every file:
1. **`knip` flagged it as unreachable** from the package's declared
entry points (`server/index.ts`, `public/index.ts`, `common/index.ts`,
plus deep-import-derived entries).
2. **Resolve-aware import scan** confirmed zero importers across the
repo (Node-style: `<base>.ts`, `<base>.tsx`, `<base>/index.ts`,
`<base>/index.tsx`).
3. **Package-id deep-import grep** for
`@kbn/observability-ai-assistant-app-plugin/<sub>` references from other
packages.
4. **`jest.mock()` string scan** for test mocks pointing at the path.
5. **Type-check passes** (`node scripts/type_check --project
x-pack/solutions/observability/plugins/observability_ai_assistant_app/tsconfig.json`).
## Patterns observed (for context)
The most common dead-code shapes in this slice:
- **Orphan barrel `index.ts`** that re-exports from siblings — the
commonest shape across the cleanup.
- Other patterns vary by package (dead React components, dead route
handlers, dead test fixtures).
The full pattern catalog (across all teams) is in elastic#266635.
🤖 Generated by an AI agent following a verification recipe at
`.agents/skills/dead-code-cleanup/SKILL.md` (PR elastic#266635).
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent ed8cf56 commit b0d820a
18 files changed
Lines changed: 0 additions & 267 deletions
File tree
- x-pack
- platform/plugins/private/translations/translations
- solutions/observability/plugins/observability_ai_assistant_app
- public
- components
- hooks
- __storybook_mocks__
- utils
- server
- clients
- util
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35231 | 35231 | | |
35232 | 35232 | | |
35233 | 35233 | | |
35234 | | - | |
35235 | | - | |
35236 | 35234 | | |
35237 | 35235 | | |
35238 | 35236 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35168 | 35168 | | |
35169 | 35169 | | |
35170 | 35170 | | |
35171 | | - | |
35172 | | - | |
35173 | 35171 | | |
35174 | 35172 | | |
35175 | 35173 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35351 | 35351 | | |
35352 | 35352 | | |
35353 | 35353 | | |
35354 | | - | |
35355 | | - | |
35356 | 35354 | | |
35357 | 35355 | | |
35358 | 35356 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35353 | 35353 | | |
35354 | 35354 | | |
35355 | 35355 | | |
35356 | | - | |
35357 | | - | |
35358 | 35356 | | |
35359 | 35357 | | |
35360 | 35358 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
90 | | - | |
91 | 89 | | |
92 | 90 | | |
93 | 91 | | |
| |||
Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 0 additions & 30 deletions
This file was deleted.
0 commit comments