Skip to content

feat(agents): offer Global Assistant in the New Session drive picker - #2330

Merged
2witstudios merged 2 commits into
masterfrom
pu/new-session-button
Aug 4, 2026
Merged

2witstudios merged 2 commits into
masterfrom
pu/new-session-button

Conversation

@2witstudios

@2witstudios 2witstudios commented Aug 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

The global Agents console's New Session button opened a raycast-style drive picker that only listed drives, so a drive-less global-assistant session could only be spawned from the sidebar's Assistant group "+". The picker now lists a Global Assistant entry that jumps straight to the existing naming step.

  • DrivePickerDialog: new optional onPickGlobalAssistant prop — when set, renders a "Global Assistant" item (same Bot icon as the spawn palette) in its own group above the drives.
  • AgentsListHeader: wires the entry via the existing openAssistantSpawn() from useSpawnSession, session flow only — the "New Agent" picker still lists drives only, since agent creation needs a real drive to navigate into.
  • No backend/store changes: POST /api/agent-sessions with null driveId/agentPageId already creates the global session, and sidebar grouping/panes already handle driveId === null.

Testing

  • AgentsListHeader.test.tsx: new test for picker → naming-step flow for Global Assistant, plus an assertion the New Agent picker never shows the entry — 8/8 passing.
  • bun run --filter web typecheck and lint clean (only pre-existing warnings in unrelated hooks).

🤖 Generated with Claude Code

https://claude.ai/code/session_01VLXPJie89VLSvARqGfTMZu

Summary by CodeRabbit

  • New Features

    • Added a “Global Assistant” option to the session drive picker.
    • Selecting it starts a new assistant session directly, without requiring drive selection.
    • Global Assistant is available for new sessions but not when creating a new agent.
  • Bug Fixes

    • Improved the new session flow to correctly support global assistant sessions.

The global Agents console's New Session button opened a drive picker that
only listed drives, so a drive-less global-assistant session could only be
spawned from the sidebar's Assistant group. The picker now lists a Global
Assistant entry (session flow only — New Agent still needs a real drive)
that jumps straight to the existing openAssistantSpawn naming step.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLXPJie89VLSvARqGfTMZu
@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@2witstudios, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

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 reviews.

How do review 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 refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 471a9597-db48-44b4-ad4d-15c4adc3e327

📥 Commits

Reviewing files that changed from the base of the PR and between a7ea909 and b0153ce.

📒 Files selected for processing (2)
  • apps/web/src/components/agents/DrivePickerDialog.tsx
  • apps/web/src/components/agents/__tests__/AgentsListHeader.test.tsx
📝 Walkthrough

Walkthrough

The drive picker now offers a conditional “Global Assistant” option for new sessions. Selecting it closes the picker and opens the assistant naming flow without drive selection. Agent creation does not show this option.

Changes

Global Assistant session flow

Layer / File(s) Summary
Global Assistant picker entry
apps/web/src/components/agents/DrivePickerDialog.tsx
DrivePickerDialog accepts an optional callback and renders a “Global Assistant” entry when the callback is provided.
Drive-less session spawn and validation
apps/web/src/components/agents/AgentsListHeader.tsx, apps/web/src/components/agents/__tests__/AgentsListHeader.test.tsx
Session creation passes the callback, closes the picker, and calls openAssistantSpawn. Tests cover the session and agent creation flows.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant AgentsListHeader
  participant DrivePickerDialog
  participant useSpawnSession
  participant NamingStep
  User->>AgentsListHeader: Start new session
  AgentsListHeader->>DrivePickerDialog: Open picker with callback
  User->>DrivePickerDialog: Select Global Assistant
  DrivePickerDialog->>AgentsListHeader: Invoke callback
  AgentsListHeader->>useSpawnSession: Call openAssistantSpawn
  useSpawnSession->>NamingStep: Open assistant naming step
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding Global Assistant to the New Session drive picker.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pu/new-session-button

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
apps/web/src/components/agents/DrivePickerDialog.tsx (1)

49-56: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Use neutral copy when the picker can start a global session.

When onPickGlobalAssistant is present, this dialog offers a non-drive target. The existing dialog still announces Choose a drive, Pick which drive to create this in, and Search drives…. This is misleading for the Global Assistant path and for assistive technology. Use conditional or neutral copy for the title, description, and placeholder.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/web/src/components/agents/DrivePickerDialog.tsx` around lines 49 - 56,
Update the DrivePickerDialog copy tied to onPickGlobalAssistant so the title,
description, and search placeholder use neutral wording when a global assistant
option is available, while preserving the existing drive-specific copy when it
is not. Locate the dialog heading, supporting description, and search input
placeholder and make each conditional on onPickGlobalAssistant.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@apps/web/src/components/agents/DrivePickerDialog.tsx`:
- Around line 49-56: Update the DrivePickerDialog copy tied to
onPickGlobalAssistant so the title, description, and search placeholder use
neutral wording when a global assistant option is available, while preserving
the existing drive-specific copy when it is not. Locate the dialog heading,
supporting description, and search input placeholder and make each conditional
on onPickGlobalAssistant.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c4c7f55f-f565-453b-aee3-d34573a56641

📥 Commits

Reviewing files that changed from the base of the PR and between 88b4233 and a7ea909.

📒 Files selected for processing (3)
  • apps/web/src/components/agents/AgentsListHeader.tsx
  • apps/web/src/components/agents/DrivePickerDialog.tsx
  • apps/web/src/components/agents/__tests__/AgentsListHeader.test.tsx

…view: CodeRabbit)

The session-flow picker isn't drive-only anymore, so "Choose a drive" /
"Search drives…" / "No drives found." mislabel it — switch title,
description, placeholder, and empty state on onPickGlobalAssistant.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLXPJie89VLSvARqGfTMZu
@2witstudios
2witstudios merged commit 48ef425 into master Aug 4, 2026
3 checks passed
@2witstudios
2witstudios deleted the pu/new-session-button branch August 6, 2026 00:46
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