Files
headquarter/openspec/changes/repo-restructure/apply-4.4-report.md
T
Developer e434c439c9 refactor: rename files to PascalCase components and kebab-case APIs (Task 4.4)
- Rename all component files to PascalCase matching exported names
- Move components into feature directories (git/, session/, project/, terminal/, workspace/, ui/, layout/)
- Rename all page files to PascalCase with Page suffix
- Rename all API files to kebab-case
- Update all imports across codebase with corrected relative depths
- Preserve git history via git mv

Quality gates: tsc (pass), eslint (pass), 66/74 tests pass (8 pre-existing failures)
Refs: repo-restructure Task 4.4
2026-06-02 22:58:10 +00:00

84 lines
3.7 KiB
Markdown

# Task 4.4 Apply Report: Rename Files to Naming Convention
**Status:** Success
## Files Renamed (43 total)
### Component Files → PascalCase + Feature Directories
```
components/app-shell.tsx → components/layout/AppShell.tsx
components/code-editor.tsx → components/ui/CodeEditor.tsx
components/commit-dialog.tsx → components/features/git/CommitDialog.tsx
components/commit-panel.tsx → components/features/git/CommitPanel.tsx
components/file-editor.tsx → components/features/git/FileEditor.tsx
components/git-toolbar.tsx → components/features/git/GitToolbar.tsx
components/icon.tsx → components/ui/Icon.tsx
components/instance-list.tsx → components/features/session/InstanceList.tsx
components/merge-dialog.tsx → components/features/git/MergeDialog.tsx
components/protected-route.tsx → components/ProtectedRoute.tsx
components/protected-route.test.tsx → components/ProtectedRoute.test.tsx
components/repositories-settings-tab.tsx → components/features/project/RepositoriesSettingsTab.tsx
components/repositories-settings-tab.test.tsx → components/features/project/RepositoriesSettingsTab.test.tsx
components/repository-create-dialog.tsx → components/features/project/RepositoryCreateDialog.tsx
components/settings-tab-layout.tsx → components/features/settings/SettingsTabLayout.tsx
components/syntax-highlighter.tsx → components/features/git/SyntaxHighlighter.tsx
components/terminal.tsx → components/features/terminal/TerminalComponent.tsx
components/workspace-header.tsx → components/features/workspace/WorkspaceHeader.tsx
```
### Page Files → PascalCase with Page Suffix
```
pages/dashboard.tsx → pages/DashboardPage.tsx
pages/dashboard.test.tsx → pages/DashboardPage.test.tsx
pages/git-history.tsx → pages/GitHistoryPage.tsx
pages/git-repositories.tsx → pages/GitRepositoriesPage.tsx
pages/placeholder.tsx → pages/PlaceholderPage.tsx
pages/profile.tsx → pages/ProfilePage.tsx
pages/project-settings.tsx → pages/ProjectSettingsPage.tsx
pages/projects.tsx → pages/ProjectsPage.tsx
pages/projects.test.tsx → pages/ProjectsPage.test.tsx
pages/repo-workspace.tsx → pages/RepoWorkspacePage.tsx
pages/sessions.tsx → pages/SessionsPage.tsx
pages/settings.tsx → pages/SettingsPage.tsx
pages/ssh-keys.tsx → pages/SshKeysPage.tsx
pages/terminal.tsx → pages/TerminalPage.tsx
pages/tool-configs.tsx → pages/ToolConfigsPage.tsx
pages/tool-types.tsx → pages/ToolTypesPage.tsx
pages/tool-workshop.tsx → pages/ToolWorkshopPage.tsx
pages/tool-workshop.test.tsx → pages/ToolWorkshopPage.test.tsx
```
### API Files → kebab-case
```
api/config_folders.test.ts → api/config-folders.test.ts
api/config_folders.ts → api/config-folders.ts
api/git_repositories.ts → api/git-repositories.ts
api/ssh_keys.ts → api/ssh-keys.ts
api/tool_configs.ts → api/tool-configs.ts
api/tool_types.test.ts → api/tool-types.test.ts
api/tool_types.ts → api/tool-types.ts
```
## Import Updates
Updated import statements across ~30+ files to reflect new paths, including:
- Router imports (`router.tsx`)
- Component-to-component imports
- Page-to-component imports
- Feature component imports (with corrected relative depths for nested directories)
- Test file imports
## Quality Gate Results
| Gate | Result |
|------|--------|
| `npm run typecheck` | ✅ PASS — zero errors |
| `npm run lint` | ✅ PASS — zero warnings |
| `npx vitest run` | ✅ 66 passed / 74 total (8 failures = pre-existing ProjectsPage.test.tsx issues) |
## Notes
- All renames used `git mv` to preserve git history
- Relative import depths were corrected for files moved into deeper directory structures (e.g., `components/features/git/` needs `../../../api/` instead of `../api/`)
- No file contents were modified except import paths