Skip to content

feat: add task room create and launch flow#1052

Open
donovan-yohan wants to merge 4 commits into
nightlyfrom
issue-1045-create-launch-flow
Open

feat: add task room create and launch flow#1052
donovan-yohan wants to merge 4 commits into
nightlyfrom
issue-1045-create-launch-flow

Conversation

@donovan-yohan

Copy link
Copy Markdown
Owner

Summary

  • add provider-neutral WorkspaceTopic launch preview helpers and frontend task-room API helpers for create-only, create+launch, and retrying launch after room creation
  • wire + task entrypoints in the topic sidebar and Command Center, with create/edit/retry state and typed failure display
  • cover the flow with workspace-topic, frontend API, topic sidebar, and action coverage tests

Closes #1045

Verification

  • PATH="$HOME/.local/opt/node-v24.16.0-linux-x64/bin:$PATH" npm test -- test/workspace-topics.test.ts test/api-error.test.ts test/topic-sidebar-shell.test.ts test/action-coverage.test.ts
  • PATH="$HOME/.local/opt/node-v24.16.0-linux-x64/bin:$PATH" npm run check (0 errors, existing warnings)
  • PATH="$HOME/.local/opt/node-v24.16.0-linux-x64/bin:$PATH" npm run build
  • PATH="$HOME/.local/opt/node-v24.16.0-linux-x64/bin:$PATH" npm test (388 files, 5027 passed, 9 skipped)
  • pre-push changed-test hook with Node 24 PATH (70 files, 563 passed)

Simplify

  • tier 3 simplify pass: launched reuse/quality/efficiency reviewers on the full diff; local self-review found and fixed retry semantics so a launch retry uses the already-created room instead of attempting duplicate topic/work-context creation
  • Claude Code delegation skipped because profile-local claude is installed but not logged in

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@donovan-yohan, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 29 minutes and 24 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3dae6028-7aff-41ee-a98a-f91d23b57ba3

📥 Commits

Reviewing files that changed from the base of the PR and between 8751feb and cb3052e.

📒 Files selected for processing (13)
  • frontend/src/components/TopicSidebarShell.css
  • frontend/src/components/TopicSidebarShell.tsx
  • frontend/src/hooks/useActionRegistry.ts
  • frontend/src/lib/actions/definitions/session.ts
  • frontend/src/lib/api.ts
  • frontend/src/lib/topic-task-ref.ts
  • shared/workspace-topics.ts
  • test/action-coverage.test.ts
  • test/api-error.test.ts
  • test/topic-sidebar-shell.test.ts
  • test/topic-task-ref.test.ts
  • test/workspace-topic-room-api.test.ts
  • test/workspace-topics.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-1045-create-launch-flow

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new task room creation panel in the topic sidebar, allowing users to create workspace topic rooms and optionally launch agent sessions. It adds the corresponding API endpoints, action registry integrations, and comprehensive unit tests. The review feedback highlights a bug in the task reference regular expression that causes false-positive GitHub issue classifications, and identifies redundant workContext construction in TopicSidebarShell that is already handled by the API helper.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +1126 to +1130
const issueMatch = trimmed.match(/(?:issues\/|#)?(\d+)\b/);
if (!issueMatch) {
return { kind: 'external', id: trimmed, title };
}
const issueId = issueMatch[1]!;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current regular expression /(?:issues\/|#)?(\d+)\b/ has an optional prefix, which causes it to match any number in the input string (e.g., 'Fix bug in v2' matches '2', and 'JIRA-123' matches '123'). This leads to false-positive GitHub issue classifications. Consider restricting the match to pure numbers, numbers prefixed with #, or explicit issues/<id> paths.

  const issueMatch = trimmed.match(/^(?:#)?(\\d+)$/) || trimmed.match(/\\bissues\\/(\\d+)/);
  if (!issueMatch) {
    return { kind: 'external', id: trimmed, title };
  }
  const issueId = issueMatch[1]!;

Comment on lines +1265 to +1280
workContext: {
title: previewCreate.title,
anchors: {
project: { workspaceId: previewCreate.workspaceId },
repo: {
...(previewCreate.routingDefaults?.repoPath
? { localPath: previewCreate.routingDefaults.repoPath }
: {}),
},
worktree: {
...(previewCreate.routingDefaults?.worktreePath
? { localPath: previewCreate.routingDefaults.worktreePath }
: {}),
},
},
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The workContext object construction here is fully redundant. The createWorkContextForTopicRoom helper in api.ts already automatically defaults the title to input.topic.title and constructs the exact same anchors (project, repo, and worktree) from the topic's routing defaults if workContext is omitted. Removing this block simplifies the code and avoids duplicating the anchor resolution logic.

@donovan-yohan

Copy link
Copy Markdown
Owner Author

Verdict: changes requested.

Review exact head: 8af42e1

Blockers:

  1. frontend/src/components/TopicSidebarShell.tsx:1123-1136 — task refs are misclassified. /(?:issues\/|#)?(\d+)\b/ makes the prefix optional, so arbitrary refs containing digits (v2, JIRA-123, task 999) become github-issue refs instead of external refs. Create topic task rooms and launch agents from workspace defaults #1045 explicitly depends on durable task refs; silently linking unrelated text to a GitHub issue is bad data, not a cosmetic nit. Restrict GitHub issue parsing to whole numeric input, #<number>, or explicit GitHub issue URLs/issues/<number>, and add negative tests.
  2. frontend/src/components/TopicSidebarShell.tsx:759-789 and 1199-1219 — the create form does not support or preserve the required repo/worktree/cwd/node/provider/template controls from Create topic task rooms and launch agents from workspace defaults #1045. It only exposes title, starter prompt, and task ref, then derives repo/worktree/cwd from the active session while omitting activeSession.nodeId entirely. The preview can show node: local/default node and launch through local /sessions for a remote active session. That misses the Create topic task rooms and launch agents from workspace defaults #1045 acceptance requirement that users can pick/preview node/provider/defaults before create+launch.

Non-blocking concern:

  • frontend/src/components/TopicSidebarShell.tsx:1261-1280 duplicates WorkContext title/anchor construction already centralized in createWorkContextForTopicRoom (frontend/src/lib/api.ts:1713-1736). Not currently behavior-breaking, but it creates drift risk; prefer deleting the duplicate unless the UI must override anchors.

Bot triage:

  • Gemini inline regex finding: blocker, verified against code.
  • Gemini inline redundant WorkContext finding: follow-up/non-blocking, verified against helper defaults.
  • Gemini review summary: informational summary of the two inline findings.
  • CodeRabbit issue comment: noise; rate-limit/quota only, no substantive review.

Evidence checked:

  • PR metadata/head/checks: base nightly, head 8af42e1, GitHub CI/e2e/sync-labels/scan-commits green.
  • Bot surfaces checked: review summaries, inline PR comments, PR issue comments.
  • Local changed-file review: TopicSidebarShell TSX/CSS, action registry definition, frontend API helpers, shared workspace-topic preview/session helper, changed tests.
  • Local targeted test attempt: npm test -- test/workspace-topics.test.ts test/api-error.test.ts test/topic-sidebar-shell.test.ts test/action-coverage.test.ts; 3 files passed, test/topic-sidebar-shell.test.ts could not import lucide-react because this review worktree has no installed dependency (npm ls lucide-react --depth=0 shows empty). CI is the execution evidence for the full PR head.

Unblock by fixing both blockers on the same PR branch and rerunning targeted tests/check/build. Fresh exact-head QA/review needed after the new head, obviously. (-_-;)

@donovan-yohan

Copy link
Copy Markdown
Owner Author

Verdict: approve.

Review exact head: b27508d

Blockers: none.

Why this unblocks the prior review:

  • frontend/src/lib/topic-task-ref.ts:3-40 now only classifies whole numeric refs, whole #number refs, explicit issues/ refs, or GitHub issue URLs as github-issue. Arbitrary digit-bearing text like Fix bug in v2, task 999, and JIRA-123 stays external, with tests in test/topic-task-ref.test.ts.
  • frontend/src/components/TopicSidebarShell.tsx:1136-1205 now resolves active sessions by scoped key and carries activeSession.nodeId into topic routing defaults alongside repo/worktree/cwd.
  • frontend/src/components/TopicSidebarShell.tsx:1247-1261 removed the duplicate WorkContext anchor override, so createWorkContextForTopicRoom owns centralized anchor construction.
  • frontend/src/lib/api.ts:1713-1746 adds the topic node anchor to default WorkContext creation, and frontend/src/lib/api.ts:1815-1827 launches through the topic routing node when the caller did not explicitly override nodeId.
  • shared/workspace-topics.ts:1118-1185 preserves nodeId in the shared session create body path too, so the non-frontend helper is not left semantically behind. tiny mercy from the fish, apparently.

Coverage ledger:

  • Reviewed frontend/src/components/TopicSidebarShell.tsx — remediation integration, active session resolution, preview defaults, create+launch retry path.
  • Reviewed frontend/src/lib/api.ts — WorkContext defaults, remote session route selection, nodeId body stripping via createSession.
  • Reviewed frontend/src/lib/topic-task-ref.ts — parser boundaries and false-positive cases.
  • Reviewed shared/workspace-topics.ts — shared launch body projection of nodeId.
  • Reviewed test/topic-task-ref.test.ts, test/workspace-topic-room-api.test.ts, test/workspace-topics.test.ts — coverage matches the prior blockers.
  • Skipped non-remediation PR files except as prior-review context; this gate is scoped to the diff from 8af42e1 to b27508d.

Evidence:

  • Local targeted pass: npm test -- test/topic-task-ref.test.ts test/workspace-topic-room-api.test.ts test/workspace-topics.test.ts test/api-error.test.ts test/action-coverage.test.ts => 5 files / 62 tests passed.
  • Local targeted attempt including test/topic-sidebar-shell.test.ts still fails before tests because this review worktree cannot resolve lucide-react; same environment issue noted in the prior review, not introduced by this remediation.
  • GitHub checks at this head: ci pass, e2e pass, scan-commits pass, CodeRabbit pass.

Bot feedback + learning:

  • Bot surfaces checked: review summaries, inline PR comments, issue comments.
  • Gemini regex finding: blocker at old head, fixed and covered by tests.
  • Gemini duplicate WorkContext finding: follow-up at old head, fixed by deleting the duplicate override.
  • CodeRabbit: prior issue comment was rate-limit/noise; latest status check is pass with no substantive comment surfaced.
  • Learning retained: yes — node routing review should trace active-session lookup → preview defaults → WorkContext anchors → session route selection → shared launch body.

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.

Create topic task rooms and launch agents from workspace defaults

1 participant