Skip to content

Open fresh desktop profiles in a ~ folder workspace - #37898

Merged
brennanb2025 merged 23 commits into
mainfrom
brennanb2025/default-home-folder
Nov 7, 2026
Merged

brennanb2025 merged 23 commits into
mainfrom
brennanb2025/default-home-folder

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

A fresh desktop profile now opens in an ordinary folder workspace at the OS home directory, with its existing shell. The initial repo group is named ~, so it reads as the user's home directory. Onboarding Continue saves the visibly selected default agent and opens it through the normal launcher in that workspace. First use and Help replay share the same completion behavior.

Initialization runs only when no saved profile document exists. The ordinary folder record, selected workspace, fresh-profile defaults and inherited telemetry consent are published through the existing atomic profile publication. Existing saved profiles, including empty catalogs, deleted groups and user-renamed groups, stay unchanged. Generic remote/headless stores do not opt in. These are intended boundaries; there is no new setting, saved marker, workspace type, directory creation or special agent launcher.

The rightmost + retains ordinary last-project workspace creation and the chosen default agent; FolderPlus opens Add Project. Completion retains the original shell and existing agent tabs. A failed settings save keeps onboarding open without launching anything. Empty profiles keep Add Project as the fallback. The separate Set up later change is tracked in #38028.

Independent review and the reference comparison are complete. Real macOS and Windows QA covered initialization, exact shell directory, Explorer and graceful restart. Real Claude and Codex first-use and Help-replay flows each reached a reply with the selected agent, retaining the shell and prior tabs. Screenshots, driver identities, stopped PIDs and real configuration hashes were inspected. This evidence carries across main merges and test-only corrections; the later name-only change is a tests-row flow.

The latest blocking conflict was resolved by merging main a5da3ed in d5c5ac3. This retains main's current host-owned launch path and the captured workspace owner. Import paths follow main's module moves. Five material profile-initialization cases remain from two suites main removed; unrelated deleted coverage stays deleted. A selector and request type moved unchanged to satisfy lint. Test-only 81879bb corrects a relocated dynamic import. Both retained independent reviewers accept the integration; the retained Codex reviewer verified the final import/lint-only corrections, carrying the Claude production receipt; prior real QA carries across this merge.

Validation on final 2b2e79b: all 54 tests in ten focused suites passed. Final local changed check passed 29/32; code quality printed zero findings, broad units remained incomplete with truncated output, and typechecks remained queued at the explicit two-minute limits. All exact-head GitHub checks passed, including twelve unit shards, static analysis/typecheck, changed E2E, both packages, persistence and all three WSL distributions. Prior 41 rename-owning and 22 merge-owning tests and all real-run proof remain recorded; no full local gate pass is claimed.

Files Added Deleted Net
Test 18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1176 $\color{#cf222e}{\Huge{\mathbf{−}}}$​236 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​940
Prod 29 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​483 $\color{#cf222e}{\Huge{\mathbf{−}}}$​189 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​294
Files Added Deleted Net
Test 18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1134 $\color{#cf222e}{\Huge{\mathbf{−}}}$​237 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​897
Prod 29 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​494 $\color{#cf222e}{\Huge{\mathbf{−}}}$​196 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​298

@brennanb2025
brennanb2025 marked this pull request as ready for review November 3, 2026 21:15
@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • Resume reviews
  • Trigger review
Walkthrough

New profile initialization builds persisted defaults with a Home repository and active local workspace. Profile stores can initialize Home when enabled and no profile document exists; startup disables this in serve mode. Onboarding completion continues into a selected workspace or opens Add Project when none is selected. Agent launches can retain the captured workspace execution host, and workspace activation reports explicit outcomes. The changes also centralize local project record creation and adjust folder-workspace lookup behavior.

Merge Risk: Low · up to f0fd9

Profiles created from a serve-mode window can unexpectedly include Home. Failed profile creation can leave an extra listed profile, and unexpected launch errors lack diagnostics. These are bounded risks to address or accept before merging.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 32.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description explains the changes and reports test results, but it omits most template sections. It also lacks visual proof and a risk and rollback assessment. Use the template headings. Add a plain-language summary, the problem and alternatives, and an actual linked issue if required. Attach before-and-after visual proof. Add reproducible test steps, a risk level, affected users and rollback guid…
Passed Passed checks: 3 passed

Check name Status Explanation
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.
Title check Passed The title "Open fresh desktop profiles in a ~ folder workspace" matches the main change: fresh desktop profiles now start in a folder workspace at the OS home directory. The changeset adds Home initia…
Full details: Title check

Explanation

The title "Open fresh desktop profiles in a ~ folder workspace" matches the main change: fresh desktop profiles now start in a folder workspace at the OS home directory. The changeset adds Home initialization in new-profile state, the persistence store, and onboarding completion, all of which the title covers. It is concise and specific. It does not mention onboarding completion, which is a secondary but related part of the change.

Full details: Docstring Coverage

Explanation

Docstring coverage is 32.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 28 functions across 47 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Full details: Description check

Resolution

Use the template headings. Add a plain-language summary, the problem and alternatives, and an actual linked issue if required. Attach before-and-after visual proof. Add reproducible test steps, a risk level, affected users and rollback guidance. Complete the review, upstream-boundary and checklist sections, and add AI disclosure if applicable.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@brennanb2025

brennanb2025 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Fresh desktop profiles start in an ordinary folder workspace at the OS home directory, with the initial repo group named ~. Onboarding Continue saves the visible agent selection and opens it through normal workspace activation. Existing saved and renamed groups remain unchanged. Set up later is tracked separately in #38028.

Brennan authorized squash-merging this PR, followed by #38028. A blocking main conflict required merging a5da3ed in d5c5ac3. The resolution preserves main’s current host-owned launcher and the captured workspace owner. Relocated imports were updated; only five material profile-initialization cases were retained from two suites main deleted. The pure selector and request type were extracted unchanged for lint. Both retained reviewers accept the production merge. Test-only 81879bb corrects one dynamic import in the relocated launcher suite. Final 2b2e79b consolidates identical imports and adds fixture SAFETY comments; the retained Codex reviewer accepted both corrections with Claude’s d5c5ac3 production receipt carried to 2b2e79b under the review workflow’s CI-only correction rule: the later commits change only an existing test import, import grouping and fixture comments. Codex narrowly verified those exact deltas; behavior and assertions are unchanged. Prior app QA carries; this merge introduces no new user behavior.

Validation on 2b2e79b: ten focused suites passed all 54 tests. Final local changed check passed 29/32; code quality printed zero new findings, broad units produced truncated output and typecheck remained queued before the explicit two-minute limits. No full local pass is claimed. All exact-head GitHub checks passed, including twelve unit shards, static analysis/typecheck, changed E2E, both packages, persistence and all three WSL distributions. GitHub reports CLEAN and MERGEABLE, out of draft. Prior 41 rename-owning and 22 merge-owning tests and app proof carry.

QA carry: real macOS Claude and Codex first-use/Help-replay runs at cddbdf9 reached a reply while preserving the shell and prior tabs. Earlier Windows/macOS exact-directory, Explorer and graceful-restart evidence remains valid. Screenshots, driver identities, stopped PIDs and real configuration hashes were inspected. The initial review head 1bcde73 and subsequent main merges/test-only corrections, including 2e232f1, retain that evidence. Later shipped change 8a47976 changes only the initial display name from Home to ~ (tests-row flow); 3a5d41d is a main merge with a behavior-preserving conflict resolution; bd21600 and afa0597 are test-only. No run-row behavior changed and no agent-response or whole-QA replay was needed.

For Brennan's review

Flow This PR: requested agent replies in Home
Fresh onboarding, Claude Fresh onboarding, Claude
Help replay, Codex; jump to final step Help replay, Codex; jump to final step
Fresh onboarding, Codex Fresh onboarding, Codex
Help replay, Claude Help replay, Claude

Before this PR, both first use and Help replay opened Add Project: Main first use Main replay

Retained graceful-restart evidence:

Flow Main This PR
After graceful restart after-restart.png after-restart-shell-run4.png

The behavior boundaries are fresh-profile admission, atomic profile publication, and shared onboarding completion.

@brennanb2025
brennanb2025 marked this pull request as draft November 4, 2026 01:36
@brennanb2025
brennanb2025 marked this pull request as ready for review November 4, 2026 02:43

@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
src/renderer/src/lib/launch-agent-in-new-tab.ts: 1

54-54: Trivial · Maintainability & Code Quality · Quick win

Log unexpected launch exceptions before returning a refusal.

When openAgentInNewTab throws, the catch block discards the original error. Some callers show a generic toast for the returned null, but no boundary preserves the exception for diagnostics. The previous implementation propagated these exceptions instead of discarding them.

Suggested fix
-  } catch {
+  } catch (error) {
+    console.error('Agent launch failed unexpectedly', error)
     args.focusIntent?.cancel()
Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9c8f947b-402f-4b96-bd37-9ee7a5228bf9
Commits

Reviewing files that changed from the base of the PR and between 1ccf400 and cddbdf9.

Files selected for processing: 23
  • src/renderer/src/components/onboarding/OnboardingFlow.test.tsx
  • src/renderer/src/components/onboarding/onboarding-completion-agent-launch.ts
  • src/renderer/src/components/onboarding/use-onboarding-flow-actions.test.tsx
  • src/renderer/src/components/onboarding/use-onboarding-flow-actions.ts
  • src/renderer/src/components/onboarding/use-onboarding-flow-persistence.test.ts
  • src/renderer/src/components/onboarding/use-onboarding-flow-persistence.ts
  • src/renderer/src/components/onboarding/use-onboarding-flow.ts
  • src/renderer/src/lib/connection-owner-resolution.ts
  • src/renderer/src/lib/execution-host-facts.test.ts
  • src/renderer/src/lib/execution-host-facts.ts
  • src/renderer/src/lib/fix-checks-agent-launch.test.ts
  • src/renderer/src/lib/fix-checks-agent-launch.ts
  • src/renderer/src/lib/folder-workspace-path-status.ts
  • src/renderer/src/lib/launch-agent-execution-context.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-args.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-host-agents.ts
  • src/renderer/src/lib/launch-agent-in-new-tab-main-surface.test.ts
  • src/renderer/src/lib/launch-agent-in-new-tab.test.ts
  • src/renderer/src/lib/launch-agent-in-new-tab.ts
  • src/renderer/src/lib/launch-agent-web-host-tab.ts
  • src/renderer/src/lib/worktree-activation-automation-filter.test.ts
  • src/renderer/src/lib/worktree-activation-outcome.ts
  • src/renderer/src/lib/worktree-activation.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Report the activation outcome from both onboarding… · onboarding-folder-agent-launch.ts:96-117

src/renderer/src/lib/onboarding-folder-agent-launch.ts:96-117
Minor · Functional Correctness · Quick win

Report the activation outcome from both onboarding launch paths.

When the selected workspace disappears, activateAndRevealWorktree(...) returns an unnotified workspace-missing refusal. The non-structured path discards it. The structured path stops before opening the provisional session but does not report it.

Use the outcome API and reportAgentWorkspaceActivation(...). Keep the existing boolean behavior when no agent is selected. The reporter preserves notifications for missing workspaces and does not duplicate path-blocked notifications.

Suggested fix
-import { activateAndRevealWorktree } from '@/lib/worktree-activation'
+import { activateAndRevealWorktreeWithOutcome } from '@/lib/worktree-activation'
+import { reportAgentWorkspaceActivation } from '@/lib/worktree-activation-outcome'
 import { beginStructuredAgentSessionProvisionalLaunch } from '@/lib/agent-session/structured-agent-session-provisional-tab'

@@
-    activateAndRevealWorktree(args.worktreeId, {
+    const outcome = activateAndRevealWorktreeWithOutcome(args.worktreeId, {
       sidebarRevealBehavior: 'auto',
       ...(args.executionHostId ? { executionHostId: args.executionHostId } : {}),
       ...(startup ? { startup } : {}),
       ...(providesInitialSurface ? { providesInitialSurface: true } : {})
     })
+    return args.launch.agent
+      ? reportAgentWorkspaceActivation(outcome, args.launch.agent)
+      : 'opened' in outcome
Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c88e53e0-bd3b-45e9-b369-e83a066d818c
Commits

Reviewing files that changed from the base of the PR and between 03b10de and 1bcde73.

Files selected for processing: 1
  • src/renderer/src/lib/launch-agent-in-new-tab-main-surface.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.

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

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Preserve the serve-mode Home exclusion for newly created profiles. · orca-profiles.ts:169-175

src/main/ipc/profiles/orca-profiles.ts:169-175
Minor · Functional Correctness · Quick win

Preserve the serve-mode Home exclusion for newly created profiles.

When a serve-mode process opens a window, a user can create a local or cloud-linked profile through the registered handlers. Both handlers currently initialize the profile with Home. This violates the initializeHomeWorkspace: !state.isServeMode contract.

Thread !state.isServeMode through the existing lifecycle options and let the shared initializer create the default state without Home when it is false. Apply the option to both creation handlers.

Suggested fix
diff --git a/src/main/ipc/register-core-handlers/register-core-handlers.ts b/src/main/ipc/register-core-handlers/register-core-handlers.ts
@@
   registerOrcaProfileHandlers(store, {
+    initializeHomeWorkspace: lifecycleOptions.initializeHomeWorkspace,
     onBeforeRelaunch: lifecycleOptions.onBeforeRelaunch,
     onAuthMutation: lifecycleOptions.onOrcaProfileAuthMutation,
     onBeforeSignOut: lifecycleOptions.onBeforeOrcaProfileSignOut,
     onAfterSignOut: lifecycleOptions.onAfterOrcaProfileSignOut
   })

diff --git a/src/main/ipc/profiles/orca-profiles.ts b/src/main/ipc/profiles/orca-profiles.ts
@@
 type RegisterOrcaProfileHandlersOptions = {
+  initializeHomeWorkspace?: boolean
   onBeforeRelaunch?: () => void | Promise<void>
@@
-      initializeNewOrcaProfileState(result.profile.id, store.getSettings().telemetry)
+      initializeNewOrcaProfileState(
+        result.profile.id,
+        store.getSettings().telemetry,
+        getProfileUserDataPath(),
+        options.initializeHomeWorkspace
+      )
@@
-        initializeNewOrcaProfileState(result.profile.id, store.getSettings().telemetry)
+        initializeNewOrcaProfileState(
+          result.profile.id,
+          store.getSettings().telemetry,
+          getProfileUserDataPath(),
+          options.initializeHomeWorkspace
+        )

diff --git a/src/main/orca-profiles/new-profile-state.ts b/src/main/orca-profiles/new-profile-state.ts
@@
   profileId: string,
   telemetry: GlobalSettings['telemetry'],
-  userDataPath = getProfileUserDataPath()
+  userDataPath = getProfileUserDataPath(),
+  initializeHomeWorkspace = true
@@
-    const initialState = createInitialHomeWorkspaceState(initial)
+    const initialState = initializeHomeWorkspace
+      ? createInitialHomeWorkspaceState(initial)
+      : initial
Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: baba308b-a64d-47f7-ab3f-de4d311e126f
Commits

Reviewing files that changed from the base of the PR and between 1bcde73 and f0fd9a4.

Files selected for processing: 7
  • src/renderer/src/lib/execution-host-facts.test.ts
  • src/renderer/src/lib/execution-host-facts.ts
  • src/renderer/src/lib/fix-checks-agent-launch.test.ts
  • src/renderer/src/lib/fix-checks-agent-launch.ts
  • src/renderer/src/lib/folder-workspace-path-status.ts
  • src/renderer/src/lib/worktree-activation.ts
  • tests/e2e/onboarding.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

@brennanb2025 brennanb2025 changed the title Open fresh desktop profiles in a Home folder workspace Open fresh desktop profiles in a ~ folder workspace Nov 5, 2026
@brennanb2025
brennanb2025 merged commit 46575a2 into main Nov 7, 2026
64 checks passed
OrcaWin added a commit that referenced this pull request Nov 8, 2026
… sign-in probe and onboarding trust prompt

- setup-script-import: imported setups are saved from the Review setup
  script dialog since #37937.
- github-url-smart-input-transition: the GitLab source lists through
  gitlab:listWorkItems since #32005, so stub that channel.
- structured-chat-tabs-open-close: the Claude catalog probe also sends an
  initialize request for sign-in discovery since #37191.
- golden-core-flows: onboarding launches the chosen agent in the fresh ~
  workspace (#37898), whose first launch asks the per-repo agent folder
  trust question (#38946); answer it before adding a project.
OrcaWin added a commit that referenced this pull request Nov 8, 2026
… sign-in probe and onboarding trust prompt (#39983)

- setup-script-import: imported setups are saved from the Review setup
  script dialog since #37937.
- github-url-smart-input-transition: the GitLab source lists through
  gitlab:listWorkItems since #32005, so stub that channel.
- structured-chat-tabs-open-close: the Claude catalog probe also sends an
  initialize request for sign-in discovery since #37191.
- golden-core-flows: onboarding launches the chosen agent in the fresh ~
  workspace (#37898), whose first launch asks the per-repo agent folder
  trust question (#38946); answer it before adding a project.

Co-authored-by: OrcaWin <[email protected]>
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