chore(ui): demote 5 unused-export interfaces to file-private - #224
Merged
Conversation
WAWQAQ asked for dead-code simplification. These 5 exported types
in `packages/ui/src/components.tsx` have ZERO external consumers
across `apps/desktop/src` and `packages/ui/src` — they're only used
internally to type props within the same file:
- `SessionFilter` (line 218 — sidebar filter union)
- `SessionRowActions` (line 375 — row action callbacks)
- `DailyReviewBridge` (line 1357 — daily-review IPC bridge)
- `SearchModalDeps` (line 2793 — search modal IPC bridge)
- `LoadToolResultDescription` (line 6071 — internal helper return type)
Demoting from `export interface` / `export type` to plain `interface` /
`type` shrinks the public surface area of the `@maka/ui` barrel
(`index.ts` re-exports `export * from './components.js'`), which:
1. Stops leaking internal-shape types as if they were public API.
2. Makes future "what's actually public" review easier.
3. Eliminates 5 names from the IDE auto-import suggestions.
If a future consumer legitimately needs one of these, re-adding
`export` is a one-line follow-up.
Verified safe via:
grep -rE "^import.*\b<name>\b" --include="*.tsx" --include="*.ts" \\
apps/desktop/src packages/ui/src
returns zero matches for each of the 5 names.
Zero runtime impact (TS type elision means these don't exist in
the emitted JS). Zero visual change.
jackwener
added a commit
that referenced
this pull request
Jun 24, 2026
Follow-up to PR #224. After scanning a wider set of `components.tsx` exports, 4 more had zero external consumers: - `SkillEntry` (line 341 — skill catalog row shape) - `EmptyStateProps` (line 799 — empty-state component props) - `EmptyState` (line 811 — the component itself, used 10x internally) - `SearchModalCloseOptions` (line 2804 — internal close-event payload) `SkillEntry`: appears 5x in components.tsx (parent panel props, descriptor function, render helper) — internal-only. `EmptyState` + `EmptyStateProps`: PR-EMPTY-STATE-COMPONENT-0 (2026-05-19 task #8) extracted the shared component anticipating multi-file reuse. Three months later still only used inside components.tsx itself (10 call sites), all the surfaces that wanted empty states ended up using it via that route. Demote until a real external consumer materializes; re-add `export` is one-line then. `SearchModalCloseOptions`: 1 internal usage in the modal's `onClose` type — no consumer. Verified zero external imports of each name via: grep -rE "^import.*\\b<name>\\b" --include="*.tsx" --include="*.ts" apps/desktop/src packages/ui/src Zero runtime impact (TS type elision). Zero visual change. 4 fewer names in the `@maka/ui` barrel's IDE auto-import surface. Same approach as PR #224 (5 demotions); this round catches what the first sweep missed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lane 3 (simplification), reminder fire #1 of WAWQAQ's new mandate.
Bug
5 `export interface` / `export type` declarations in `packages/ui/src/components.tsx` have zero external consumers but were still being re-exported through the `@maka/ui` barrel (`index.ts: export * from './components.js'`):
Verification
```bash
grep -rE "^import.\\b\\b" --include=".tsx" --include="*.ts" \\
apps/desktop/src packages/ui/src
```
Returns zero matches for each — none of them are imported anywhere outside `components.tsx` itself.
Fix
Drop the `export` keyword. They're still defined in the file and TypeScript resolves them locally just fine for the internal call sites.
Why
If a future consumer legitimately needs one of these, re-adding `export` is a one-line follow-up.
Diff
`1 file changed, 5 insertions(+), 5 deletions(-)` — pure metadata change. Zero runtime impact (TS type elision means these don't exist in emitted JS). Zero visual change. No other open PR touches these specific lines.