Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
1f8beb9
fix(native-chat): an open chat moves to the account you switch to bef…
brennanb2025 Oct 20, 2026
253f941
fix(native-chat): declare the launch-account read for the runtime lay…
brennanb2025 Oct 20, 2026
f1e3681
fix(claude): find custom chat history before managed-account resume
brennanb2025 Oct 20, 2026
d951264
test(claude): assign the complete custom account home
brennanb2025 Oct 20, 2026
a9d0cba
Merge remote-tracking branch 'origin/main' into brennanb2025/chat-acc…
brennanb2025 Oct 20, 2026
73511e7
feat(native-chat): offer account switching and hand-off at usage limits
brennanb2025 Oct 20, 2026
37ed8bb
fix: track the provider in account-list reload effects
brennanb2025 Oct 20, 2026
bb8853a
fix(native-chat): target recovery actions at the chat host and transc…
brennanb2025 Oct 20, 2026
3c5668a
fix(native-chat): verify account recovery for each chat on its host
brennanb2025 Oct 20, 2026
3c98d23
refactor(native-chat): retain the existing image-support result
brennanb2025 Oct 20, 2026
f8a5162
fix(native-chat): withdraw account recovery after failed eligibility …
brennanb2025 Oct 20, 2026
90aa1ac
fix(native-chat): leave unavailable recovery facts absent
brennanb2025 Oct 20, 2026
4656809
Align Japanese usage-limit recovery copy with catalog convention
brennanb2025 Oct 20, 2026
ed99d49
Preserve complete chat context through usage-limit recovery
brennanb2025 Oct 21, 2026
6a90d57
Keep Continue callback focus optional
brennanb2025 Oct 21, 2026
7a652f2
Keep recovery fixtures and account effects type safe
brennanb2025 Oct 21, 2026
b568a2f
Keep chat recovery on native sources and native accounts
brennanb2025 Oct 21, 2026
239cf23
Validate native recovery files after path admission
brennanb2025 Oct 21, 2026
67ca530
Use the optional cursor shape in recovery fixture
brennanb2025 Oct 21, 2026
5828d03
fix(native-chat): exclude source CLI family from limit handoff
brennanb2025 Oct 21, 2026
8fe9e7e
Resolve recovery context in the owning workspace directory
brennanb2025 Oct 21, 2026
59c6bcc
Preserve unknown account model facts and legacy option replay
brennanb2025 Oct 22, 2026
1454518
Clarify terminal account-switch feedback in translated locales
brennanb2025 Oct 22, 2026
27e75e7
Offer usage-limit Continue Now only once the limit resets
brennanb2025 Oct 25, 2026
323e395
Keep usage-limit reset timers current and bounded
brennanb2025 Oct 26, 2026
9f7bc1a
Merge main and preserve chat account routing
brennanb2025 Oct 26, 2026
bdb1efb
Keep option mutation plans checked against their contract
brennanb2025 Oct 26, 2026
8b9c641
Cover unknown model choices across chat consumers
brennanb2025 Oct 26, 2026
9d6c783
Keep consumer fixtures aligned with canonical types
brennanb2025 Oct 26, 2026
0534fe8
Match the mobile picker label in its consumer test
brennanb2025 Oct 26, 2026
327138e
fix: clarify terminal scope in translated Claude account settings
brennanb2025 Oct 26, 2026
f3f1904
Merge main and retain account retirement on the current delivery seam
brennanb2025 Oct 27, 2026
1d809a3
Update integration tests for current session and remote client contracts
brennanb2025 Oct 27, 2026
4e3a83c
Keep native worker replies on their receiving account
brennanb2025 Oct 27, 2026
94c8623
Preserve receiving accounts across cold starts and nested reports
brennanb2025 Oct 28, 2026
4bee36d
Merge main into chat account switching
brennanb2025 Oct 28, 2026
b9bac09
Preserve the delivery receiver when reading chat commands
brennanb2025 Oct 28, 2026
20ffa6a
Clarify native reply matching and consolidate imports
brennanb2025 Oct 28, 2026
e4a4b86
Resolve catalog scope without re-entering conversation queues
brennanb2025 Oct 28, 2026
2cc13f3
Align catalog and mobile test fixtures with current contracts
brennanb2025 Oct 28, 2026
506dc97
Align receiving-account readers and fixtures with typed contracts
brennanb2025 Oct 28, 2026
1053b01
Repair account-switch fixtures and measure receiving work
brennanb2025 Oct 28, 2026
92d9a58
Use the checked account-home path in catalog tests
brennanb2025 Oct 28, 2026
173d1e4
Merge main while preserving account-aware catalog reads
brennanb2025 Oct 29, 2026
5d201c4
Restore executed-option recorder context
brennanb2025 Oct 29, 2026
8150a51
Control receiving catalog deadline test clock
brennanb2025 Oct 29, 2026
f9d581c
Merge main and retain account-aware catalog contracts
brennanb2025 Oct 29, 2026
6f15008
Merge main and preserve account-aware recovery
brennanb2025 Oct 29, 2026
057118f
Merge main and preserve account-aware recovery
brennanb2025 Oct 29, 2026
990dd6e
Merge main and preserve structured options coverage
brennanb2025 Oct 29, 2026
f04ae5c
Merge latest main before pushing account-switch integration
brennanb2025 Oct 29, 2026
3e63cfc
Align unknown-model consumer fixtures with send capture
brennanb2025 Oct 30, 2026
89bcedb
Merge main and preserve account-aware option contracts
brennanb2025 Oct 30, 2026
a75d195
Merge main and retain integrated option contracts
brennanb2025 Oct 30, 2026
d2b1e36
Consolidate session host type imports
brennanb2025 Oct 30, 2026
bc20e16
Align cross-version catalog fixtures with host read contracts
brennanb2025 Oct 30, 2026
adaadd6
Merge main and preserve account-aware session contracts
brennanb2025 Oct 30, 2026
8ecb6c1
Merge main and keep one workspace sleeper with account-aware session …
brennanb2025 Oct 30, 2026
6ade96e
test(native-chat): bind Runs through the current start authority in r…
brennanb2025 Oct 30, 2026
d254c91
Merge main and keep account-aware launch publication with the renamed…
brennanb2025 Oct 31, 2026
46a325f
fix(native-chat): follow the selected account before its folder exists
brennanb2025 Oct 31, 2026
7ea925b
test(ai-vault): build the stale acquisition receipt without a type as…
brennanb2025 Oct 31, 2026
9ec20b2
test(native-chat): narrow the rig acquisition link before relinking it
brennanb2025 Oct 31, 2026
78af492
Merge main so chat admission follows each agent's Chat or CLI choice
brennanb2025 Oct 31, 2026
bb726c9
test(native-chat): follow main's chat admission in fixtures and bound…
brennanb2025 Oct 31, 2026
e0659ca
test(native-chat): give the declared-effort catalog fake its capture …
brennanb2025 Oct 31, 2026
8960978
Merge main and keep the account-aware worker listing beside owner-rou…
brennanb2025 Oct 31, 2026
8d1ba5d
Merge main and keep the legacy no-choice replay contracts beside the …
brennanb2025 Oct 31, 2026
2078637
Consume main's outcome change feed in the receiving-account index
brennanb2025 Oct 31, 2026
2bdfcef
Merge commit '20786375b1e608b9a3d09bb61865539ac30e5e0c' into brennanb…
brennanb2025 Oct 31, 2026
7e104e9
Merge remote-tracking branch 'origin/main' into brennanb2025/usage-li…
brennanb2025 Oct 31, 2026
06e00b7
test: validate historical usage-limit fixture before rendering
brennanb2025 Oct 31, 2026
6a4ee88
fix: scope handoff choices and share account observation
brennanb2025 Oct 31, 2026
f0ab7be
fix: align account menu lifetime and local projections
brennanb2025 Oct 31, 2026
8d00ba9
test: preserve account observation contracts in quality checks
brennanb2025 Oct 31, 2026
0029a83
fix: preserve typed account observation project coverage
brennanb2025 Oct 31, 2026
a158811
fix: restore handoff feedback for empty host inventory
brennanb2025 Oct 31, 2026
1dc20fa
test: name exported handoff mocks with public types
brennanb2025 Oct 31, 2026
476fb91
test: follow settings navigation consumption in feature tip adapter
brennanb2025 Oct 31, 2026
4302beb
Keep usage-limit recovery actions beside their lead-in
brennanb2025 Oct 31, 2026
d524c8c
Merge main into brennanb2025/usage-limit-actions
brennanb2025 Nov 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/focus-setting-read-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,13 @@
1 src/renderer/src/components/sidebar/WorktreeList.tsx
1 src/renderer/src/components/sidebar/WorktreeVisibilityDialog.tsx
1 src/renderer/src/components/skills/SkillsPage.tsx
2 src/renderer/src/components/status-bar/ClaudeSwitcherMenu.tsx
1 src/renderer/src/components/status-bar/ClaudeSwitcherMenu.tsx
1 src/renderer/src/components/status-bar/CodexSwitcherMenu.tsx
2 src/renderer/src/components/status-bar/provider-account-sync-key.ts
1 src/renderer/src/components/status-bar/SshStatusSegment.tsx
1 src/renderer/src/components/status-bar/StatusBarSurface.tsx
1 src/renderer/src/components/status-bar/usage-provider-settings-target.ts
1 src/renderer/src/components/status-bar/use-claude-switcher-state.ts
2 src/renderer/src/components/status-bar/use-codex-switcher-controller.ts
1 src/renderer/src/components/status-bar/use-status-bar-controller.ts
1 src/renderer/src/components/status-bar/use-workspace-space-git-refresh-action.ts
Expand Down
31 changes: 23 additions & 8 deletions config/scripts/typecheck-project-coverage.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,29 @@ describe('typecheck project coverage', () => {
expect(tests.filter((file) => !project.files.has(resolve(root, file)))).toEqual([])
})

it('assigns the combined pane launch integration to its typed cross-process project', () => {
const suite = resolve(
root,
'src/renderer/src/components/terminal-pane/pty-agent-pane-launch.test.ts'
)
expect(
projects.filter((project) => project.files.has(suite)).map((project) => project.config)
).toEqual(['config/tsconfig.test.pane-launch.json'])
it('assigns cross-process integrations and their producer fixture to the mixed project', () => {
const files = [
'src/renderer/src/components/terminal-pane/pty-agent-pane-launch.test.ts',
'src/renderer/src/runtime/observed-provider-accounts.test.tsx',
'src/renderer/src/components/status-bar/ClaudeSwitcherMenu.observation.test.tsx',
'src/renderer/src/components/status-bar/ClaudeSwitcherMenu.owner-lifetime.test.tsx',
'src/renderer/src/runtime/provider-account-observation.test-fixture.ts'
]
for (const file of files) {
expect(
projects
.filter((project) => project.files.has(resolve(root, file)))
.map((project) => project.config),
file
).toEqual(['config/tsconfig.test.pane-launch.json'])
}
for (const config of ['config/tsconfig.web.json', 'config/tsconfig.tc.web.json']) {
const parsed = ts.readConfigFile(resolve(root, config), ts.sys.readFile)
expect(parsed.error).toBeUndefined()
expect(parsed.config.exclude).toEqual(
expect.arrayContaining(files.map((file) => `../${file}`))
)
}
const combined = projects.find(
(project) => project.config === 'config/tsconfig.test.pane-launch.json'
)
Expand Down
4 changes: 4 additions & 0 deletions config/tsconfig.tc.web.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"extends": "./tsconfig.web.json",
"exclude": [
"../src/renderer/src/components/terminal-pane/pty-agent-pane-launch.test.ts",
"../src/renderer/src/runtime/observed-provider-accounts.test.tsx",
"../src/renderer/src/components/status-bar/ClaudeSwitcherMenu.observation.test.tsx",
"../src/renderer/src/components/status-bar/ClaudeSwitcherMenu.owner-lifetime.test.tsx",
"../src/renderer/src/runtime/provider-account-observation.test-fixture.ts",
"../src/shared/**/*.test.ts",
"../src/shared/**/*.test.tsx",
"../src/shared/**/*.spec.ts",
Expand Down
4 changes: 4 additions & 0 deletions config/tsconfig.test.pane-launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
"extends": "./tsconfig.web.json",
"include": [
"../src/renderer/src/components/terminal-pane/pty-agent-pane-launch.test.ts",
"../src/renderer/src/runtime/observed-provider-accounts.test.tsx",
"../src/renderer/src/components/status-bar/ClaudeSwitcherMenu.observation.test.tsx",
"../src/renderer/src/components/status-bar/ClaudeSwitcherMenu.owner-lifetime.test.tsx",
"../src/renderer/src/runtime/provider-account-observation.test-fixture.ts",
"../src/renderer/src/env.d.ts",
"../src/types/build-constants.d.ts",
"../src/shared/**/*"
Expand Down
8 changes: 7 additions & 1 deletion config/tsconfig.web.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
"../src/preload/api/**/*",
"../src/shared/**/*"
],
"exclude": ["../src/renderer/src/components/terminal-pane/pty-agent-pane-launch.test.ts"],
"exclude": [
"../src/renderer/src/components/terminal-pane/pty-agent-pane-launch.test.ts",
"../src/renderer/src/runtime/observed-provider-accounts.test.tsx",
"../src/renderer/src/components/status-bar/ClaudeSwitcherMenu.observation.test.tsx",
"../src/renderer/src/components/status-bar/ClaudeSwitcherMenu.owner-lifetime.test.tsx",
"../src/renderer/src/runtime/provider-account-observation.test-fixture.ts"
],
"compilerOptions": {
"composite": true,
"jsx": "react-jsx",
Expand Down
23 changes: 23 additions & 0 deletions src/main/claude-accounts/claude-account-usage-preparation.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import type { ClaudeProfileRouter } from './claude-profile-router'
import type { ClaudeRuntimeAuthPreparation } from './runtime-auth/runtime-auth-types'

/** Usage reads use the same login route as account launches. */
export function claudeAccountUsagePreparation(
router: Pick<ClaudeProfileRouter, 'coveredBySystemDefault' | 'systemDefaultHome' | 'accountHome'>,
accountId: string
): ClaudeRuntimeAuthPreparation {
if (router.coveredBySystemDefault(accountId)) {
// Setting CLAUDE_CONFIG_DIR for System default changes its Keychain identity.
return {
configDir: router.systemDefaultHome(),
envPatch: {},
provenance: 'system'
}
}
const home = router.accountHome(accountId)
return {
configDir: home,
envPatch: { CLAUDE_CONFIG_DIR: home },
provenance: `profile:${accountId}`
}
}
23 changes: 22 additions & 1 deletion src/main/claude-accounts/claude-launch-routing.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { afterEach, describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it, vi } from 'vitest'
import type { ClaudeManagedAccount } from '../../shared/managed-account-types'
import { resolveClaudeStructuredInvocation } from '../claude/claude-structured-launch-resolution'
import { resolveClaudeStructuredLaunchHome } from '../claude/claude-structured-launch-home'
Expand All @@ -14,6 +14,7 @@ import { ClaudeProfileRouter, type ClaudeProfileRouterSettings } from './claude-
import { prepareLocalCommitMessageAgentEnv } from '../text-generation/commit-message-agent-environment'
import { claudeStructuredAuthPolicyForSettings } from './claude-structured-auth-policy'
import { applyClaudeEnvPatch } from './environment'
import { withoutInheritedClaudeConfigDir } from '../claude/claude-config-dir-pin'

const roots: string[] = []
afterEach(() => {
Expand Down Expand Up @@ -97,7 +98,27 @@ describe('one router decision for every Claude launch', () => {
usage: f.systemHome,
inactiveUsage: f.systemHome
})
const prepare = vi.spyOn(f.router, 'prepareLaunch')
const inherited = withoutInheritedClaudeConfigDir({ CLAUDE_CONFIG_DIR: '/inherited' })
expect(await f.router.accountSelectionHomes(inherited)).toEqual([f.systemHome, f.systemHome])
const overlay = { ...inherited, CLAUDE_CONFIG_DIR: join(f.systemHome, 'explicit') }
expect(await f.router.accountSelectionHomes(overlay)).toEqual([
overlay.CLAUDE_CONFIG_DIR,
overlay.CLAUDE_CONFIG_DIR
])
expect(prepare).not.toHaveBeenCalled()
expect(await resolveClaudeStructuredLaunchHome(f.router, { ...overlay }, '/recorded')).toBe(
overlay.CLAUDE_CONFIG_DIR
)
signIn(f.accountHome, 'a@example.test')
expect(await f.router.accountSelectionHomes(overlay)).toEqual([
overlay.CLAUDE_CONFIG_DIR,
f.accountHome
])
expect(await resolveClaudeStructuredLaunchHome(f.router, { ...overlay }, '/recorded')).toBe(
f.accountHome
)
prepare.mockRestore()
expect(await launchHomes(f)).toEqual({
terminal: f.accountHome,
terminalEnv: f.accountHome,
Expand Down
22 changes: 8 additions & 14 deletions src/main/claude-accounts/claude-profile-router.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { claudeAccountUsagePreparation } from './claude-account-usage-preparation'
import { claudeProfileSelectionHomes } from './claude-profile-selection-homes'
import { prepareClaudeProfileForLaunch } from './claude-profile-launch-preparation'
import { getClaudeAgentViewService } from '../claude/agent-view-service'
import { existsSync, mkdirSync, readFileSync, rmSync } from 'node:fs'
Expand Down Expand Up @@ -333,22 +335,14 @@ export class ClaudeProfileRouter {

/** Read usage from the same login the account would launch with. */
accountUsagePreparation(accountId: string): ClaudeRuntimeAuthPreparation {
if (this.coveredBySystemDefault(accountId)) {
// Setting CLAUDE_CONFIG_DIR for System default changes its Keychain identity.
return {
configDir: this.systemDefaultHome(),
envPatch: {},
provenance: 'system'
}
}
const home = this.accountHome(accountId)
return {
configDir: home,
envPatch: { CLAUDE_CONFIG_DIR: home },
provenance: `profile:${accountId}`
}
return claudeAccountUsagePreparation(this, accountId)
}

async accountSelectionHomes(launchEnv: NodeJS.ProcessEnv = process.env): Promise<string[]> {
return claudeProfileSelectionHomes(this, this.args.getSettings(), this.envReady, launchEnv)
}

/** Every account folder on this host, selected or not. */
accountHomes(): string[] {
return listClaudeProfileHomes(this.args.dataRoot)
}
Expand Down
19 changes: 19 additions & 0 deletions src/main/claude-accounts/claude-profile-selection-homes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import type { ClaudeProfileRouter, ClaudeProfileRouterSettings } from './claude-profile-router'
import { claudeLaunchDestinationHome } from '../claude/claude-launch-destination-home'

/** Every native switcher destination, even an account whose setup has not created its home. */
export async function claudeProfileSelectionHomes(
router: Pick<ClaudeProfileRouter, 'systemDefaultHome' | 'accountUsagePreparation'>,
settings: Pick<ClaudeProfileRouterSettings, 'claudeManagedAccounts'>,
environmentReady: Promise<unknown>,
launchEnv: NodeJS.ProcessEnv = process.env
): Promise<string[]> {
await environmentReady
const system = router.systemDefaultHome()
return [
{ provenance: 'system' as const, configDir: system },
...settings.claudeManagedAccounts
.filter((account) => account.managedAuthRuntime !== 'wsl')
.map((account) => router.accountUsagePreparation(account.id))
].map((preparation) => claudeLaunchDestinationHome(preparation, launchEnv, system))
}
12 changes: 12 additions & 0 deletions src/main/claude/claude-launch-destination-home.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import type { ClaudeRuntimeAuthPreparation } from '../claude-accounts/runtime-auth/runtime-auth-types'

/** System provenance preserves the explicit agent overlay; managed provenance pins its own home. */
export function claudeLaunchDestinationHome(
preparation: Pick<ClaudeRuntimeAuthPreparation, 'provenance' | 'configDir'>,
launchEnv: NodeJS.ProcessEnv,
systemDefaultHome: string
): string {
return preparation.provenance === 'system'
? launchEnv.CLAUDE_CONFIG_DIR?.trim() || systemDefaultHome
: preparation.configDir
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
} from './structured-agent-session-option-models'
import { structuredAgentSessionImmediatePermission } from './structured-agent-session-launch-permission'
import type { StructuredAgentSessionMutationContext } from './structured-agent-session-host-mutations'
import { readStructuredSessionRecovery } from './structured-agent-session-recovery-read'
import { structuredAgentSessionNeverSent } from './structured-agent-session-never-sent'

export {
Expand Down Expand Up @@ -221,8 +222,10 @@ export async function readStructuredAgentSessionOptions(
current.serviceTier = projected.options.serviceTier
}
}
const recovery = await readStructuredSessionRecovery(session, context, sessionId)
return {
...options,
...recovery,
...(live?.effortFixed
? {
models: options.models.map(({ effortsKnown: _unknown, ...row }) => ({
Expand Down
Loading
Loading