feat(app): support direct-start sessions - #1173
Conversation
There was a problem hiding this comment.
Suggested priority: P2 (includes user-path files (packages/app/src/components/prompt-input/workspace-chip-helpers.ts, packages/app/src/components/prompt-input/workspace-chip.test.ts, packages/app/src/components/prompt-input/workspace-chip.tsx, packages/app/src/i18n/en.ts, packages/app/src/i18n/zh.ts, packages/app/src/pages/layout.tsx, packages/app/src/pages/layout/pawwork-session-controller.ts, packages/app/src/pages/layout/pawwork-session-source.ts, packages/app/src/pages/layout/pawwork-sidebar-project-group-header-presentation.ts, packages/app/src/pages/layout/pawwork-sidebar-project-group-header.test.ts, packages/app/src/pages/layout/pawwork-sidebar-project-group-header.tsx, packages/app/src/pages/layout/pawwork-sidebar-session-rows.test.ts, packages/app/src/pages/layout/pawwork-sidebar.tsx, packages/app/src/pages/layout/shell-navigation.test.ts, packages/app/src/pages/layout/shell-navigation.ts)).
P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.
|
Warning Review limit reached
More reviews will be available in 10 minutes and 14 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR introduces "direct start" as a first-class workspace mode. It adds types and helpers, integrates direct-start into workspace chip UI and session/project resolution, updates sidebar presentation and shell navigation fallback, and updates tests and i18n strings. ChangesDirect-start workspace mode
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a 'Direct Start' feature to the workspace and session management, allowing users to start sessions directly from a fallback directory when no active project workspace is selected. Key changes include adding helper functions to identify and label direct-start paths, updating the workspace chip and sidebar components to display direct-start options with a distinct chat bubble icon, disabling management actions (rename/remove) for direct-start groups, and configuring shell navigation to fall back to the direct-start root. Unit tests and internationalization keys have also been added to support this feature. There are no review comments, and the implementation looks solid with no feedback to provide.
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.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/app/src/pages/layout/pawwork-sidebar-project-group-header.test.ts (1)
16-21: ⚡ Quick winConsider testing that
collapsedis ignored for direct-start.The test verifies
collapsed: false, but the implementation (line 9–10 in the presentation module) always returnsbubble-5for direct-start regardless ofcollapsed. Adding a second assertion withcollapsed: truewould confirm the collapsed state is intentionally ignored for this kind.📋 Proposed test enhancement
test("renders direct-start groups as chat-shaped and not project-manageable", () => { expect(projectGroupHeaderPresentation({ kind: "direct-start", collapsed: false })).toEqual({ icon: "bubble-5", canManage: false, }) + expect(projectGroupHeaderPresentation({ kind: "direct-start", collapsed: true })).toEqual({ + icon: "bubble-5", + canManage: false, + }) })🤖 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 `@packages/app/src/pages/layout/pawwork-sidebar-project-group-header.test.ts` around lines 16 - 21, Update the test for projectGroupHeaderPresentation to assert that the collapsed flag is ignored for kind "direct-start": add another expect call invoking projectGroupHeaderPresentation({ kind: "direct-start", collapsed: true }) and assert it equals the same object { icon: "bubble-5", canManage: false }, so both collapsed: false and collapsed: true produce identical results.
🤖 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.
Inline comments:
In `@packages/app/src/components/prompt-input/workspace-chip.tsx`:
- Around line 64-66: The Icon currently shows "bubble-5" whenever current() is
falsy even if no direct-start directory exists; update the Icon name logic so
"bubble-5" is used only when a direct-start directory actually exists or
directStartActive() is true. Locate the Icon in workspace-chip.tsx and change
the name expression to check directStartDirectory() (and/or directStartActive())
alongside current(), e.g. only return "bubble-5" when directStartDirectory() ||
directStartActive() is truthy, otherwise fall back to "folder".
---
Nitpick comments:
In `@packages/app/src/pages/layout/pawwork-sidebar-project-group-header.test.ts`:
- Around line 16-21: Update the test for projectGroupHeaderPresentation to
assert that the collapsed flag is ignored for kind "direct-start": add another
expect call invoking projectGroupHeaderPresentation({ kind: "direct-start",
collapsed: true }) and assert it equals the same object { icon: "bubble-5",
canManage: false }, so both collapsed: false and collapsed: true produce
identical results.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: afe86a5e-f983-4562-bb88-3ad7f6058186
📒 Files selected for processing (15)
packages/app/src/components/prompt-input/workspace-chip-helpers.tspackages/app/src/components/prompt-input/workspace-chip.test.tspackages/app/src/components/prompt-input/workspace-chip.tsxpackages/app/src/i18n/en.tspackages/app/src/i18n/zh.tspackages/app/src/pages/layout.tsxpackages/app/src/pages/layout/pawwork-session-controller.tspackages/app/src/pages/layout/pawwork-session-source.tspackages/app/src/pages/layout/pawwork-sidebar-project-group-header-presentation.tspackages/app/src/pages/layout/pawwork-sidebar-project-group-header.test.tspackages/app/src/pages/layout/pawwork-sidebar-project-group-header.tsxpackages/app/src/pages/layout/pawwork-sidebar-session-rows.test.tspackages/app/src/pages/layout/pawwork-sidebar.tsxpackages/app/src/pages/layout/shell-navigation.test.tspackages/app/src/pages/layout/shell-navigation.ts
Summary
Direct start/直接开始in the sidebar instead of exposing the backing folder.No linked issue; this follows the product design discussion for starting without choosing a workspace.
Why
Users should be able to start a useful chat or task before choosing a project. This keeps PawWork usable out of the box while still using the existing backend default directory as the execution and persistence root.
Related Issue
None.
Human Review Status
Pending
Review Focus
globalSync.data.path.directory.Risk Notes
Behavior risk: new-session shell actions now fall back to the backend default directory when no project is active. That directory remains the actual filesystem backing store.
Platform impact considered: this reuses the existing global default directory and does not add OS-specific path construction, shell behavior, permissions, packaging, or updater changes.
No dependency, generated file, docs, release note, credential, deletion, or migration surface was changed.
How To Verify
Screenshots or Recordings
Local visual checks were completed for the changed home composer surface and direct-start picker state. No externally hosted recording is attached.
Checklist
bug,enhancement,task,documentation. Type labels are author-added; the labeler bot does NOT assign them. Add the label in the GitHub UI, then tick this.app,ui,platform,harness,ci. The labeler bot assigns these on PR open based on changed paths. Confirm the bot choice (or override if wrong), then tick this.P0,P1,P2,P3. The priority-triage bot suggests one on PR open. Confirm or override, then tick this.Pending,Approved by @<reviewer>, orNot required: <reason>(default isPending; "not required" is restricted to bot-authored low-risk PRs).dev, and my PR title and commit messages use Conventional Commits in English.Summary by CodeRabbit
New Features
Improvements
Tests