3.8 KiB
3.8 KiB
id, title, status, wave, depends_on, plan, spec
| id | title | status | wave | depends_on | plan | spec | |
|---|---|---|---|---|---|---|---|
| 03-task-mr-linking-launch | Task-to-MR linking and quick launch | done | 2 |
|
plan.md | ../../specs/integrations/requirements/gitlab-integration.md |
Task 03: Task-to-MR Linking And Quick Launch
Acceptance
- A configured-host MR URL can be idempotently linked to an existing task and repository, while wrong-host/cross-workspace URLs are rejected and unlinking removes only the selected association/refresh watch.
- MR and issue rows expose action-preset task launch; successful MR launch links the created task, while issue launch carries URL context without a durable issue association.
- GitLab rows show single/multiple linked-task indicators and update after link/unlink on desktop and mobile without affecting GitHub launch behavior.
Verification
cd apps/backend && rtk go test -run 'Test.*(TaskMR|MRURL|AssociateExistingMR|UnlinkTaskMR)' ./internal/gitlab/...
cd apps && rtk pnpm --filter @kandev/web test -- --run lib/api/domains/gitlab-api.test.ts lib/state/slices/gitlab/gitlab-slice.test.ts hooks/domains/gitlab/use-task-mr.test.ts components/gitlab/my-gitlab/quick-task-launcher.test.tsx components/gitlab/my-gitlab/mr-row-task-indicator.test.tsx components/gitlab/my-gitlab/mr-list.test.tsx components/gitlab/my-gitlab/issue-list.test.tsx
cd apps/web && rtk pnpm run typecheck
Files Likely Touched
apps/backend/internal/gitlab/service_task_mr_link.go(new)apps/backend/internal/gitlab/service_task_mr_link_test.go(new)apps/backend/internal/gitlab/controller_task_mrs.go(new)apps/backend/internal/gitlab/controller_task_mrs_test.go(new)apps/backend/internal/gitlab/controller.goapps/backend/internal/gitlab/store.goapps/backend/internal/gitlab/store_test.goapps/backend/internal/gitlab/service_sync.goapps/web/lib/types/gitlab.tsapps/web/lib/api/domains/gitlab-api.tsapps/web/lib/api/domains/gitlab-api.test.tsapps/web/lib/state/slices/gitlab/types.tsapps/web/lib/state/slices/gitlab/gitlab-slice.tsapps/web/lib/state/slices/gitlab/gitlab-slice.test.tsapps/web/hooks/domains/gitlab/use-task-mr.tsapps/web/hooks/domains/gitlab/use-task-mr.test.tsapps/web/hooks/domains/gitlab/use-mr-key-to-tasks.ts(new)apps/web/hooks/domains/gitlab/use-mr-key-to-tasks.test.ts(new)apps/web/components/gitlab/my-gitlab/quick-task-launcher.tsx(new)apps/web/components/gitlab/my-gitlab/quick-task-launcher.test.tsx(new)apps/web/components/gitlab/my-gitlab/mr-row-task-indicator.tsx(new)apps/web/components/gitlab/my-gitlab/mr-row-task-indicator.test.tsx(new)apps/web/components/gitlab/my-gitlab/mr-list.tsxapps/web/components/gitlab/my-gitlab/mr-list.test.tsx(new)apps/web/components/gitlab/my-gitlab/issue-list.tsxapps/web/components/gitlab/my-gitlab/issue-list.test.tsx(new)apps/web/app/gitlab/gitlab-page-client.tsx
Dependencies
Task 01 supplies authoritative connection/host resolution. This task owns the task-MR HTTP handler file; Task 04 must not edit it.
Inputs
- Spec: browse/launch/link
What, task association data, Task-to-MR API, association failure modes, and link/launch scenarios. - Pattern:
apps/backend/internal/github/controller.gohttpCreateTaskPR, GitHubAssociateExistingPRByURL, andapps/web/components/github/my-github/quick-task-launcher.tsx. - Pattern: GitHub
PRRowTaskIndicatoranduse-pr-key-to-tasks. - Constraint: project path matching includes subgroups and configured host;
never infer self-managed URLs as
gitlab.com.
Output Contract
Report URL normalization, workspace/repository validation, association cleanup,
launch defaults, indicator keying, mobile implications, files changed, tests
run, blockers, and residual race behavior. Mark this task done and update the
plan after verification.