Skip to content

Rename project → workspace for repository concept#276

Merged
waleedkadous merged 17 commits intomainfrom
builder/0112-workspace-rename
Feb 15, 2026
Merged

Rename project → workspace for repository concept#276
waleedkadous merged 17 commits intomainfrom
builder/0112-workspace-rename

Conversation

@waleedkadous
Copy link
Contributor

@waleedkadous waleedkadous commented Feb 15, 2026

Summary

Systematic rename of all "project" identifiers that mean "repository/codebase" to "workspace" throughout Tower, Agent Farm, Dashboard, CLI, and HQ packages. The word "project" was ambiguous — used for both git repositories (Tower) and tracked work-units (porch). This rename eliminates that confusion.

  • 124 files changed across 6 phases (types → migration → server → client → dashboard → tests)
  • Database migration v9 renames columns and known_projectsknown_workspaces
  • URL paths renamed: /project//workspace/, /api/projects//api/workspaces/
  • config.projectRootconfig.workspaceRoot across ~39 files
  • Work-unit terminology (projectId, projectlist.md, codev/projects/) preserved unchanged

Changes

  • Phase 1: Renamed type definitions, config interfaces, and schema comments
  • Phase 2: Added database migration v9 (CREATE-INSERT-DROP pattern matching v7/v8)
  • Phase 3: Renamed Tower server identifiers, URL paths, and SQL query strings
  • Phase 4: Renamed Tower client, all CLI commands, utilities, and HQ connector wire protocol
  • Phase 5: Renamed Dashboard components and codev-hq package types/handlers
  • Phase 6: Updated all test files (40+ files), fixed stale StatusPanel assertions, grep verification

Testing

  • npm run build passes with zero TypeScript errors
  • 1290 unit/integration tests pass (13 skipped tunnel tests expected)
  • Targeted test slices verified: 251 rename-surface tests all pass
  • Grep verification confirms no repo-meaning "project" identifiers remain
  • 3-way consultation (Gemini, Codex, Claude) approved all 6 phases

Spec

Link: codev/specs/0112-workspace-rename.md

Review

Link: codev/reviews/0112-workspace-rename.md

@waleedkadous
Copy link
Contributor Author

Architect Review

Bug Found

packages/codev/src/agent-farm/utils/notifications.ts — Line in the diff changes:

- (project ${payload.projectId})
+ (workspace project ${payload.projectId})

"workspace project" is contradictory. projectId here is a porch work-unit ID, not a workspace. Should stay as project ${payload.projectId}.

Minor Notes (non-blocking)

  • data-project HTML attribute in tower.html not renamed to data-workspace (value was correctly updated). Cosmetic — never queried by JS.
  • project-badge CSS class not renamed. Fine — CSS naming is separate from domain naming.
  • consult/index.ts includes non-rename changes (reasoning_effort, sandbox) — likely picked up from main before branching.

Merge Order Note

PR #278 (dead code cleanup) deletes several files that this PR modifies (codev-hq/*, hq-connector.ts, session.ts, session-utils.test.ts). Recommend merging #278 first, then rebasing this PR to drop changes to deleted files.

Verdict: APPROVE with fix

Fix the notifications.ts log message, then good to merge (after #278).

…, add dashboard details, specify migration v9
- Add codev-hq package scope (Gemini: wire protocol consistency)
- Add tower-server.ts, tower-tunnel.ts, tunnel-client.ts (Claude: missing files)
- Add activeProjects/totalProjects → activeWorkspaces/totalWorkspaces rename
- Expand test file list from 16 to 27+ files
- Expand grep verification to cover dashboard/, codev-hq/, SQL columns
- Add migration validation checklist
- Note skeleton.ts has distinct findProjectRoot()
- Rebut cli.ts (work-unit context) and new Playwright tests (redundant)
- Add __tests__/e2e/ Playwright test files (9 files with /project/ URLs)
- Add explicit Playwright verification step in Phase 6
- Add grep allowlist for historical migration SQL (v1-v8)
- Note doctor.ts has its own local findProjectRoot()
- Add missing test files: tower-utils, tower-proxy, tower-websocket, skeleton
- Config.projectRoot → Config.workspaceRoot
- findProjectRoot() → findWorkspaceRoot() in config.ts
- ProjectTerminals → WorkspaceTerminals
- DbTerminalSession.project_path → workspace_path
- InstanceStatus.projectPath/projectName → workspacePath/workspaceName
- TowerProject → TowerWorkspace, TowerProjectStatus → TowerWorkspaceStatus
- activeProjects/totalProjects → activeWorkspaces/totalWorkspaces in health type
- Update schema.ts inline comments
- terminal_sessions.project_path → workspace_path (table rebuild)
- file_tabs.project_path → workspace_path (table rebuild)
- known_projects → known_workspaces with workspace_path column
- Update GLOBAL_SCHEMA for fresh installs
- Follow existing v7/v8 CREATE-INSERT-DROP pattern
Dashboard: projectName → workspaceName in DashboardState, App.tsx title logic
Dashboard tests: /project/ → /workspace/ URL paths in api-url-resolution tests
HQ package: ProjectInfo → WorkspaceInfo, project_path → workspace_path,
  projects → workspaces across types, state, handlers, and server
CLI: Tower status type cast and log label projectName/Projects → workspaceName/Workspaces

Kept: project_id (porch work-unit), StatusPanel project refs (porch kanban)
Rename project → workspace across all test files and tower.html template:

Test files (40 files):
- tower-test-utils.ts: ProjectHandle → WorkspaceHandle, helper functions
- tower-routes/instances/terminals/proxy/utils/websocket tests: imports, mocks, URLs
- tower-api/baseline E2E tests: API paths, response fields, helper functions
- bugfix-195/199/202/213 tests: config mocks, API paths, response fields
- cli-tower-mode, attach, status-gate, spawn tests: config and API references
- config, types, session-utils, file-tab-persistence tests: config field names
- tunnel-client/integration tests: API paths, metadata fields
- pty-manager, tower-shellper-integration tests: config references
- skeleton.test.ts: findProjectRoot → findWorkspaceRoot
- clipboard.test.ts: findProjectRoot → findWorkspaceRoot
- file-path-resolution.test.ts: projectPath → workspacePath
- Dashboard E2E tests (9 files): URL paths /project/ → /workspace/

Tower HTML UI:
- Fix runtime bugs: instance.projectPath → workspacePath, projectName → workspaceName
- Fix API request bodies: JSON.stringify({ projectPath }) → { workspacePath }
- Fix proxy URLs: ./project/ → ./workspace/
- Update UI text: Running Instances → Running Workspaces, Launch New Workspace,
  Recent Workspaces, Loading workspaces, toast messages
Phase 2: Fresh-vs-existing DB detection, GLOBAL_SCHEMA additions,
  transaction wrapping for v9 migration, TutorialState rename
Phase 3: Restore Bugfix #274 startup ordering (reconcile before
  initInstances), fix comment in tower-utils
Phase 4: Revert out-of-scope behavioral changes in consult/index.ts
  (restore sandbox=read-only, model_reasoning_effort=medium)
Phase 5: Add workspace name display in dashboard header with tests
The autocomplete badge for codev workspaces referenced s.isProject
but the server now sends isWorkspace after the Phase 3 rename.
…orkspaces/workspace_path

Address codex review feedback: the HQ dashboard frontend still used
the old projects/project_path keys while the backend was already
returning workspaces/workspace_path after the Phase 5 rename.
projectId is a porch work-unit ID, not a workspace reference.
@waleedkadous waleedkadous force-pushed the builder/0112-workspace-rename branch from f474b7b to 1a91a3a Compare February 15, 2026 12:47
@waleedkadous waleedkadous merged commit 7d140d8 into main Feb 15, 2026
6 checks passed
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