Skip to content

refactor(ui): extract non-chat component groups - #372

Merged
Astro-Han merged 2 commits into
mainfrom
codex/ui-components-pr2
Jun 30, 2026
Merged

refactor(ui): extract non-chat component groups#372
Astro-Han merged 2 commits into
mainfrom
codex/ui-components-pr2

Conversation

@Astro-Han

Copy link
Copy Markdown
Contributor

Summary

Extracts the non-chat dependency groups from packages/ui/src/components.tsx into focused sibling modules while keeping the public @maka/ui surface stable through components.tsx re-exports.

Move map:

  • nav-selection.ts: NavSelection / SessionFilter
  • modal-a11y.ts: useModalA11y
  • tool-format.ts: tool formatting helpers
  • empty-state.tsx: EmptyState
  • capability-audit-strip.tsx: CapabilityAuditStrip
  • search-modal.tsx: SearchModal
  • session-list-panel.tsx: SessionListPanel + row/group helpers
  • tool-activity.tsx: ToolActivity, OverlayHost, preview surfaces, formatBytes
  • permission-dialog.tsx: PermissionDialog + permission summary helpers
  • module-panel-types.ts: shared sidebar/module panel types

Why

Refs #363. This is PR2 from the sink-file split plan: cut unrelated non-chat UI responsibilities out of components.tsx without changing runtime behavior or visual output.

Scope

Changed:

  • Added focused packages/ui/src/* sibling modules for the extracted non-chat groups.
  • Kept components.tsx as the compatibility re-export point, so packages/ui/src/index.ts and existing consumers continue to work.
  • Moved toast.tsx to import useModalA11y from the leaf module to avoid a components.js back-edge.
  • Co-migrated source-reading contract tests to the new file paths.

Not included:

  • No ChatView, Composer, Settings, main.tsx, Storybook, CSS, or visual redesign work.
  • No new dependency or CI import-cycle tooling.

Verification

  • npm run -w @maka/ui build
  • npm run -w @maka/desktop build:main
  • npm run -w @maka/desktop typecheck
  • npm run -w @maka/desktop build
  • node scripts/check-a11y.mjs
  • npm run build
  • Targeted desktop contract set: 216 tests passed, 0 failed

Known unrelated blocker:

  • npm run -w @maka/desktop test currently stops in pretest on the existing check-console gate for packages/headless/src/harbor-cli.ts console calls.

User-facing impact

None expected. This is intended to be behavior- and visually-neutral. No CHANGELOG.md, docs, breaking changes, or migrations.

Reviewer notes

Cycle guard checked the new UI leaf files for imports from @maka/ui, ./index.js, or ./components.js; no matches. components.tsx still re-exports the moved declarations so the public API remains intact until the later chat extraction slice.

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.

1 participant