4.0 KiB
4.0 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec |
|---|---|---|---|---|---|---|
| 01-workspace-connection | Workspace-scoped GitLab connection | done | 1 | plan.md | ../../specs/integrations/requirements/gitlab-integration.md |
Task 01: Workspace-Scoped GitLab Connection
Acceptance
- Each workspace reads, writes, tests, deletes, and health-checks exactly one
GitLab host/auth configuration. All GitLab clients resolve from the
authoritative workspace ID, and valid
http:///https://self-managed origins preserve their configured scheme through every provider path. - Legacy global host/token data migrates idempotently to the active or earliest workspace; copying a connection copies a PAT but no watches or task links.
- The GitLab settings and browse pages switch connections with the active workspace and never display or use another workspace's status.
Verification
cd apps/backend && rtk go test ./internal/gitlab/... ./internal/backendapp/...
cd apps && rtk pnpm --filter @kandev/web test -- --run lib/api/domains/gitlab-api.test.ts components/gitlab/gitlab-settings.test.tsx components/integrations/integration-copy-config.test.ts hooks/domains/gitlab/use-gitlab-status.test.ts
cd apps/web && rtk pnpm run typecheck
Files Likely Touched
apps/backend/internal/gitlab/models.goapps/backend/internal/gitlab/store.goapps/backend/internal/gitlab/store_config.go(new)apps/backend/internal/gitlab/store_config_test.go(new)apps/backend/internal/gitlab/service.goapps/backend/internal/gitlab/service_config.go(new)apps/backend/internal/gitlab/service_config_test.go(new)apps/backend/internal/gitlab/copy.go(new)apps/backend/internal/gitlab/factory.goapps/backend/internal/gitlab/factory_test.goapps/backend/internal/gitlab/provider.goapps/backend/internal/gitlab/provider_test.goapps/backend/internal/gitlab/controller.goapps/backend/internal/gitlab/controller_config.go(new)apps/backend/internal/gitlab/controller_config_test.go(new)apps/backend/internal/gitlab/controller_watches.goapps/backend/internal/gitlab/handlers.goapps/backend/internal/gitlab/poller.goapps/backend/internal/gitlab/service_search.goapps/backend/internal/gitlab/service_watches.goapps/backend/internal/gitlab/service_issue_watches.goapps/backend/internal/backendapp/services.goapps/backend/internal/backendapp/gitlab_service_test.goapps/web/lib/types/gitlab.tsapps/web/lib/api/domains/gitlab-api.tsapps/web/lib/api/domains/gitlab-api.test.tsapps/web/components/gitlab/gitlab-settings.tsxapps/web/components/gitlab/gitlab-settings.test.tsxapps/web/components/integrations/integration-copy-config.tsapps/web/components/integrations/integration-copy-config.test.tsapps/web/components/integrations/integrations-menu.tsxapps/web/hooks/domains/gitlab/use-gitlab-status.tsapps/web/hooks/domains/gitlab/use-gitlab-status.test.ts(new)apps/web/app/gitlab/gitlab-page-client.tsx
Dependencies
None.
Inputs
- Spec:
Whatworkspace connection bullets,gitlab_configs, Connection API, Connection health, Permissions, Persistence guarantees. - ADR:
docs/decisions/0030-workspace-scoped-integration-settings.md. - Patterns:
apps/backend/internal/jira/{store.go,service.go,provider.go,copy.go,handlers.go},apps/backend/internal/linear/, andapps/web/components/integrations/integration-copy-config.ts. - Constraint: keep
GITLAB_TOKENas an explicit environment fallback only; never serialize a secret value or authenticated URL. - Constraint: do not upgrade or reject an existing
http://self-managed host; normalize origin/trailing slash while preserving its scheme.
Output Contract
Report the config schema/migration, client resolution boundary, compatibility
surface removed or retained, frontend workspace behavior, files changed, tests
run, blockers, and residual credential-isolation risks. Mark this task done
and update plan.md only after targeted verification passes.