fix(web): add workspace context to domain and project creation #536

Merged
jason.woltje merged 2 commits from fix/workspace-domain-project-create into main 2026-02-27 10:28:40 +00:00
Owner

Summary

  • Implements the Create Domain dialog on the settings/domains page — the button previously only logged a TODO to the console
  • Adds parameter to , , and in so mutations explicitly forward the workspace context via the header
  • Uses the hook in the domains page to read the current workspace from localStorage and pass it to domain mutations

Root Cause

The on the domain controller requires to be present. The domains page had no create form (just a TODO console.log), so creation was never wired up. The API client functions lacked a parameter, preventing explicit workspace context on mutations.

Notes on SS-WS-002 (project creation)

Project creation was already correct — already uses and passes the result to . No changes required for SS-WS-002.

Test plan

  • Navigate to Settings > Domains; click Create
## Summary - Implements the Create Domain dialog on the settings/domains page — the button previously only logged a TODO to the console - Adds parameter to , , and in so mutations explicitly forward the workspace context via the header - Uses the hook in the domains page to read the current workspace from localStorage and pass it to domain mutations ## Root Cause The on the domain controller requires to be present. The domains page had no create form (just a TODO console.log), so creation was never wired up. The API client functions lacked a parameter, preventing explicit workspace context on mutations. ## Notes on SS-WS-002 (project creation) Project creation was already correct — already uses and passes the result to . No changes required for SS-WS-002. ## Test plan - [ ] Navigate to Settings > Domains; click Create
jason.woltje added 1 commit 2026-02-27 10:18:48 +00:00
fix(web): add workspace context to domain and project creation
All checks were successful
ci/woodpecker/push/web Pipeline was successful
2abb405e5f
- Implement create domain dialog on settings/domains page with name,
  slug (auto-generated from name), and description fields
- Add workspaceId parameter to createDomain, updateDomain, and
  deleteDomain API functions so the X-Workspace-Id header is sent
- Use useWorkspaceId hook in domains page so the workspace context
  is available for all domain mutations

Project creation (SS-WS-002) already passes workspaceId via
useWorkspaceId hook in projects/page.tsx — no changes needed there.

Fixes #534

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje added 1 commit 2026-02-27 10:25:26 +00:00
fix(web): address review findings — workspace ID threading and error handling
All checks were successful
ci/woodpecker/push/web Pipeline was successful
cb363cfd92
- Thread workspaceId into fetchDomains() so X-Workspace-Id header is sent
- Guard useEffect against null workspaceId with early return; add workspaceId to dep array
- Add catch block in handleCreate to surface errors via setError
- Remove console.log from handleEdit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit dd0568cf15 into main 2026-02-27 10:28:40 +00:00
jason.woltje deleted branch fix/workspace-domain-project-create 2026-02-27 10:28:40 +00:00
Sign in to join this conversation.