Skip to content

refactor(component-ownership): relocate misplaced shared components - #1000

Merged
sudomaggie merged 2 commits into
developfrom
dev/relocate-component-ownership
Aug 26, 2026
Merged

refactor(component-ownership): relocate misplaced shared components#1000
sudomaggie merged 2 commits into
developfrom
dev/relocate-component-ownership

Conversation

@Harry19081

Copy link
Copy Markdown
Member

Problem

App-root services, engine-owned terminal/session UI, domain-specific tables and hover cards, and reusable primitives had accumulated under generic component/shared roots. That obscured ownership, encouraged broad forwarding barrels, and made import direction difficult to reason about. The terminal relocation also exposed two concrete hazards: stale relative Sass paths and a reverse TerminalCore-to-SessionCore composition dependency.

Solution

  • Relocate app-shell services and root components under app/root, engine-specific terminal and replay components under TerminalCore and SessionCore, and domain components beside their owning modules.
  • Move genuinely neutral primitives such as Placeholder, tab-pill controls, header separators, toolbar tooltip, and settings search into reusable component homes.
  • Preserve the current terminal accent/cursor behavior and lazy loading, fix relocated stylesheet paths, and let chat/workstation hosts compose the SessionCore read-only renderer into TerminalCore.
  • Remove obsolete forwarding barrels and unused reexports; retain only intentional entry points with live consumers.
  • Keep stable ModelTable contracts and shared constants in neutral type/config modules while moving its implementation to KeyVault ownership.
  • Update active documentation and startup dependency guards for the new paths.

Potential risks

The primary risk is import-path churn across a large internal surface: downstream branches or untracked local code that still imports the retired paths will need to update. Terminal chunking, CSS resolution, theme repainting, and read-only composition are the highest runtime-risk areas; targeted tests and a production webpack build cover them. No dependency, lockfile, persistence, schema, IPC, wire-format, or public package API changes are included. Rollback is a single-commit revert.

No screenshots were captured because this is an ownership/import refactor with no intended visual change; screenshots would not distinguish the result. A desktop GUI smoke test was not run because Computer Use was not authorized.

Verification

  • npm run typecheck — passed on the committed tree
  • npm run lint — passed; commit-time lint-staged also passed for 412 source files
  • npm run check:circular — passed; no cycles across 6,546 modules
  • npm run build — passed; production webpack bundle compiled
  • npx vitest run src/app/root/components/ErrorBoundary/index.test.ts src/components/Placeholder/normalizePlaceholderSubtitle.test.ts src/components/TabPill/config.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/FileTreeContent/tests/treeUtils.test.ts src/engines/ChatPanel/ChatPanelTabBar/ChatPanelTabBar.test.ts — 5 files / 36 tests passed
  • Terminal-focused Vitest sweep covering TerminalCore, TerminalReadOnly, TerminalBlock, TerminalMainContent, startup graph, terminal stores/services/hooks, CLI session bridge, replay bridge, and terminal utilities — 34 files / 287 tests passed
  • git diff --check origin/develop...HEAD — passed
  • Legacy root/import sweep — no live source imports or files remain at the retired component paths
  • Export review — only FileTreeContentHandle and ResizableSplitPanel are newly forwarded, and both have live consumers

The focused frontend consistency review was applied manually because the documented frontend-ui-audit skill is unavailable in this workspace. No new design-system, accessibility, arbitrary-value, or visual-pattern concerns were found.

@sudomaggie
sudomaggie merged commit f9fb112 into develop Aug 26, 2026
6 checks passed
@Harry19081 Harry19081 added refactor Code restructuring without an intended behavior change frontend-ui Frontend UI, design system, accessibility, layout, or theming dev-tooling Developer tooling, build, CI, tests, diagnostics, or release labels Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-tooling Developer tooling, build, CI, tests, diagnostics, or release frontend-ui Frontend UI, design system, accessibility, layout, or theming refactor Code restructuring without an intended behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants