Merge remote-tracking branch 'origin/main' into brennanb2025/parking-ownership

# Conflicts:
#	config/scripts/preflight/changed-checks/check-changed-selection.mjs
#	config/scripts/preflight/changed-checks/run-lint.mjs
#	package.json
#	src/renderer/src/store/keyed-record-transitions.ts
#	src/renderer/src/store/store-observer-installers.ts
#	src/renderer/src/store/terminals/terminal-orphan-cleanup.ts
This commit is contained in:
Brennan Benson
2026-11-09 12:50:28 -08:00
793 changed files with 29613 additions and 29176 deletions
-1
View File
@@ -1111,7 +1111,6 @@ jobs:
src/main/browser/guest-lifecycle/popups/presentation/popup-origin-chrome.electron.test.ts
src/main/browser/guest-lifecycle/navigation/browser-link-materialization.electron.test.ts
src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-compatibility.electron.test.ts
src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-adapter-compatibility.electron.test.ts
src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-native-compatibility.electron.test.ts
src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-background-compatibility.electron.test.ts
src/main/browser/extensions/api-runtime/browser-extension-api.electron.test.ts
+14 -19
View File
@@ -20,9 +20,12 @@ const {
assertPackagedNativeVariantsInstalled,
assertProcessHostOutputBuilt,
createPackagedRuntimeNodeModuleResources,
normalizeElectronArchitecture,
prunePackagedRuntimeNodeModules,
readPackage,
verifyPackagedMainRuntimeDeps
} = require('./packaged-runtime-node-modules.cjs')
const { copyPackagedTranscribeCpp } = require('./packaged-transcribe-cpp.cjs')
const {
assertNoWindowsExecutablesInRuntimeNodeModules
} = require('./packaged-windows-only-runtime-files.cjs')
@@ -171,19 +174,6 @@ const commonExtraResources = [
nativeChatVisualsResource,
emojiShortcodeDatasetResource
]
// Native speech addons need real disk paths; copy only the artifact target’s variant.
const macSpeechNativeResource = {
from: 'node_modules/sherpa-onnx-darwin-${arch}',
to: 'node_modules/sherpa-onnx-darwin-${arch}'
}
const linuxSpeechNativeResource = {
from: 'node_modules/sherpa-onnx-linux-${arch}',
to: 'node_modules/sherpa-onnx-linux-${arch}'
}
const winSpeechNativeResource = {
from: 'node_modules/sherpa-onnx-win-x64',
to: 'node_modules/sherpa-onnx-win-x64'
}
// electron-builder replaces these defaults when `depends` is configured; retain
// Electron's loader requirements alongside Orca's headless-host dependencies.
const debElectronRuntimeDependencies = [
@@ -329,8 +319,8 @@ module.exports = {
'!resources/native-chat-visuals/**',
// extraResources already ships plugin bytes; exclude source duplicates.
'!resources/plugins/launch/**',
// Platform extraResources selects speech natives; asar would duplicate it and ship other variants.
'!node_modules/sherpa-onnx*{,/**/*}',
// afterPack copies the target's speech engine to resources/node_modules; asar would duplicate it and ship other variants.
'!node_modules/{transcribe-cpp,@transcribe-cpp,koffi,@koromix}{,/**/*}',
// CLI shim belongs beside resources/bin/orca.exe; unpacking source creates a second .cmd without its executable (#7351).
'!resources/win32{,/**/*}'
],
@@ -450,6 +440,13 @@ module.exports = {
writeMacBuildCompatibility(resourcesDir, { version, commit, architecture })
}
stampPackagedCliVersion(resourcesDir, context.packager.appInfo.version)
// Before the prune, which drops the copied packages' type declarations too.
copyPackagedTranscribeCpp(
readPackage,
resourcesDir,
context.electronPlatformName,
normalizeElectronArchitecture(context.arch)
)
prunePackagedRuntimeNodeModules(resourcesDir, context.electronPlatformName, context.arch)
assertNoWindowsExecutablesInRuntimeNodeModules(resourcesDir, context.electronPlatformName)
// Gate native glibc floor after pruning foreign CPU variants; GLIBC_2.34 once broke Ubuntu 20.04 startup (#9902).
@@ -553,7 +550,6 @@ module.exports = {
extraResources: [
...commonExtraResources,
...windowsRuntimeResources,
winSpeechNativeResource,
{
from: 'resources/win32/bin/orca.cmd',
to: 'bin/orca.cmd'
@@ -610,7 +606,8 @@ module.exports = {
rank: 'Alternate'
}))
],
// Bundled ONNX Runtime (speech) needs macOS 13.4 (#22690); the update-manifest gate reads this from Info.plist.
// Set for ONNX Runtime (#22690, #39135), now gone; transcribe-cpp needs 11.0, Electron 12.0. Kept until
// Kelvin decides. The update-manifest gate reads this from Info.plist.
minimumSystemVersion: '13.4',
icon: 'resources/build/icon.icns',
entitlements: 'resources/build/entitlements.mac.plist',
@@ -633,7 +630,6 @@ module.exports = {
extraResources: [
...commonExtraResources,
...createPackagedRuntimeNodeModuleResources('darwin'),
macSpeechNativeResource,
{
from: 'resources/darwin/bin/orca',
to: 'bin/orca'
@@ -698,7 +694,6 @@ module.exports = {
extraResources: [
...commonExtraResources,
...createPackagedRuntimeNodeModuleResources('linux'),
linuxSpeechNativeResource,
{
from: 'native/wayland-clipboard/.build/${arch}/orca-wayland-clipboard',
to: 'bin/orca-wayland-clipboard'
+1 -5
View File
@@ -147,7 +147,6 @@
2 test-no-real-time-wait:src/main/agent-hooks/server/testing/http/server-transport-interference.test.ts
1 test-no-real-time-wait:src/main/agent-hooks/server/testing/main-agent/server-turn-ended-at.test.ts
1 test-no-real-time-wait:src/main/agent-hooks/server/testing/main-agent/server-turn-started-at.test.ts
5 test-no-real-time-wait:src/main/agent-hooks/wsl-relay/wsl-hook-relay-manager.test.ts
1 test-no-real-time-wait:src/main/ai-vault/scanners/opencode/reader-transport/session-scanner-opencode-sqlite-process.test.ts
2 test-no-real-time-wait:src/main/ai-vault/scanners/opencode/sqlite/session-scanner-opencode-sqlite-scan-scope.test.ts
1 test-no-real-time-wait:src/main/antigravity/windows-hook-json-post.test.ts
@@ -458,7 +457,6 @@
1 test-no-wall-clock:src/cli/runtime/status-caller.test.ts
2 test-no-wall-clock:src/main/agent-hooks/installation/scripts/managed-hook-timeout.test.ts
2 test-no-wall-clock:src/main/agent-hooks/installation/scripts/posix-hook-json-stdin-reader.test.ts
1 test-no-wall-clock:src/main/agent-hooks/server/testing/providers/codex/server-codex-capacity.test.ts
1 test-no-wall-clock:src/main/agent-hooks/server/testing/http/server-endpoint-file-lifecycle.test.ts
3 test-no-wall-clock:src/main/agent-hooks/server/testing/structured-ingress/server-ingest-structured-status.test.ts
4 test-no-wall-clock:src/main/agent-hooks/server/testing/identity/server-launch-resume-identity.test.ts
@@ -641,7 +639,6 @@
1 test-no-wall-clock:src/renderer/src/components/native-chat/session/structured/delivery/NativeChatMessageList.unsent-message.test.tsx
3 test-no-wall-clock:src/renderer/src/components/native-chat/surfaces/integration/NativeChatMessageList.test.tsx
2 test-no-wall-clock:src/renderer/src/components/native-chat/tools/tasks/NativeChatStructuredSessionStatus.test.tsx
1 test-no-wall-clock:src/renderer/src/components/settings/accounts/providers/GrokAccountsSection.test.tsx
3 test-no-wall-clock:src/renderer/src/components/sidebar/workspace-card/review/use-workspace-reference-details.test.tsx
1 test-no-wall-clock:src/renderer/src/components/sidebar/worktree-list/listing/WorktreeList.lineage-agent-expansion-coupling.test.tsx
2 test-no-wall-clock:src/renderer/src/components/task-page/jira/task-page-jira-cache-selectors.test.ts
@@ -692,7 +689,6 @@
2 test-timeout-needs-reason:src/main/acp/journal/acp-structured-broken-stream.test.ts
4 test-timeout-needs-reason:src/main/agent-hooks/server/testing/http/server-transport-interference.test.ts
1 test-timeout-needs-reason:src/main/agent-hooks/wsl-relay/testing/wsl-hook-relay-live.integration.test.ts
1 test-timeout-needs-reason:src/main/agent-hooks/wsl-relay/wsl-hook-relay-manager.test.ts
1 test-timeout-needs-reason:src/main/ai-vault/parse-cache/session-parse-cache-large-scan.test.ts
1 test-timeout-needs-reason:src/main/antigravity/native-macos-credentials.real.test.ts
1 test-timeout-needs-reason:src/main/antigravity/posix-hook-invocation.test.ts
@@ -707,7 +703,7 @@
1 test-timeout-needs-reason:src/main/browser/cookies/browser-cookie-import-validated-partition.electron.test.ts
1 test-timeout-needs-reason:src/main/browser/guest-lifecycle/find/browser-find-frame-traversal.electron.test.ts
1 test-timeout-needs-reason:src/main/browser/identity/wire-probes/browser-session-ua-wire-identity-cross-context.electron.test.ts
2 test-timeout-needs-reason:src/main/browser/identity/wire-probes/browser-session-ua-wire-identity.electron.test.ts
1 test-timeout-needs-reason:src/main/browser/identity/wire-probes/browser-session-ua-wire-identity.electron.test.ts
3 test-timeout-needs-reason:src/main/claude-usage/scanner-incremental-reader.test.ts
1 test-timeout-needs-reason:src/main/claude/claude-agent-sdk-exit-proof.test.ts
1 test-timeout-needs-reason:src/main/claude/claude-background-run-isolation-real-cli.test.ts
@@ -15,7 +15,6 @@ src/main/managed-server/migration/cutover/orcad-migration-delta-move.ts
src/main/managed-server/migration/linking/orcad-migration-repository-link.test.ts
src/main/ssh/migration-source/orcad-migration-terminal-gate.test.ts
src/main/ssh/migration-source/orcad-migration-terminal-gate.ts
src/main/ssh/host-server/ssh-host-server-on-connect.test.ts
src/main/ssh/host-server/ssh-host-server-on-connect.ts
src/main/ssh/targets/ssh-target-orcad-preflight.ts
src/preload/api-types.ts
@@ -14,4 +14,3 @@ tests/e2e/cross-version-wire/legacy-relay-bridge.unit.test.ts
tests/e2e/helpers/legacy-relay-docker-host.ts
src/main/managed-server/install/remote-install-model.ts
src/main/ssh/system-transport/ssh-system-transport.integration.test.ts
src/main/ssh/migration-source/orcad-migration-bridged-panes.test.ts
+4 -2
View File
@@ -496,9 +496,10 @@
10 src/main/speech/openai-api-key-store.ts
2 src/main/speech/speech-model-download-cleanup.ts
1 src/main/speech/speech-model-download-transport.ts
1 src/main/speech/speech-model-files.ts
2 src/main/speech/speech-model-http-download.ts
1 src/main/speech/stt-worker-model-config.ts
2 src/main/speech/stt-worker-paths.ts
1 src/main/speech/speech-vad-model.ts
2 src/main/speech/stt-gpu-failure-marker.ts
2 src/main/sqlite/harden-database-files.ts
1 src/main/sqlite/row-cache/keyed-json-row-cache.ts
2 src/main/sqlite/row-cache/legacy-json-source.ts
@@ -609,6 +610,7 @@
7 src/shared/serve-bundle-park.ts
1 src/shared/serve-user-data-path.ts
3 src/shared/source-scan/source-tree-scan.ts
2 src/shared/speech-recognizer-package.ts
5 src/shared/startup-command-staging.ts
1 src/shared/terminal/pty/native-process/pty-process-ceiling-state.ts
8 src/shared/windows-breakaway-launcher.ts
+4 -39
View File
@@ -15,6 +15,7 @@ const {
} = require('./scripts/native-build/windows/windows-pe-machine.cjs')
const { adoptPackagedNativeBuildEntries } = require('./packaged-native-build-entries.cjs')
const { runtimePackageExcludeFilter } = require('./packaged-windows-only-runtime-files.cjs')
const { missingTranscribeCppPackages } = require('./packaged-transcribe-cpp.cjs')
const {
NATIVE_BUILD_PACKAGES,
TRANSIENT_NATIVE_BUILD_ENTRY_FILTER
@@ -81,7 +82,6 @@ const PACKAGED_MAIN_REQUIRED_FILES = [
const PACKAGED_MAIN_SOURCE_RE = /^out\/main\/.+\.js$/
const TYPE_DECLARATION_ARTIFACT_RE = /\.d\.(?:c|m)?ts(?:\.map)?$/
const JS_SOURCE_MAP_ARTIFACT_RE = /\.(?:c|m)?js\.map$/
const VERSIONED_ONNXRUNTIME_DYLIB_RE = /^libonnxruntime\.\d[\d.]*\.dylib$/
const NODE_BUILTINS = new Set([
...builtinModules,
@@ -518,31 +518,6 @@ function prunePackagedRuntimeTypeAndSourceMapArtifacts(resourcesDir) {
pruneMatchingFiles(nodeModulesDir, isPrunableTypeOrSourceMapArtifact)
}
function prunePackagedSherpaOnnx(resourcesDir, electronPlatformName) {
if (electronPlatformName !== 'darwin') {
return
}
const nodeModulesDir = join(resourcesDir, 'node_modules')
if (!existsSync(nodeModulesDir)) {
return
}
for (const entry of readdirSync(nodeModulesDir, { withFileTypes: true })) {
if (!entry.isDirectory() || !entry.name.startsWith('sherpa-onnx-darwin-')) {
continue
}
const packageDir = join(nodeModulesDir, entry.name)
const packageEntries = readdirSync(packageDir)
const hasVersionedOnnxRuntime = packageEntries.some((filename) =>
VERSIONED_ONNXRUNTIME_DYLIB_RE.test(filename)
)
if (hasVersionedOnnxRuntime) {
// Why: darwin sherpa-onnx binaries link to the versioned ONNX Runtime
// install name; the unversioned dylib is a duplicate fallback copy.
rmSync(join(packageDir, 'libonnxruntime.dylib'), { force: true })
}
}
}
function prunePackagedZodSources(resourcesDir) {
// Why: Zod's src tree is TypeScript source only selected by the @zod/source
// condition; packaged runtime import/require paths resolve to built JS.
@@ -556,17 +531,7 @@ function assertPackagedNativeVariantsInstalled(electronPlatformName, electronArc
const isInstalled = (name) => existsSync(join(nodeModulesDir, name, 'package.json'))
const missing = []
const rootOptionalDependencies =
JSON.parse(readFileSync(join(projectDir, 'package.json'), 'utf8')).optionalDependencies ?? {}
// Why win32 is always x64: winSpeechNativeResource packages sherpa-onnx-win-x64 for every
// Windows target (there is no sherpa-onnx-win-arm64; it runs under emulation).
const sherpaName =
electronPlatformName === 'win32'
? 'sherpa-onnx-win-x64'
: `sherpa-onnx-${electronPlatformName}-${architecture}`
if (sherpaName in rootOptionalDependencies && !isInstalled(sherpaName)) {
missing.push(sherpaName)
}
missing.push(...missingTranscribeCppPackages(readPackage, electronPlatformName, architecture))
// Why prefix, not equality: linux variants carry a libc suffix (watcher-linux-x64-glibc),
// mirroring what prunePackagedParcelWatcher keeps.
@@ -634,7 +599,6 @@ function prunePackagedRuntimeNodeModules(resourcesDir, electronPlatformName, ele
// Why before the filename walk: zod/src is deleted wholesale, so walking it first is wasted work.
prunePackagedZodSources(resourcesDir)
prunePackagedRuntimeTypeAndSourceMapArtifacts(resourcesDir)
prunePackagedSherpaOnnx(resourcesDir, electronPlatformName)
}
function pruneMatchingFiles(directory, shouldPrune) {
@@ -656,13 +620,14 @@ module.exports = {
createPackagedRuntimeNodeModuleResources,
findAsarEntry,
isPackagedExternalSpecifier,
normalizeElectronArchitecture,
normalizeNodePtyWindowsArch,
packageNameFromSpecifier,
prunePackagedNodePty,
prunePackagedParcelWatcher,
prunePackagedRuntimeNodeModules,
prunePackagedRuntimeTypeAndSourceMapArtifacts,
prunePackagedSherpaOnnx,
prunePackagedZodSources,
readPackage,
verifyPackagedMainRuntimeDeps
}
+97
View File
@@ -0,0 +1,97 @@
const { cpSync, existsSync } = require('node:fs')
const { execFileSync } = require('node:child_process')
const { join } = require('node:path')
const TRANSCRIBE_CPP_PACKAGES = require('../src/shared/transcribe-cpp-packages.json')
// transcribe.dll needs MSVC runtime >= 14.40 (older ones crash in std::mutex); the system copy may be older.
const WINDOWS_CRT_DLLS = ['msvcp140.dll', 'vcruntime140.dll', 'vcruntime140_1.dll']
const MIN_WINDOWS_CRT_VERSION = [14, 40]
/**
* The packages the speech host loads transcribe-cpp from, in load order: the ESM binding, koffi
* (its FFI), koffi's prebuilt addon, and the target's native libraries. Each resolves from the
* previous one's directory, as Node does at runtime. Null where the target ships no transcribe-cpp.
*/
function transcribeCppRuntimePackages(readPackage, electronPlatformName, architecture) {
const native = TRANSCRIBE_CPP_PACKAGES[`${electronPlatformName}-${architecture}`]
if (!native) {
return null
}
const binding = readPackage('transcribe-cpp')
const koffi = readPackage('koffi', binding.packageDir)
const koffiAddon = readPackage(
`@koromix/koffi-${electronPlatformName}-${architecture}`,
koffi.packageDir
)
const nativeLibraries = readPackage(native, binding.packageDir)
return [binding, koffi, koffiAddon, nativeLibraries]
}
function readFileVersion(dll) {
const version = execFileSync(
'powershell.exe',
['-NoProfile', '-Command', `(Get-Item -LiteralPath '${dll}').VersionInfo.FileVersion`],
{ encoding: 'utf8' }
).trim()
return version.split(/[.,\s]+/).map((part) => Number.parseInt(part, 10))
}
function copyWindowsCrt(nativeDir) {
const systemDir = join(process.env.SystemRoot || 'C:\\Windows', 'System32')
for (const name of WINDOWS_CRT_DLLS) {
const source = join(systemDir, name)
if (!existsSync(source)) {
throw new Error(
`Packaging transcribe-cpp needs ${source} (Visual C++ 2015-2022 x64 runtime).`
)
}
const [major, minor] = readFileVersion(source)
if (!Number.isFinite(major) || !Number.isFinite(minor)) {
throw new Error(`Cannot read the file version of ${source}.`)
}
const [minMajor, minMinor] = MIN_WINDOWS_CRT_VERSION
if (major < minMajor || (major === minMajor && minor < minMinor)) {
throw new Error(
`${source} is ${major}.${minor}; transcribe-cpp needs ${MIN_WINDOWS_CRT_VERSION.join('.')}+. ` +
'Install the latest Visual C++ 2015-2022 x64 redistributable on the build host.'
)
}
// App-local beside transcribe.dll, which loads its dependencies from its own directory.
cpSync(source, join(nativeDir, name))
}
}
/** Copy transcribe-cpp into the slice's resources/node_modules, outside asar where koffi can dlopen it. */
function copyPackagedTranscribeCpp(readPackage, resourcesDir, electronPlatformName, architecture) {
// beforePack's assertPackagedNativeVariantsInstalled already failed any real build missing these;
// only an afterPack driven without it (packaging tests) gets here without them.
if (missingTranscribeCppPackages(readPackage, electronPlatformName, architecture).length > 0) {
return
}
const packages = transcribeCppRuntimePackages(readPackage, electronPlatformName, architecture)
if (!packages) {
return
}
for (const { name, packageDir } of packages) {
const target = join(resourcesDir, 'node_modules', ...name.split('/'))
cpSync(packageDir, target, { recursive: true, dereference: true })
}
if (electronPlatformName === 'win32') {
copyWindowsCrt(join(resourcesDir, 'node_modules', ...packages[3].name.split('/')))
}
}
/** The transcribe-cpp packages a target needs that this install lacks (install:release adds other CPUs). */
function missingTranscribeCppPackages(readPackage, electronPlatformName, architecture) {
try {
transcribeCppRuntimePackages(readPackage, electronPlatformName, architecture)
return []
} catch (error) {
return [String(error.message ?? error)]
}
}
module.exports = {
copyPackagedTranscribeCpp,
missingTranscribeCppPackages
}
+5 -19
View File
@@ -10887,7 +10887,7 @@
"providers": ["local", "daemon", "ssh", "wsl", "remote-runtime"],
"coveredPlatforms": ["macos"],
"coveredProviders": [],
"coverageNotes": "Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. NEXT136 retains only unchanged execution receipts at their original scopes. Reduced-source selectors and retained static assertions have no new execution or equivalent replacement credit.",
"coverageNotes": "Audit2923 accepts loss of the first/replayed attested legacy worker_done CLI acceptance alarms, including exact send parameters, sender pane proof, lifecycle-wait flag and minted mutation identity. The removed fixture supplied settled runtime verdicts; it did not execute settlement authority, durable replay or outage recovery. Reduced selectors have no new execution, fault-control or equivalent replacement credit. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. NEXT136 retains only unchanged execution receipts at their original scopes. Reduced-source selectors and retained static assertions have no new execution or equivalent replacement credit.",
"motivatingLinks": [
"https://github.com/stablyai/orca/pull/11107#discussion_r3663321387",
"https://github.com/stablyai/orca/issues/13858",
@@ -10897,11 +10897,11 @@
"https://linear.app/stably/issue/STA-4022"
],
"invariant": "Starting a worker in the coordinator's current workspace must materialize one inactive terminal tab before worker-start returns, preserve coordinator focus, and remain exactly once after workspace re-entry. After an app update or restart, an exact live legacy worker must fence automatic provider resume, adopt its original PTY into its original background pane, retain readable output, and clear the resume record without spawning, writing, signalling, interrupting, replacing, or focusing the worker. A current-contract worker whose renderer graph identity is temporarily absent must retain its Dispatch capability and settle exactly once from exact hook-attested handle, pane, and process evidence; otherwise only an exact attested coordinator may take over. A worker_done caller may report success only after the owning runtime returns an explicit lifecycle verdict or authoritative reads prove that the exact Task, Dispatch, and worker report receipt settled the expected outcome. Federated terminal settlement must remain replay-eligible until the worker durably acknowledges it, and identical same-outcome retries must converge idempotently. Independently updated clients and worker servers must preserve the negotiated protocol: current peers use Run-home lifecycle settlement, while protocol v1/v2 peers retain their legacy completion path without receiving newer-only fields. A federated worker may accept only the authority defined by its negotiated protocol. An exact existing target workspace must receive a discoverable tab without stealing coordinator focus; if renderer reveal fails, worker-start must expose that the live worker remains background-only. Run and Dispatch checks must resolve through the caller's stable pane identity when a terminal handle is reminted, while a live handle outranks mismatched pane metadata. A nested worker's creator edge requires the current creator pane, process incarnation, and owning Run generation; reminting and rebinding that pane to another Run must remove the stale edge. Explicit legacy terminal inspection remains handle-scoped, and remote or headless worker presentation remains background-only.",
"oracle": "Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Retained assertion references and unchanged receipts keep their original scopes; retired callbacks and archived receipts provide no current coverage.",
"oracle": "Audit2923 accepts loss of the first/replayed attested legacy worker_done CLI acceptance alarms, including exact send parameters, sender pane proof, lifecycle-wait flag and minted mutation identity. The removed fixture supplied settled runtime verdicts; it did not execute settlement authority, durable replay or outage recovery. Reduced selectors have no new execution, fault-control or equivalent replacement credit. Audit2133 current-parent preparation: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Audit2095 current-parent preparation2126: Current reduced sources/selectors intentionally retire the alarms listed in knownGaps; prior dated runs and replacement claims do not validate the changed set. Audit2090 (sources2088/2089): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Retained assertion references and unchanged receipts keep their original scopes; retired callbacks and archived receipts provide no current coverage.",
"commands": [
"ORCA_BACKGROUND_LAUNCH=1 npx vitest run --config config/vitest.config.ts src/main/runtime/rpc/methods/orchestration/messaging/check-worker-federated-attachment.test.ts",
"pnpm exec vitest run --config config/vitest.config.ts src/cli/handlers/orchestration.test.ts src/cli/handlers/orchestration-check-identity.test.ts src/cli/handlers/orchestration-worker-cli.test.ts src/main/runtime/rpc/methods/orchestration/worker/composed-workers.test.ts src/main/runtime/rpc/methods/orchestration/messaging/check.test.ts src/main/runtime/rpc/methods/orchestration/messaging/send.test.ts",
"pnpm exec vitest run --config config/vitest.config.ts src/cli/handlers/orchestration-lifecycle-rejection.test.ts src/cli/handlers/orchestration-lifecycle-json-rejection.test.ts src/cli/handlers/orchestration-migration.test.ts",
"pnpm exec vitest run --config config/vitest.config.ts src/cli/handlers/orchestration-lifecycle-rejection.test.ts src/cli/handlers/orchestration-lifecycle-json-rejection.test.ts",
"pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/rpc/methods/orchestration/federation/federation.test.ts",
"pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/rpc/methods/orchestration/federation/federation-lifecycle-settlement.test.ts --reporter=dot",
"pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/orchestration/db/federation/federation-acknowledgment-migration.test.ts --reporter=dot",
@@ -10915,7 +10915,6 @@
"src/cli/handlers/orchestration.test.ts",
"src/cli/handlers/orchestration-lifecycle-rejection.test.ts",
"src/cli/handlers/orchestration-lifecycle-json-rejection.test.ts",
"src/cli/handlers/orchestration-migration.test.ts",
"src/cli/handlers/orchestration-check-identity.test.ts",
"src/cli/handlers/orchestration-worker-cli.test.ts",
"src/main/runtime/rpc/methods/orchestration/worker/composed-workers.test.ts",
@@ -10950,12 +10949,6 @@
"file": "src/cli/handlers/orchestration-lifecycle-json-rejection.test.ts",
"assertions": ["a rejected lifecycle verdict is emitted as a JSON ok=false envelope"]
},
{
"file": "src/cli/handlers/orchestration-migration.test.ts",
"assertions": [
"first and replayed legacy worker_done settlements are accepted from their authoritative runtime verdict"
]
},
{
"file": "src/cli/handlers/orchestration-check-identity.test.ts",
"assertions": [
@@ -11038,15 +11031,6 @@
"result": "passed",
"durationSeconds": 20,
"summary": "The combined candidate passed one real Electron and compiled-CLI journey: wrong worker identity exited nonzero with ok=false while Dispatch stayed dispatched, the exact worker received an explicit completed verdict, and runtime state independently reached completed."
},
{
"date": "2026-08-11",
"runner": "local",
"platform": "macos",
"command": "pnpm exec vitest run --config config/vitest.config.ts src/cli/handlers/orchestration-lifecycle-rejection.test.ts src/cli/handlers/orchestration-lifecycle-json-rejection.test.ts src/cli/handlers/orchestration-migration.test.ts",
"result": "passed",
"durationSeconds": 0.4,
"summary": "Three focused files passed 12 deterministic tests covering explicit current and Run-home verdicts, JSON failure output, exact report and terminal-state verification for stripped responses, stale/stopped rejection, idempotent retry, and first/replayed attested legacy settlements."
}
],
"runtimeBudget": {
@@ -11072,6 +11056,8 @@
"Attach saved intentional-break artifacts for hidden local presentation and dropped stable-pane delivery."
],
"knownGaps": [
"Audit2923 accepts loss of the first/replayed attested legacy worker_done CLI acceptance alarms, including exact send parameters, sender pane proof, lifecycle-wait flag and minted mutation identity. The removed fixture supplied settled runtime verdicts; it did not execute settlement authority, durable replay or outage recovery. Reduced selectors have no new execution, fault-control or equivalent replacement credit.",
"Audit2923 retires this entire mixed three-file receipt from current evidenceRuns because its selector included the removed migration suite. Preserved verbatim original JSON object (historical only; no reduced-selector validation):\n{\n \"date\": \"2026-08-11\",\n \"runner\": \"local\",\n \"platform\": \"macos\",\n \"command\": \"pnpm exec vitest run --config config/vitest.config.ts src/cli/handlers/orchestration-lifecycle-rejection.test.ts src/cli/handlers/orchestration-lifecycle-json-rejection.test.ts src/cli/handlers/orchestration-migration.test.ts\",\n \"result\": \"passed\",\n \"durationSeconds\": 0.4,\n \"summary\": \"Three focused files passed 12 deterministic tests covering explicit current and Run-home verdicts, JSON failure output, exact report and terminal-state verification for stripped responses, stale/stopped rejection, idempotent retry, and first/replayed attested legacy settlements.\"\n }",
"Audit2086 (sources2082/2083): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-06.spec.ts: suppresses saved mobile agent status when live evidence is the Claude agents screen; suppresses saved mobile agent status when the current terminal title is neutral; suppresses saved mobile agent status when fresh live OSC title is Claude agents; keeps saved PTY bindings pending until the runtime knows the PTY is connected; refreshes daemon PTY liveness before publishing mobile session tabs; does not invalidate a newly spawned SSH pane from an overlapping stale process list. src/main/runtime/orca-runtime-tests/pty-title-status.spec.ts: associates controller PTYs with mixed-case Windows and UNC cwd paths; uses OSC titles rather than controller process names for rendererless PTYs; ignores the bare cursor-agent native title so synthesized spinner state survives; only records the bare Cursor native title via the stale-working clear; refuses a bare Cursor title while the foreground read is unavailable; does not treat a bare Cursor title as an agent once the shell owns the foreground; accepts a bare Cursor title when the foreground read confirms cursor-agent; refuses a bare Cursor title on a runtime pty with no controller attached; clears a stale working title after 3s of title-less output; cancels the stale-title timer when the PTY exits; keeps stale-title timers isolated per PTY. src/main/runtime/orca-runtime-tests/paired-settings.spec.ts: projects runtime-backed settings to paired clients; updates quick commands without widening general paired settings payloads; applies native-chat option deltas atomically on the runtime host; keeps a future-launch default when an older client asks to prune from inventory; preserves concurrent additions after forty quick commands; accepts runtime-backed setting updates from paired clients; broadcasts visibility default changes to paired clients; reconciles hooks only when paired-client hook settings change; rejects relative paths for runtime nested repo scan/import. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence.",
"Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-handles-part-02.spec.ts: recovers a moved SSH pane through the tab it now sits in, not the one its lease froze; reports a plain expired orphan; does not report a pane whose only recent lease was superseded; does not report a pane whose only recent lease had its relay id recycled; picks the eligible orphan over a superseded predecessor that matches first; collects the same tabs the per-tab reader reports, in one sweep of the leases; reports no candidate when no lease names any of the worktree tabs. src/main/runtime/orca-runtime-tests/runtime-availability.spec.ts: starts unavailable with no authoritative window; reports the configured Windows terminal shell on status; reports floating workspace availability from settings on status; polls floating tabs with targeted PTY liveness and no repo/provider inventory; hydrates persisted tabs when the store cannot report repos; advertises browser screencast only when a renderer window is available; routes mobile Codex reset consumption through the account mutation coordinator; maps a definite pre-provider rejection into an authoritative current snapshot. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence.",
"Audit2070 (sources2068/2069): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime.test.ts: ordinary registration cleanup removes only await import('./orca-runtime-tests/hooks-and-hosted-review.spec'). src/main/runtime/orca-runtime-tests/worktree-removal-archive-hook-gate.spec.ts: removes and records the waiver when the failure is explicitly overridden; removes without an override record when the hook succeeds; removes when the hook is configured but not requested; removes when no archive hook is configured; holds a desktop removal in the same repo until this one is accepted; joins a desktop removal of the same worktree accepted while this one waited. src/main/runtime/orca-runtime-tests/worktree-ps-agent-row-dismissal.spec.ts: drops the row as soon as the user dismisses it, without waiting for the PTY to exit; tells paired clients to republish on the transition and on the dismissal; rejoins a row through its %s handle after pane ownership clears. src/main/runtime/orca-runtime-tests/hooks-and-hosted-review.spec.ts: reports an error when the SSH filesystem provider is unavailable; reports an SSH orca.yaml as an error without reading any filesystem; reports ok for a local repo hook check; reads SSH issue commands as absent and drops writes without touching any filesystem; allows host integration slug helpers for SSH repos through provider-aware GitHub clients; routes runtime GitHub repo identity helpers through the selected WSL project runtime; routes runtime GitHub issue and work-item actions through the selected WSL project runtime; pins explicit origin preference on runtime open-by-number work item lookups; forwards check-details cancellation without local Git overrides. Existing unrelated evidenceRuns retain their original scope; unchanged dated receipt objects do not validate changed source bytes or reduced selectors. No fresh gate execution or historical import-closure equivalence is claimed. Frozen current literal-import graph reaches these changed test bytes; unresolved local and computed edges remain debt, and current reachability is not historical execution or equivalent replacement evidence.",
@@ -102,9 +102,7 @@
"config/scripts/locale-catalog/locale-repair-catalog-missing-leaves.test.mjs": 159,
"config/scripts/locale-catalog/locale-translation-policy-ko-round5.test.mjs": 154,
"config/scripts/locale-catalog/locale-translation-policy.es-pr.test.mjs": 91,
"config/scripts/locale-catalog/locale-translation-policy.es-round5.test.mjs": 153,
"config/scripts/locale-catalog/locale-translation-policy.ja-relocalization.test.mjs": 116,
"config/scripts/locale-catalog/locale-translation-policy.ja-round5.test.mjs": 209,
"config/scripts/locale-catalog/locale-translation-policy.test.mjs": 189,
"config/scripts/localization/source-extraction/localization-extraction-call-syntax.test.mjs": 317,
"config/scripts/localization/extraction-policy/localization-extraction-change-scope.test.mjs": 732,
@@ -313,7 +311,6 @@
"src/cli/automation-owner-conflict-recovery.test.ts": 448,
"src/cli/automation-runs-paging.test.ts": 569,
"src/cli/browser/browser-empty-values.test.ts": 313,
"src/cli/browser/browser.test.ts": 431,
"src/cli/codex-command-classification.test.ts": 65,
"src/cli/command-suggestion-budget.test.ts": 132,
"src/cli/command-suggestion-destructive-families.test.ts": 226,
@@ -331,7 +328,6 @@
"src/cli/handlers/automation-owner-fencing.test.ts": 529,
"src/cli/handlers/computer-action-validation.test.ts": 317,
"src/cli/handlers/computer-state-formatting.test.ts": 337,
"src/cli/handlers/connector.test.ts": 781,
"src/cli/handlers/core.test.ts": 194,
"src/cli/handlers/data-account-commands.test.ts": 431,
"src/cli/handlers/emulator.test.ts": 303,
@@ -348,21 +344,13 @@
"src/cli/handlers/orchestration-legacy-read-only.test.ts": 526,
"src/cli/handlers/orchestration-lifecycle-json-rejection.test.ts": 555,
"src/cli/handlers/orchestration-lifecycle-rejection.test.ts": 781,
"src/cli/handlers/orchestration-migration.test.ts": 536,
"src/cli/handlers/orchestration-request-show-cli.test.ts": 581,
"src/cli/handlers/orchestration-send-receipt-warnings.test.ts": 565,
"src/cli/handlers/orchestration-task-create-cli.test.ts": 652,
"src/cli/handlers/orchestration-task-list-brief.test.ts": 494,
"src/cli/handlers/orchestration-windows-ask-cli.test.ts": 801,
"src/cli/handlers/orchestration-worker-cli.test.ts": 706,
"src/cli/handlers/orchestration-worker-show-wait-cli.test.ts": 748,
"src/cli/handlers/orchestration.test.ts": 543,
"src/cli/handlers/orchestration/agent-view.test.ts": 511,
"src/cli/handlers/orchestration/concise-list-row-size.test.ts": 492,
"src/cli/handlers/orchestration/mutation-request.test.ts": 4146,
"src/cli/handlers/orchestration/older-runtime-run-binding.test.ts": 547,
"src/cli/handlers/orchestration/terminal-identity-codex-filtered.test.ts": 409,
"src/cli/handlers/orchestration/worker-list-run-scope.test.ts": 495,
"src/cli/handlers/orchestration/worker-output.test.ts": 79,
"src/cli/handlers/orchestration/worker-start-implicit-coordinator.test.ts": 522,
"src/cli/handlers/plugin-dev-watch.test.ts": 942,
@@ -374,13 +362,10 @@
"src/cli/handlers/profile-state-recovery-admission.test.ts": 2149,
"src/cli/handlers/profile-state.test.ts": 1045,
"src/cli/handlers/repo-visibility.test.ts": 419,
"src/cli/handlers/search.test.ts": 578,
"src/cli/handlers/serve-restore.test.ts": 120,
"src/cli/handlers/serve-service.test.ts": 200,
"src/cli/handlers/skill-guide-host-gate.test.ts": 596,
"src/cli/handlers/skill-sharing.test.ts": 423,
"src/cli/handlers/speech.test.ts": 454,
"src/cli/handlers/terminal-daemon.test.ts": 426,
"src/cli/handlers/terminal-set-pane-title.test.ts": 623,
"src/cli/handlers/terminal-split.test.ts": 452,
"src/cli/handlers/terminal-switch-paired-reveal.test.ts": 487,
@@ -394,7 +379,6 @@
"src/cli/index-omitted-host-scope-selectors.test.ts": 6719,
"src/cli/index-orchestration.test.ts": 659,
"src/cli/index-terminal-commands.test.ts": 466,
"src/cli/index-vm-recipe-doctor.test.ts": 459,
"src/cli/index-workspace-owner-choice-scaling.test.ts": 10154,
"src/cli/index-workspace-owner-choice.test.ts": 1072,
"src/cli/index-worktree-create-agent.test.ts": 582,
@@ -417,7 +401,6 @@
"src/cli/plugin-authoring/plugin-test-node.test.ts": 110,
"src/cli/plugin-authoring/plugin-test-runner.test.ts": 6256,
"src/cli/plugin-authoring/plugin-type-files-symlink.test.ts": 743,
"src/cli/plugin-authoring/plugin-type-files.test.ts": 372,
"src/cli/plugin-authoring/plugin-worker-panel-template.test.ts": 1469,
"src/cli/plugin-dev-watch/plugin-dev-watch-approval.test.ts": 544,
"src/cli/plugin-dev-watch/plugin-dev-watch-check.test.ts": 427,
@@ -456,7 +439,6 @@
"src/cli/runtime/serve-update-supervisor-gate.test.ts": 73,
"src/cli/runtime/status-caller.test.ts": 488,
"src/cli/runtime/status.test.ts": 1406,
"src/cli/runtime/terminal-prompt-mutation-recovery-plugin-denied.test.ts": 125,
"src/cli/runtime/transport-framing.test.ts": 194,
"src/cli/runtime/transport.test.ts": 462,
"src/cli/runtime/types.test.ts": 62,
@@ -468,17 +450,14 @@
"src/cli/skills-reference-selector.test.ts": 528,
"src/cli/skills.test.ts": 386,
"src/cli/specs/account.test.ts": 95,
"src/cli/specs/bundled-guide-flags.test.ts": 246,
"src/cli/specs/cli-command-names-parity.test.ts": 205,
"src/cli/specs/profile-state.test.ts": 102,
"src/cli/terminal-format.test.ts": 84,
"src/cli/terminal-list-host-scope-format.test.ts": 127,
"src/cli/terminal-read-screen.test.ts": 660,
"src/cli/worktree-ps-program-status.test.ts": 65,
"src/cli/worktree-ps-terminal-verdict.test.ts": 60,
"src/cli/worktree-selector-caller-host.test.ts": 107,
"src/cli/worktree-selector-wsl-posix-path.test.ts": 134,
"src/cli/wsl-distro-cli-refusal.test.ts": 74,
"src/main/acp/process/acp-agent-connection.test.ts": 407,
"src/main/acp/discovery/acp-at-rest-commands.test.ts": 1400,
"src/main/acp/transport/acp-json-rpc-peer.test.ts": 195,
@@ -551,55 +530,39 @@
"src/main/agent-hooks/installation/configuration/managed-toml-ownership.test.ts": 52,
"src/main/agent-hooks/installation/scripts/posix-hook-json-stdin-reader.test.ts": 3479,
"src/main/agent-hooks/server/testing/presence/server-agent-presence.test.ts": 1257,
"src/main/agent-hooks/server/testing/tool-events/server-agent-tool-plugin-hooks.test.ts": 717,
"src/main/agent-hooks/server/testing/identity/server-ai-vault-liveness.test.ts": 643,
"src/main/agent-hooks/server/testing/providers/amp/server-amp-normalization.test.ts": 607,
"src/main/agent-hooks/server/testing/providers/antigravity/server-antigravity-resume-identity.test.ts": 820,
"src/main/agent-hooks/server/testing/providers/claude/server-claude-blocked-prompt.test.ts": 681,
"src/main/agent-hooks/server/testing/permissions/server-claude-child-permission-lifecycle.test.ts": 681,
"src/main/agent-hooks/server/testing/providers/claude/server-claude-config-dir-observation.test.ts": 696,
"src/main/agent-hooks/server/testing/interruptions/server-claude-helper-kill.test.ts": 10279,
"src/main/agent-hooks/server/testing/interruptions/server-claude-helper-recovery.test.ts": 34523,
"src/main/agent-hooks/server/testing/providers/claude/server-claude-normalization.test.ts": 683,
"src/main/agent-hooks/server/testing/task-wakeup/server-claude-owed-notification-expiry.test.ts": 877,
"src/main/agent-hooks/server/testing/permissions/server-claude-permission-tool-failure.test.ts": 674,
"src/main/agent-hooks/server/testing/permissions/server-claude-permission-visibility.test.ts": 765,
"src/main/agent-hooks/server/testing/identity/server-claude-session-continuation.test.ts": 675,
"src/main/agent-hooks/server/testing/http/server-claude-statusline.test.ts": 679,
"src/main/agent-hooks/server/testing/task-wakeup/server-claude-task-wakeup-lifecycle.test.ts": 5451,
"src/main/agent-hooks/server/testing/interruptions/server-claude-terminal-interrupt.test.ts": 802,
"src/main/agent-hooks/server/testing/authority/server-closed-tab-suppression.test.ts": 895,
"src/main/agent-hooks/server/testing/providers/codex/server-codex-capacity.test.ts": 671,
"src/main/agent-hooks/server/testing/providers/codex/server-codex-interrupt-hook.test.ts": 679,
"src/main/agent-hooks/server/testing/normalization/server-provider-normalization.test.ts": 741,
"src/main/agent-hooks/server/testing/providers/codex/server-codex-review-turn-end.test.ts": 860,
"src/main/agent-hooks/server/testing/providers/codex/server-codex-side-thread.test.ts": 847,
"src/main/agent-hooks/server/testing/providers/codex/server-codex-subagent-transcript.test.ts": 706,
"src/main/agent-hooks/server/testing/providers/codex/server-codex-turn-interruption.test.ts": 716,
"src/main/agent-hooks/server/testing/transcripts/server-transcript-result-retry.test.ts": 1125,
"src/main/agent-hooks/server/testing/identity/server-copilot-resume-identity.test.ts": 729,
"src/main/agent-hooks/server/testing/providers/cursor/server-cursor-normalization.test.ts": 645,
"src/main/agent-hooks/server/testing/http/server-endpoint-file-lifecycle.test.ts": 801,
"src/main/agent-hooks/server/testing/providers/grok/server-grok-background-status.test.ts": 723,
"src/main/agent-hooks/server/testing/providers/grok/server-grok-cancel.test.ts": 692,
"src/main/agent-hooks/server/testing/providers/grok/server-grok-discovery.test.ts": 723,
"src/main/agent-hooks/server/testing/identity/server-hermes-resume-identity.test.ts": 941,
"src/main/agent-hooks/server/testing/http/server-hook-http-ingest.test.ts": 719,
"src/main/agent-hooks/server/testing/identity/server-hook-session-binding.test.ts": 2674,
"src/main/agent-hooks/server/testing/presence/server-http-owner-probe-lifecycle.test.ts": 1088,
"src/main/agent-hooks/server/testing/presence/server-idle-process-owner.test.ts": 1014,
"src/main/agent-hooks/server/testing/remote-ingress/server-ingest-remote-codex-question.test.ts": 656,
"src/main/agent-hooks/server/testing/remote-ingress/server-ingest-remote-codex-transcript.test.ts": 647,
"src/main/agent-hooks/server/testing/remote-ingress/server-ingest-remote.test.ts": 653,
"src/main/agent-hooks/server/testing/structured-ingress/server-ingest-structured-state-clock.test.ts": 723,
"src/main/agent-hooks/server/testing/structured-ingress/server-ingest-structured-status.test.ts": 697,
"src/main/agent-hooks/server/testing/terminal-ingress/server-ingest-terminal-status.test.ts": 673,
"src/main/agent-hooks/server/testing/interruptions/server-interrupt-inference-guards.test.ts": 685,
"src/main/agent-hooks/server/testing/interruptions/server-interrupt-inference-resurrection.test.ts": 759,
"src/main/agent-hooks/server/testing/persistence/server-last-status-child-held-main-agent.test.ts": 937,
"src/main/agent-hooks/server/testing/persistence/server-last-status-hydrate-confirmation.test.ts": 713,
"src/main/agent-hooks/server/testing/persistence/server-last-status-hydrate-validation.test.ts": 737,
"src/main/agent-hooks/server/testing/persistence/server-last-status-lead-boundary.test.ts": 768,
"src/main/agent-hooks/server/testing/persistence/server-last-status-main-agent-fact.test.ts": 813,
"src/main/agent-hooks/server/testing/persistence/server-last-status-restored-children.test.ts": 818,
"src/main/agent-hooks/server/testing/persistence/server-last-status-write.test.ts": 745,
@@ -607,13 +570,10 @@
"src/main/agent-hooks/server/testing/main-agent/server-main-agent-turn-verdicts.test.ts": 1716,
"src/main/agent-hooks/server/testing/providers/muse/server-muse-session-log-poll.test.ts": 2772,
"src/main/agent-hooks/server/testing/identity/server-nested-agent-boundaries.test.ts": 657,
"src/main/agent-hooks/server/testing/identity/server-nested-agent-consumers.test.ts": 660,
"src/main/agent-hooks/server/testing/identity/server-nested-agent-model.test.ts": 665,
"src/main/agent-hooks/server/testing/identity/server-nested-same-provider-owner.test.ts": 708,
"src/main/agent-hooks/server/testing/persistence/server-observation-provenance.test.ts": 672,
"src/main/agent-hooks/server/testing/authority/server-omp-retired-ingress.test.ts": 641,
"src/main/agent-hooks/server/testing/authority/server-omp-retirement-ack.test.ts": 676,
"src/main/agent-hooks/server/testing/providers/opencode/server-opencode-tui-identity.test.ts": 843,
"src/main/agent-hooks/server/testing/identity/server-opencode-writer-observation.test.ts": 681,
"src/main/agent-hooks/server/testing/authority/server-pane-authority.test.ts": 762,
"src/main/agent-hooks/server/testing/terminal-ingress/server-process-lifetime-status.test.ts": 852,
@@ -624,7 +584,6 @@
"src/main/agent-hooks/server/testing/authority/server-removed-worktree-foreign-authority.test.ts": 764,
"src/main/agent-hooks/server/testing/authority/server-removed-worktree-status.test.ts": 687,
"src/main/agent-hooks/server/testing/replay/server-replay-evidence-clock.test.ts": 643,
"src/main/agent-hooks/server/testing/persistence/server-restored-agent-status.test.ts": 694,
"src/main/agent-hooks/server/testing/authority/server-retired-pane-new-turn.test.ts": 666,
"src/main/agent-hooks/server/testing/http/server-startup-lifecycle.test.ts": 718,
"src/main/agent-hooks/server/testing/http/server-startup-prompt-control.test.ts": 697,
@@ -637,7 +596,6 @@
"src/main/agent-hooks/server/testing/http/server-transport-interference.test.ts": 1814,
"src/main/agent-hooks/server/testing/main-agent/server-turn-ended-at.test.ts": 990,
"src/main/agent-hooks/server/testing/main-agent/server-turn-started-at.test.ts": 898,
"src/main/agent-hooks/server/program-status/hook-precedence.test.ts": 45,
"src/main/agent-hooks/server/testing/replay/spool.test.ts": 999,
"src/main/agent-hooks/server/testing/identity/terminal-handle-row-identity.test.ts": 669,
"src/main/agent-hooks/installation/commands/windows-batch-hook-launcher.test.ts": 108,
@@ -645,15 +603,12 @@
"src/main/agent-hooks/installation/commands/windows-hook-payload-delivery.test.ts": 345,
"src/main/agent-hooks/installation/commands/windows-native-hook-exe-hosts.test.ts": 262,
"src/main/agent-hooks/installation/commands/windows-powershell-hook-launcher.test.ts": 44,
"src/main/agent-hooks/wsl-relay/wsl-guest-plugin-install.test.ts": 64,
"src/main/agent-hooks/wsl-relay/wsl-hook-relay-idle-stop.test.ts": 1235,
"src/main/agent-hooks/wsl-relay/testing/wsl-hook-relay-live.integration.test.ts": 2231,
"src/main/agent-hooks/wsl-relay/wsl-hook-relay-manager.test.ts": 3176,
"src/main/agent-hooks/wsl-relay/wsl-hook-relay-reattach.test.ts": 1280,
"src/main/agent-hooks/wsl-relay/wsl-hook-relay-recovery.test.ts": 1529,
"src/main/agent-hooks/wsl-relay/wsl-hook-relay-sentinel.test.ts": 62,
"src/main/agent-hooks/wsl-relay/wsl-opencode-settings-lifetime.test.ts": 1951,
"src/main/agent-hooks/wsl-relay/wsl-opencode-settings.test.ts": 1364,
"src/main/agent-launch/agent-launch-account-env.test.ts": 958,
"src/main/agent-launch/agent-launch-executor-cancel.test.ts": 1455,
"src/main/agent-launch/agent-launch-mode-settings.test.ts": 4041,
@@ -941,8 +896,6 @@
"src/main/browser/cookies/browser-google-cookie-clear-target.test.ts": 6235,
"src/main/browser/element-grab/browser-grab-payload.test.ts": 55,
"src/main/browser/guest-lifecycle/devtools/browser-guest-devtools-dock.test.ts": 57,
"src/main/browser/guest-lifecycle/input/shortcuts/browser-guest-shortcut-plugin-frame.test.ts": 280,
"src/main/browser/guest-lifecycle/input/shortcuts/browser-guest-shortcut-precedence.test.ts": 411,
"src/main/browser/guest-lifecycle/input/browser-guest-target-url.test.ts": 50,
"src/main/browser/guest-lifecycle/input/browser-guest-wheel-zoom-scroll.test.ts": 45,
"src/main/browser/client-hosts/leases/browser-host-client-identity.test.ts": 97,
@@ -950,24 +903,18 @@
"src/main/browser/identity/mode/browser-identity-mode-store.test.ts": 95,
"src/main/browser/guest-lifecycle/prompts/browser-javascript-dialogs.test.ts": 54,
"src/main/browser/guest-lifecycle/manager/viewport/browser-manager-annotation-bridge.test.ts": 603,
"src/main/browser/guest-lifecycle/manager/navigation/browser-manager-auth-user-agent.test.ts": 555,
"src/main/browser/guest-lifecycle/manager/downloads/browser-manager-client-hosted-downloads.test.ts": 670,
"src/main/browser/guest-lifecycle/manager/downloads/browser-manager-destroyed-guest-downloads.test.ts": 589,
"src/main/browser/guest-lifecycle/manager/registration/browser-manager-destroyed-guest.test.ts": 633,
"src/main/browser/guest-lifecycle/manager/devtools/browser-manager-devtools-retirement.test.ts": 551,
"src/main/browser/guest-lifecycle/manager/downloads/browser-manager-downloads.test.ts": 592,
"src/main/browser/guest-lifecycle/manager/grab/browser-manager-grab-capture.test.ts": 516,
"src/main/browser/guest-lifecycle/manager/grab/browser-manager-grab-mode.test.ts": 567,
"src/main/browser/guest-lifecycle/manager/grab/browser-manager-grab-selection.test.ts": 584,
"src/main/browser/guest-lifecycle/manager/registration/browser-manager-guest-unload.test.ts": 534,
"src/main/browser/guest-lifecycle/manager/browser-manager-guest-visibility.test.ts": 543,
"src/main/browser/guest-lifecycle/manager/navigation/browser-manager-load-failure-replay.test.ts": 549,
"src/main/browser/guest-lifecycle/manager/registration/browser-manager-page-prompt-routing.test.ts": 560,
"src/main/browser/guest-lifecycle/manager/popups/browser-manager-popup-child.test.ts": 503,
"src/main/browser/guest-lifecycle/manager/popups/browser-manager-popup-routing.test.ts": 575,
"src/main/browser/guest-lifecycle/manager/viewport/browser-manager-tab-identity.test.ts": 619,
"src/main/browser/guest-lifecycle/manager/viewport/browser-manager-viewport-override.test.ts": 597,
"src/main/browser/guest-lifecycle/manager/viewport/browser-manager-viewport-ownership.test.ts": 550,
"src/main/browser/network/execution-routes/browser-network-deferred-socket.test.ts": 101,
"src/main/browser/network/execution-routes/browser-network-execution-route.test.ts": 272,
"src/main/browser/network/tunnels/browser-network-tunnel-client.test.ts": 127,
@@ -1007,8 +954,6 @@
"src/main/browser/sessions/partition-policies/browser-session-partition-policies.test.ts": 979,
"src/main/browser/sessions/partition-policies/browser-session-partition-proxy-install.test.ts": 477,
"src/main/browser/sessions/proxy/browser-session-proxy.test.ts": 857,
"src/main/browser/sessions/profiles/browser-session-registry-identity.persistence.test.ts": 603,
"src/main/browser/sessions/profiles/browser-session-registry-startup-metadata.test.ts": 478,
"src/main/browser/sessions/profiles/browser-session-registry.test.ts": 883,
"src/main/browser/identity/wire-probes/browser-session-ua-wire-identity-cross-context.electron.test.ts": 7167,
"src/main/browser/identity/wire-probes/browser-session-ua-wire-identity.electron.test.ts": 8280,
@@ -4173,7 +4118,6 @@
"src/main/ssh/connection/ssh-connection-reconnect-ladder.test.ts": 570,
"src/main/ssh/connection/ssh-connection-sftp-namespace.test.ts": 1290,
"src/main/ssh/connection/ssh-connection-sftp-wire.test.ts": 481,
"src/main/ssh/targets/ssh-connection-store-orcad-ownership.test.ts": 324,
"src/main/ssh/targets/ssh-connection-store-route-dedupe.test.ts": 350,
"src/main/ssh/targets/ssh-connection-store.test.ts": 377,
"src/main/ssh/connection/ssh-connection-system-transport.test.ts": 458,
@@ -4191,7 +4135,6 @@
"src/main/ssh/legacy-relay/bridge/legacy-relay-client.test.ts": 109,
"src/main/ssh/legacy-relay/bridge/legacy-relay-hidden-output.test.ts": 179,
"src/main/ssh/legacy-relay/bridge/legacy-relay-target-bridge.test.ts": 167,
"src/main/ssh/migration-source/orcad-migration-bridged-panes.test.ts": 322,
"src/main/ssh/legacy-relay/endpoints/ssh-host-relay-census-for-target.test.ts": 53,
"src/main/ssh/legacy-relay/endpoints/ssh-host-relay-windows-census.test.ts": 232,
"src/main/ssh/legacy-relay/endpoints/ssh-host-relay-windows-inventory.test.ts": 178,
@@ -4221,7 +4164,6 @@
"src/main/managed-server/migration/transfers/orcad-migration-snapshot-coordinator.test.ts": 309,
"src/main/ssh/migration-source/orcad-migration-source-fence.test.ts": 2000,
"src/main/persistence/migrating-orcad-catalog/orcad-migration-source-retention.test.ts": 2297,
"src/main/ssh/migration-source/orcad-migration-ssh-relay-source.test.ts": 1903,
"src/main/managed-server/migration/cutover/orcad-migration-stuck-host-profiles.test.ts": 2402,
"src/main/ssh/migration-source/orcad-migration-terminal-gate.test.ts": 63,
"src/main/managed-server/install/orcad-remote-deploy.test.ts": 537,
@@ -4705,7 +4647,6 @@
"src/renderer/src/components/NativeChatResumeOnRestartGroups.test.tsx": 3472,
"src/renderer/src/components/NewWorkspaceComposerCard.quick-file-drop.test.tsx": 4557,
"src/renderer/src/components/NewWorkspaceComposerCard.set-location.test.tsx": 1301,
"src/renderer/src/components/NotificationCardStack.test.tsx": 272,
"src/renderer/src/components/QuickOpen.selection.test.tsx": 1046,
"src/renderer/src/components/SelectedTextCopyMenu.test.tsx": 329,
"src/renderer/src/components/TerminalSearch.test.tsx": 458,
@@ -4723,15 +4664,12 @@
"src/renderer/src/components/activity/activity-scope-filter.test.ts": 734,
"src/renderer/src/components/activity/activity-search-query.test.tsx": 2286,
"src/renderer/src/components/activity/activity-terminal-portal-publication-loop.react185.test.tsx": 222,
"src/renderer/src/components/activity/activity-thread-grouping.status-order.test.ts": 759,
"src/renderer/src/components/activity/activity-thread-list-pane-collapsible.test.tsx": 3688,
"src/renderer/src/components/activity/activity-thread-list-pane.multi-select.test.tsx": 4699,
"src/renderer/src/components/activity/activity-thread-list-pane.virtualization.test.tsx": 4863,
"src/renderer/src/components/activity/useActivityUnreadCount.freshness.test.tsx": 1990,
"src/renderer/src/components/activity/useActivityUnreadCount.test.ts": 1633,
"src/renderer/src/components/agent-session-continuation/agent-session-continuation-selection.test.ts": 56,
"src/renderer/src/components/agent-tab-shortcut-launch.test.ts": 369,
"src/renderer/src/components/agent/AgentLaunchPickerMenu.language.test.tsx": 2115,
"src/renderer/src/components/agent/AgentLaunchPickerMenu.search.test.tsx": 2090,
"src/renderer/src/components/artifacts/ArtifactCollection.test.tsx": 1833,
"src/renderer/src/components/artifacts/ArtifactPreview.test.tsx": 474,
@@ -4743,14 +4681,12 @@
"src/renderer/src/components/automations/AutomationRunsTable.test.tsx": 668,
"src/renderer/src/components/automations/AutomationSchedulePicker.test.ts": 431,
"src/renderer/src/components/automations/AutomationTimeField.test.tsx": 654,
"src/renderer/src/components/automations/AutomationsListPanel.test.tsx": 2441,
"src/renderer/src/components/automations/AutomationsPage.behavior.test.tsx": 3389,
"src/renderer/src/components/automations/AutomationsPage.edit-destination.test.tsx": 2932,
"src/renderer/src/components/automations/AutomationsPage.run-navigation.test.tsx": 3056,
"src/renderer/src/components/automations/ExternalAutomationManagers.test.tsx": 852,
"src/renderer/src/components/automations/automation-captured-owner.test.ts": 379,
"src/renderer/src/components/automations/automation-create-projects.test.ts": 42,
"src/renderer/src/components/automations/automation-detail-tab-navigation.test.ts": 201,
"src/renderer/src/components/automations/automation-host-cache-controller.test.ts": 411,
"src/renderer/src/components/automations/automation-host-cache-error.test.ts": 391,
"src/renderer/src/components/automations/automation-host-cache-health.test.ts": 52,
@@ -4766,14 +4702,11 @@
"src/renderer/src/components/automations/automation-host-recovery.test.ts": 51,
"src/renderer/src/components/automations/automation-host-scale-gates.test.ts": 638,
"src/renderer/src/components/automations/automation-host-scheduler.test.ts": 439,
"src/renderer/src/components/automations/automation-host-status-descriptors.test.ts": 231,
"src/renderer/src/components/automations/automation-legacy-schedule-editing.test.ts": 449,
"src/renderer/src/components/automations/automation-list-focus-recovery.test.ts": 48,
"src/renderer/src/components/automations/automation-list-keyboard-navigation.test.ts": 61,
"src/renderer/src/components/automations/automation-list-row-identity.test.ts": 626,
"src/renderer/src/components/automations/automation-list-search.test.ts": 75,
"src/renderer/src/components/automations/automation-list-view.test.ts": 257,
"src/renderer/src/components/automations/automation-project-groups.test.ts": 54,
"src/renderer/src/components/automations/automation-run-context.test.ts": 58,
"src/renderer/src/components/automations/automation-run-history-keyboard-navigation.test.ts": 434,
"src/renderer/src/components/automations/automation-run-open-target.test.ts": 442,
@@ -4797,7 +4730,6 @@
"src/renderer/src/components/browser-pane/ClientHostedBrowserPagePane.failure-remount.test.tsx": 3085,
"src/renderer/src/components/browser-pane/ClientHostedBrowserPagePane.markup.test.tsx": 4575,
"src/renderer/src/components/browser-pane/ClientHostedBrowserPagePane.test.tsx": 6541,
"src/renderer/src/components/browser-pane/ReopenBrowserPageOnServerButton.test.tsx": 497,
"src/renderer/src/components/browser-pane/annotate/MarkupOverlay.test.tsx": 1124,
"src/renderer/src/components/browser-pane/annotate/browser-annotation-output.test.ts": 74,
"src/renderer/src/components/browser-pane/annotate/browser-grab-toast-owner-cleanup.test.tsx": 1007,
@@ -4815,7 +4747,6 @@
"src/renderer/src/components/browser-pane/assemble-chrome/browser-workspace-pane.retention-props.test.tsx": 3808,
"src/renderer/src/components/browser-pane/assemble-chrome/use-browser-chrome-tool-fold.test.tsx": 307,
"src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-find-shortcuts.test.tsx": 1874,
"src/renderer/src/components/browser-pane/browser-client-hosted-download-notices.test.tsx": 1020,
"src/renderer/src/components/browser-pane/browser-client-page-attachment-scan-budget.test.ts": 464,
"src/renderer/src/components/browser-pane/browser-client-page-metadata-publisher.test.ts": 315,
"src/renderer/src/components/browser-pane/browser-client-page-profile-staging.test.ts": 434,
@@ -4831,9 +4762,7 @@
"src/renderer/src/components/browser-pane/history/use-browser-history-shortcut.test.tsx": 1990,
"src/renderer/src/components/browser-pane/host-guest/agent-input-focus-guard.test.ts": 228,
"src/renderer/src/components/browser-pane/host-guest/browser-automation-visibility.test.ts": 45,
"src/renderer/src/components/browser-pane/host-guest/browser-focus.test.ts": 180,
"src/renderer/src/components/browser-pane/host-guest/browser-guest-eviction-veto.test.ts": 1724,
"src/renderer/src/components/browser-pane/host-guest/browser-guest-paint-policy.test.ts": 2035,
"src/renderer/src/components/browser-pane/host-guest/browser-page-evicted-guest-recovery.test.ts": 1839,
"src/renderer/src/components/browser-pane/host-guest/browser-page-guest-recovery.test.ts": 515,
"src/renderer/src/components/browser-pane/host-guest/browser-page-registration-ownership.test.ts": 2197,
@@ -5588,7 +5517,6 @@
"src/renderer/src/components/settings/chat/ChatSettingsSection.test.tsx": 2718,
"src/renderer/src/lib/skill-runtime-command.test.ts": 1670,
"src/renderer/src/components/settings/virtual-machines/recipes/EphemeralVmsPane.test.tsx": 1025,
"src/renderer/src/components/settings/accounts/providers/GrokAccountsSection.test.tsx": 623,
"src/renderer/src/components/settings/accounts/sign-in/HostAccountSignInPrompt.test.tsx": 309,
"src/renderer/src/components/settings/agents/launch/HostAgentLaunchSettings.test.tsx": 7498,
"src/renderer/src/components/settings/developer-permissions/LocalNetworkConnectionTest.test.tsx": 592,
@@ -5609,7 +5537,6 @@
"src/renderer/src/components/settings/ssh/SshPane.test.tsx": 1699,
"src/renderer/src/components/settings/ssh/targets/SshTargetForm.test.tsx": 1014,
"src/renderer/src/components/settings/ssh/targets/SshTargetList.test.tsx": 2093,
"src/renderer/src/components/settings/tasks/TaskSourceProviderCard.test.tsx": 467,
"src/renderer/src/components/settings/tasks/TaskSourceSimpleSetup.test.tsx": 527,
"src/renderer/src/components/settings/TerminalAppearanceSection.ghostty.test.ts": 549,
"src/renderer/src/components/settings/terminal/appearance/TerminalContrastSetting.test.tsx": 798,
@@ -5762,7 +5689,6 @@
"src/renderer/src/components/sidebar/worktree-list/rows/repo-header-ssh-isolation.test.tsx": 2945,
"src/renderer/src/components/sidebar/worktree-list/rows/section-header-create-host.test.tsx": 2393,
"src/renderer/src/components/sidebar/worktree-list/viewport/hard-scroll-up.test.ts": 66,
"src/renderer/src/components/sidebar/worktree-list/viewport/header-folder-composition.test.tsx": 3725,
"src/renderer/src/components/sidebar/worktree-list/viewport/use-scroll-to-top.test.ts": 293,
"src/renderer/src/components/sidebar/worktree-list/viewport/use-scroll-to-top.test.tsx": 269,
"src/renderer/src/components/sidebar/worktree-list/drag/worktree-manual-order-store-write.test.ts": 2144,
@@ -5854,7 +5780,6 @@
"src/renderer/src/components/task-page/gitlab/use-task-page-gitlab-loading.test.tsx": 1504,
"src/renderer/src/components/task-page/jira/Content.board-owner.test.tsx": 2582,
"src/renderer/src/components/task-page/jira/IssueAssigneeField.test.tsx": 1122,
"src/renderer/src/components/task-page/jira/TaskPageJiraStatusFilters.test.tsx": 923,
"src/renderer/src/components/task-page/jira/task-page-jira-board-detail-integration.test.tsx": 2192,
"src/renderer/src/components/task-page/jira/task-page-jira-board-transitions.test.ts": 69,
"src/renderer/src/components/task-page/jira/task-page-jira-board-view.test.tsx": 2287,
@@ -5924,7 +5849,6 @@
"src/renderer/src/components/terminal-pane/pty-connection/startup/launch-parity-window-tab.test.ts": 17426,
"src/renderer/src/components/terminal-pane/layout-serialization.test.ts": 109,
"src/renderer/src/components/terminal-pane/pty-transport/legacy-relay/legacy-relay-bridge-transport.test.ts": 358,
"src/renderer/src/components/terminal-pane/session-restore/newer-daemon/newer-daemon-hold-banner.test.tsx": 477,
"src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/paired-reconnect-multi-pane-materialization.test.ts": 1040,
"src/renderer/src/components/terminal-pane/pty-connection/agent-identity/foreground-process/pane-delayed-agent-startup.test.ts": 285,
"src/renderer/src/components/terminal-pane/pty-connection/agent-identity/foreground-process/pane-foreground-agent-tracker.test.ts": 486,
@@ -6011,7 +5935,6 @@
"src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-reattach-admission.test.ts": 1636,
"src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-recycled-pty-incarnation.test.ts": 787,
"src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-errors.test.ts": 1218,
"src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-user-input.test.ts": 953,
"src/renderer/src/components/terminal-pane/input/focus/regular-terminal-focus-ownership.test.ts": 208,
"src/renderer/src/components/terminal-pane/pty-connection/output-restore/remote-hidden-output-restore-outcomes.test.ts": 2794,
"src/renderer/src/components/terminal-pane/pty-connection/output-restore/remote-hidden-output-restore-unavailable-banner.repro.test.ts": 2355,
@@ -6414,7 +6337,6 @@
"src/renderer/src/lib/agent-session/structured-agent-session-draft-position-lifetime.test.tsx": 3166,
"src/renderer/src/lib/agent-session/structured-agent-session-ordinary-draft.test.tsx": 9907,
"src/renderer/src/lib/agent-session/structured-agent-session-provisional-tab.test.ts": 3672,
"src/renderer/src/lib/skills/installation/agent-skill-cli-prerequisite.test.ts": 219,
"src/renderer/src/lib/agent-session/launch/startup/agent-startup-delayed-delivery-perf.test.ts": 1708,
"src/shared/agent-status/contracts/agent-status-evidence-clock.test.ts": 88,
"src/shared/agent-status/title/agent-title-tracker.test.ts": 172,
@@ -6466,7 +6388,6 @@
"src/renderer/src/lib/workspace/creation/work-item/direct-work-item-setup.test.ts": 2072,
"src/renderer/src/lib/browser/documents/doc-preview-grants.test.ts": 2094,
"src/renderer/src/lib/editor/file-operations/editor-file-operation-owner.test.ts": 2848,
"src/renderer/src/lib/workspace/activation/initial-surface/empty-workspace-default-agent-chat.test.ts": 1895,
"src/renderer/src/lib/emulator-error-copy.test.ts": 415,
"src/renderer/src/lib/ensure-hooks-confirmed.test.ts": 799,
"src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts": 3601,
@@ -6512,7 +6433,6 @@
"src/renderer/src/lib/lazy-with-retry.test.ts": 282,
"src/renderer/src/lib/linear-board-drag-payload.test.ts": 58,
"src/renderer/src/lib/work-items/linear/linear-issue-context-snapshot.test.ts": 55,
"src/renderer/src/lib/work-items/linear/linear-issue-url-lookup.test.ts": 374,
"src/renderer/src/lib/work-items/linear/linear-issue-workspace-attachment.test.ts": 99,
"src/renderer/src/lib/link-source-local-open-owner.test.ts": 433,
"src/renderer/src/lib/linked-work-item-context.test.ts": 64,
@@ -6713,7 +6633,6 @@
"src/renderer/src/lib/workspace/ownership/worktree-operation-route.test.ts": 342,
"src/renderer/src/lib/workspace/search/worktrees/worktree-palette-comment-snippet.test.ts": 53,
"src/renderer/src/lib/workspace/search/worktrees/worktree-palette-titleless-review.test.ts": 198,
"src/renderer/src/lib/workspace/search/worktrees/worktree-palette-runtime-owner-identity.test.ts": 425,
"src/renderer/src/lib/workspace/search/worktrees/worktree-palette-search.test.ts": 206,
"src/renderer/src/lib/workspace/search/worktrees/worktree-palette-task-url-match.test.ts": 165,
"src/renderer/src/lib/workspace/activation/worktree-reactivation-preserved-pane-replacement.test.ts": 2268,
@@ -6738,7 +6657,6 @@
"src/renderer/src/runtime/native-chat/naming/legacy-chat-rename-migration.test.tsx": 3834,
"src/renderer/src/runtime/local-structured-session-tabs-sync/local-structured-session-tabs-sync.test.ts": 2643,
"src/renderer/src/runtime/web-session-tabs-sync/agent-status/mirrored-agent-status-clock-skew.test.ts": 1839,
"src/renderer/src/runtime/hosted-terminals/mounted-surfaces/mounted-terminal-tab-registry.test.ts": 634,
"src/renderer/src/runtime/web-session-tabs-sync/agent-status/paired-reconnect-sidebar-agent-count.test.ts": 1905,
"src/renderer/src/runtime/web-session-tabs-sync/closing/paired-terminal-tab-close-environment-removal.test.ts": 1897,
"src/renderer/src/runtime/web-session-tabs-sync/closing/paired-terminal-tab-close-reload.test.ts": 1943,
@@ -6752,8 +6670,6 @@
"src/renderer/src/runtime/hosted-terminals/streams/remote-runtime-terminal-stale-stream-frames.test.ts": 234,
"src/renderer/src/runtime/hosted-terminals/streams/remote-runtime-terminal-stall-recovery.test.ts": 826,
"src/renderer/src/runtime/hosts/updates/remote-server-restart-wait.test.ts": 49,
"src/renderer/src/runtime/browser/client-hosting/restored-client-hosted-browser-host-attach.test.ts": 43,
"src/renderer/src/runtime/browser/client-hosting/restored-client-hosted-browser-host-restart-attach.test.ts": 474,
"src/renderer/src/runtime/rpc/subscriptions/runtime-client-events.test.ts": 64,
"src/renderer/src/runtime/files/reads/runtime-directory-page-client.test.ts": 268,
"src/renderer/src/runtime/rpc/environment-revisions/runtime-environment-pairing-refresh.test.ts": 109,
@@ -6764,7 +6680,6 @@
"src/renderer/src/runtime/files/reads/runtime-file-range-client.test.ts": 444,
"src/renderer/src/runtime/files/mutations/runtime-file-write-disk-precondition.test.ts": 478,
"src/renderer/src/runtime/source-control/git/runtime-git-client.test.ts": 513,
"src/renderer/src/runtime/provider-accounts/sign-in/runtime-host-account-sign-in-client.test.ts": 487,
"src/renderer/src/runtime/hosts/connections/runtime-host-contact-regained.test.ts": 413,
"src/renderer/src/runtime/jira/runtime-jira-image-client.test.ts": 214,
"src/renderer/src/runtime/jira/runtime-jira-payload-stream.test.ts": 192,
@@ -6939,7 +6854,6 @@
"src/renderer/src/store/slices/editor/git/editor-remote-branch-actions.test.ts": 935,
"src/renderer/src/store/slices/editor/hydration/editor-session-duplicate-restore.test.ts": 1931,
"src/renderer/src/store/slices/editor/focus/editor-set-active-file-guard.test.ts": 895,
"src/renderer/src/store/slices/editor/tabs/editor-state-worktree-purge-leak.test.ts": 1740,
"src/renderer/src/store/slices/editor/tabs/editor-tab-layout-owner.test.ts": 1883,
"src/renderer/src/store/slices/editor/tabs/editor-tab-placement.test.ts": 1837,
"src/renderer/src/store/slices/editor/tabs/editor-tab-shared-project-owner.test.ts": 954,
@@ -6958,7 +6872,6 @@
"src/renderer/src/store/github/pull-requests/github-pr-branch-direct-refresh-scope.test.ts": 667,
"src/renderer/src/store/github/pull-requests/github-pr-branch-fallback-results.test.ts": 658,
"src/renderer/src/store/github/pull-requests/github-pr-branch-linked-pr-divergence.test.ts": 662,
"src/renderer/src/store/github/checks/github-pr-checks-fetch.test.ts": 766,
"src/renderer/src/store/github/comments/github-pr-comment-read-order.test.ts": 570,
"src/renderer/src/store/github/comments/github-pr-comments.test.ts": 746,
"src/renderer/src/store/github/pull-requests/github-pr-host-scope.test.ts": 1030,
@@ -6967,7 +6880,6 @@
"src/renderer/src/store/github/pull-requests/github-pr-request-lifetime.test.ts": 1458,
"src/renderer/src/store/github/projects/github-project-view-tables.test.ts": 656,
"src/renderer/src/store/github/repositories/github-repo-lookup-index.test.ts": 51,
"src/renderer/src/store/github/review-threads/github-review-thread-actions.test.ts": 574,
"src/renderer/src/store/github/review-threads/github-review-thread-rollback.test.ts": 663,
"src/renderer/src/store/github/task-records/github-task-record-retries.test.ts": 758,
"src/renderer/src/store/github/task-records/github-task-records.test.ts": 807,
@@ -6977,7 +6889,6 @@
"src/renderer/src/store/github/work-items/github-work-items-twin-cache-host.test.ts": 672,
"src/renderer/src/store/slices/hosted-review/hosted-review-request-lifetime.test.ts": 110,
"src/renderer/src/store/slices/hosted-review/hosted-review.test.ts": 320,
"src/renderer/src/store/repos/issue-source-preference-twin.test.ts": 1858,
"src/renderer/src/store/slices/jira/jira-status-filter-cache.test.ts": 1770,
"src/renderer/src/store/slices/jira/jira-web-client-status.test.ts": 1901,
"src/renderer/src/store/slices/jira/jira.test.ts": 312,
@@ -7055,7 +6966,6 @@
"src/renderer/src/store/slices/tabs/tabs-unread-and-focus.test.ts": 1801,
"src/renderer/src/store/slices/tabs/structured-chat-close-owner.test.ts": 1866,
"src/renderer/src/store/slices/tabs/tabs-reconciliation-empty-groups.test.ts": 1703,
"src/renderer/src/store/terminals/terminal-input-activity-store-write.test.ts": 1726,
"src/renderer/src/store/terminals/terminal-layout-pty-ownership.test.ts": 1734,
"src/renderer/src/store/terminals/terminal-pane-detach-agent-identity.test.ts": 1627,
"src/renderer/src/store/terminals/terminal-pane-detach-agent-retention.test.ts": 2846,
@@ -7068,7 +6978,6 @@
"src/renderer/src/store/terminals/terminals-hydration-canonical-pty-overlap.test.ts": 1946,
"src/renderer/src/store/terminals/terminals-hydration-canonical-rows.test.ts": 1680,
"src/renderer/src/store/slices/ui/ui-agent-send-target.test.ts": 760,
"src/renderer/src/store/slices/ui/ui-feature-interactions.test.ts": 648,
"src/renderer/src/store/slices/ui/ui-host-filter-sync.test.ts": 597,
"src/renderer/src/store/slices/ui/ui-host-workspace-statuses.test.ts": 1695,
"src/renderer/src/store/slices/ui/ui-modal-slot-dismissal.test.ts": 662,
@@ -7092,7 +7001,6 @@
"src/renderer/src/store/slices/settings/worktree-visibility-settings-write.test.ts": 307,
"src/renderer/src/store/slices/worktrees/teardown/worktrees-always-force-delete.test.ts": 1611,
"src/renderer/src/store/slices/worktrees/teardown/worktrees-background-removal.test.ts": 2011,
"src/renderer/src/store/slices/worktrees/create/worktrees-create-base-status.test.ts": 1252,
"src/renderer/src/store/slices/worktrees/create/worktrees-create-captured-host.test.ts": 1148,
"src/renderer/src/store/slices/worktrees/listing/worktrees-fetch-listing-merge.test.ts": 1311,
"src/renderer/src/store/slices/worktrees/listing/worktrees-fetch-owner-routing.test.ts": 2038,
@@ -7121,7 +7029,6 @@
"src/renderer/src/store/slices/worktrees/session/worktrees-terminal-reference-origins.test.ts": 1218,
"src/renderer/src/store/slices/worktrees/session/worktrees-terminal-reference-source-race.test.ts": 1063,
"src/renderer/src/store/slices/workspace-attention/worktrees-unread-state.test.ts": 1704,
"src/renderer/src/store/slices/worktrees/session/worktrees-workspace-selection-state.test.ts": 1170,
"src/renderer/src/store/slices/worktrees/host-scoped-row-merges.test.ts": 1805,
"src/renderer/src/store/slices/worktrees/listing/detected-worktree-meta.test.ts": 318,
"src/renderer/src/store/slices/worktrees/listing/stale-listing-purges-created-worktree.test.ts": 1828,
@@ -7190,7 +7097,6 @@
"src/shared/agent-cli-install-dir-fallback.test.ts": 130,
"src/shared/agent-launch/startup/agent-command-line-intent.test.ts": 95,
"src/shared/agent-status/title/agent-detection.test.ts": 188,
"src/shared/agent-hook-listener/transport/agent-hook-endpoint-file.test.ts": 58,
"src/shared/agent-hook-listener/transport/agent-hook-endpoint-temp-cleanup.test.ts": 55,
"src/shared/agent-hook-listener/normalization/agent-hook-listener-claude-elicitation.test.ts": 229,
"src/shared/agent-hook-listener/normalization/agent-hook-listener-codex-approval-ownership.test.ts": 258,
@@ -8350,7 +8256,6 @@
"tests/e2e/git-history-tooltip-wrap.spec.ts": 22900,
"tests/e2e/git-no-upstream-polling-churn.spec.ts": 22600,
"tests/e2e/github-cli-stall-repro.spec.ts": 18200,
"tests/e2e/github-created-issue-start-prefill.spec.ts": 43100,
"tests/e2e/github-url-smart-input-transition.spec.ts": 58200,
"tests/e2e/golden-agent-tui-launch.spec.ts": 27300,
"tests/e2e/golden-core-flows.spec.ts": 91100,
@@ -53,7 +53,6 @@ export const UNIT_EXCLUDE = [
'src/main/browser/client-pages/renderer/browser-client-page-renderer-lifecycle.electron.test.ts',
'src/main/persistence/profile-state/profile-state-writer-stall.electron.test.ts',
'src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-compatibility.electron.test.ts',
'src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-adapter-compatibility.electron.test.ts',
'src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-native-compatibility.electron.test.ts',
'src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-background-compatibility.electron.test.ts',
'src/main/browser/extensions/api-runtime/browser-extension-api.electron.test.ts',
@@ -3,147 +3,6 @@ import { describe, expect, it } from 'vitest'
import { repairTranslatedValue } from './locale-translation-policy.mjs'
describe('locale-translation-policy ko round 5', () => {
it('fixes Korean round 5 review, integration, and search keyword regressions', () => {
expect(
repairTranslatedValue({
key: 'auto.components.sidebar.workspace.status.409528031f',
enValue: 'Review',
localeValue: '검토',
locale: 'ko'
})
).toBe('리뷰')
expect(
repairTranslatedValue({
key: 'auto.components.sidebar.workspace.status.6c1efa2cf8',
enValue: 'In review',
localeValue: '검토 중',
locale: 'ko'
})
).toBe('리뷰 중')
expect(
repairTranslatedValue({
key: 'auto.components.TaskPage.524f095d55',
enValue: 'Needs review',
localeValue: '검토 필요',
locale: 'ko'
})
).toBe('리뷰 필요')
expect(
repairTranslatedValue({
key: 'auto.components.onboarding.IntegrationsStep.277f30eb34',
enValue:
'Linear, GitLab, Bitbucket, Azure DevOps, Gitea, and Jira live in Settings > Integrations.',
localeValue:
'Linear, GitLab, Bitbucket, Azure DevOps, Gitea 및 Jira는 설정 > 통합에 있습니다.',
locale: 'ko'
})
).toBe('Linear, GitLab, Bitbucket, Azure DevOps, Gitea 및 Jira는 설정 > 연동에 있습니다.')
expect(
repairTranslatedValue({
key: 'auto.components.settings.general.search.244e3fb4c8',
enValue: 'Install the Orca skill so agents know to use the Orca CLI.',
localeValue: '에이전트가 Orca CLI 사용 방법을 알 수 있도록 Orca 기술을 설치합니다.',
locale: 'ko'
})
).toBe('에이전트가 Orca CLI를 사용하도록 Orca 스킬을 설치하세요.')
expect(
repairTranslatedValue({
key: 'auto.components.editor.MarkdownPreview.322afab6ff',
enValue: 'Review notes',
localeValue: '메모 검토',
locale: 'ko'
})
).toBe('리뷰 노트')
expect(
repairTranslatedValue({
key: 'auto.components.right.sidebar.source.control.repo.icon.ecf63ec3ef',
enValue: 'Launch',
localeValue: '시작하다',
locale: 'ko'
})
).toBe('실행')
expect(
repairTranslatedValue({
key: 'auto.components.GitHubItemDialog.485609c4f2',
enValue: 'check #',
localeValue: '확인하다 #',
locale: 'ko'
})
).toBe('체크 #')
expect(
repairTranslatedValue({
key: 'auto.lib.automation.templates.maintenance.prompt',
enValue:
'Check for stuck work, stale generated files, failing validation, and anything that needs human attention. Report only actionable issues.',
localeValue:
'작업 중단, 오래 생성된 파일, 유효성 검사 실패 및 사람의 주의가 필요한 모든 사항을 확인하세요. 실행 가능한 문제만 보고하세요.',
locale: 'ko'
})
).toBe(
'작업 중단, 오래 생성된 파일, 유효성 검사 실패 및 사람의 주의가 필요한 모든 사항을 확인하세요. 실행 가능한 이슈만 보고하세요.'
)
expect(
repairTranslatedValue({
key: 'auto.components.GitLabItemDialog.02cbe2de44',
enValue: 'Pipeline',
localeValue: '파이프라인',
locale: 'ko'
})
).toBe('파이프라인')
})
// Why: #12113 — brand names stay Latin, but generic workflow nouns keep their Korean.
it('keeps brand names English and generic workflow terms translated', () => {
expect(
repairTranslatedValue({
key: 'auto.components.feature.wall.BrowserAnimatedVisual.04096318ab',
enValue: 'Terminal 1',
localeValue: '터미널 1',
locale: 'ko'
})
).toBe('터미널 1')
expect(
repairTranslatedValue({
key: 'auto.components.skills.SkillsPage.38e0951c3a',
enValue: 'Agent Skills',
localeValue: '에이전트 스킬',
locale: 'ko'
})
).toBe('에이전트 스킬')
expect(
repairTranslatedValue({
key: 'auto.components.LinearIssueMarkdownDescriptionEditor.d9c47069ef',
enValue: 'Markdown',
localeValue: '가격 인하',
locale: 'ko'
})
).toBe('Markdown')
expect(
repairTranslatedValue({
key: 'auto.components.workspace.cleanup.WorkspaceCleanupDialog.9623a5107d',
enValue: 'Unpushed commits',
localeValue: '푸시되지 않은 커밋',
locale: 'ko'
})
).toBe('푸시되지 않은 커밋')
expect(
repairTranslatedValue({
key: 'auto.components.workspace.cleanup.WorkspaceCleanupDialog.0b1766738a',
enValue: 'Repo',
localeValue: '레포',
locale: 'ko'
})
).toBe('레포')
expect(
repairTranslatedValue({
key: 'auto.components.sidebar.add.repo.local.start.actions.fb4fc5380e',
enValue: 'Local project, Git repo, or folder with many repos',
localeValue: '로컬 프로젝트, Git 저장소 또는 저장소가 많은 폴더',
locale: 'ko'
})
).toBe('로컬 프로젝트, Git 저장소 또는 저장소가 많은 폴더')
})
it('re-glues Korean particles after Latin terms without gluing content words', () => {
// A wrong space before the 에 particle is re-glued onto the Latin term.
expect(
@@ -1,65 +0,0 @@
import { describe, expect, it } from 'vitest'
import { repairTranslatedValue } from './locale-translation-policy.mjs'
describe('locale-translation-policy es round 5', () => {
// Why: #12113 — brand names stay Latin, but generic workflow nouns keep their Spanish.
it('keeps brand names English and generic workflow terms translated', () => {
expect(
repairTranslatedValue({
key: 'auto.components.LinearIssueMarkdownDescriptionEditor.d9c47069ef',
enValue: 'Markdown',
localeValue: 'Reducción',
locale: 'es'
})
).toBe('Markdown')
expect(
repairTranslatedValue({
key: 'auto.components.TaskPage.7f3f7b4c18',
enValue: 'Description (optional, markdown)',
localeValue: 'Descripción (opcional, rebaja)',
locale: 'es'
})
).toBe('Descripción (opcional, markdown)')
expect(
repairTranslatedValue({
key: 'auto.components.right.sidebar.source.control.primary.action.ed93b4f14f',
enValue: 'Commit',
localeValue: 'Comprometerse',
locale: 'es'
})
).toBe('Commit')
expect(
repairTranslatedValue({
key: 'auto.components.right.sidebar.GitHistoryPanel.cf7cad58d2',
enValue: 'No commits yet',
localeValue: 'Aún no hay compromisos',
locale: 'es'
})
).toBe('Aún no hay commits')
expect(
repairTranslatedValue({
key: 'auto.components.right.sidebar.SourceControl.b94112eb9e',
enValue: 'Commit message',
localeValue: 'mensaje de confirmación',
locale: 'es'
})
).toBe('mensaje de confirmación')
expect(
repairTranslatedValue({
key: 'auto.components.workspace.cleanup.WorkspaceCleanupDialog.0b1766738a',
enValue: 'Repo',
localeValue: 'repositorio',
locale: 'es'
})
).toBe('repositorio')
expect(
repairTranslatedValue({
key: 'auto.components.sidebar.add.repo.local.start.actions.fb4fc5380e',
enValue: 'Local project, Git repo, or folder with many repos',
localeValue: 'Proyecto local, repositorio de Git o carpeta con muchos repositorios',
locale: 'es'
})
).toBe('Proyecto local, repositorio de Git o carpeta con muchos repositorios')
})
})
@@ -6,16 +6,6 @@ const ja = (enValue, localeValue, key = 'auto.test.relocalization') =>
repairTranslatedValue({ key, enValue, localeValue, locale: 'ja' })
describe('locale-translation-policy ja relocalization', () => {
it('heals generic terms the brand revert left in Latin mid-sentence', () => {
expect(ja('Close terminal?', 'この terminal を閉じますか?')).toBe('このターミナルを閉じますか?')
expect(ja('New Terminal', '新規 Terminal')).toBe('新規ターミナル')
expect(ja('Stop the agent?', 'この agent を停止しますか?')).toBe('この Agent を停止しますか?')
expect(ja('Nothing to commit.', 'commit するものはありません。')).toBe(
'コミットするものはありません。'
)
expect(ja('Open the repo', 'repo を開く')).toBe('リポジトリを開く')
})
it('leaves the second word of a two-word command in Latin', () => {
expect(ja('a commit hook or git commit fails', 'コミットフックまたは git commit が失敗')).toBe(
'コミットフックまたは git commit が失敗'
@@ -36,21 +26,6 @@ describe('locale-translation-policy ja relocalization', () => {
expect(ja('Run git commit -m', 'git commit -m を実行')).toBe('git commit -m を実行')
})
it('keeps commands and identifiers in English so they still run', () => {
expect(shouldPreserveEnglishValue('pnpm install')).toBe(true)
expect(shouldPreserveEnglishValue('glab auth login')).toBe(true)
expect(shouldPreserveEnglishValue("gh pr list --json number -q '.[0].number'")).toBe(true)
expect(shouldPreserveEnglishValue('--model sonnet')).toBe(true)
expect(shouldPreserveEnglishValue('localhost, 127.0.0.1, *.internal')).toBe(true)
expect(shouldPreserveEnglishValue('stale-agent-row-{{value0}}')).toBe(true)
expect(shouldPreserveEnglishValue('text-foreground')).toBe(true)
expect(shouldPreserveEnglishValue('{basePrompt}')).toBe(true)
expect(shouldPreserveEnglishValue('{firstPrompt}')).toBe(true)
expect(shouldPreserveEnglishValue('{assistantMessage}')).toBe(true)
expect(shouldPreserveEnglishValue('/pricing')).toBe(true)
expect(shouldPreserveEnglishValue('/signup')).toBe(true)
})
it('repairs translated code examples back to executable values', () => {
expect(ja('--model sonnet', '--モデルソネット')).toBe('--model sonnet')
expect(
@@ -68,78 +43,10 @@ describe('locale-translation-policy ja relocalization', () => {
expect(shouldPreserveEnglishValue('e.g. {{value0}}')).toBe(false)
})
it('normalizes Japanese typography and settled terminology', () => {
expect(ja('Loading…', '読み込み中...')).toBe('読み込み中…')
expect(ja('Merge conflict', 'マージ紛争')).toBe('マージ競合')
// Why: MT inserts a Microsoft-style separator space that Japanese compounds do not use.
expect(ja('Status bar', 'ステータス バー')).toBe('ステータスバー')
expect(ja('Missing credentials', '資格情報がありません')).toBe('認証情報がありません')
expect(ja('Unknown', '未知')).toBe('不明')
expect(ja('Restart the server', 'サーバを再起動')).toBe('サーバーを再起動')
expect(ja('Open the browser', 'ブラウザーを開く')).toBe('ブラウザを開く')
})
it('preserves translated Japanese Skills labels', () => {
expect(
ja(
'Filter by agent',
'エージェントで絞り込み',
'auto.components.skills.SkillsPage.filterProvider'
)
).toBe('エージェントで絞り込み')
})
it('preserves the native chat subagent label', () => {
expect(ja('Subagent', 'サブエージェント', 'components.native-chat.tool.row.subagent')).toBe(
'サブエージェント'
)
})
it('leaves ranges and token samples out of the ellipsis rule', () => {
expect(ja('Compare main...HEAD', 'main...HEAD を比較')).toBe('main...HEAD を比較')
})
it('spaces the Latin terms the phrase fixes write back in', () => {
expect(ja('Clear cookies', 'クッキーを消去')).toBe('Cookie を消去')
expect(ja('Safely fast-forward the branch', 'ブランチを安全に早送りします')).toBe(
'ブランチを安全に fast-forward します'
)
})
it('uses ホスト for host, and leaves サーバー alone when English says server', () => {
expect(ja('Host path', 'サーバーパス')).toBe('ホストパス')
expect(ja('Enter a path that exists on the selected host.', 'ランタイムサーバー上のパス')).toBe(
'ホスト上のパス'
)
// Why: host and server are deliberately distinct wherever the English uses both.
expect(ja('Save the server host', 'サーバーを保存')).toBe('サーバーを保存')
})
it('restores Git vocabulary and brand names the MT localized', () => {
expect(ja('Branch upstream', 'ブランチの上流')).toBe('ブランチの upstream')
expect(ja('origin has commits', '起源にコミットがあります')).toBe('origin にコミットがあります')
expect(ja('Discard all staged changes?', '段階的な変更を破棄しますか?')).toBe(
'ステージ済みの変更を破棄しますか?'
)
expect(ja('Create Hermes automation', 'エルメスオートメーションを作成')).toBe(
'Hermes オートメーションを作成'
)
expect(ja('Delete the worktree', 'worktree を削除')).toBe('ワークツリーを削除')
})
it('keeps class strings, refs, and fixture filenames in English', () => {
for (const value of [
'size-4 text-muted-foreground',
'text-amber-700 dark:text-amber-300',
'origin/main',
'upstream/main',
'login.spec.ts',
'bastion.example.com'
]) {
expect(shouldPreserveEnglishValue(value)).toBe(true)
}
})
it('preserves a selector that has no declaration block', () => {
for (const value of [
'div.pricing-grid > div.card.starter:nth-of-type(1) > a.cta',
@@ -1,157 +0,0 @@
import { describe, expect, it } from 'vitest'
import { repairTranslatedValue } from './locale-translation-policy.mjs'
describe('locale-translation-policy ja round 5', () => {
it('fixes inline, launch, action, MR, and status chip regressions', () => {
expect(
repairTranslatedValue({
key: 'auto.components.GitHubItemDialog.6e43a16435',
enValue: 'Inline',
localeValue: '列をなして',
locale: 'ja'
})
).toBe('インライン')
expect(
repairTranslatedValue({
key: 'auto.components.repo.repo.icon.ecf63ec3ef',
enValue: 'Launch',
localeValue: '打ち上げ',
locale: 'ja'
})
).toBe('起動')
expect(
repairTranslatedValue({
key: 'auto.components.sidebar.workspace.status.2c19d1db33',
enValue: 'Play',
localeValue: '遊ぶ',
locale: 'ja'
})
).toBe('再生')
expect(
repairTranslatedValue({
key: 'auto.components.TaskPage.8396825a14',
enValue: 'Action',
localeValue: 'アクション',
locale: 'ja'
})
).toBe('操作')
expect(
repairTranslatedValue({
key: 'auto.components.TaskPage.456b8512da',
enValue: 'MergeRequest',
localeValue: 'マージリクエスト',
locale: 'ja'
})
).toBe('MR')
expect(
repairTranslatedValue({
key: 'auto.components.github.PRFilterDropdowns.7f1ba66c3e',
enValue: 'Reviewed by',
localeValue: 'レビュー者',
locale: 'ja'
})
).toBe('レビュアー')
expect(
repairTranslatedValue({
key: 'auto.components.sidebar.workspace.status.caebe3c10f',
enValue: 'Conductor Review',
localeValue: '指揮者のレビュー',
locale: 'ja'
})
).toBe('Conductor レビュー')
expect(
repairTranslatedValue({
key: 'auto.components.github.pr.merge.state.bf5e4c6c92',
enValue: 'Blocked',
localeValue: 'ブロック',
locale: 'ja'
})
).toBe('ブロック中')
expect(
repairTranslatedValue({
key: 'auto.components.settings.IntegrationsPane.027440e1cb',
enValue: 'Merge requests, issues, todos, and pipelines via the',
localeValue: 'リクエスト、イシュー、ToDo、パイプラインをマージします。',
locale: 'ja'
})
).toBe('MR、Issue、ToDo、パイプラインは')
expect(
repairTranslatedValue({
key: 'auto.components.GitLabItemDialog.98718490e4',
enValue: 'MR title is required.',
localeValue: 'MRの肩書きは必須です。',
locale: 'ja'
})
).toBe('MR タイトルは必須です。')
expect(
repairTranslatedValue({
key: 'auto.components.settings.terminal.search.d5e6c7fab1',
enValue: 'font features',
localeValue: 'フォントの特徴',
locale: 'ja'
})
).toBe('フォント特性')
expect(
repairTranslatedValue({
key: 'auto.components.GitHubItemDialog.f05d237049',
enValue: 'Add a project first',
localeValue: 'まずプロジェクトを追加してください',
locale: 'ja'
})
).toBe('まずプロジェクトを追加')
})
// Why: #12113 — brand names stay Latin, but generic workflow nouns keep their Japanese.
it('keeps brand names English and generic workflow terms translated', () => {
expect(
repairTranslatedValue({
key: 'auto.components.status.bar.WorkspaceSpaceManagerPanel.e9528a89b3',
enValue: 'Terminals',
localeValue: '端末',
locale: 'ja'
})
).toBe('ターミナル')
expect(
repairTranslatedValue({
key: 'auto.components.skills.SkillsPage.38e0951c3a',
enValue: 'Agent Skills',
localeValue: 'Agent のスキル',
locale: 'ja'
})
).toBe('Agent のスキル')
expect(
repairTranslatedValue({
key: 'auto.components.tab.bar.TabBar.3d5d6c960d',
enValue: 'New Markdown',
localeValue: '新規マークダウン',
locale: 'ja'
})
).toBe('新規 Markdown')
expect(
repairTranslatedValue({
key: 'auto.components.sidebar.local.base.ref.suggestion.toast.commits',
enValue: 'commits',
localeValue: 'コミット',
locale: 'ja'
})
).toBe('コミット')
expect(
repairTranslatedValue({
key: 'auto.components.mobile.slides.WorktreeListSlide.22971156df',
enValue: 'Repo',
localeValue: 'リポ',
locale: 'ja'
})
).toBe('リポ')
expect(
repairTranslatedValue({
key: 'auto.components.sidebar.add.repo.local.start.actions.fb4fc5380e',
enValue: 'Local project, Git repo, or folder with many repos',
localeValue:
'ローカル プロジェクト、Git リポジトリ、または多数のリポジトリを含むフォルダー',
locale: 'ja'
})
).toBe('ローカルプロジェクト、Git リポジトリ、または多数のリポジトリを含むフォルダー')
})
})
@@ -43,9 +43,6 @@ const COMPAT_SLOT_GLIBC_FLOOR = glibcFloorProfile(
[1, 3, 7]
)
// Lazy speech-worker sherpa prebuilt requires GCC11 GLIBCXX_3.4.29; exempt C++ floor only, retain glibc gate because it is not launch-critical.
const LIBSTDCXX_FLOOR_EXEMPT = /(?:^|[/\\])sherpa-onnx/
// VER_FLG_WEAK needs may resolve null and use fallback; they must not raise required floor.
const VER_FLG_WEAK = 0x2
@@ -118,15 +115,9 @@ function isLibstdcxxNode(name) {
return name.startsWith('GLIBCXX_') || name.startsWith('CXXABI_')
}
// Gate load-time requirements; exempt sherpa C++ needs only, never its glibc needs.
function findFloorViolations(needs, filePath = '', glibcFloor = DESKTOP_GLIBC_FLOOR) {
const exemptLibstdcxx = LIBSTDCXX_FLOOR_EXEMPT.test(filePath)
return needs.filter(
(need) =>
!need.weak &&
isVersionNodeAboveFloor(need.name, glibcFloor) &&
!(exemptLibstdcxx && isLibstdcxxNode(need.name))
)
// Gate load-time requirements; weak needs can resolve to null and fall back.
function findFloorViolations(needs, glibcFloor = DESKTOP_GLIBC_FLOOR) {
return needs.filter((need) => !need.weak && isVersionNodeAboveFloor(need.name, glibcFloor))
}
// Ubuntu20.04 keeps openpty/forkpty in libutil until glibc2.34 merge: require DT_NEEDED even when newer libc compat aliases satisfy link-time floor.
@@ -402,7 +393,7 @@ function verifyLinuxGlibcFloor(rootDir, options = {}) {
const { versionNeeds, neededLibraries, isStatic } = readDynamicInfo(filePath, objdumpPath)
const isMuslTarget = isMuslTemplatePayload(filePath, neededLibraries, versionNeeds)
// Remote musl payloads use their host's C++ runtime, not Ubuntu's libstdc++ or libutil.
const floorViolations = findFloorViolations(versionNeeds, filePath, glibcFloor).filter(
const floorViolations = findFloorViolations(versionNeeds, glibcFloor).filter(
(need) => !isMuslTarget || !isLibstdcxxNode(need.name)
)
// Inspect dynamic symbols only if relocated provider is absent from DT_NEEDED; healthy case avoids extra objdump.
@@ -13,20 +13,6 @@ const checks = [
args: ['test', '--package-path', 'native/computer-use-macos'],
enabled: process.platform === 'darwin'
},
{
name: 'Linux provider Python syntax',
command: 'python3',
args: [
'-c',
[
'import ast, pathlib',
'source=pathlib.Path("native/computer-use-linux/runtime.py").read_text(encoding="utf-8")',
'ast.parse(source)',
'print("syntax-ok")'
].join(';')
],
enabled: true
},
{
name: 'Linux snapshot renderer tests',
command: 'python3',
@@ -118,7 +118,6 @@ const NODE_RUNTIME_INCLUDE = [
'src/main/browser/cookies/sources/browser-cookie-import-undecryptable.test.ts',
'src/main/browser/cookies/sources/browser-cookie-source-partition.test.ts',
// Playwright's CDP transport needs Node's WebSocket implementation.
'src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-adapter-compatibility.electron.test.ts',
'src/main/browser/guest-lifecycle/popups/presentation/popup-origin-chrome.electron.test.ts',
'src/main/browser/guest-lifecycle/navigation/browser-link-materialization.electron.test.ts',
'src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-compatibility.electron.test.ts',
@@ -131,7 +131,6 @@ export const LINUX_PACKAGE_TESTS = [
'src/main/browser/client-pages/renderer/browser-client-page-renderer-lifecycle.electron.test.ts',
'src/main/persistence/profile-state/profile-state-writer-stall.electron.test.ts',
'src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-compatibility.electron.test.ts',
'src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-adapter-compatibility.electron.test.ts',
'src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-native-compatibility.electron.test.ts',
'src/main/browser/guest-lifecycle/popups/compatibility/browser-popup-background-compatibility.electron.test.ts',
'src/main/browser/extensions/api-runtime/browser-extension-api.electron.test.ts',
@@ -171,6 +170,7 @@ export const WINDOWS_BOUNDARY_TESTS = [
'src/shared/__tests__/process-host/windows-tree-kill-late-taskkill.win32.test.ts',
'src/shared/agent-launch/startup/omp-fresh-launch-cmd.win32.test.ts',
'src/shared/windows-batch-spawn.win32.test.ts',
'src/main/claude/structured/launch/claude-structured-child-env.test.ts',
'src/main/agent-hooks/installation/commands/windows-hook-payload-delivery.test.ts',
'src/main/agent-hooks/installation/scripts/managed-hook-stdin-lifecycle.test.ts',
'src/main/jcode/hook-gate-script.test.ts',
+4 -4
View File
@@ -1,5 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="113" height="20" role="img" aria-label="downloads: 161m">
<title>downloads: 161m</title>
<svg xmlns="http://www.w3.org/2000/svg" width="113" height="20" role="img" aria-label="downloads: 162m">
<title>downloads: 162m</title>
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
@@ -15,7 +15,7 @@
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="11">
<text x="37" y="15" fill="#010101" fill-opacity=".3">downloads</text>
<text x="37" y="14">downloads</text>
<text x="93.5" y="15" fill="#010101" fill-opacity=".3">161m</text>
<text x="93.5" y="14">161m</text>
<text x="93.5" y="15" fill="#010101" fill-opacity=".3">162m</text>
<text x="93.5" y="14">162m</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 943 B

After

Width:  |  Height:  |  Size: 943 B

+31 -25
View File
@@ -20,6 +20,8 @@ import { HostSidebarRevealContext } from '../../src/layout/host-sidebar-reveal'
import { HostAreaServingContext } from '../../src/mobile-web-shell/host-area-serving'
import { usePageOwnsHostArea } from '../../src/mobile-web-shell/page-owns-host-area'
import { isOverlayPageRoute } from '../../src/new-workspace/overlay-page-route'
import { MobileDictationHostProvider } from '../../src/dictation/mobile-dictation-host'
import { MobileDictationPillLayer } from '../../src/dictation/MobileDictationPill'
// Keep at least this much room for the detail pane when resizing the sidebar.
const MIN_DETAIL_WIDTH = 320
@@ -121,33 +123,37 @@ export default function HostGroupLayout() {
// Keep detail Stack at a stable tree position so fold/rotation cannot remount navigation.
return (
<HostProtocolGate hostId={hostId} transparentWhilePending={overlayRoute}>
<View style={[styles.row, overlayRoute && styles.transparent]}>
{showSidebar && (sidebarOpen || foldSidebarWidth !== null) ? (
<View style={[styles.sidebar, { width: foldSidebarWidth ?? sidebarWidth }]}>
<HostScreen
embedded
hostId={hostId}
onHideSidebar={canCollapseSidebar ? hideSidebar : undefined}
/>
{/* Edge drag handle captures Android gestures above the list. */}
{foldSidebarWidth === null ? (
<View style={styles.resizeHandle} {...resizer.panHandlers} />
) : null}
{/* One dictation per host document, outliving the session screen that started it. */}
<MobileDictationHostProvider>
<View style={[styles.row, overlayRoute && styles.transparent]}>
{showSidebar && (sidebarOpen || foldSidebarWidth !== null) ? (
<View style={[styles.sidebar, { width: foldSidebarWidth ?? sidebarWidth }]}>
<HostScreen
embedded
hostId={hostId}
onHideSidebar={canCollapseSidebar ? hideSidebar : undefined}
/>
{/* Edge drag handle captures Android gestures above the list. */}
{foldSidebarWidth === null ? (
<View style={styles.resizeHandle} {...resizer.panHandlers} />
) : null}
</View>
) : null}
{foldGap > 0 ? <View style={{ width: foldGap }} /> : null}
<View style={styles.detail}>
<HostAreaServingContext.Provider value={setHostAreaServing}>
<HostSidebarRevealContext.Provider
value={
showSidebar && !sidebarOpen && foldSidebarWidth === null ? revealSidebar : null
}
>
<HostStack animation={showSidebar ? 'none' : 'default'} />
</HostSidebarRevealContext.Provider>
</HostAreaServingContext.Provider>
</View>
) : null}
{foldGap > 0 ? <View style={{ width: foldGap }} /> : null}
<View style={styles.detail}>
<HostAreaServingContext.Provider value={setHostAreaServing}>
<HostSidebarRevealContext.Provider
value={
showSidebar && !sidebarOpen && foldSidebarWidth === null ? revealSidebar : null
}
>
<HostStack animation={showSidebar ? 'none' : 'default'} />
</HostSidebarRevealContext.Provider>
</HostAreaServingContext.Provider>
</View>
</View>
<MobileDictationPillLayer />
</MobileDictationHostProvider>
</HostProtocolGate>
)
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -4,6 +4,16 @@
"family": "session.pr-sidebar",
"namedDeltas": [],
"values": {
"0730389db3e9": {
"name": "hostedReview.forBranch#1",
"ordinal": 7,
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}"
},
"0d9f7988ff86": {
"name": "github.prChecks#1",
"ordinal": 13,
"json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}"
},
"1287167eaf56": {
"name": "github.repoSlug#1",
"ordinal": 1,
@@ -39,21 +49,11 @@
}
}
},
"1723d8a5d8be": {
"name": "github.workItemDetails#1",
"ordinal": 15,
"json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}"
},
"1f5765918736": {
"name": "github.repoSlug#1",
"ordinal": 2,
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}"
},
"2bb452e534eb": {
"name": "github.prChecks#1",
"ordinal": 12,
"json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}"
},
"2c045643bad3": {
"name": "github.repoSlug#1",
"ordinal": 1,
@@ -88,6 +88,42 @@
}
}
},
"2dc2ca47b4e7": {
"name": "github.prForBranch#1",
"ordinal": 9,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"30a3a771295b": {
"name": "github.repoSlug#1",
"ordinal": 1,
@@ -127,31 +163,39 @@
"kind": "loading"
}
},
"3b5c096da2a3": {
"name": "hostedReview.forBranch#1",
"357f9b7862e3": {
"name": "worktree.show#1",
"ordinal": 6,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}"
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}"
},
"8352e3c99668": {
"name": "status.get#1",
"ordinal": 11,
"3a8e6b13f380": {
"name": "github.prForBranch#1",
"ordinal": 10,
"json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}"
},
"3ecc2d44a209": {
"name": "runtime.clientEvents.subscribe#1",
"ordinal": 3,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}"
},
"4da7ea39401b": {
"name": "worktree.show#1",
"ordinal": 4,
"args": [
{
"name": "method",
"value": "status.get"
"value": "worktree.show"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
"worktree": "id:repo-9::/w"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
"failWhenDisconnected": true
}
}
],
@@ -160,10 +204,64 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-6",
"id": "frame-3",
"ok": true,
"result": {
"runtimeId": "recorded"
"worktree": {
"linkedPR": {
"$rpc": "null"
}
}
}
}
}
},
"5d309fcf43a7": {
"name": "github.workItemDetails#1",
"ordinal": 16,
"json": "{\"id\":\"frame-8\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}"
},
"75885386f005": {
"name": "hostedReview.forBranch#1",
"ordinal": 5,
"args": [
{
"name": "method",
"value": "hostedReview.forBranch"
},
{
"name": "params",
"value": {
"active": true,
"branch": "feature",
"linkedGitHubPR": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-4",
"ok": true,
"result": {
"mergeable": "MERGEABLE",
"number": 12,
"provider": "github",
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
@@ -205,6 +303,75 @@
}
}
},
"861c8796ae1f": {
"name": "github.prChecks#1",
"ordinal": 11,
"args": [
{
"name": "method",
"value": "github.prChecks"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-6",
"ok": true,
"result": [
{
"checkRunId": 7,
"conclusion": "success",
"name": "build",
"status": "completed"
}
]
}
}
},
"870c2b9bacd0": {
"name": "status.get#1",
"ordinal": 12,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"87a169b1b8d4": {
"name": "github.repoSlug#1",
"ordinal": 1,
@@ -240,26 +407,26 @@
}
}
},
"87ba39148f02": {
"name": "github.prChecks#1",
"ordinal": 10,
"8b7e690466d7": {
"name": "status.get#1",
"ordinal": 12,
"args": [
{
"name": "method",
"value": "github.prChecks"
"value": "status.get"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
@@ -268,16 +435,11 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-5",
"id": "frame-7",
"ok": true,
"result": [
{
"checkRunId": 7,
"conclusion": "success",
"name": "build",
"status": "completed"
}
]
"result": {
"runtimeId": "recorded"
}
}
}
},
@@ -348,46 +510,85 @@
}
}
},
"9c952632b0c0": {
"name": "status.get#1",
"ordinal": 11,
"9091d133c3b0": {
"name": "reply-salvage",
"ordinal": 8,
"value": {
"droppedCount": 1,
"droppedPaths": ["linkedPR"],
"method": "worktree.show",
"operation": "worktree.summary-or-skip",
"variant": "worktree-summary"
}
},
"a55c83eeaeea": {
"name": "github.prForBranch#1",
"ordinal": 9,
"args": [
{
"name": "method",
"value": "status.get"
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-5",
"ok": true,
"result": {
"fetchedAt": 0,
"kind": "found",
"pr": {
"headSha": "head-sha-1",
"mergeable": "MERGEABLE",
"number": 12,
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"a0729c676b9a": {
"name": "worktree.show#1",
"ordinal": 3,
"a7e609fcb031": {
"name": "github.prChecks#1",
"ordinal": 11,
"args": [
{
"name": "method",
"value": "worktree.show"
"value": "github.prChecks"
},
{
"name": "params",
"value": {
"worktree": "id:repo-9::/w"
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
}
},
{
@@ -398,20 +599,8 @@
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-2",
"ok": true,
"result": {
"worktree": {
"linkedPR": {
"$rpc": "null"
}
}
}
}
"status": "pending",
"startedAt": 0
}
},
"abae46078fe1": {
@@ -446,47 +635,6 @@
}
}
},
"abcf3bdc5cde": {
"name": "status.get#1",
"ordinal": 13,
"json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
},
"b3a7ec3ab1c7": {
"name": "github.prForBranch#1",
"ordinal": 8,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"b77761a8ce16": {
"name": "github.repoSlug#1",
"ordinal": 1,
@@ -557,6 +705,69 @@
}
}
},
"bfedf583a747": {
"name": "github.workItemDetails#1",
"ordinal": 15,
"args": [
{
"name": "method",
"value": "github.workItemDetails"
},
{
"name": "params",
"value": {
"number": 12,
"repo": "id:repo-9",
"type": "pr"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-8",
"ok": true,
"result": {
"body": "body",
"comments": [
{
"author": "rev",
"body": "please fix",
"createdAt": "2026-01-01T00:00:00Z",
"id": 55,
"isResolved": false,
"line": 3,
"path": "src/app.ts",
"threadId": "thread-1",
"url": "https://github.com/owner/repo/pull/12#discussion_r55"
}
],
"headSha": "head-sha-1",
"item": {
"assignees": [],
"id": "PR_1",
"labels": [],
"number": 12,
"state": "open",
"title": "Recorded",
"type": "pr",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"c1bb3c2243f0": {
"name": "github.repoSlug#1",
"ordinal": 1,
@@ -591,206 +802,16 @@
}
}
},
"c2f3182f1780": {
"name": "github.prForBranch#1",
"ordinal": 8,
"args": [
"c70e6fd19823": {
"name": "streams-registered-at-teardown",
"ordinal": 17,
"value": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
"cancelled": true,
"method": "runtime.clientEvents.subscribe",
"payload": "runtime.clientEvents.subscribe#1"
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-4",
"ok": true,
"result": {
"fetchedAt": 0,
"kind": "found",
"pr": {
"headSha": "head-sha-1",
"mergeable": "MERGEABLE",
"number": 12,
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"c79bbd27f177": {
"name": "hostedReview.forBranch#1",
"ordinal": 4,
"args": [
{
"name": "method",
"value": "hostedReview.forBranch"
},
{
"name": "params",
"value": {
"active": true,
"branch": "feature",
"linkedGitHubPR": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-3",
"ok": true,
"result": {
"mergeable": "MERGEABLE",
"number": 12,
"provider": "github",
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
},
"cb071b912510": {
"name": "github.prChecks#1",
"ordinal": 10,
"args": [
{
"name": "method",
"value": "github.prChecks"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"d3426861162d": {
"name": "github.workItemDetails#1",
"ordinal": 14,
"args": [
{
"name": "method",
"value": "github.workItemDetails"
},
{
"name": "params",
"value": {
"number": 12,
"repo": "id:repo-9",
"type": "pr"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-7",
"ok": true,
"result": {
"body": "body",
"comments": [
{
"author": "rev",
"body": "please fix",
"createdAt": "2026-01-01T00:00:00Z",
"id": 55,
"isResolved": false,
"line": 3,
"path": "src/app.ts",
"threadId": "thread-1",
"url": "https://github.com/owner/repo/pull/12#discussion_r55"
}
],
"headSha": "head-sha-1",
"item": {
"assignees": [],
"id": "PR_1",
"labels": [],
"number": 12,
"state": "open",
"title": "Recorded",
"type": "pr",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"d3d85b61b684": {
"name": "reply-salvage",
"ordinal": 7,
"value": {
"droppedCount": 1,
"droppedPaths": ["linkedPR"],
"method": "worktree.show",
"operation": "worktree.summary-or-skip",
"variant": "worktree-summary"
}
]
},
"e0a11d8a1005": {
"commentError": {
@@ -817,10 +838,10 @@
"refreshFailed": false
}
},
"ea4c904bfb5f": {
"name": "worktree.show#1",
"ordinal": 5,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}"
"e10925fa98de": {
"name": "status.get#1",
"ordinal": 14,
"json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
},
"ead3ad184e51": {
"commentError": {
@@ -837,11 +858,6 @@
"value": {
"$rpc": "undefined"
}
},
"fcced642024c": {
"name": "github.prForBranch#1",
"ordinal": 9,
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}"
}
},
"recording": {
@@ -850,13 +866,19 @@
{
"id": "pr-sidebar-load.normal:branch-hint",
"observation": {
"sender": ["1287167eaf56", "a0729c676b9a", "c79bbd27f177", "b3a7ec3ab1c7"],
"payloads": ["1f5765918736", "ea4c904bfb5f", "3b5c096da2a3", "fcced642024c"],
"sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"],
"payloads": [
"1f5765918736",
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "35045fa5a752",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -864,25 +886,26 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"cb071b912510",
"9c952632b0c0"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"a7e609fcb031",
"870c2b9bacd0"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "35045fa5a752",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -890,27 +913,57 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"87ba39148f02",
"8352e3c99668",
"d3426861162d"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde",
"1723d8a5d8be"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "e0a11d8a1005",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
"id": "pr-sidebar-load.normal:cleanup",
"observation": {
"sender": [
"1287167eaf56",
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747"
],
"payloads": [
"1f5765918736",
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "e0a11d8a1005",
"effects": ["9091d133c3b0", "c70e6fd19823"]
}
},
{
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -4,6 +4,16 @@
"family": "session.pr-sidebar",
"namedDeltas": [],
"values": {
"0730389db3e9": {
"name": "hostedReview.forBranch#1",
"ordinal": 7,
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}"
},
"0d9f7988ff86": {
"name": "github.prChecks#1",
"ordinal": 13,
"json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}"
},
"1287167eaf56": {
"name": "github.repoSlug#1",
"ordinal": 1,
@@ -39,82 +49,9 @@
}
}
},
"1723d8a5d8be": {
"name": "github.workItemDetails#1",
"ordinal": 15,
"json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}"
},
"19ddadf49030": {
"name": "github.addIssueComment#1",
"ordinal": 16,
"args": [
{
"name": "method",
"value": "github.addIssueComment"
},
{
"name": "params",
"value": {
"body": "recorded comment",
"number": 12,
"repo": "id:repo-9",
"type": "pr"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-8",
"ok": true,
"result": {
"comment": {
"id": 57
},
"ok": true
}
}
}
},
"1f5765918736": {
"name": "github.repoSlug#1",
"ordinal": 2,
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}"
},
"2bb452e534eb": {
"name": "github.prChecks#1",
"ordinal": 12,
"json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}"
},
"35045fa5a752": {
"commentError": {
"$rpc": "null"
},
"pr": {
"kind": "loading"
}
},
"39b9c8ebcce5": {
"name": "github.addIssueComment#1",
"ordinal": 17,
"json": "{\"id\":\"frame-8\",\"deviceToken\":\"recording-device\",\"method\":\"github.addIssueComment\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"body\":\"recorded comment\",\"type\":\"pr\"}}"
},
"3b5c096da2a3": {
"name": "hostedReview.forBranch#1",
"ordinal": 6,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}"
},
"3eeb7e426600": {
"1e1163c70eba": {
"name": "github.prComments#1",
"ordinal": 18,
"ordinal": 19,
"args": [
{
"name": "method",
@@ -145,67 +82,80 @@
"startedAt": 0
}
},
"6f75be8d77df": {
"name": "github.prComments#1",
"ordinal": 19,
"json": "{\"id\":\"frame-9\",\"deviceToken\":\"recording-device\",\"method\":\"github.prComments\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"noCache\":true,\"prRepo\":{\"owner\":\"owner\",\"repo\":\"repo\",\"host\":\"github.com\"}}}"
"1f5765918736": {
"name": "github.repoSlug#1",
"ordinal": 2,
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}"
},
"8352e3c99668": {
"name": "status.get#1",
"ordinal": 11,
"2dc2ca47b4e7": {
"name": "github.prForBranch#1",
"ordinal": 9,
"args": [
{
"name": "method",
"value": "status.get"
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-6",
"ok": true,
"result": {
"runtimeId": "recorded"
}
}
"status": "pending",
"startedAt": 0
}
},
"84e5ca07cb7a": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": true
"35045fa5a752": {
"commentError": {
"$rpc": "null"
},
"pr": {
"kind": "loading"
}
},
"87ba39148f02": {
"name": "github.prChecks#1",
"357f9b7862e3": {
"name": "worktree.show#1",
"ordinal": 6,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}"
},
"3a8e6b13f380": {
"name": "github.prForBranch#1",
"ordinal": 10,
"json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}"
},
"3b2df6b54829": {
"name": "github.addIssueComment#1",
"ordinal": 17,
"args": [
{
"name": "method",
"value": "github.prChecks"
"value": "github.addIssueComment"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
"body": "recorded comment",
"number": 12,
"repo": "id:repo-9",
"type": "pr"
}
},
{
@@ -220,54 +170,25 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-5",
"id": "frame-9",
"ok": true,
"result": [
{
"checkRunId": 7,
"conclusion": "success",
"name": "build",
"status": "completed"
}
]
"result": {
"comment": {
"id": 57
},
"ok": true
}
}
}
},
"9270aeb7d9c6": {
"status": "pending",
"startedAt": 0
},
"9c952632b0c0": {
"name": "status.get#1",
"ordinal": 11,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"a0729c676b9a": {
"name": "worktree.show#1",
"3ecc2d44a209": {
"name": "runtime.clientEvents.subscribe#1",
"ordinal": 3,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}"
},
"4da7ea39401b": {
"name": "worktree.show#1",
"ordinal": 4,
"args": [
{
"name": "method",
@@ -291,7 +212,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-2",
"id": "frame-3",
"ok": true,
"result": {
"worktree": {
@@ -303,104 +224,14 @@
}
}
},
"abcf3bdc5cde": {
"name": "status.get#1",
"ordinal": 13,
"json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
"5d309fcf43a7": {
"name": "github.workItemDetails#1",
"ordinal": 16,
"json": "{\"id\":\"frame-8\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}"
},
"b3a7ec3ab1c7": {
"name": "github.prForBranch#1",
"ordinal": 8,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"c2f3182f1780": {
"name": "github.prForBranch#1",
"ordinal": 8,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-4",
"ok": true,
"result": {
"fetchedAt": 0,
"kind": "found",
"pr": {
"headSha": "head-sha-1",
"mergeable": "MERGEABLE",
"number": 12,
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"c79bbd27f177": {
"75885386f005": {
"name": "hostedReview.forBranch#1",
"ordinal": 4,
"ordinal": 5,
"args": [
{
"name": "method",
@@ -429,7 +260,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-3",
"id": "frame-4",
"ok": true,
"result": {
"mergeable": "MERGEABLE",
@@ -443,9 +274,210 @@
}
}
},
"cb071b912510": {
"7881ab1fb5d1": {
"name": "github.addIssueComment#1",
"ordinal": 18,
"json": "{\"id\":\"frame-9\",\"deviceToken\":\"recording-device\",\"method\":\"github.addIssueComment\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"body\":\"recorded comment\",\"type\":\"pr\"}}"
},
"84e5ca07cb7a": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": true
},
"861c8796ae1f": {
"name": "github.prChecks#1",
"ordinal": 10,
"ordinal": 11,
"args": [
{
"name": "method",
"value": "github.prChecks"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-6",
"ok": true,
"result": [
{
"checkRunId": 7,
"conclusion": "success",
"name": "build",
"status": "completed"
}
]
}
}
},
"870c2b9bacd0": {
"name": "status.get#1",
"ordinal": 12,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"8b7e690466d7": {
"name": "status.get#1",
"ordinal": 12,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-7",
"ok": true,
"result": {
"runtimeId": "recorded"
}
}
}
},
"8f35f3a8538e": {
"name": "github.prComments#1",
"ordinal": 20,
"json": "{\"id\":\"frame-10\",\"deviceToken\":\"recording-device\",\"method\":\"github.prComments\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"noCache\":true,\"prRepo\":{\"owner\":\"owner\",\"repo\":\"repo\",\"host\":\"github.com\"}}}"
},
"9091d133c3b0": {
"name": "reply-salvage",
"ordinal": 8,
"value": {
"droppedCount": 1,
"droppedPaths": ["linkedPR"],
"method": "worktree.show",
"operation": "worktree.summary-or-skip",
"variant": "worktree-summary"
}
},
"9270aeb7d9c6": {
"status": "pending",
"startedAt": 0
},
"9be162e088f2": {
"name": "streams-registered-at-teardown",
"ordinal": 21,
"value": [
{
"cancelled": true,
"method": "runtime.clientEvents.subscribe",
"payload": "runtime.clientEvents.subscribe#1"
}
]
},
"a55c83eeaeea": {
"name": "github.prForBranch#1",
"ordinal": 9,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-5",
"ok": true,
"result": {
"fetchedAt": 0,
"kind": "found",
"pr": {
"headSha": "head-sha-1",
"mergeable": "MERGEABLE",
"number": 12,
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"a7e609fcb031": {
"name": "github.prChecks#1",
"ordinal": 11,
"args": [
{
"name": "method",
@@ -471,9 +503,9 @@
"startedAt": 0
}
},
"d3426861162d": {
"bfedf583a747": {
"name": "github.workItemDetails#1",
"ordinal": 14,
"ordinal": 15,
"args": [
{
"name": "method",
@@ -501,7 +533,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-7",
"id": "frame-8",
"ok": true,
"result": {
"body": "body",
@@ -564,17 +596,6 @@
"refreshFailed": false
}
},
"d3d85b61b684": {
"name": "reply-salvage",
"ordinal": 7,
"value": {
"droppedCount": 1,
"droppedPaths": ["linkedPR"],
"method": "worktree.show",
"operation": "worktree.summary-or-skip",
"variant": "worktree-summary"
}
},
"e0a11d8a1005": {
"commentError": {
"$rpc": "null"
@@ -600,22 +621,14 @@
"refreshFailed": false
}
},
"ea4c904bfb5f": {
"name": "worktree.show#1",
"ordinal": 5,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}"
"e10925fa98de": {
"name": "status.get#1",
"ordinal": 14,
"json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
},
"eb79a9b3682a": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"$rpc": "undefined"
}
},
"f742d75db77c": {
"e40828b3dc78": {
"name": "github.prComments#1",
"ordinal": 18,
"ordinal": 19,
"args": [
{
"name": "method",
@@ -646,7 +659,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-9",
"id": "frame-10",
"ok": true,
"result": [
{
@@ -671,10 +684,13 @@
}
}
},
"fcced642024c": {
"name": "github.prForBranch#1",
"ordinal": 9,
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}"
"eb79a9b3682a": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"$rpc": "undefined"
}
}
},
"recording": {
@@ -683,13 +699,19 @@
{
"id": "branch-hint",
"observation": {
"sender": ["1287167eaf56", "a0729c676b9a", "c79bbd27f177", "b3a7ec3ab1c7"],
"payloads": ["1f5765918736", "ea4c904bfb5f", "3b5c096da2a3", "fcced642024c"],
"sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"],
"payloads": [
"1f5765918736",
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "35045fa5a752",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -697,25 +719,26 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"cb071b912510",
"9c952632b0c0"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"a7e609fcb031",
"870c2b9bacd0"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "35045fa5a752",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -723,27 +746,28 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"87ba39148f02",
"8352e3c99668",
"d3426861162d"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde",
"1723d8a5d8be"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "e0a11d8a1005",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -751,32 +775,33 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"87ba39148f02",
"8352e3c99668",
"d3426861162d",
"19ddadf49030",
"3eeb7e426600"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747",
"3b2df6b54829",
"1e1163c70eba"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde",
"1723d8a5d8be",
"39b9c8ebcce5",
"6f75be8d77df"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7",
"7881ab1fb5d1",
"8f35f3a8538e"
],
"settlements": {
"mount": "eb79a9b3682a",
"post-comment": "9270aeb7d9c6"
},
"state": "e0a11d8a1005",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -784,32 +809,67 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"87ba39148f02",
"8352e3c99668",
"d3426861162d",
"19ddadf49030",
"f742d75db77c"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747",
"3b2df6b54829",
"e40828b3dc78"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde",
"1723d8a5d8be",
"39b9c8ebcce5",
"6f75be8d77df"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7",
"7881ab1fb5d1",
"8f35f3a8538e"
],
"settlements": {
"mount": "eb79a9b3682a",
"post-comment": "84e5ca07cb7a"
},
"state": "d39b1bf1038a",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
"id": "cleanup",
"observation": {
"sender": [
"1287167eaf56",
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747",
"3b2df6b54829",
"e40828b3dc78"
],
"payloads": [
"1f5765918736",
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7",
"7881ab1fb5d1",
"8f35f3a8538e"
],
"settlements": {
"mount": "eb79a9b3682a",
"post-comment": "84e5ca07cb7a"
},
"state": "d39b1bf1038a",
"effects": ["9091d133c3b0", "9be162e088f2"]
}
}
]
@@ -4,6 +4,11 @@
"family": "session.pr-sidebar",
"namedDeltas": [],
"values": {
"0730389db3e9": {
"name": "hostedReview.forBranch#1",
"ordinal": 7,
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}"
},
"0ab0279ef3fe": {
"commentError": "Resource not accessible by integration",
"pr": {
@@ -27,6 +32,11 @@
"refreshFailed": false
}
},
"0d9f7988ff86": {
"name": "github.prChecks#1",
"ordinal": 13,
"json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}"
},
"1287167eaf56": {
"name": "github.repoSlug#1",
"ordinal": 1,
@@ -62,11 +72,6 @@
}
}
},
"1723d8a5d8be": {
"name": "github.workItemDetails#1",
"ordinal": 15,
"json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}"
},
"18a67e1b19d6": {
"commentError": {
"$rpc": "null"
@@ -97,14 +102,63 @@
"ordinal": 2,
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}"
},
"2bb452e534eb": {
"name": "github.prChecks#1",
"ordinal": 12,
"json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}"
"2dc2ca47b4e7": {
"name": "github.prForBranch#1",
"ordinal": 9,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"3362c89b344f": {
"35045fa5a752": {
"commentError": {
"$rpc": "null"
},
"pr": {
"kind": "loading"
}
},
"357f9b7862e3": {
"name": "worktree.show#1",
"ordinal": 6,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}"
},
"3a8e6b13f380": {
"name": "github.prForBranch#1",
"ordinal": 10,
"json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}"
},
"3d6c69a8143e": {
"name": "github.resolveReviewThread#1",
"ordinal": 16,
"ordinal": 17,
"args": [
{
"name": "method",
@@ -134,175 +188,19 @@
"code": "upstream_error",
"message": "Resource not accessible by integration"
},
"id": "frame-8",
"id": "frame-9",
"ok": false
}
}
},
"35045fa5a752": {
"commentError": {
"$rpc": "null"
},
"pr": {
"kind": "loading"
}
},
"3b5c096da2a3": {
"name": "hostedReview.forBranch#1",
"ordinal": 6,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}"
},
"61c7e519a6dc": {
"name": "github.resolveReviewThread#1",
"ordinal": 17,
"json": "{\"id\":\"frame-8\",\"deviceToken\":\"recording-device\",\"method\":\"github.resolveReviewThread\",\"params\":{\"repo\":\"id:repo-9\",\"threadId\":\"thread-1\",\"resolve\":true}}"
},
"7ed3d39f0607": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": false
},
"8352e3c99668": {
"name": "status.get#1",
"ordinal": 11,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-6",
"ok": true,
"result": {
"runtimeId": "recorded"
}
}
}
},
"87ba39148f02": {
"name": "github.prChecks#1",
"ordinal": 10,
"args": [
{
"name": "method",
"value": "github.prChecks"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-5",
"ok": true,
"result": [
{
"checkRunId": 7,
"conclusion": "success",
"name": "build",
"status": "completed"
}
]
}
}
},
"901052a1366a": {
"name": "github.resolveReviewThread#1",
"ordinal": 16,
"args": [
{
"name": "method",
"value": "github.resolveReviewThread"
},
{
"name": "params",
"value": {
"repo": "id:repo-9",
"resolve": true,
"threadId": "thread-1"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"9270aeb7d9c6": {
"status": "pending",
"startedAt": 0
},
"9c952632b0c0": {
"name": "status.get#1",
"ordinal": 11,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"a0729c676b9a": {
"name": "worktree.show#1",
"3ecc2d44a209": {
"name": "runtime.clientEvents.subscribe#1",
"ordinal": 3,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}"
},
"4da7ea39401b": {
"name": "worktree.show#1",
"ordinal": 4,
"args": [
{
"name": "method",
@@ -326,7 +224,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-2",
"id": "frame-3",
"ok": true,
"result": {
"worktree": {
@@ -338,104 +236,14 @@
}
}
},
"abcf3bdc5cde": {
"name": "status.get#1",
"ordinal": 13,
"json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
"5d309fcf43a7": {
"name": "github.workItemDetails#1",
"ordinal": 16,
"json": "{\"id\":\"frame-8\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}"
},
"b3a7ec3ab1c7": {
"name": "github.prForBranch#1",
"ordinal": 8,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"c2f3182f1780": {
"name": "github.prForBranch#1",
"ordinal": 8,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-4",
"ok": true,
"result": {
"fetchedAt": 0,
"kind": "found",
"pr": {
"headSha": "head-sha-1",
"mergeable": "MERGEABLE",
"number": 12,
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"c79bbd27f177": {
"75885386f005": {
"name": "hostedReview.forBranch#1",
"ordinal": 4,
"ordinal": 5,
"args": [
{
"name": "method",
@@ -464,7 +272,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-3",
"id": "frame-4",
"ok": true,
"result": {
"mergeable": "MERGEABLE",
@@ -478,9 +286,217 @@
}
}
},
"cb071b912510": {
"7ed3d39f0607": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": false
},
"84983e28731b": {
"name": "github.resolveReviewThread#1",
"ordinal": 17,
"args": [
{
"name": "method",
"value": "github.resolveReviewThread"
},
{
"name": "params",
"value": {
"repo": "id:repo-9",
"resolve": true,
"threadId": "thread-1"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"861c8796ae1f": {
"name": "github.prChecks#1",
"ordinal": 10,
"ordinal": 11,
"args": [
{
"name": "method",
"value": "github.prChecks"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-6",
"ok": true,
"result": [
{
"checkRunId": 7,
"conclusion": "success",
"name": "build",
"status": "completed"
}
]
}
}
},
"870c2b9bacd0": {
"name": "status.get#1",
"ordinal": 12,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"8b7e690466d7": {
"name": "status.get#1",
"ordinal": 12,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-7",
"ok": true,
"result": {
"runtimeId": "recorded"
}
}
}
},
"9091d133c3b0": {
"name": "reply-salvage",
"ordinal": 8,
"value": {
"droppedCount": 1,
"droppedPaths": ["linkedPR"],
"method": "worktree.show",
"operation": "worktree.summary-or-skip",
"variant": "worktree-summary"
}
},
"9270aeb7d9c6": {
"status": "pending",
"startedAt": 0
},
"a55c83eeaeea": {
"name": "github.prForBranch#1",
"ordinal": 9,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-5",
"ok": true,
"result": {
"fetchedAt": 0,
"kind": "found",
"pr": {
"headSha": "head-sha-1",
"mergeable": "MERGEABLE",
"number": 12,
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"a7e609fcb031": {
"name": "github.prChecks#1",
"ordinal": 11,
"args": [
{
"name": "method",
@@ -506,9 +522,9 @@
"startedAt": 0
}
},
"d3426861162d": {
"bfedf583a747": {
"name": "github.workItemDetails#1",
"ordinal": 14,
"ordinal": 15,
"args": [
{
"name": "method",
@@ -536,7 +552,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-7",
"id": "frame-8",
"ok": true,
"result": {
"body": "body",
@@ -569,16 +585,10 @@
}
}
},
"d3d85b61b684": {
"name": "reply-salvage",
"ordinal": 7,
"value": {
"droppedCount": 1,
"droppedPaths": ["linkedPR"],
"method": "worktree.show",
"operation": "worktree.summary-or-skip",
"variant": "worktree-summary"
}
"c11667112704": {
"name": "github.resolveReviewThread#1",
"ordinal": 18,
"json": "{\"id\":\"frame-9\",\"deviceToken\":\"recording-device\",\"method\":\"github.resolveReviewThread\",\"params\":{\"repo\":\"id:repo-9\",\"threadId\":\"thread-1\",\"resolve\":true}}"
},
"e0a11d8a1005": {
"commentError": {
@@ -605,10 +615,10 @@
"refreshFailed": false
}
},
"ea4c904bfb5f": {
"name": "worktree.show#1",
"ordinal": 5,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}"
"e10925fa98de": {
"name": "status.get#1",
"ordinal": 14,
"json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
},
"eb79a9b3682a": {
"status": "fulfilled",
@@ -618,10 +628,16 @@
"$rpc": "undefined"
}
},
"fcced642024c": {
"name": "github.prForBranch#1",
"ordinal": 9,
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}"
"febdecd6dd97": {
"name": "streams-registered-at-teardown",
"ordinal": 19,
"value": [
{
"cancelled": true,
"method": "runtime.clientEvents.subscribe",
"payload": "runtime.clientEvents.subscribe#1"
}
]
}
},
"recording": {
@@ -630,13 +646,19 @@
{
"id": "branch-hint",
"observation": {
"sender": ["1287167eaf56", "a0729c676b9a", "c79bbd27f177", "b3a7ec3ab1c7"],
"payloads": ["1f5765918736", "ea4c904bfb5f", "3b5c096da2a3", "fcced642024c"],
"sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"],
"payloads": [
"1f5765918736",
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "35045fa5a752",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -644,25 +666,26 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"cb071b912510",
"9c952632b0c0"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"a7e609fcb031",
"870c2b9bacd0"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "35045fa5a752",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -670,27 +693,28 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"87ba39148f02",
"8352e3c99668",
"d3426861162d"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde",
"1723d8a5d8be"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "e0a11d8a1005",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -698,30 +722,31 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"87ba39148f02",
"8352e3c99668",
"d3426861162d",
"901052a1366a"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747",
"84983e28731b"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde",
"1723d8a5d8be",
"61c7e519a6dc"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7",
"c11667112704"
],
"settlements": {
"mount": "eb79a9b3682a",
"resolve-thread": "9270aeb7d9c6"
},
"state": "18a67e1b19d6",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -729,30 +754,63 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"87ba39148f02",
"8352e3c99668",
"d3426861162d",
"3362c89b344f"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747",
"3d6c69a8143e"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde",
"1723d8a5d8be",
"61c7e519a6dc"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7",
"c11667112704"
],
"settlements": {
"mount": "eb79a9b3682a",
"resolve-thread": "7ed3d39f0607"
},
"state": "0ab0279ef3fe",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
"id": "cleanup",
"observation": {
"sender": [
"1287167eaf56",
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747",
"3d6c69a8143e"
],
"payloads": [
"1f5765918736",
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7",
"c11667112704"
],
"settlements": {
"mount": "eb79a9b3682a",
"resolve-thread": "7ed3d39f0607"
},
"state": "0ab0279ef3fe",
"effects": ["9091d133c3b0", "febdecd6dd97"]
}
}
]
@@ -4,6 +4,16 @@
"family": "session.pr-sidebar",
"namedDeltas": [],
"values": {
"0730389db3e9": {
"name": "hostedReview.forBranch#1",
"ordinal": 7,
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}"
},
"0d9f7988ff86": {
"name": "github.prChecks#1",
"ordinal": 13,
"json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}"
},
"1287167eaf56": {
"name": "github.repoSlug#1",
"ordinal": 1,
@@ -39,20 +49,46 @@
}
}
},
"1723d8a5d8be": {
"name": "github.workItemDetails#1",
"ordinal": 15,
"json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}"
},
"1f5765918736": {
"name": "github.repoSlug#1",
"ordinal": 2,
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}"
},
"2bb452e534eb": {
"name": "github.prChecks#1",
"ordinal": 12,
"json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}"
"2dc2ca47b4e7": {
"name": "github.prForBranch#1",
"ordinal": 9,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"341c71d5f61d": {
"commentError": {
@@ -85,78 +121,24 @@
"kind": "loading"
}
},
"3b5c096da2a3": {
"name": "hostedReview.forBranch#1",
"ordinal": 6,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}"
},
"8352e3c99668": {
"name": "status.get#1",
"ordinal": 11,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-6",
"ok": true,
"result": {
"runtimeId": "recorded"
}
}
}
},
"9c952632b0c0": {
"name": "status.get#1",
"ordinal": 11,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"a0729c676b9a": {
"357f9b7862e3": {
"name": "worktree.show#1",
"ordinal": 6,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}"
},
"3a8e6b13f380": {
"name": "github.prForBranch#1",
"ordinal": 10,
"json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}"
},
"3ecc2d44a209": {
"name": "runtime.clientEvents.subscribe#1",
"ordinal": 3,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}"
},
"4da7ea39401b": {
"name": "worktree.show#1",
"ordinal": 4,
"args": [
{
"name": "method",
@@ -180,7 +162,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-2",
"id": "frame-3",
"ok": true,
"result": {
"worktree": {
@@ -192,104 +174,14 @@
}
}
},
"abcf3bdc5cde": {
"name": "status.get#1",
"ordinal": 13,
"json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
"5d309fcf43a7": {
"name": "github.workItemDetails#1",
"ordinal": 16,
"json": "{\"id\":\"frame-8\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}"
},
"b3a7ec3ab1c7": {
"name": "github.prForBranch#1",
"ordinal": 8,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"c2f3182f1780": {
"name": "github.prForBranch#1",
"ordinal": 8,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-4",
"ok": true,
"result": {
"fetchedAt": 0,
"kind": "found",
"pr": {
"headSha": "head-sha-1",
"mergeable": "MERGEABLE",
"number": 12,
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"c79bbd27f177": {
"75885386f005": {
"name": "hostedReview.forBranch#1",
"ordinal": 4,
"ordinal": 5,
"args": [
{
"name": "method",
@@ -318,7 +210,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-3",
"id": "frame-4",
"ok": true,
"result": {
"mergeable": "MERGEABLE",
@@ -332,9 +224,174 @@
}
}
},
"cb071b912510": {
"870c2b9bacd0": {
"name": "status.get#1",
"ordinal": 12,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"8b7e690466d7": {
"name": "status.get#1",
"ordinal": 12,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-7",
"ok": true,
"result": {
"runtimeId": "recorded"
}
}
}
},
"9091d133c3b0": {
"name": "reply-salvage",
"ordinal": 8,
"value": {
"droppedCount": 1,
"droppedPaths": ["linkedPR"],
"method": "worktree.show",
"operation": "worktree.summary-or-skip",
"variant": "worktree-summary"
}
},
"98eb9b836539": {
"name": "github.prChecks#1",
"ordinal": 10,
"ordinal": 11,
"args": [
{
"name": "method",
"value": "github.prChecks"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-6",
"ok": true,
"result": {
"checks": []
}
}
}
},
"a55c83eeaeea": {
"name": "github.prForBranch#1",
"ordinal": 9,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-5",
"ok": true,
"result": {
"fetchedAt": 0,
"kind": "found",
"pr": {
"headSha": "head-sha-1",
"mergeable": "MERGEABLE",
"number": 12,
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"a7e609fcb031": {
"name": "github.prChecks#1",
"ordinal": 11,
"args": [
{
"name": "method",
@@ -360,9 +417,9 @@
"startedAt": 0
}
},
"d3426861162d": {
"bfedf583a747": {
"name": "github.workItemDetails#1",
"ordinal": 14,
"ordinal": 15,
"args": [
{
"name": "method",
@@ -390,7 +447,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-7",
"id": "frame-8",
"ok": true,
"result": {
"body": "body",
@@ -423,57 +480,21 @@
}
}
},
"d3d85b61b684": {
"name": "reply-salvage",
"ordinal": 7,
"value": {
"droppedCount": 1,
"droppedPaths": ["linkedPR"],
"method": "worktree.show",
"operation": "worktree.summary-or-skip",
"variant": "worktree-summary"
}
},
"d43ea39cfd0a": {
"name": "github.prChecks#1",
"ordinal": 10,
"args": [
"c70e6fd19823": {
"name": "streams-registered-at-teardown",
"ordinal": 17,
"value": [
{
"name": "method",
"value": "github.prChecks"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
"cancelled": true,
"method": "runtime.clientEvents.subscribe",
"payload": "runtime.clientEvents.subscribe#1"
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-5",
"ok": true,
"result": {
"checks": []
}
}
}
]
},
"ea4c904bfb5f": {
"name": "worktree.show#1",
"ordinal": 5,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}"
"e10925fa98de": {
"name": "status.get#1",
"ordinal": 14,
"json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
},
"eb79a9b3682a": {
"status": "fulfilled",
@@ -482,11 +503,6 @@
"value": {
"$rpc": "undefined"
}
},
"fcced642024c": {
"name": "github.prForBranch#1",
"ordinal": 9,
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}"
}
},
"recording": {
@@ -495,13 +511,19 @@
{
"id": "branch-hint",
"observation": {
"sender": ["1287167eaf56", "a0729c676b9a", "c79bbd27f177", "b3a7ec3ab1c7"],
"payloads": ["1f5765918736", "ea4c904bfb5f", "3b5c096da2a3", "fcced642024c"],
"sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"],
"payloads": [
"1f5765918736",
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "35045fa5a752",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -509,25 +531,26 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"cb071b912510",
"9c952632b0c0"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"a7e609fcb031",
"870c2b9bacd0"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "35045fa5a752",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -535,27 +558,57 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"d43ea39cfd0a",
"8352e3c99668",
"d3426861162d"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"98eb9b836539",
"8b7e690466d7",
"bfedf583a747"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde",
"1723d8a5d8be"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "341c71d5f61d",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
"id": "cleanup",
"observation": {
"sender": [
"1287167eaf56",
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"98eb9b836539",
"8b7e690466d7",
"bfedf583a747"
],
"payloads": [
"1f5765918736",
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "341c71d5f61d",
"effects": ["9091d133c3b0", "c70e6fd19823"]
}
}
]
+322 -269
View File
@@ -4,6 +4,16 @@
"family": "session.pr-sidebar",
"namedDeltas": [],
"values": {
"0730389db3e9": {
"name": "hostedReview.forBranch#1",
"ordinal": 7,
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}"
},
"0d9f7988ff86": {
"name": "github.prChecks#1",
"ordinal": 13,
"json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}"
},
"1287167eaf56": {
"name": "github.repoSlug#1",
"ordinal": 1,
@@ -39,20 +49,46 @@
}
}
},
"1723d8a5d8be": {
"name": "github.workItemDetails#1",
"ordinal": 15,
"json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}"
},
"1f5765918736": {
"name": "github.repoSlug#1",
"ordinal": 2,
"json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}"
},
"2bb452e534eb": {
"name": "github.prChecks#1",
"ordinal": 12,
"json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}"
"2dc2ca47b4e7": {
"name": "github.prForBranch#1",
"ordinal": 9,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"35045fa5a752": {
"commentError": {
@@ -62,119 +98,24 @@
"kind": "loading"
}
},
"3b5c096da2a3": {
"name": "hostedReview.forBranch#1",
"ordinal": 6,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}"
},
"8352e3c99668": {
"name": "status.get#1",
"ordinal": 11,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-6",
"ok": true,
"result": {
"runtimeId": "recorded"
}
}
}
},
"87ba39148f02": {
"name": "github.prChecks#1",
"ordinal": 10,
"args": [
{
"name": "method",
"value": "github.prChecks"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-5",
"ok": true,
"result": [
{
"checkRunId": 7,
"conclusion": "success",
"name": "build",
"status": "completed"
}
]
}
}
},
"9c952632b0c0": {
"name": "status.get#1",
"ordinal": 11,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"a0729c676b9a": {
"357f9b7862e3": {
"name": "worktree.show#1",
"ordinal": 6,
"json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}"
},
"3a8e6b13f380": {
"name": "github.prForBranch#1",
"ordinal": 10,
"json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}"
},
"3ecc2d44a209": {
"name": "runtime.clientEvents.subscribe#1",
"ordinal": 3,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}"
},
"4da7ea39401b": {
"name": "worktree.show#1",
"ordinal": 4,
"args": [
{
"name": "method",
@@ -198,7 +139,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-2",
"id": "frame-3",
"ok": true,
"result": {
"worktree": {
@@ -210,104 +151,14 @@
}
}
},
"abcf3bdc5cde": {
"name": "status.get#1",
"ordinal": 13,
"json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
"5d309fcf43a7": {
"name": "github.workItemDetails#1",
"ordinal": 16,
"json": "{\"id\":\"frame-8\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}"
},
"b3a7ec3ab1c7": {
"name": "github.prForBranch#1",
"ordinal": 8,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"c2f3182f1780": {
"name": "github.prForBranch#1",
"ordinal": 8,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-4",
"ok": true,
"result": {
"fetchedAt": 0,
"kind": "found",
"pr": {
"headSha": "head-sha-1",
"mergeable": "MERGEABLE",
"number": 12,
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"c79bbd27f177": {
"75885386f005": {
"name": "hostedReview.forBranch#1",
"ordinal": 4,
"ordinal": 5,
"args": [
{
"name": "method",
@@ -336,7 +187,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-3",
"id": "frame-4",
"ok": true,
"result": {
"mergeable": "MERGEABLE",
@@ -350,9 +201,179 @@
}
}
},
"cb071b912510": {
"861c8796ae1f": {
"name": "github.prChecks#1",
"ordinal": 10,
"ordinal": 11,
"args": [
{
"name": "method",
"value": "github.prChecks"
},
{
"name": "params",
"value": {
"headSha": "head-sha-1",
"prNumber": 12,
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-6",
"ok": true,
"result": [
{
"checkRunId": 7,
"conclusion": "success",
"name": "build",
"status": "completed"
}
]
}
}
},
"870c2b9bacd0": {
"name": "status.get#1",
"ordinal": 12,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "pending",
"startedAt": 0
}
},
"8b7e690466d7": {
"name": "status.get#1",
"ordinal": 12,
"args": [
{
"name": "method",
"value": "status.get"
},
{
"name": "params",
"value": {
"$rpc": "undefined"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true,
"timeoutMs": 30000
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-7",
"ok": true,
"result": {
"runtimeId": "recorded"
}
}
}
},
"9091d133c3b0": {
"name": "reply-salvage",
"ordinal": 8,
"value": {
"droppedCount": 1,
"droppedPaths": ["linkedPR"],
"method": "worktree.show",
"operation": "worktree.summary-or-skip",
"variant": "worktree-summary"
}
},
"a55c83eeaeea": {
"name": "github.prForBranch#1",
"ordinal": 9,
"args": [
{
"name": "method",
"value": "github.prForBranch"
},
{
"name": "params",
"value": {
"acceptMergedFallbackPR": true,
"branch": "feature",
"currentHeadOid": {
"$rpc": "null"
},
"fallbackPRNumber": 12,
"linkedPRNumber": {
"$rpc": "null"
},
"repo": "id:repo-9"
}
},
{
"name": "options",
"value": {
"beforeSend": "[local beforeSend]",
"failWhenDisconnected": true
}
}
],
"settlement": {
"status": "fulfilled",
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-5",
"ok": true,
"result": {
"fetchedAt": 0,
"kind": "found",
"pr": {
"headSha": "head-sha-1",
"mergeable": "MERGEABLE",
"number": 12,
"state": "open",
"title": "Recorded",
"updatedAt": "2026-01-01T00:00:00Z",
"url": "https://github.com/owner/repo/pull/12"
}
}
}
}
},
"a7e609fcb031": {
"name": "github.prChecks#1",
"ordinal": 11,
"args": [
{
"name": "method",
@@ -378,9 +399,9 @@
"startedAt": 0
}
},
"d3426861162d": {
"bfedf583a747": {
"name": "github.workItemDetails#1",
"ordinal": 14,
"ordinal": 15,
"args": [
{
"name": "method",
@@ -408,7 +429,7 @@
"startedAt": 0,
"settledAt": 0,
"value": {
"id": "frame-7",
"id": "frame-8",
"ok": true,
"result": {
"body": "body",
@@ -441,16 +462,16 @@
}
}
},
"d3d85b61b684": {
"name": "reply-salvage",
"ordinal": 7,
"value": {
"droppedCount": 1,
"droppedPaths": ["linkedPR"],
"method": "worktree.show",
"operation": "worktree.summary-or-skip",
"variant": "worktree-summary"
}
"c70e6fd19823": {
"name": "streams-registered-at-teardown",
"ordinal": 17,
"value": [
{
"cancelled": true,
"method": "runtime.clientEvents.subscribe",
"payload": "runtime.clientEvents.subscribe#1"
}
]
},
"e0a11d8a1005": {
"commentError": {
@@ -477,10 +498,10 @@
"refreshFailed": false
}
},
"ea4c904bfb5f": {
"name": "worktree.show#1",
"ordinal": 5,
"json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}"
"e10925fa98de": {
"name": "status.get#1",
"ordinal": 14,
"json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}"
},
"eb79a9b3682a": {
"status": "fulfilled",
@@ -489,11 +510,6 @@
"value": {
"$rpc": "undefined"
}
},
"fcced642024c": {
"name": "github.prForBranch#1",
"ordinal": 9,
"json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}"
}
},
"recording": {
@@ -502,13 +518,19 @@
{
"id": "branch-hint",
"observation": {
"sender": ["1287167eaf56", "a0729c676b9a", "c79bbd27f177", "b3a7ec3ab1c7"],
"payloads": ["1f5765918736", "ea4c904bfb5f", "3b5c096da2a3", "fcced642024c"],
"sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"],
"payloads": [
"1f5765918736",
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "35045fa5a752",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -516,25 +538,26 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"cb071b912510",
"9c952632b0c0"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"a7e609fcb031",
"870c2b9bacd0"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "35045fa5a752",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
@@ -542,27 +565,57 @@
"observation": {
"sender": [
"1287167eaf56",
"a0729c676b9a",
"c79bbd27f177",
"c2f3182f1780",
"87ba39148f02",
"8352e3c99668",
"d3426861162d"
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747"
],
"payloads": [
"1f5765918736",
"ea4c904bfb5f",
"3b5c096da2a3",
"fcced642024c",
"2bb452e534eb",
"abcf3bdc5cde",
"1723d8a5d8be"
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "e0a11d8a1005",
"effects": ["d3d85b61b684"]
"effects": ["9091d133c3b0"]
}
},
{
"id": "cleanup",
"observation": {
"sender": [
"1287167eaf56",
"4da7ea39401b",
"75885386f005",
"a55c83eeaeea",
"861c8796ae1f",
"8b7e690466d7",
"bfedf583a747"
],
"payloads": [
"1f5765918736",
"3ecc2d44a209",
"357f9b7862e3",
"0730389db3e9",
"3a8e6b13f380",
"0d9f7988ff86",
"e10925fa98de",
"5d309fcf43a7"
],
"settlements": {
"mount": "eb79a9b3682a"
},
"state": "e0a11d8a1005",
"effects": ["9091d133c3b0", "c70e6fd19823"]
}
}
]
File diff suppressed because it is too large Load Diff
+46 -54
View File
@@ -5,6 +5,10 @@ import { useFocusEffect, useLocalSearchParams } from 'expo-router'
import { ChevronLeft, RefreshCw, User } from 'lucide-react-native'
import { loadHosts, peekHosts } from '../transport/hosts/host-store'
import { useForceReconnect, useHostClient } from '../transport/connection/host-client-hooks'
import { useHostConnectionInputs } from '../transport/connection/client-context-connection-metrics'
import { classifyConnection, isConnectionOutage } from '../transport/connection/connection-health'
import { HostOfflineBanner, useHostOfflineBanner } from '../components/HostOfflineBanner'
import { useRefreshHint } from '../query/refresh-hint'
import { MobileAccountsLoadState } from './MobileAccountsLoadState'
import { colors, spacing } from '../theme/mobile-theme'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
@@ -12,9 +16,7 @@ import { useMobileTranslation } from '../i18n/use-mobile-translation'
import { styles } from './mobile-accounts-screen-styles'
import { useNow } from '../hooks/use-now'
import { ClaudeIcon, OpenAIIcon } from '../components/AgentIcons'
import { AccountsSnapshotError, decodeAccountsSnapshot } from '../components/accounts-snapshot'
import {
type AccountsSnapshot,
type ProviderKey,
getActiveProviderRateLimits,
getInactiveProviderUsage,
@@ -35,7 +37,7 @@ import { NavBar } from '../components/nav-bar/NavBar'
import { NavBarButton } from '../components/nav-bar/NavBarButton'
import { ListGroup, SectionHeader, ListRow } from '../components/list/ListGroup'
import { useRouteHandoff } from '../navigation/route-handoff'
import { subscribeAccountsSnapshots } from './accounts-snapshot-stream'
import { useMobileAccountsSnapshot } from './use-mobile-accounts-snapshot'
type AccountsNotice = { title: string; message: string }
@@ -50,26 +52,39 @@ export function MobileAccountsScreen() {
// Why: shared client per host. See docs/mobile-shared-client-per-host.md.
const { client, state: connState } = useHostClient(hostId)
const forceReconnect = useForceReconnect()
const connectionInputs = useHostConnectionInputs(hostId)
// Seed from the last host read so the subtitle is there on the first frame.
const [hostName, setHostName] = useState(
() => peekHosts()?.find((host) => host.id === hostId)?.name ?? ''
)
const [snapshot, setSnapshot] = useState<AccountsSnapshot | null>(null)
const [error, setError] = useState<string | null>(null)
const [refreshing, setRefreshing] = useState(false)
const [hostError, setHostError] = useState<string | null>(null)
const [busyAccountId, setBusyAccountId] = useState<string | null>(null)
const [clockEnabled, setClockEnabled] = useState(false)
const [notice, setNotice] = useState<AccountsNotice | null>(null)
const acceptSnapshot = useCallback((nextSnapshot: AccountsSnapshot) => {
setSnapshot(nextSnapshot)
setError(null)
}, [])
const rejectInvalidSnapshot = useCallback(() => {
// Fail closed on unrecognized snapshot: stale data can expose finite reset for wrong account.
setSnapshot(null)
setError(t('accounts.screen.invalidSnapshot', 'Invalid accounts snapshot from host'))
}, [t])
const accounts = useMobileAccountsSnapshot({
hostId,
client,
connState,
lastConnectedAt: connectionInputs.lastConnectedAt
})
const { snapshot, live, refresh, refreshing, acceptSnapshot } = accounts
const error = accounts.error ?? hostError
// Stored accounts stay up while connecting or offline; re-pair and a failed read on a live connection say so instead.
const showsAccounts =
snapshot !== null &&
(live || (connState !== 'auth-failed' && !(connState === 'connected' && error)))
const offlineBanner = useHostOfflineBanner({
client,
connState,
lastConnectedAt: connectionInputs.lastConnectedAt,
outage: isConnectionOutage(classifyConnection({ state: connState, ...connectionInputs })),
forceReconnect: hostId && forceReconnect ? () => void forceReconnect(hostId) : null,
hasData: showsAccounts,
asOf: accounts.readAt
})
// Stored accounts wait on the stream's first answer for their usage.
const showRefreshLine = useRefreshHint(showsAccounts && !live && offlineBanner === null)
const {
supported: codexResetSupported,
resetting: resettingCodex,
@@ -108,7 +123,7 @@ export function MobileAccountsScreen() {
}
const host = hosts.find((h) => h.id === hostId)
if (!host) {
setError(t('accounts.screen.hostNotFound', 'Host not found'))
setHostError(t('accounts.screen.hostNotFound', 'Host not found'))
return
}
setHostName(host.name)
@@ -118,41 +133,6 @@ export function MobileAccountsScreen() {
}
}, [hostId, t])
const refresh = useCallback(async () => {
if (!client) {
return
}
setRefreshing(true)
try {
const res = await client.sendRequest('accounts.list')
if (res.ok) {
acceptSnapshot(decodeAccountsSnapshot(res.result))
} else {
setError(res.error.message)
}
} catch (e) {
if (e instanceof AccountsSnapshotError) {
rejectInvalidSnapshot()
} else {
setError(e instanceof Error ? e.message : String(e))
}
} finally {
setRefreshing(false)
}
}, [acceptSnapshot, client, rejectInvalidSnapshot])
// Stream desktop poll/account-switch updates, falling back to one-shot accounts.list on subscription error.
useEffect(() => {
if (!client || connState !== 'connected') {
return
}
return subscribeAccountsSnapshots(client, {
onSnapshot: acceptSnapshot,
onInvalidSnapshot: rejectInvalidSnapshot,
onStreamError: () => void refresh()
})
}, [acceptSnapshot, client, connState, refresh, rejectInvalidSnapshot])
const selectAccount = useCallback(
async (provider: ProviderKey, accountId: string | null) => {
if (!client) {
@@ -202,7 +182,8 @@ export function MobileAccountsScreen() {
const activeUsage = getActiveProviderRateLimits(snapshot, provider)
const resetCredit = provider === 'codex' ? getCodexResetCreditSummary(activeUsage, now) : null
const Icon = provider === 'claude' ? ClaudeIcon : OpenAIIcon
const switchBlocked = busyAccountId !== null || resettingCodex || connState !== 'connected'
// Stored rows may name a selection or Codex target the desktop has since changed.
const switchBlocked = busyAccountId !== null || resettingCodex || !live
const spinner = <ActivityIndicator size="small" color={colors.textSecondary} />
return (
<View>
@@ -324,6 +305,7 @@ export function MobileAccountsScreen() {
}
title={t('accounts.screen.title', 'Accounts')}
subtitle={hostName || undefined}
refreshing={showRefreshLine}
trailing={
<NavBarButton
icon={refreshing ? RefreshingIcon : RefreshCw}
@@ -337,11 +319,11 @@ export function MobileAccountsScreen() {
<ScrollView
contentContainerStyle={[
styles.scroll,
!snapshot && { flexGrow: 1 },
!showsAccounts && { flexGrow: 1 },
{ paddingBottom: insets.bottom + spacing.xl }
]}
>
{!snapshot ? (
{!showsAccounts ? (
<MobileAccountsLoadState
connState={connState}
hostName={hostName}
@@ -352,6 +334,16 @@ export function MobileAccountsScreen() {
/>
) : (
<>
{offlineBanner ? (
<View style={styles.offlineBanner}>
<HostOfflineBanner
hostName={hostName}
offline={offlineBanner.offline}
asOf={offlineBanner.asOf}
onRetry={offlineBanner.retry}
/>
</View>
) : null}
{renderProviderSection('claude')}
{renderProviderSection('codex')}
{renderOtherProviders()}
@@ -1,11 +1,12 @@
import { queryOptions, skipToken } from '@tanstack/react-query'
import { AccountsSnapshotSchema, decodeAccountsSnapshot } from '../components/accounts-snapshot'
import type { AccountsSnapshot } from '../components/AccountUsage'
import { hostQueryKey } from '../query/host-query-key'
import { hostQueryKey, type HostQueryKey } from '../query/host-query-key'
import type { PersistedHostFamily } from '../query/host-query-persistence'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
/** Usage and rate limits are live facts: a stored snapshot keeps the accounts and drops every number. */
function withoutAccountUsage(snapshot: AccountsSnapshot | null): AccountsSnapshot | null {
export function withoutAccountUsage(snapshot: AccountsSnapshot | null): AccountsSnapshot | null {
if (!snapshot) {
return null
}
@@ -37,6 +38,15 @@ export const accountsSnapshotFamily: PersistedHostFamily<AccountsSnapshot | null
export const accountsSnapshotKey = (hostId: string) =>
hostQueryKey(hostId, accountsSnapshotFamily.family, { exec: 'local' }, {})
/** Kept by the accounts stream or an `accounts.list` read, never fetched. */
export const accountsSnapshotOptions = (hostId: string) =>
queryOptions<AccountsSnapshot | null, Error, AccountsSnapshot | null, HostQueryKey>({
queryKey: accountsSnapshotKey(hostId),
queryFn: skipToken,
gcTime: Infinity,
meta: { streamBacked: true, persist: accountsSnapshotFamily.persist }
})
/** The desktop's `accounts.subscribe` stream, decoded: rate-limit polls and account switches as they happen. */
export function subscribeAccountsSnapshots(
client: RpcClient,
@@ -11,6 +11,9 @@ export const styles = themedStyleSheet(() => ({
paddingHorizontal: spacing.lg,
paddingTop: spacing.sm
},
offlineBanner: {
paddingBottom: spacing.sm
},
// On a screen, not a sheet: one step above the page, as the other screen groups are.
group: {
backgroundColor: colors.bgPanel
@@ -0,0 +1,107 @@
import { createElement } from 'react'
import { QueryClientProvider, type QueryClient } from '@tanstack/react-query'
import { act, create, type ReactTestRenderer } from 'react-test-renderer'
import { afterEach, describe, expect, it, vi } from 'vitest'
// Also tells TanStack observers on a microtask, so act() sees replies.
import '../test-support/query-client-test-renderer'
import { settleQueryNotifications } from '../test-support/rpc-recording/hook-mount'
import { createOrcaQueryClient } from '../query/orca-query-client'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import { accountsSnapshotKey } from './accounts-snapshot-stream'
import { useMobileAccountsSnapshot } from './use-mobile-accounts-snapshot'
const HOST = 'host-1'
const CONNECTED_AT = 1_794_000_000_000
const SNAPSHOT = {
claude: {
accounts: [{ id: 'claude-1', email: 'claude@example.test', updatedAt: 100 }],
activeAccountId: 'claude-1'
},
codex: { accounts: [], activeAccountId: null },
rateLimits: {
claude: {
provider: 'claude',
session: { usedPercent: 42, windowMinutes: 300, resetsAt: null, resetDescription: null },
weekly: null,
updatedAt: 100,
error: null,
status: 'ok'
},
codex: null,
inactiveClaudeAccounts: [],
inactiveCodexAccounts: []
}
}
function accountsClient(listReply: unknown) {
let stream: (payload: unknown) => void = () => {}
const sendRequest = vi.fn(async () => ({ id: 'reply', ok: true as const, result: listReply }))
const client: RpcClient = {
sendRequest,
subscribe: (_method, _params, listener) => {
stream = listener
return () => {}
},
updateTerminalSubscriptionViewport: () => {},
getState: () => 'connected',
getReconnectAttempt: () => 0,
getLastConnectedAt: () => CONNECTED_AT,
getGeneration: () => 1,
onStateChange: () => () => {},
notifyForeground: () => {},
close: () => {}
}
return { client, sendRequest, frame: (payload: unknown) => stream(payload) }
}
let tree: ReactTestRenderer | null = null
afterEach(() => {
act(() => tree?.unmount())
tree = null
})
async function mountAccounts(queryClient: QueryClient, client: RpcClient) {
let state: ReturnType<typeof useMobileAccountsSnapshot> | null = null
function Probe() {
state = useMobileAccountsSnapshot({
hostId: HOST,
client,
connState: 'connected',
lastConnectedAt: CONNECTED_AT
})
return null
}
await act(async () => {
tree = create(createElement(QueryClientProvider, { client: queryClient }, createElement(Probe)))
})
return () => {
if (!state) {
throw new Error('Not mounted')
}
return state
}
}
describe('accounts snapshot', () => {
it('still shows usage when the stream fails and accounts.list answers', async () => {
const port = accountsClient(SNAPSHOT)
const read = await mountAccounts(createOrcaQueryClient(), port.client)
await act(async () => port.frame({ type: 'error' }))
await settleQueryNotifications()
expect(port.sendRequest).toHaveBeenCalledWith('accounts.list')
expect(read().live).toBe(true)
expect(read().snapshot?.rateLimits.claude?.session?.usedPercent).toBe(42)
})
it('hides usage this screen did not read on the current connection, keeping the accounts', async () => {
const queryClient = createOrcaQueryClient()
queryClient.setQueryData(accountsSnapshotKey(HOST), SNAPSHOT, { updatedAt: CONNECTED_AT - 1 })
const read = await mountAccounts(queryClient, accountsClient(SNAPSHOT).client)
expect(read().live).toBe(false)
expect(read().snapshot?.rateLimits.claude).toBeNull()
expect(read().snapshot?.claude.accounts.map((account) => account.email)).toEqual([
'claude@example.test'
])
})
})
@@ -0,0 +1,128 @@
import { useCallback, useEffect, useMemo, useState } from 'react'
import { hashKey, useQuery, useQueryClient } from '@tanstack/react-query'
import { AccountsSnapshotError, decodeAccountsSnapshot } from '../components/accounts-snapshot'
import type { AccountsSnapshot } from '../components/AccountUsage'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
import { holdsRestoredHostQueryData } from '../query/host-query-persistence'
import type { ConnectionState } from '../transport/connection/connection-state'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import {
accountsSnapshotKey,
accountsSnapshotOptions,
subscribeAccountsSnapshots,
withoutAccountUsage
} from './accounts-snapshot-stream'
/**
* One host's accounts: the last stored snapshot at once, then the desktop's stream, or `accounts.list` when the
* stream fails. Usage shows only from a read on the current connection; anything older shows accounts alone.
*/
export function useMobileAccountsSnapshot({
hostId,
client,
connState,
lastConnectedAt
}: {
hostId: string
client: RpcClient | null
connState: ConnectionState
lastConnectedAt: number | null
}) {
const t = useMobileTranslation()
const queryClient = useQueryClient()
const { data, dataUpdatedAt } = useQuery(accountsSnapshotOptions(hostId))
// Dated by when its read was sent, so a failure from an earlier connection doesn't outlive it.
const [failure, setFailure] = useState<{ message: string; at: number } | null>(null)
const [refreshing, setRefreshing] = useState(false)
// Data this screen didn't read itself, such as a previous visit's in the same document, can't vouch for usage.
const [mountedAt] = useState(Date.now)
const acceptSnapshot = useCallback(
(nextSnapshot: AccountsSnapshot) => {
queryClient.setQueryData(accountsSnapshotKey(hostId), nextSnapshot)
setFailure(null)
},
[hostId, queryClient]
)
const rejectInvalidSnapshot = useCallback(
(readAt = Date.now()) => {
// Fail closed on unrecognized snapshot: stale data can expose finite reset for wrong account.
queryClient.setQueryData(accountsSnapshotKey(hostId), null)
setFailure({
message: t('accounts.screen.invalidSnapshot', 'Invalid accounts snapshot from host'),
at: readAt
})
},
[hostId, queryClient, t]
)
const refresh = useCallback(async () => {
if (!client) {
return
}
setRefreshing(true)
const sentAt = Date.now()
// A reply sent before a reconnect speaks for the old connection; the new one's stream answers instead.
const reconnectedSince = () => (client.getLastConnectedAt() ?? 0) > sentAt
try {
const res = await client.sendRequest('accounts.list')
if (reconnectedSince()) {
return
}
if (res.ok) {
acceptSnapshot(decodeAccountsSnapshot(res.result))
} else {
setFailure({ message: res.error.message, at: sentAt })
}
} catch (e) {
if (reconnectedSince()) {
return
}
if (e instanceof AccountsSnapshotError) {
rejectInvalidSnapshot(sentAt)
} else {
setFailure({ message: e instanceof Error ? e.message : String(e), at: sentAt })
}
} finally {
setRefreshing(false)
}
}, [acceptSnapshot, client, rejectInvalidSnapshot])
// Stream desktop poll/account-switch updates, falling back to one-shot accounts.list on subscription error.
useEffect(() => {
if (!client || connState !== 'connected') {
return
}
return subscribeAccountsSnapshots(client, {
onSnapshot: acceptSnapshot,
onInvalidSnapshot: () => rejectInvalidSnapshot(),
onStreamError: () => void refresh()
})
}, [acceptSnapshot, client, connState, refresh, rejectInvalidSnapshot])
// Only this screen's own read on the current connection shows usage. A stored snapshot never does, whatever its
// date: native Home writes it from its own stream, possibly after this connect or on a clock since set back.
const live =
data != null &&
!holdsRestoredHostQueryData(queryClient, hashKey(accountsSnapshotKey(hostId))) &&
connState === 'connected' &&
lastConnectedAt !== null &&
dataUpdatedAt >= Math.max(lastConnectedAt, mountedAt)
const snapshot = useMemo(
() => (live ? (data ?? null) : withoutAccountUsage(data ?? null)),
[live, data]
)
const error =
failure && (lastConnectedAt === null || failure.at >= lastConnectedAt) ? failure.message : null
return {
snapshot,
live,
readAt: data != null ? dataUpdatedAt : null,
error,
refreshing,
refresh,
acceptSnapshot
}
}
@@ -11,6 +11,7 @@ import { themedStyleSheet } from '../../theme/themed-styles'
import { useMobileColorScheme } from '../../theme/use-mobile-color-scheme'
import { BOTTOM_DRAWER_EASING } from '../bottom-drawer/bottom-drawer-constants'
import { MobileSearchField } from '../MobileSearchField'
import { useMobileDictationClearance } from '../../dictation/mobile-dictation-host-context'
const FADE_ID = 'bottom-search-bar-fade'
const BUTTON_SIZE = 44
@@ -76,6 +77,7 @@ export function BottomSearchBar({
useEffect(() => {
onCoveredHeightChange?.(coveredHeight)
}, [coveredHeight, onCoveredHeightChange])
useMobileDictationClearance(coveredHeight)
// Close stays until the keyboard is down: iOS's late click at the tapped spot would otherwise hit the primary action that replaced it.
const searching = focused || keyboardUp || (hasSearch ?? value.trim() !== '')
@@ -72,15 +72,6 @@ afterEach(() => {
vi.useRealTimers()
})
it('brings an unposted comment back after the app is killed', async () => {
await open()
await type('Can we keep the retry?')
kill()
await open()
expect(box().value).toBe('Can we keep the retry?')
})
it('keeps text typed in a reopened composer when the earlier post lands', async () => {
let land: (ok: boolean) => void = () => {}
onSubmit = () => new Promise((resolve) => (land = resolve))
@@ -125,16 +125,6 @@ afterEach(() => {
vi.useRealTimers()
})
it('brings typed fields back after the app is killed instead of the commit seed', async () => {
await open()
expect(titleField()?.props.value).toBe('Seed from commits')
await typeTitle('Fix the login race')
kill()
await open()
expect(titleField()?.props.value).toBe('Fix the login race')
})
it('keeps nothing for the next Create once a Create lands after its sheet closed', async () => {
let land: (outcome: unknown) => void = () => {}
host.create.mockReturnValue(new Promise((resolve) => (land = resolve)))
@@ -47,7 +47,7 @@ export function useDetailCardScope({
record.restore = false
dismiss()
}
const click = (event: MouseEvent) => {
const press = (event: MouseEvent) => {
if (!inside(event.target) && !headerBack(event.target)) {
outside()
}
@@ -120,7 +120,9 @@ export function useDetailCardScope({
}
}
const capture = { capture: true, signal: listeners.signal }
document.addEventListener('click', click, capture)
// Why: the terminal claims its touches, so iOS sends no click for a tap there.
document.addEventListener('pointerdown', press, capture)
document.addEventListener('click', press, capture)
document.addEventListener('keydown', key, capture)
document.addEventListener('keyup', key, capture)
document.addEventListener('keydown', isolate, { signal: listeners.signal })
@@ -1,14 +1,15 @@
import { useEffect, useMemo, useState, type Ref } from 'react'
import { ActivityIndicator, Pressable, Text, View } from 'react-native'
import { Laptop, Mic, Smartphone, Square, X } from 'lucide-react-native'
import { CircleAlert, Laptop, Mic, RotateCcw, Smartphone, Square, X } from 'lucide-react-native'
import type { MobileDictationMeter } from '../hooks/mobile-dictation-meter'
import type { MobileDictationEngineShown } from '../hooks/mobile-dictation-session-state'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
import {
COMPOSER_CONTROL_HIT_SLOP,
COMPOSER_CONTROL_SIZE,
composerInputStyles
} from '../components/composer-input/composer-input-styles'
import { colors, spacing, typography } from '../theme/mobile-theme'
import { colors, radii, spacing, typography } from '../theme/mobile-theme'
import { themedStyleSheet } from '../theme/themed-styles'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
import {
@@ -27,11 +28,14 @@ const FINISHING_NOTE_DELAY_MS = 300
export function MobileDictationCancelButton({
onCancel,
targetRef,
compact = false
compact = false,
discards = false
}: {
onCancel: () => void
targetRef?: Ref<View>
compact?: boolean
// After a failure, ✕ throws the kept recording away.
discards?: boolean
}): React.JSX.Element {
useMobileColorScheme()
useMobileTranslation()
@@ -39,7 +43,9 @@ export function MobileDictationCancelButton({
<Pressable
ref={targetRef}
accessibilityRole="button"
accessibilityLabel={dictationControlsCopy.cancel()}
accessibilityLabel={
discards ? dictationControlsCopy.discard() : dictationControlsCopy.cancel()
}
style={({ pressed }) => [
composerInputStyles.controlButton,
compact && styles.compactCancel,
@@ -86,6 +92,77 @@ export function MobileDictationMicIcon({
)
}
// The failure that kept its recording: a reason and "Recording kept", on two lines in chat and one in the terminal.
export function MobileDictationFailureNote({
reason,
compact = false
}: {
reason: string
compact?: boolean
}): React.JSX.Element {
useMobileColorScheme()
useMobileTranslation()
const kept = dictationControlsCopy.recordingKept()
return (
<View style={styles.row} accessible accessibilityLabel={`${reason}. ${kept}.`}>
<CircleAlert
pointerEvents="none"
size={compact ? 15 : 17}
color={colors.statusRed}
strokeWidth={2.2}
/>
{compact ? (
<Text style={styles.failureCompact} numberOfLines={1}>
{`${reason} · ${kept}`}
</Text>
) : (
<View style={styles.failureLines}>
<Text style={styles.failureReason} numberOfLines={1}>
{reason}
</Text>
<Text style={styles.failureKept} numberOfLines={1}>
{kept}
</Text>
</View>
)}
</View>
)
}
// Retry sits where Stop was: a labelled pill in chat, the round control in the terminal.
export function MobileDictationRetryButton({
onRetry,
labelled
}: {
onRetry: () => void
labelled: boolean
}): React.JSX.Element {
useMobileColorScheme()
useMobileTranslation()
return (
<Pressable
accessibilityRole="button"
accessibilityLabel={dictationControlsCopy.retry()}
style={({ pressed }) => [
labelled ? styles.retryPill : composerInputStyles.controlButton,
pressed && composerInputStyles.pressed
]}
hitSlop={COMPOSER_CONTROL_HIT_SLOP}
onPress={onRetry}
>
<RotateCcw
pointerEvents="none"
size={15}
color={labelled ? colors.bgBase : colors.textPrimary}
strokeWidth={2.4}
/>
{labelled ? (
<Text style={styles.retryLabel}>{dictationControlsCopy.retryShort()}</Text>
) : null}
</Pressable>
)
}
function EngineIcon({ kind, color }: { kind: MobileDictationEngineShown['kind']; color: string }) {
return kind === 'phone' ? (
<Smartphone pointerEvents="none" size={15} color={color} strokeWidth={2} />
@@ -190,5 +267,38 @@ const styles = themedStyleSheet(() => ({
flexShrink: 1,
color: colors.textSecondary,
fontSize: typography.metaSize + 1
},
failureLines: {
flexShrink: 1,
minWidth: 0
},
failureReason: {
color: colors.textPrimary,
fontSize: typography.metaSize + 1,
fontWeight: '500'
},
failureKept: {
color: colors.textSecondary,
fontSize: typography.metaSize
},
failureCompact: {
flexShrink: 1,
color: colors.textPrimary,
fontSize: typography.metaSize
},
retryPill: {
height: COMPOSER_CONTROL_SIZE,
borderRadius: radii.pill,
alignItems: 'center',
justifyContent: 'center',
flexDirection: 'row',
gap: 6,
paddingHorizontal: spacing.md,
backgroundColor: colors.surfaceBright
},
retryLabel: {
color: colors.bgBase,
fontSize: typography.bodySize,
fontWeight: '600'
}
}))
@@ -0,0 +1,316 @@
import { useContext, useEffect } from 'react'
import { Pressable, Text, View } from 'react-native'
import { useSafeAreaInsets } from 'react-native-safe-area-context'
import { CircleAlert, Laptop, Smartphone } from 'lucide-react-native'
import type { UseMobileDictationResult } from '../hooks/mobile-dictation-session-state'
import { useMobileTranslation } from '../i18n/use-mobile-translation'
import { colors, radii, spacing, typography } from '../theme/mobile-theme'
import { themedStyleSheet } from '../theme/themed-styles'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
import {
MobileDictationGrapes,
MobileDictationTimer,
useMobileDictationElapsed
} from './MobileDictationMeter'
import {
MobileDictationCancelButton,
MobileDictationMicIcon,
MobileDictationRetryButton
} from './MobileDictationLiveControls'
import {
dictationControlsCopy,
dictationFailureReason,
dictationSpokenDuration
} from './mobile-dictation-controls-copy'
import { dictationAwayCopy } from './mobile-dictation-away-copy'
import { composerInputStyles } from '../components/composer-input/composer-input-styles'
import {
useMobileDictationHost,
useMobileDictationHostLive,
MobileDictationPillContext,
type MobileDictationHostToast
} from './mobile-dictation-host-context'
const TOAST_MS = 4000
// Long enough to read the target's name and reach Open.
const TOAST_WITH_OPEN_MS = 6000
// The meter needs a live recording; finishing and failures show words instead.
function PillStatus({
dictation,
elapsedSeconds
}: {
dictation: UseMobileDictationResult
elapsedSeconds: number
}) {
if (dictation.failure) {
return (
<Text style={styles.sub} numberOfLines={1}>
{`${dictationFailureReason(dictation.failure)} · ${dictationControlsCopy.recordingKept()}`}
</Text>
)
}
if (!dictation.isRecording) {
return (
<Text style={styles.sub} numberOfLines={1}>
{dictation.isStarting ? dictationAwayCopy.starting() : dictationAwayCopy.finishing()}
</Text>
)
}
return (
<View style={styles.subRow}>
<View style={styles.recDot} />
<Text style={styles.sub}>{dictationAwayCopy.listening()}</Text>
<Text style={styles.sub}>·</Text>
<MobileDictationTimer elapsedSeconds={elapsedSeconds} />
{dictation.engine ? (
<>
<Text style={styles.sub}>·</Text>
{dictation.engine.kind === 'phone' ? (
<Smartphone size={13} color={colors.textMuted} strokeWidth={2} />
) : (
<Laptop size={14} color={colors.textMuted} strokeWidth={2} />
)}
</>
) : null}
</View>
)
}
// The dictation whose target is off screen: tap to go back, ✕ and Stop work from here; a failure stays until Retry or ✕.
function MobileDictationPill({
title,
onOpen,
onStop
}: {
title: string
onOpen: () => void
onStop: () => void
}) {
// Subscribed only while the pill shows, so a hidden pill never re-renders on the dictation's ticks.
const dictation = useMobileDictationHostLive(useMobileDictationHost())
const { elapsedSeconds } = useMobileDictationElapsed(dictation.meter)
const failed = dictation.failure !== null
return (
<View style={styles.pill}>
<Pressable
style={styles.body}
onPress={onOpen}
accessibilityRole="button"
accessibilityLabel={
failed
? `${dictationAwayCopy.stopped()}, ${title}`
: dictationAwayCopy.label(title, dictationSpokenDuration(elapsedSeconds))
}
accessibilityHint={dictationAwayCopy.hint()}
>
{failed ? (
<CircleAlert size={18} color={colors.statusRed} strokeWidth={2.2} />
) : (
<MobileDictationGrapes meter={dictation.meter} dotSize={4} />
)}
<View style={styles.titles}>
<Text style={styles.title} numberOfLines={1}>
{failed ? dictationAwayCopy.stopped() : title}
</Text>
<PillStatus dictation={dictation} elapsedSeconds={elapsedSeconds} />
</View>
</Pressable>
<MobileDictationCancelButton onCancel={() => void dictation.cancel()} discards={failed} />
{failed ? (
<MobileDictationRetryButton onRetry={() => void dictation.retry()} labelled />
) : (
<Pressable
accessibilityRole="button"
accessibilityLabel={
dictation.isProcessing
? dictationControlsCopy.finishing()
: dictationControlsCopy.stop()
}
aria-busy={dictation.isStarting || dictation.isProcessing}
disabled={dictation.isProcessing}
style={({ pressed }) => [
composerInputStyles.controlButton,
pressed && composerInputStyles.pressed
]}
onPress={onStop}
>
<MobileDictationMicIcon
active={dictation.isStarting || dictation.isRecording}
processing={dictation.isProcessing}
micSize={17}
micStroke={2}
/>
</Pressable>
)}
</View>
)
}
function MobileDictationToast({
toast,
onDone,
bottom
}: {
toast: MobileDictationHostToast | null
onDone: () => void
bottom: number
}) {
useEffect(() => {
if (!toast) {
return
}
const timer = setTimeout(onDone, toast.open ? TOAST_WITH_OPEN_MS : TOAST_MS)
return () => clearTimeout(timer)
}, [onDone, toast])
// The live region stays mounted so a screen reader hears the message appear.
return (
<View
style={[styles.toastRow, { bottom }]}
pointerEvents="box-none"
accessibilityLiveRegion="polite"
>
{toast ? (
<View style={styles.toast}>
<Text style={styles.toastText} numberOfLines={2}>
{toast.message}
</Text>
{toast.open ? (
<Pressable
accessibilityRole="button"
hitSlop={8}
onPress={() => {
onDone()
toast.open?.()
}}
>
<Text style={styles.toastAction}>{dictationAwayCopy.open()}</Text>
</Pressable>
) : null}
</View>
) : null}
</View>
)
}
// Floats over every screen of the host document, above the bottom inset.
export function MobileDictationPillLayer(): React.JSX.Element | null {
useMobileColorScheme()
useMobileTranslation()
const insets = useSafeAreaInsets()
const { stop } = useMobileDictationHost()
const pill = useContext(MobileDictationPillContext)
if (!pill) {
return null
}
// Above the home indicator, or above a screen's bottom bar when it reported one.
const pillBottom = Math.max(insets.bottom + spacing.md, pill.clearance + spacing.sm)
return (
<>
{pill.away ? (
<View style={[styles.layer, { bottom: pillBottom }]} pointerEvents="box-none">
<MobileDictationPill title={pill.title} onOpen={pill.open} onStop={stop} />
</View>
) : null}
<MobileDictationToast
toast={pill.toast}
onDone={pill.clearToast}
bottom={pillBottom + (pill.away ? PILL_HEIGHT + spacing.sm : 0)}
/>
</>
)
}
const PILL_HEIGHT = 56
const styles = themedStyleSheet(() => ({
// Above every screen's own floating controls, below drawers and the host's pending cover (1000).
layer: {
position: 'absolute',
left: spacing.lg,
right: spacing.lg,
zIndex: 900,
elevation: 9
},
pill: {
height: PILL_HEIGHT,
borderRadius: radii.pill,
backgroundColor: colors.bgRaised,
borderWidth: 1,
borderColor: colors.borderSubtle,
flexDirection: 'row',
alignItems: 'center',
gap: spacing.sm,
paddingLeft: spacing.lg,
paddingRight: spacing.sm,
shadowColor: '#000',
shadowOpacity: 0.35,
shadowRadius: 12,
shadowOffset: { width: 0, height: 6 },
elevation: 8
},
body: {
flex: 1,
minWidth: 0,
flexDirection: 'row',
alignItems: 'center',
gap: spacing.md,
alignSelf: 'stretch'
},
titles: {
flex: 1,
minWidth: 0,
gap: 1
},
title: {
color: colors.textPrimary,
fontSize: typography.bodySize + 1,
fontWeight: '600'
},
subRow: {
flexDirection: 'row',
alignItems: 'center',
gap: 5
},
sub: {
color: colors.textSecondary,
fontSize: typography.metaSize,
flexShrink: 1
},
recDot: {
width: 8,
height: 8,
borderRadius: 4,
backgroundColor: colors.statusRed
},
toastRow: {
position: 'absolute',
left: spacing.lg,
right: spacing.lg,
alignItems: 'center',
zIndex: 900,
elevation: 9
},
toast: {
flexDirection: 'row',
alignItems: 'center',
gap: spacing.md,
maxWidth: 360,
backgroundColor: colors.bgRaised,
borderWidth: 1,
borderColor: colors.borderSubtle,
borderRadius: radii.surface,
paddingHorizontal: spacing.lg,
paddingVertical: spacing.sm
},
toastText: {
flexShrink: 1,
color: colors.textPrimary,
fontSize: 13
},
toastAction: {
color: colors.accentBlue,
fontSize: 13,
fontWeight: '600'
}
}))
@@ -1,6 +1,7 @@
import * as z from 'zod'
import type { RuntimeSpeechModelSummary } from '../../../src/shared/runtime-worktree-contracts'
import { hostUnionArms, salvagedOptional, salvagingArray } from '../../../src/shared/zod-salvage'
import { normalizeDictationTerms } from '../../../src/shared/dictation-dictionary'
export const SPEECH_MODEL_PROVIDERS = hostUnionArms<RuntimeSpeechModelSummary['provider']>({
local: true,
@@ -36,6 +37,11 @@ export const dictationSetupSchema = z.looseObject({
dictationHoldToRecord: salvagedOptional('dictationHoldToRecord', z.boolean()),
// Absent from older hosts, which remove no fillers either; the phone then keeps them on, the host default.
removeFillerWords: salvagedOptional('removeFillerWords', z.boolean()),
// Absent from older hosts, which spell nothing; malformed entries are dropped.
dictationTerms: salvagedOptional(
'dictationTerms',
z.unknown().transform(normalizeDictationTerms)
),
models: salvagingArray(speechModelSchema)
})
@@ -0,0 +1,20 @@
import { translate } from '../i18n/mobile-i18n'
// Words for a dictation whose target is off screen: the pill and the toast that offers a way back.
export const dictationAwayCopy = {
insertedIn: ({ title, target }: { title: string; target: { field: string } | null }) =>
target?.field === 'live'
? translate('dictation.announce.typedInto', 'Typed into {{target}}', { target: title })
: translate('dictation.announce.insertedIn', 'Inserted in {{target}}', { target: title }),
open: () => translate('dictation.pill.open', 'Open'),
listening: () => translate('dictation.pill.listening', 'Listening'),
starting: () => translate('dictation.pill.starting', 'Starting'),
finishing: () => translate('dictation.pill.finishing', 'Finishing'),
stopped: () => translate('dictation.pill.stopped', 'Dictation stopped'),
label: (target: string, duration: string) =>
translate('dictation.pill.label', 'Dictation to {{target}}, {{duration}}', {
target,
duration
}),
hint: () => translate('dictation.pill.hint', 'Double-tap to go back')
}
@@ -0,0 +1,51 @@
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import { editMobileNativeChatDraft } from '../session/native-chat/composer/mobile-native-chat-draft-store'
import { terminalInputSend } from '../terminal/mobile-terminal-operations'
import {
buildTerminalSendParams,
TERMINAL_INPUT_SEND_OPTIONS
} from '../terminal/terminal-send-request'
import { insertDictationText } from './mobile-dictation-text-insertion'
// Where a dictation's words go when its screen is gone or behind another: the chat's draft, or the terminal's input.
export type MobileDictationAwayTarget =
| { readonly field: 'chat'; readonly scope: string }
| { readonly field: 'live'; readonly handle: string }
| null
// The draft keeps the words (never sent); a terminal gets them typed in, never Enter. False when they did not land.
export async function insertMobileDictationAway(
owner: {
readonly client: RpcClient | null
readonly target: MobileDictationAwayTarget
},
text: string
): Promise<boolean> {
const { target } = owner
if (target?.field === 'chat') {
editMobileNativeChatDraft(
target.scope,
(current) => insertDictationText(current, text, null).text
)
return true
}
if (target?.field !== 'live' || !owner.client) {
return false
}
try {
const reply = await terminalInputSend.request(
owner.client,
buildTerminalSendParams({
terminal: target.handle,
text,
enter: false,
// No phone identity: a phone may only claim a terminal it is watching, and this one is off screen; the words go in as plain typed input.
deviceToken: null
}),
TERMINAL_INPUT_SEND_OPTIONS
)
return terminalInputSend.interpret(reply) === true
} catch {
return false
}
}
@@ -1,5 +1,11 @@
import { translate } from '../i18n/mobile-i18n'
import type { MobileDictationEngineShown } from '../hooks/mobile-dictation-session-state'
import type {
MobileDictationEngineShown,
MobileDictationKeptFailure
} from '../hooks/mobile-dictation-session-state'
import { MOBILE_DICTATION_CONNECTION_SLOW_ERROR_MESSAGE } from '../hooks/mobile-dictation-pending-audio-budget'
import { phoneDictationFailedMessage } from '../hooks/mobile-dictation-device-engine'
import { dictationFailureMessage, dictationSessionLostMessage } from './mobile-dictation-setup'
// Active: starting or recording, so the mic is a Stop.
export type MobileDictationMicState = { starting: boolean; active: boolean; processing: boolean }
@@ -11,6 +17,10 @@ export const dictationControlsCopy = {
stop: () => translate('dictation.controls.stop', 'Stop and insert'),
finishing: () => translate('dictation.controls.finishing', 'Finishing dictation'),
cancel: () => translate('dictation.controls.cancel', 'Cancel dictation'),
discard: () => translate('dictation.controls.discard', 'Discard recording'),
retry: () => translate('dictation.controls.retry', 'Retry dictation'),
retryShort: () => translate('dictation.controls.retryShort', 'Retry'),
recordingKept: () => translate('dictation.failure.recordingKept', 'Recording kept'),
mic: ({ starting, active, processing }: MobileDictationMicState) =>
starting
? dictationControlsCopy.starting()
@@ -29,7 +39,7 @@ export const dictationControlsCopy = {
: translate('dictation.status.movedToComputer', 'Moved to the computer')
}
function spokenDuration(elapsedSeconds: number): string {
export function dictationSpokenDuration(elapsedSeconds: number): string {
const minutes = Math.floor(elapsedSeconds / 60)
const count = elapsedSeconds % 60
const seconds =
@@ -57,7 +67,7 @@ export function dictationMeterLabel(
engine: MobileDictationEngineShown['kind'] | null,
computer: string | null
): string {
const duration = spokenDuration(elapsedSeconds)
const duration = dictationSpokenDuration(elapsedSeconds)
if (engine === 'phone') {
return translate('dictation.controls.meterOnPhone', 'Recording, {{duration}}, on this phone', {
duration
@@ -79,3 +89,17 @@ export function dictationMeterLabel(
}
return translate('dictation.controls.meter', 'Recording, {{duration}}', { duration })
}
// The few words a kept failure shows in the composer row; the full message is too long for it.
export function dictationFailureReason({ message, offline }: MobileDictationKeptFailure): string {
if (offline || dictationFailureMessage(message) === dictationSessionLostMessage()) {
return translate('dictation.failure.connectionLost', 'Connection lost')
}
if (message === MOBILE_DICTATION_CONNECTION_SLOW_ERROR_MESSAGE) {
return translate('dictation.failure.connectionSlow', 'Connection too slow')
}
if (message === phoneDictationFailedMessage()) {
return translate('dictation.failure.phoneStopped', 'Stopped on this phone')
}
return translate('dictation.failure.stopped', 'Dictation stopped')
}
@@ -0,0 +1,103 @@
import { createContext, useContext, useEffect, useState, useSyncExternalStore } from 'react'
import type { UseMobileDictationResult } from '../hooks/mobile-dictation-session-state'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { MobileDictationAwayTarget } from './mobile-dictation-away-insert'
import type { DictationTerm } from '../../../src/shared/dictation-dictionary'
export type MobileDictationHostToast = { message: string; open?: () => void }
// Who started the dictation and where its words go, fixed at the tap: leaving the screen never moves them.
export type MobileDictationOwner = {
// The starting screen instance, and the session it shows (a reopened screen of that session takes over its controls).
readonly instance: object
readonly sessionKey: string
readonly client: RpcClient | null
readonly target: MobileDictationAwayTarget
// The target tab's title, for the pill and its toasts.
readonly title: string
// The session route that opens the target tab again when its screen is gone.
readonly href: string
// The target tab's pane key, for a screen still in the stack to switch back to it.
readonly paneKey: string | undefined
readonly dictationMode: string | undefined
readonly removeFillerWords: boolean
// The computer's terms for this worktree, for words the phone recognizes itself.
readonly dictationTerms: readonly DictationTerm[] | undefined
// The computer spells its own words with this worktree's repo terms.
readonly worktreeId: string
}
// A mounted session screen, as the dictation host sees it.
export type MobileDictationScreen = {
readonly instance: object
readonly sessionKey: string
// The one "shown" rule (mobile-dictation-shown.ts): true while the in-place controls stand for the dictation.
readonly shown: () => boolean
// The starting screen inserts where it started (cursor, live input); false when it cannot, so the host inserts instead.
readonly insert: (text: string) => boolean
// Setup refusals open its setup sheet; other failures toast on it.
readonly reportFailure: (err: Error) => void
readonly toast: (message: string) => void
// Pop the screens above this one and show the target tab.
readonly bringToFront: (paneKey: string | undefined) => void
}
// Stable across the dictation's ticks: screens read the live dictation through subscribe, so a word heard re-renders only who shows it.
export type MobileDictationHost = {
readonly owner: MobileDictationOwner | null
readonly start: (owner: MobileDictationOwner) => Promise<void>
// Stop with the selection tick, as every stop button does.
readonly stop: () => void
readonly attach: (screen: MobileDictationScreen) => () => void
// A screen's shown() answer changed; the pill reads it on render.
readonly refresh: () => void
readonly subscribe: (listener: () => void) => () => void
readonly getDictation: () => UseMobileDictationResult
// The same dictation as nobody's: no status, words or failure; its identity holds until the meter or callbacks change.
readonly getIdleDictation: () => UseMobileDictationResult
// Starting, recording, finishing, or a failure kept for Retry.
readonly getUnderway: () => boolean
}
// The floating pill's own state, apart from the host's so a bar height or toast re-renders only the pill.
export type MobileDictationPill = {
// Shown while the dictation's own screen is not.
readonly away: boolean
readonly title: string
readonly open: () => void
readonly toast: MobileDictationHostToast | null
readonly clearToast: () => void
// The tallest bottom bar a screen reported, so the pill floats above it.
readonly clearance: number
}
export const MobileDictationHostContext = createContext<MobileDictationHost | null>(null)
export const MobileDictationPillContext = createContext<MobileDictationPill | null>(null)
export function useMobileDictationHost(): MobileDictationHost {
const host = useContext(MobileDictationHostContext)
if (!host) {
throw new Error('useMobileDictationHost needs a MobileDictationHostProvider')
}
return host
}
// The live dictation, re-rendering on each of its changes.
export function useMobileDictationHostLive(host: MobileDictationHost): UseMobileDictationResult {
return useSyncExternalStore(host.subscribe, host.getDictation)
}
// Bottom bars report the height they cover, so the pill floats above them rather than over their buttons.
export const MobileDictationClearanceContext = createContext<
((id: symbol, height: number) => void) | null
>(null)
// A bottom bar's covered height, cleared when it unmounts; a hidden screen's bar lays out at zero.
export function useMobileDictationClearance(height: number): void {
const setClearance = useContext(MobileDictationClearanceContext)
const [id] = useState(() => Symbol('dictation-clearance'))
useEffect(() => {
setClearance?.(id, height)
}, [height, id, setClearance])
useEffect(() => () => setClearance?.(id, 0), [id, setClearance])
}
@@ -0,0 +1,249 @@
import { useCallback, useLayoutEffect, useMemo, useRef, useState, type ReactNode } from 'react'
import { useMobileDictation } from '../hooks/use-mobile-dictation'
import type { UseMobileDictationResult } from '../hooks/mobile-dictation-session-state'
import { useRouteHandoff } from '../navigation/route-handoff'
import { triggerError } from '../platform/haptics'
import { useClipboardWriter } from '../platform/clipboard'
import { dictationFailureMessage } from './mobile-dictation-setup'
import { useMobileDictationHaptics } from './use-mobile-dictation-haptics'
import { useMobileDictationSilenceStop } from './use-mobile-dictation-silence-stop'
import { insertMobileDictationAway } from './mobile-dictation-away-insert'
import { nativeChatDictationCopy } from './mobile-session-native-chat-dictation-copy'
import { dictationAwayCopy } from './mobile-dictation-away-copy'
import {
MobileDictationClearanceContext,
MobileDictationHostContext,
MobileDictationPillContext,
type MobileDictationHost,
type MobileDictationHostToast,
type MobileDictationOwner,
type MobileDictationScreen
} from './mobile-dictation-host-context'
export { useMobileDictationHost } from './mobile-dictation-host-context'
// The owner's screen; startingOnly asks only for the screen that started it.
function screenFor(
screens: ReadonlySet<MobileDictationScreen>,
owner: MobileDictationOwner | null,
startingOnly: boolean
): MobileDictationScreen | null {
const matches = [...screens].filter((screen) => owner && screen.sessionKey === owner.sessionKey)
const starting = matches.find((screen) => screen.instance === owner?.instance) ?? null
if (startingOnly) {
return starting
}
// Else the one in front, then the one that started it, then the newest copy of its session.
return matches.find((screen) => screen.shown()) ?? starting ?? matches.at(-1) ?? null
}
function isUnderway(dictation: UseMobileDictationResult): boolean {
return (
dictation.isStarting ||
dictation.isRecording ||
dictation.isProcessing ||
dictation.failure !== null
)
}
// One dictation per host document, above its screens, so it keeps going when its session leaves the screen.
export function MobileDictationHostProvider({ children }: { children: ReactNode }) {
const router = useRouteHandoff()
const [owner, setOwner] = useState<MobileDictationOwner | null>(null)
const ownerRef = useRef(owner)
const screensRef = useRef(new Set<MobileDictationScreen>())
const [, setRevision] = useState(0)
const refresh = useCallback(() => setRevision((revision) => revision + 1), [])
const [toast, setToast] = useState<MobileDictationHostToast | null>(null)
const clearToast = useCallback(() => setToast(null), [])
const [clearances, setClearances] = useState<ReadonlyMap<symbol, number>>(new Map())
const clipboard = useClipboardWriter()
// Bring a dictation's target back: its screen if one is still mounted, otherwise open the session again.
const openOwner = useCallback(
(target: MobileDictationOwner) => {
const screen = screenFor(screensRef.current, target, false)
if (screen) {
screen.bringToFront(target.paneKey)
} else {
router.push(target.href)
}
},
[router]
)
const open = useCallback(() => {
if (ownerRef.current) {
openOwner(ownerRef.current)
}
}, [openOwner])
// Say it on the screen that shows the dictation, else in the host's toast (with Open for the dictation it is about).
const say = (message: string, about?: MobileDictationOwner) => {
const screen = screenFor(screensRef.current, ownerRef.current, false)
if (screen?.shown()) {
screen.toast(message)
} else {
setToast(about ? { message, open: () => openOwner(about) } : { message })
}
}
const reportFailureRef = useRef((err: Error) => {
const screen = screenFor(screensRef.current, ownerRef.current, false)
if (screen?.shown()) {
screen.reportFailure(err)
return
}
triggerError()
setToast({ message: dictationFailureMessage(err.message) })
})
const dictation = useMobileDictation({
client: owner?.client ?? null,
enabled: true,
removeFillerWords: owner?.removeFillerWords ?? true,
dictationTerms: owner?.dictationTerms,
worktreeId: owner?.worktreeId,
onTranscript: (text) => {
const current = ownerRef.current
if (!current) {
return
}
const starting = screenFor(screensRef.current, current, true)
if (starting?.shown() && starting.insert(text)) {
return
}
void insertMobileDictationAway(current, text).then((inserted) => {
if (inserted) {
say(dictationAwayCopy.insertedIn(current), current)
return
}
triggerError()
void clipboard.writeText(text).then(
() => say(nativeChatDictationCopy.insertFailedCopied()),
() => say(nativeChatDictationCopy.insertFailed())
)
})
},
onError: (err, { kept }) => {
if (kept) {
triggerError()
} else {
reportFailureRef.current(err)
}
},
onAudioLimitReached: () => say(nativeChatDictationCopy.stoppedAtCloudLimit())
})
const stop = useMobileDictationHaptics(dictation)
useMobileDictationSilenceStop(dictation, owner?.dictationMode, stop, (message) => say(message))
// Screens subscribe to the live dictation; the host's context only changes when its owner or pill does.
const liveRef = useRef(dictation)
const listenersRef = useRef(new Set<() => void>())
const { meter, start: startDictation, stop: stopDictation, cancel, retry } = dictation
const idle = useMemo<UseMobileDictationResult>(
() => ({
status: 'idle',
isStarting: false,
isRecording: false,
isProcessing: false,
transcriptSoFar: '',
error: null,
failure: null,
engine: null,
meter,
start: startDictation,
stop: stopDictation,
cancel,
retry
}),
[cancel, meter, retry, startDictation, stopDictation]
)
const idleRef = useRef(idle)
useLayoutEffect(() => {
liveRef.current = dictation
idleRef.current = idle
for (const listener of listenersRef.current) {
listener()
}
})
const subscribe = useCallback((listener: () => void) => {
listenersRef.current.add(listener)
return () => {
listenersRef.current.delete(listener)
}
}, [])
const getDictation = useCallback(() => liveRef.current, [])
const getIdleDictation = useCallback(() => idleRef.current, [])
const getUnderway = useCallback(() => isUnderway(liveRef.current), [])
const start = useCallback(
async (next: MobileDictationOwner) => {
ownerRef.current = next
setOwner(next)
try {
await startDictation(next.client)
} catch (err) {
// The starting screen may already be gone, so a refused start is told wherever the user is now.
reportFailureRef.current(err instanceof Error ? err : new Error(String(err)))
}
},
[startDictation]
)
const attach = useCallback(
(screen: MobileDictationScreen) => {
screensRef.current.add(screen)
refresh()
return () => {
screensRef.current.delete(screen)
refresh()
}
},
[refresh]
)
const setClearance = useCallback((id: symbol, height: number) => {
setClearances((current) => {
if ((current.get(id) ?? 0) === height) {
return current
}
const next = new Map(current)
if (height > 0) {
next.set(id, height)
} else {
next.delete(id)
}
return next
})
}, [])
const away =
owner !== null && isUnderway(dictation) && !screenFor(screensRef.current, owner, false)?.shown()
const title = owner?.title ?? ''
const clearance = Math.max(0, ...clearances.values())
const pill = useMemo(
() => ({ away, title, open, toast, clearToast, clearance }),
[away, clearToast, clearance, open, title, toast]
)
const value = useMemo<MobileDictationHost>(
() => ({
owner,
start,
stop,
attach,
refresh,
subscribe,
getDictation,
getIdleDictation,
getUnderway
}),
[attach, getDictation, getIdleDictation, getUnderway, owner, refresh, start, stop, subscribe]
)
return (
<MobileDictationClearanceContext.Provider value={setClearance}>
<MobileDictationHostContext.Provider value={value}>
<MobileDictationPillContext.Provider value={pill}>
{children}
</MobileDictationPillContext.Provider>
</MobileDictationHostContext.Provider>
</MobileDictationClearanceContext.Provider>
)
}
@@ -7,9 +7,11 @@ export type MobileDictationLeaveHold = {
hold: () => boolean
}
// Leaving unmounts the screen and with it what was said, so starting, recording or transcribing holds the first leave.
// The dictation outlives its screen inside the page, but leaving the page's document ends it; that leave stops and inserts first.
export function useMobileDictationLeaveHold(
dictation: UseMobileDictationResult
dictation: UseMobileDictationResult,
// True when leaving stays inside the page, where the floating pill carries the dictation on.
leaveKeepsPage: () => boolean
): MobileDictationLeaveHold {
const { isStarting, isRecording, isProcessing, stop } = dictation
const active = isStarting || isRecording || isProcessing
@@ -20,7 +22,7 @@ export function useMobileDictationLeaveHold(
}
const holdsLeave = active && !held
const hold = useCallback(() => {
if (!holdsLeave) {
if (!holdsLeave || leaveKeepsPage()) {
return false
}
setHeld(true)
@@ -28,7 +30,7 @@ export function useMobileDictationLeaveHold(
void stop()
}
return true
}, [holdsLeave, isStarting, isRecording, stop])
}, [holdsLeave, isStarting, isRecording, leaveKeepsPage, stop])
return { holdsLeave, hold }
}
@@ -7,7 +7,11 @@ export type MobileDictationLive = {
readonly engine: MobileDictationEngineShown | null
// The paired computer's name; null when another server runs the workspace and the phone lacks its name.
readonly computerName: string | null
// Also discards a failed dictation's kept recording.
readonly cancel: () => void
// The short reason a dictation failed with its recording kept; Retry plays it to the computer again.
readonly failureReason: string | null
readonly retry: () => void
}
// The chat mic sits several composers deep (overlay, queued edits); it reads the live dictation from here.
+13 -6
View File
@@ -44,7 +44,7 @@ function speechlessServerMessage(): string {
)
}
function isSpeechlessServerError(message: string): boolean {
export function isSpeechlessServerError(message: string): boolean {
return message.startsWith('speech_unavailable')
}
@@ -126,8 +126,12 @@ export function isDictationSetupRequiredError(message: string): boolean {
return SETUP_REQUIRED_CODES.has(message) || message.startsWith('voice_model_not_ready:')
}
export async function fetchDictationSetup(client: RpcOperationSender): Promise<MobileSpeechSetup> {
const reply = await requestDictationSetupReply(client)
/** `worktreeId` asks for that repo's dictionary terms too. */
export async function fetchDictationSetup(
client: RpcOperationSender,
worktreeId?: string
): Promise<MobileSpeechSetup> {
const reply = await requestDictationSetupReply(client, worktreeId ? { worktreeId } : null)
if (isLegacyDesktopSpeechSetupReply(reply)) {
throw new Error(
translate(
@@ -145,15 +149,18 @@ export async function fetchDictationSetup(client: RpcOperationSender): Promise<M
)
}
async function requestDictationSetupReply(client: RpcOperationSender): Promise<RpcResponse> {
async function requestDictationSetupReply(
client: RpcOperationSender,
params: { worktreeId: string } | null
): Promise<RpcResponse> {
try {
return await dictationSetupRead.request(client, null)
return await dictationSetupRead.request(client, params)
} catch (error) {
if (!(error instanceof LogicalClientCutoverError)) {
throw error
}
// Replay this read on authenticated replacement; mutations must surface cutover to avoid replaying unknown commits.
return dictationSetupRead.request(client, null)
return dictationSetupRead.request(client, params)
}
}
@@ -0,0 +1,15 @@
// The one rule for where a dictation's controls live: in place on its session screen, or the floating pill.
// Today the session screen counts as showing its dictation whenever it is in front, on any of its tabs; the
// words still land in the tab where the dictation started. Showing the pill on another tab too means adding
// "and the dictation's target tab is the active one" here.
export function mobileDictationShownOnScreen({
ownedHere,
inFront
}: {
// This screen shows the session the dictation was started in.
ownedHere: boolean
// This screen is the one in front (no other screen pushed over it).
inFront: boolean
}): boolean {
return ownedHere && inFront
}
@@ -39,6 +39,7 @@ export function useMobileDictationDestination({
? { field: 'live', handle: terminalHandle }
: null
setTarget(targetRef.current)
return targetRef.current
},
[chatComposerScopeKey]
)
@@ -11,8 +11,9 @@ export function useMobileDictationHaptics(dictation: UseMobileDictationResult):
}
}, [dictation.isRecording])
const { stop } = dictation
return useCallback(() => {
triggerSelection()
void dictation.stop()
}, [dictation])
void stop()
}, [stop])
}
@@ -4,10 +4,11 @@ import { useWorkspaceExecutionHost } from '../navigation/workspace-execution-hos
import { useHostDisplay } from '../transport/hosts/use-host-display'
import { useHostProfile } from '../transport/hosts/use-host-profile'
import type { MobileDictationLive } from './mobile-dictation-live-context'
import { dictationFailureReason } from './mobile-dictation-controls-copy'
// What every dictation control reads while one runs: meter, engine, the computer's name and cancel.
// What every dictation control reads while one runs or waits for Retry: meter, engine, the computer's name, cancel and Retry.
export function useMobileDictationLive(
dictation: Pick<UseMobileDictationResult, 'meter' | 'engine'>,
dictation: Pick<UseMobileDictationResult, 'meter' | 'engine' | 'failure' | 'retry'>,
cancel: () => void,
hostId: string
): MobileDictationLive {
@@ -20,9 +21,17 @@ export function useMobileDictationLive(
const hostTitle = useHostDisplay(hostProfile).title
// A workspace routed to another server transcribes there, and the phone lacks that server's name.
const computerName = useWorkspaceExecutionHost() === undefined && hostProfile ? hostTitle : null
const { meter, engine } = dictation
const { meter, engine, failure, retry } = dictation
const failureReason = failure === null ? null : dictationFailureReason(failure)
return useMemo(
() => ({ meter, engine, computerName, cancel: stableCancel }),
[meter, engine, computerName, stableCancel]
() => ({
meter,
engine,
computerName,
cancel: stableCancel,
failureReason,
retry: () => void retry()
}),
[meter, engine, computerName, stableCancel, failureReason, retry]
)
}
@@ -1,78 +0,0 @@
import { QueryClient } from '@tanstack/react-query'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { homeWorktreeCountsKey } from '../host-screen/host-list-queries'
import { restoreHomeQueries } from './home-query-restore'
const LEGACY_KEY = 'orca:home-snapshot:v1'
const asyncStorage = new Map<string, string>()
const storeRows = new Map<string, string>()
vi.mock('react-native', () => ({
AppState: { addEventListener: () => ({ remove: () => {} }) },
Platform: { OS: 'ios' }
}))
vi.mock('@react-native-async-storage/async-storage', () => ({
default: {
getItem: async (key: string) => asyncStorage.get(key) ?? null,
removeItem: async (key: string) => {
asyncStorage.delete(key)
}
}
}))
vi.mock('../device-store/device-store', () => ({
processDeviceStore: () => ({
open: async () => 'ready',
read: async (hostId: string, _table: string, keys: readonly string[]) => ({
status: 'ok',
values: keys.map((key) => storeRows.get(`${hostId}/${key}`) ?? null)
}),
write: async (
hostId: string,
_table: string,
ops: readonly { key: string; value: string | null }[]
) => {
for (const op of ops) {
if (op.value === null) {
storeRows.delete(`${hostId}/${op.key}`)
} else {
storeRows.set(`${hostId}/${op.key}`, op.value)
}
}
return { written: true }
}
})
}))
beforeEach(() => {
asyncStorage.clear()
storeRows.clear()
})
describe('restoreHomeQueries', () => {
it('moves the old Home snapshot into the store, so the launch after it still paints the counts', async () => {
asyncStorage.set(
LEGACY_KEY,
JSON.stringify({
savedAt: 1_794_000_000_000,
worktreeInfo: {
'host-a': {
hostId: 'host-a',
totalWorktrees: 7,
activeCount: 2,
lastActiveWorktree: null
}
}
})
)
await restoreHomeQueries(new QueryClient(), ['host-a'])
await vi.waitFor(() => expect(asyncStorage.has(LEGACY_KEY)).toBe(false))
const relaunched = new QueryClient()
await restoreHomeQueries(relaunched, ['host-a'])
expect(relaunched.getQueryData(homeWorktreeCountsKey('host-a'))).toEqual({
totalWorktrees: 7,
activeCount: 2,
agents: []
})
})
})
+2 -14
View File
@@ -2,9 +2,7 @@ import { useRouter, useFocusEffect } from 'expo-router'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import {
notifyManager,
queryOptions,
replaceEqualDeep,
skipToken,
useQueries,
useQueryClient,
type QueryObserverResult
@@ -16,7 +14,7 @@ import {
type AgentListInput
} from '../agents/agent-list-rows'
import { useAgentActivityWrites } from '../agents/use-agent-activity-writes'
import { accountsSnapshotFamily, accountsSnapshotKey } from '../accounts/accounts-snapshot-stream'
import { accountsSnapshotOptions } from '../accounts/accounts-snapshot-stream'
import type { AccountsSnapshot } from '../components/AccountUsage'
import {
HOST_LIST_TARGET,
@@ -36,7 +34,6 @@ import { loadHostCatalog } from '../transport/hosts/host-store'
import type { HostCatalogEntry } from '../transport/hosts/host-profile'
import { hostObserverOptions, type HostQuery } from '../query/host-query'
import { isHostNotConnectedError } from '../query/host-query-errors'
import type { HostQueryKey } from '../query/host-query-key'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import {
homeWorktreeCountsQuery,
@@ -61,15 +58,6 @@ const homeQueryOptions = <TData>(
host: HomeHost
) => hostObserverOptions(query, host.client, host.hostId, HOST_LIST_TARGET, NO_HOST_LIST_INPUT)
// Kept by the accounts stream (use-mobile-home-host-connections), never fetched.
const homeAccountsOptions = (hostId: string) =>
queryOptions<AccountsSnapshot | null, Error, AccountsSnapshot | null, HostQueryKey>({
queryKey: accountsSnapshotKey(hostId),
queryFn: skipToken,
gcTime: Infinity,
meta: { streamBacked: true, persist: accountsSnapshotFamily.persist }
})
const readOf = (result: QueryObserverResult<HomeWorktreeCounts>) => ({
data: result.data,
dataUpdatedAt: result.dataUpdatedAt,
@@ -158,7 +146,7 @@ export function useMobileHomeData() {
subscribed: homeFocused
})
const accountsQueries = useMemo(
() => homeHosts.map(({ hostId }) => homeAccountsOptions(hostId)),
() => homeHosts.map(({ hostId }) => accountsSnapshotOptions(hostId)),
[homeHosts]
)
// Usage is live: only a snapshot from this connection shows, never a stored or disconnected one.
@@ -20,6 +20,7 @@ import type {
} from '../platform/dictation-capture-contract'
import type { MobileDictationPendingAudioBudget } from './mobile-dictation-pending-audio-budget'
import type { MobileDictationHeldAudio } from './mobile-dictation-held-audio'
import type { MobileDictationRecording } from './mobile-dictation-recording'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { MobileDictationRun } from './mobile-dictation-engine-run'
@@ -35,7 +36,7 @@ type MobileDictationAudioChunkQueue = {
stopAtAudioLimit: () => void
}
// Holding: the microphone runs from the tap while the host's start reply is pending, or for a whole on-device dictation.
// Holding: the microphone runs from the tap while the host's start reply is pending, or while a replay's host start is.
export type MobileDictationAudioPhase = 'closed' | 'holding' | 'sending'
// Newer hosts report the text so far: shown while speaking, and handed over by a failure instead of dropped.
@@ -122,6 +123,7 @@ export function useMobileDictationAudioChunks(capture: DictationCapture, run: Mo
failActiveDictation: run.failActiveDictation,
transcriptSoFar: run.keptTranscript,
heldAudio: run.heldAudio.current,
recording: run.recording.current,
// Like desktop: stop as the user would, so what the host kept is transcribed and inserted.
stopAtAudioLimit: () => {
if (run.status.current === 'recording') {
@@ -142,7 +144,7 @@ export function subscribeMobileDictationAudioChunks(
getActiveId: () => string | null
audioPhase: () => MobileDictationAudioPhase
},
queue: Omit<MobileDictationAudioChunkQueue, 'isActive'>
queue: Omit<MobileDictationAudioChunkQueue, 'isActive'> & { recording: MobileDictationRecording }
): { remove: () => void; sendHeld: () => void } {
// Reuse wiring on the microphone hot path instead of allocating per chunk.
const chunkQueue = { ...queue, isActive: (id: string) => source.getActiveId() === id }
@@ -159,11 +161,15 @@ export function subscribeMobileDictationAudioChunks(
}
const subscription = capture.onChunk((chunk) => {
const dictationId = source.getActiveId()
if (!dictationId) {
return
}
// Kept whatever the phase, so a phone's failure or a failed send can play it to the computer again.
queue.recording.keep(chunk)
const phase = source.audioPhase()
if (!dictationId || phase === 'closed') {
if (phase === 'closed') {
return
}
// An on-device dictation holds its audio with no computer at all.
if (phase === 'holding') {
queue.heldAudio.hold(chunk)
return
@@ -15,6 +15,7 @@ import type { RpcClient } from '../transport/rpc/rpc-client-contract'
type StartMobileDictationDesktopSessionOptions = {
client: RpcClient
dictationId: string
worktreeId?: string
generation: number
getCurrentGeneration: () => number
getEnabled: () => boolean
@@ -102,7 +103,7 @@ export function startMobileDictationDesktopSession(
}
async function startOnHost(options: StartMobileDictationDesktopSessionOptions): Promise<boolean> {
const { client, dictationId } = options
const { client, dictationId, worktreeId } = options
let hostDedupesResends = false
try {
@@ -111,7 +112,7 @@ async function startOnHost(options: StartMobileDictationDesktopSessionOptions):
client,
dictationSessionStart.request(
client,
{ dictationId },
{ dictationId, ...(worktreeId ? { worktreeId } : {}) },
{ timeoutMs: MOBILE_DICTATION_RECONNECT_GRACE_MS }
)
).catch(() => {
+19 -65
View File
@@ -9,11 +9,7 @@ import type {
MobileDictationAudioPhase,
MobileDictationTranscriptSoFar
} from './mobile-dictation-audio-chunk'
import {
cancelDesktopDictation,
settledDesktopDictationWork,
startMobileDictationDesktopSession
} from './mobile-dictation-desktop-start'
import { cancelDesktopDictation } from './mobile-dictation-desktop-start'
import {
chooseMobileDictationRoute,
phoneDictationBusyMessage,
@@ -26,6 +22,11 @@ import {
} from './mobile-dictation-device-engine'
import type { MobileDictationPendingAudioBudget } from './mobile-dictation-pending-audio-budget'
import type { MobileDictationHeldAudio } from './mobile-dictation-held-audio'
import type { MobileDictationRecording } from './mobile-dictation-recording'
import {
replayMobileDictationToHost,
startMobileDictationOnHost
} from './mobile-dictation-host-start'
import type { ShowMobileDictationEngine } from './mobile-dictation-engine-shown'
// What the engines share with useMobileDictation: its refs (read at call time) and its state transitions.
@@ -42,15 +43,19 @@ export type MobileDictationRun = {
readonly pendingChunks: RefObject<Set<Promise<void>>>
readonly pendingAudioBudget: RefObject<MobileDictationPendingAudioBudget>
readonly heldAudio: RefObject<MobileDictationHeldAudio>
readonly recording: RefObject<MobileDictationRecording>
readonly sendHeldAudio: RefObject<() => void>
readonly finish: RefObject<(emptyTranscriptMessage: string) => Promise<void>>
readonly onTranscript: RefObject<(text: string) => void>
readonly onAudioLimitReached: RefObject<(() => void) | undefined>
readonly worktreeId: RefObject<string | undefined>
readonly keptTranscript: MobileDictationTranscriptSoFar
readonly applyStatus: (next: DictationStatus) => void
// keepText: leave the words so far on screen (recording, finishing, or a failure kept for Retry).
readonly applyStatus: (next: DictationStatus, keepText?: boolean) => void
readonly showEngine: ShowMobileDictationEngine
readonly closeDictationAudio: () => void
readonly reportError: (err: unknown) => void
// kept: the recording stays for Retry, the words so far stay shown, and nothing is inserted yet.
readonly reportError: (err: unknown, kept?: boolean) => void
readonly failActiveDictation: (dictationId: string, err: unknown) => void
}
@@ -80,6 +85,7 @@ export function settleMobileDictation(
run.engine.current = { kind: 'host' }
run.audioPhase.current = 'closed'
run.heldAudio.current.clear()
run.recording.current.clear()
run.pendingChunks.current.clear()
run.pendingAudioBudget.current.reset()
run.applyStatus('idle')
@@ -90,48 +96,7 @@ export function settleMobileDictation(
}
}
export async function startMobileDictationOnHost(
run: MobileDictationRun,
client: RpcClient,
dictationId: string,
generation: number
): Promise<void> {
await settledDesktopDictationWork(client)
if (run.generation.current !== generation) {
return
}
await startMobileDictationDesktopSession({
client,
dictationId,
generation,
getCurrentGeneration: () => run.generation.current,
getEnabled: () => run.enabled.current,
getActiveId: () => run.activeId.current,
clearActiveId: (id) => {
if (run.activeId.current === id) {
run.activeId.current = null
}
},
setIdle: () => run.applyStatus('idle'),
commitRecordingStart: (hostDedupesResends) => {
run.audioPhase.current = 'sending'
run.pendingChunks.current.clear()
run.pendingAudioBudget.current.reset(hostDedupesResends)
// A phone dictation stopped or failed at finish is already processing; it never records again.
if (run.status.current !== 'processing') {
run.applyStatus('recording')
}
run.showEngine('computer')
run.sendHeldAudio.current()
if (run.stopWhenStarted.current) {
void run.finish.current(dictationSessionErrorMessage('no-speech'))
}
},
rollbackRecordingStart: run.closeDictationAudio
})
}
// The phone's recognizer failed: replay the audio it kept to the computer, as a start's held audio (seq from 0), and carry on there.
// The phone's recognizer failed: replay the recording to the computer, as a start's held audio (seq from 0), and carry on there.
export async function fallBackMobileDictationToHost(
run: MobileDictationRun,
dictationId: string,
@@ -149,25 +114,15 @@ export async function fallBackMobileDictationToHost(
!engine.fallback ||
!client ||
client.getState() !== 'connected' ||
!run.heldAudio.current.complete
!run.recording.current.complete
) {
run.failActiveDictation(dictationId, new Error(phoneDictationFailedMessage()))
return
}
run.engine.current = { kind: 'host' }
run.showEngine('computer', true)
// A stop that began while the phone was still live is already processing; the computer must finish it too.
run.stopWhenStarted.current = finishing || run.status.current === 'processing'
try {
await startMobileDictationOnHost(run, client, dictationId, run.generation.current)
} catch (err) {
// The host start already released the mic and the dictation; keep what the phone heard.
const kept = run.keptTranscript.take(dictationId)
if (kept) {
run.onTranscript.current(kept)
}
run.reportError(err)
}
await replayMobileDictationToHost(run, client, dictationId, run.generation.current)
}
// Pick the engine before the mic opens, and arm the phone's recognizer so it hears the first word.
@@ -229,10 +184,9 @@ export function commitMobileDictationOnDevice(
() => void fallBackMobileDictationToHost(run, dictationId, false)
)
}
// This phone never replays to the computer, so it keeps no audio.
if (!fallback) {
run.audioPhase.current = 'closed'
}
// The recording keeps the phone's audio for a replay; nothing goes to the computer while the phone hears it.
run.audioPhase.current = 'closed'
run.heldAudio.current.clear()
run.applyStatus('recording')
run.showEngine('phone')
if (run.stopWhenStarted.current) {
@@ -0,0 +1,44 @@
import { errorMessage } from '../../../src/shared/error-message'
import {
isDictationSetupRequiredError,
isSpeechlessServerError
} from '../dictation/mobile-dictation-setup'
import type { MobileDictationEngine } from './mobile-dictation-device-engine'
import type { MobileDictationRecording } from './mobile-dictation-recording'
import type { MobileDictationRun } from './mobile-dictation-engine-run'
// Retry plays the recording to the computer, so it needs the whole recording and an engine that may use the computer (not This phone).
export function mobileDictationFailureRetryable(
recording: MobileDictationRecording,
engine: MobileDictationEngine
): boolean {
return recording.complete && recording.bytes > 0 && (engine.kind === 'host' || engine.fallback)
}
// A computer that needs setup or an update refuses every Retry the same way; those keep today's path (words inserted, setup sheet or toast).
function retryCanSucceed(err: unknown): boolean {
const message = errorMessage(err)
return !isDictationSetupRequiredError(message) && !isSpeechlessServerError(message)
}
// Never lose speech quietly: a retryable failure keeps the recording and the words so far for Retry; otherwise the words so far are inserted, as before.
export function concludeMobileDictationFailure(
run: Pick<
MobileDictationRun,
'recording' | 'engine' | 'keptTranscript' | 'onTranscript' | 'reportError'
>,
dictationId: string,
err: unknown,
retryable = mobileDictationFailureRetryable(run.recording.current, run.engine.current)
): void {
if (retryable && retryCanSucceed(err)) {
run.reportError(err, true)
return
}
run.recording.current.clear()
const kept = run.keptTranscript.take(dictationId)
if (kept) {
run.onTranscript.current(kept)
}
run.reportError(err)
}
@@ -0,0 +1,77 @@
import { rpcPayloadMember } from '../transport/rpc/rpc-reader-payload'
import type { DictationCapture } from '../platform/dictation-capture-contract'
import { isCurrentMobileDictationFinish } from './mobile-dictation-session-state'
import { finishDesktopDictation } from './mobile-dictation-desktop-start'
import {
finishMobileDictationOnDevice,
settleMobileDictation,
type MobileDictationRun
} from './mobile-dictation-engine-run'
// Stop listening and settle the dictation with its final text, from whichever engine heard it.
export async function finishMobileDictation(
run: MobileDictationRun,
capture: Pick<DictationCapture, 'end'>,
emptyTranscriptMessage: string
): Promise<void> {
const client = run.client.current
const dictationId = run.activeId.current
const engine = run.engine.current
if (!dictationId || (engine.kind === 'host' && !client)) {
return
}
// A replay's host start is still pending: finish once it commits and the kept audio has gone.
if (engine.kind === 'host' && run.audioPhase.current === 'holding') {
run.stopWhenStarted.current = true
if (run.status.current === 'recording') {
run.applyStatus('processing')
// Stop listening now; the tail joins the held audio the replay sends.
void capture.end()
}
return
}
const generation = run.generation.current + 1
run.generation.current = generation
run.applyStatus('processing')
const isCurrent = () =>
isCurrentMobileDictationFinish(
run.generation.current,
generation,
run.enabled.current,
run.activeId.current,
dictationId
)
try {
// Keep shutdown inside try for finally cleanup; accept its tail chunks and snapshot pending sends only after end settles, or finish can overtake the last audio.
await capture.end()
if (engine.kind === 'device') {
await finishMobileDictationOnDevice(
run,
engine,
dictationId,
emptyTranscriptMessage,
isCurrent
)
return
}
run.audioPhase.current = 'closed'
await Promise.allSettled(Array.from(run.pendingChunks.current))
if (!isCurrent() || !client) {
return
}
const sentSeconds = run.pendingAudioBudget.current.sentAudioSeconds
const finished = await finishDesktopDictation(client, dictationId, sentSeconds)
if (!isCurrent()) {
return
}
const transcript = rpcPayloadMember(finished, 'text')
settleMobileDictation(
run,
typeof transcript === 'string' ? transcript.trim() : '',
emptyTranscriptMessage
)
} catch (err) {
run.failActiveDictation(dictationId, err)
}
}
@@ -5,10 +5,10 @@ import {
} from '../../../src/shared/rpc-contract/speech-params'
import type { DictationCaptureChunk } from '../platform/dictation-capture-contract'
// Five minutes of 16 kHz PCM (9.6 MB): what an on-device dictation keeps to replay to the computer if the phone fails.
const MAX_HELD_AUDIO_BYTES = DICTATION_SAMPLE_RATE * PCM_BYTES_PER_SAMPLE * 300
// Five minutes of 16 kHz PCM (9.6 MB): the longest recording kept for a replay to the computer.
export const MAX_HELD_AUDIO_BYTES = DICTATION_SAMPLE_RATE * PCM_BYTES_PER_SAMPLE * 300
// Speech not sent yet, in order: held between the tap and the host's start reply, while every send slot is busy, and for a whole on-device dictation.
// Speech not sent yet, in order: held between the tap and the host's start reply, while every send slot is busy, and for a replay of the recording.
export class MobileDictationHeldAudio {
private held: DictationCaptureChunk[] = []
private heldBytes = 0
@@ -0,0 +1,70 @@
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import { dictationSessionErrorMessage } from '../dictation/mobile-dictation-setup'
import {
settledDesktopDictationWork,
startMobileDictationDesktopSession
} from './mobile-dictation-desktop-start'
import { concludeMobileDictationFailure } from './mobile-dictation-failure'
import type { MobileDictationRun } from './mobile-dictation-engine-run'
export async function startMobileDictationOnHost(
run: MobileDictationRun,
client: RpcClient,
dictationId: string,
generation: number,
// A replay (fallback or Retry) keeps the words so far on screen if its start fails.
replay = false
): Promise<void> {
await settledDesktopDictationWork(client)
if (run.generation.current !== generation) {
return
}
await startMobileDictationDesktopSession({
client,
dictationId,
worktreeId: run.worktreeId.current,
generation,
getCurrentGeneration: () => run.generation.current,
getEnabled: () => run.enabled.current,
getActiveId: () => run.activeId.current,
clearActiveId: (id) => {
if (run.activeId.current === id) {
run.activeId.current = null
}
},
setIdle: () => run.applyStatus('idle', replay),
commitRecordingStart: (hostDedupesResends) => {
run.audioPhase.current = 'sending'
run.pendingChunks.current.clear()
run.pendingAudioBudget.current.reset(hostDedupesResends)
// A phone dictation stopped or failed at finish is already processing; it never records again.
if (run.status.current !== 'processing') {
run.applyStatus('recording')
}
run.showEngine('computer')
run.sendHeldAudio.current()
if (run.stopWhenStarted.current) {
void run.finish.current(dictationSessionErrorMessage('no-speech'))
}
},
rollbackRecordingStart: run.closeDictationAudio
})
}
// Play the kept recording to the computer as this dictation's held audio (seq from 0); audio heard after joins it in order until the start commits.
// Fallback and Retry both end here; a failed start keeps the recording for Retry.
export async function replayMobileDictationToHost(
run: MobileDictationRun,
client: RpcClient,
dictationId: string,
generation: number
): Promise<void> {
run.engine.current = { kind: 'host' }
run.recording.current.replayInto(run.heldAudio.current)
run.audioPhase.current = 'holding'
try {
await startMobileDictationOnHost(run, client, dictationId, generation, true)
} catch (err) {
concludeMobileDictationFailure(run, dictationId, err)
}
}
@@ -0,0 +1,47 @@
import type { DictationCaptureChunk } from '../platform/dictation-capture-contract'
import { MAX_HELD_AUDIO_BYTES, type MobileDictationHeldAudio } from './mobile-dictation-held-audio'
// Everything one dictation heard, from the tap, whichever engine hears it: replayed to the computer when the phone fails, and kept after a failure for Retry.
export class MobileDictationRecording {
private chunks: DictationCaptureChunk[] = []
private keptBytes = 0
private incomplete = false
keep(chunk: DictationCaptureChunk): void {
if (this.incomplete) {
return
}
// Past the cap, or with audio the page dropped, a replay would lose speech (and the send refuses it), so keep nothing and say it is incomplete.
if (chunk.droppedBytes > 0 || this.keptBytes + chunk.data.byteLength > MAX_HELD_AUDIO_BYTES) {
this.chunks = []
this.keptBytes = 0
this.incomplete = true
return
}
this.chunks.push(chunk)
this.keptBytes += chunk.data.byteLength
}
// False once speech was lost; the recording no longer covers the whole dictation.
get complete(): boolean {
return !this.incomplete
}
get bytes(): number {
return this.keptBytes
}
// Queue a copy for sending; the recording itself stays, so a failed replay can be retried.
replayInto(held: MobileDictationHeldAudio): void {
held.clear()
for (const chunk of this.chunks) {
held.hold(chunk)
}
}
clear(): void {
this.chunks = []
this.keptBytes = 0
this.incomplete = false
}
}
@@ -0,0 +1,166 @@
// A computer dictation that fails mid-session keeps its whole recording; Retry plays all of it to the computer as a new dictation.
import { createElement } from 'react'
import { act, create } from 'react-test-renderer'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import {
createFakeRpcClient,
type FakeRpcClient,
type SentRequest
} from '../mobile-web-shell/bridge-host-test-fakes'
import type {
DictationCapture,
DictationCaptureChunk
} from '../platform/dictation-capture-contract'
type Seam = {
chunkHandlers: Set<(chunk: DictationCaptureChunk) => void>
tail: Uint8Array | null
}
const seam = vi.hoisted((): Seam => ({ chunkHandlers: new Set(), tail: null }))
vi.mock('react-native', () => ({
AppState: { currentState: 'active', addEventListener: () => ({ remove: () => {} }) },
Platform: { OS: 'ios' }
}))
// Keep capture identity stable like both real seams; a fresh object on render would rerun teardown and cancel dictation.
vi.mock('../platform/dictation-capture', () => {
const capture: DictationCapture = {
open: async () => ({ ok: true }),
begin: () => true,
end: async () => {
// Page capture reads once more here and may deliver audio.
const tail = seam.tail
seam.tail = null
if (tail !== null) {
for (const handler of seam.chunkHandlers) {
handler({ data: tail, droppedBytes: 0 })
}
}
},
release: () => {},
onChunk: (handler) => {
seam.chunkHandlers.add(handler)
return {
remove: () => {
seam.chunkHandlers.delete(handler)
}
}
},
onInterruption: () => ({ remove: () => {} })
}
return { useDictationCapture: () => capture }
})
import { useMobileDictation, type UseMobileDictationResult } from './use-mobile-dictation'
type Reply = (request: SentRequest) => 'hold' | { text?: string } | Error
// Answer every request; one reply can unblock the next.
async function pump(rpc: FakeRpcClient, sent: SentRequest[], reply: Reply): Promise<void> {
for (let round = 0; round < 30; round += 1) {
for (const request of rpc.requests.splice(0)) {
sent.push(request)
const answer = reply(request)
if (answer === 'hold') {
continue
}
if (answer instanceof Error) {
request.reject(answer)
} else {
request.resolve({ id: 'desktop', ok: true, result: answer })
}
}
await Promise.resolve()
await Promise.resolve()
}
}
function paramsOf(request: SentRequest): Record<string, unknown> {
const params = request.args[1]
return typeof params === 'object' && params !== null ? { ...params } : {}
}
function deliver(bytes: number[]): void {
for (const handler of seam.chunkHandlers) {
handler({ data: Uint8Array.from(bytes), droppedBytes: 0 })
}
}
const held: { dictation: UseMobileDictationResult | null } = { dictation: null }
function dictation(): UseMobileDictationResult {
const current = held.dictation
if (current === null) {
throw new Error('nothing mounted')
}
return current
}
beforeEach(() => {
seam.chunkHandlers.clear()
seam.tail = null
held.dictation = null
})
describe('a computer dictation whose finish fails', () => {
it('keeps the recording, and Retry sends all of it again and inserts the words', async () => {
const rpc = createFakeRpcClient()
const sent: SentRequest[] = []
const inserted: string[] = []
const errors: { message: string; kept: boolean }[] = []
function Probe(): null {
held.dictation = useMobileDictation({
client: rpc,
enabled: true,
onTranscript: (text) => inserted.push(text),
onError: (error, outcome) => errors.push({ message: error.message, kept: outcome.kept })
})
return null
}
act(() => {
create(createElement(Probe))
})
const firstTry: Reply = (request) =>
request.method === 'speech.dictation.finish' ? new Error('connection lost') : {}
await act(async () => {
const started = dictation().start()
await pump(rpc, sent, firstTry)
await started
})
await act(async () => {
deliver([1, 2, 3, 4])
await pump(rpc, sent, firstTry)
})
seam.tail = Uint8Array.from([5, 6])
await act(async () => {
const stopped = dictation().stop()
await pump(rpc, sent, firstTry)
await stopped
})
expect(inserted).toEqual([])
expect(errors).toEqual([{ message: 'connection lost', kept: true }])
expect(dictation().failure).toEqual({ message: 'connection lost', offline: false })
const firstId = paramsOf(sent[0]).dictationId
sent.length = 0
await act(async () => {
const retried = dictation().retry()
await pump(rpc, sent, (request) =>
request.method === 'speech.dictation.finish' ? { text: 'all of it' } : {}
)
await retried
})
expect(sent.map((request) => request.method)).toEqual([
'speech.dictation.start',
'speech.dictation.chunk',
'speech.dictation.finish'
])
expect(paramsOf(sent[0]).dictationId).not.toBe(firstId)
// The whole recording, from the first byte, as seq 0 of the new dictation.
expect(paramsOf(sent[1])).toMatchObject({ audioBase64: 'AQIDBAUG', seq: 0 })
expect(inserted).toEqual(['all of it'])
expect(dictation().failure).toBeNull()
})
})
@@ -0,0 +1,42 @@
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import { createMobileDictationId } from './mobile-dictation-session-state'
import {
concludeMobileDictationFailure,
mobileDictationFailureRetryable
} from './mobile-dictation-failure'
import {
releaseMobileDictationEngine,
type MobileDictationRun
} from './mobile-dictation-engine-run'
import { replayMobileDictationToHost } from './mobile-dictation-host-start'
// A dictation failed after it began hearing: stop it, and keep its recording for Retry when the computer can hear it again.
export function failActiveMobileDictation(
run: MobileDictationRun,
dictationId: string,
err: unknown
): void {
if (run.activeId.current !== dictationId) {
return
}
run.activeId.current = null
const retryable = mobileDictationFailureRetryable(run.recording.current, run.engine.current)
run.closeDictationAudio()
void releaseMobileDictationEngine(run, run.client.current, dictationId)
concludeMobileDictationFailure(run, dictationId, err, retryable)
}
// Retry: the kept recording goes to the computer as a new dictation (seq from 0), already stopped, so it finishes as soon as it has been sent.
export async function retryMobileDictationOnHost(
run: MobileDictationRun,
client: RpcClient
): Promise<void> {
const generation = run.generation.current + 1
run.generation.current = generation
const dictationId = createMobileDictationId()
run.activeId.current = dictationId
run.stopWhenStarted.current = true
run.applyStatus('processing', true)
run.showEngine('computer')
await replayMobileDictationToHost(run, client, dictationId, generation)
}
@@ -2,6 +2,7 @@
import { Buffer } from 'buffer'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import type { DictationTerm } from '../../../src/shared/dictation-dictionary'
import type { MobileDictationMeter } from './mobile-dictation-meter'
export type DictationStatus = 'idle' | 'starting' | 'recording' | 'processing' | 'error'
@@ -9,13 +10,21 @@ export type DictationStatus = 'idle' | 'starting' | 'recording' | 'processing' |
// Who is transcribing, for the icon by the timer; movedAt marks when Automatic moved from the phone to the computer.
export type MobileDictationEngineShown = { kind: 'phone' | 'computer'; movedAt: number | null }
// offline: the computer was out of reach when it failed, which is the reason the user needs.
export type MobileDictationKeptFailure = { message: string; offline: boolean }
export type UseMobileDictationOptions = {
client: RpcClient | null
enabled: boolean
onTranscript: (text: string) => void
onError?: (error: Error) => void
// kept: the recording is kept for Retry, so the failure shows in place rather than as a toast.
onError?: (error: Error, outcome: { kept: boolean }) => void
// The computer's filler switch, for text the phone recognizes itself; unknown means on.
removeFillerWords?: boolean
// The computer's dictionary for this worktree, for text the phone recognizes itself.
dictationTerms?: readonly DictationTerm[]
// Lets the computer pick this worktree's repo terms for text it recognizes.
worktreeId?: string
// The host's cloud upload is full; the dictation stops and inserts what was kept.
onAudioLimitReached?: () => void
}
@@ -28,10 +37,14 @@ export type UseMobileDictationResult = {
// Empty until a newer host reports words; older hosts never do.
transcriptSoFar: string
error: string | null
// A failure whose recording is kept: Retry plays it to the computer again, cancel discards it.
failure: MobileDictationKeptFailure | null
// Null until recording starts on an engine.
engine: MobileDictationEngineShown | null
start: () => Promise<void>
// client: the starting session's client, when one hook serves several sessions.
start: (client?: RpcClient | null) => Promise<void>
stop: () => Promise<void>
retry: () => Promise<void>
cancel: () => Promise<void>
meter: MobileDictationMeter
}
+92 -112
View File
@@ -13,19 +13,20 @@ import {
type MobileDictationAudioPhase
} from './mobile-dictation-audio-chunk'
import { MobileDictationHeldAudio } from './mobile-dictation-held-audio'
import { isCurrentMobileDictationFinish } from './mobile-dictation-session-state'
import { finishDesktopDictation } from './mobile-dictation-desktop-start'
import { MobileDictationRecording } from './mobile-dictation-recording'
import { failActiveMobileDictation, retryMobileDictationOnHost } from './mobile-dictation-retry'
import { mobileDictationFailureRetryable } from './mobile-dictation-failure'
import { finishMobileDictation } from './mobile-dictation-finish'
import type { MobileDictationEngine } from './mobile-dictation-device-engine'
import type { RpcClient } from '../transport/rpc/rpc-client-contract'
import {
finishMobileDictationOnDevice,
releaseMobileDictationEngine,
settleMobileDictation,
startMobileDictation,
type MobileDictationRun
} from './mobile-dictation-engine-run'
import { rpcPayloadMember } from '../transport/rpc/rpc-reader-payload'
import type {
DictationStatus,
MobileDictationKeptFailure,
UseMobileDictationOptions,
UseMobileDictationResult
} from './mobile-dictation-session-state'
@@ -35,11 +36,15 @@ export type { UseMobileDictationResult } from './mobile-dictation-session-state'
export function useMobileDictation(options: UseMobileDictationOptions): UseMobileDictationResult {
useMobileTranslation()
const { client, enabled, onTranscript, onError, removeFillerWords, onAudioLimitReached } = options
const { dictationTerms, worktreeId } = options
// Both capture seams hold the screen while the microphone is open; native uses the device directly and page uses shell audio verbs.
const capture = useDictationCapture()
const speech = useOnDeviceSpeech(removeFillerWords)
const speech = useOnDeviceSpeech(removeFillerWords, dictationTerms)
const [status, setStatus] = useState<DictationStatus>('idle')
const [error, setError] = useState<string | null>(null)
// A failure whose recording is kept for Retry; cleared by Retry, discard and the next dictation.
const [failure, setFailure] = useState<MobileDictationKeptFailure | null>(null)
const failureRef = useRef(failure)
const [transcriptSoFar, setTranscriptSoFar, keptTranscript] = useMobileDictationTranscriptSoFar()
const {
shown: shownEngine,
@@ -57,10 +62,12 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil
const onTranscriptRef = useRef(onTranscript)
const onErrorRef = useRef(onError)
const onAudioLimitReachedRef = useRef(onAudioLimitReached)
const worktreeIdRef = useRef(worktreeId)
const pendingChunksRef = useRef<Set<Promise<void>>>(new Set())
const pendingAudioBudgetRef = useRef(new MobileDictationPendingAudioBudget())
const audioPhaseRef = useRef<MobileDictationAudioPhase>('closed')
const heldAudioRef = useRef(new MobileDictationHeldAudio())
const recordingRef = useRef(new MobileDictationRecording())
const sendHeldAudioRef = useRef(() => {})
const stopWhenStartedRef = useRef(false)
const generationRef = useRef(0)
@@ -74,30 +81,40 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil
onTranscriptRef.current = onTranscript
onErrorRef.current = onError
onAudioLimitReachedRef.current = onAudioLimitReached
}, [client, speech, enabled, onTranscript, onError, onAudioLimitReached])
worktreeIdRef.current = worktreeId
}, [client, speech, enabled, onTranscript, onError, onAudioLimitReached, worktreeId])
const applyStatus = useCallback(
(next: DictationStatus) => {
// Kept through processing so the text so far stays in place until the final transcript replaces it in the same render.
(next: DictationStatus, keepText = next === 'recording' || next === 'processing') => {
statusRef.current = next
setStatus(next)
// Kept through processing so the text so far stays in place until the final transcript replaces it in the same render.
const live = next === 'recording' || next === 'processing'
setTranscriptSoFar((text) => (live ? text : ''))
if (!live) {
setTranscriptSoFar((text) => (keepText ? text : ''))
if (next !== 'recording' && next !== 'processing') {
clearEngine()
}
},
[clearEngine]
)
const setKeptFailure = useCallback((next: MobileDictationKeptFailure | null) => {
failureRef.current = next
setFailure(next)
}, [])
const reportError = useCallback(
(err: unknown) => {
(err: unknown, kept = false) => {
const normalized = err instanceof Error ? err : new Error(String(err))
setError(normalized.message)
applyStatus('error')
onErrorRef.current?.(normalized)
applyStatus('error', kept)
setKeptFailure(
kept
? { message: normalized.message, offline: clientRef.current?.getState() !== 'connected' }
: null
)
onErrorRef.current?.(normalized, { kept })
},
[applyStatus]
[applyStatus, setKeptFailure]
)
const closeDictationAudio = useCallback(() => {
@@ -113,29 +130,8 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil
}
}, [capture])
const failActiveDictation = useCallback(
(dictationId: string, err: unknown) => {
if (activeIdRef.current !== dictationId) {
return
}
activeIdRef.current = null
closeDictationAudio()
void releaseMobileDictationEngine(
{ engine: engineRef, speech: speechRef },
clientRef.current,
dictationId
)
const kept = keptTranscript.take(dictationId)
if (kept) {
onTranscriptRef.current(kept)
}
reportError(err)
},
[closeDictationAudio, reportError]
)
const run = useMemo<MobileDictationRun>(
() => ({
const run = useMemo<MobileDictationRun>(() => {
const created: MobileDictationRun = {
status: statusRef,
activeId: activeIdRef,
client: clientRef,
@@ -148,86 +144,28 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil
pendingChunks: pendingChunksRef,
pendingAudioBudget: pendingAudioBudgetRef,
heldAudio: heldAudioRef,
recording: recordingRef,
sendHeldAudio: sendHeldAudioRef,
finish: finishRef,
onTranscript: onTranscriptRef,
onAudioLimitReached: onAudioLimitReachedRef,
worktreeId: worktreeIdRef,
keptTranscript,
applyStatus,
showEngine,
closeDictationAudio,
reportError,
failActiveDictation
}),
[applyStatus, closeDictationAudio, failActiveDictation, keptTranscript, reportError, showEngine]
)
failActiveDictation: (dictationId, err) =>
failActiveMobileDictation(created, dictationId, err)
}
return created
}, [applyStatus, closeDictationAudio, keptTranscript, reportError, showEngine])
useMobileDictationAudioChunks(capture, run)
const finishDictation = useCallback(
async (emptyTranscriptMessage: string) => {
const client = clientRef.current
const dictationId = activeIdRef.current
const engine = engineRef.current
if (!dictationId || (engine.kind === 'host' && !client)) {
return
}
// A fallback's host start is still pending: finish once it commits and the kept audio has gone.
if (engine.kind === 'host' && audioPhaseRef.current === 'holding') {
stopWhenStartedRef.current = true
if (statusRef.current === 'recording') {
applyStatus('processing')
// Stop listening now; the tail joins the held audio the replay sends.
void capture.end()
}
return
}
const generation = generationRef.current + 1
generationRef.current = generation
applyStatus('processing')
const isCurrent = () =>
isCurrentMobileDictationFinish(
generationRef.current,
generation,
enabledRef.current,
activeIdRef.current,
dictationId
)
try {
// Keep shutdown inside try for finally cleanup; accept its tail chunks and snapshot pending sends only after end settles, or finish can overtake the last audio.
await capture.end()
if (engine.kind === 'device') {
await finishMobileDictationOnDevice(
run,
engine,
dictationId,
emptyTranscriptMessage,
isCurrent
)
return
}
audioPhaseRef.current = 'closed'
await Promise.allSettled(Array.from(pendingChunksRef.current))
if (!isCurrent() || !client) {
return
}
const sentSeconds = pendingAudioBudgetRef.current.sentAudioSeconds
const finished = await finishDesktopDictation(client, dictationId, sentSeconds)
if (!isCurrent()) {
return
}
const transcript = rpcPayloadMember(finished, 'text')
settleMobileDictation(
run,
typeof transcript === 'string' ? transcript.trim() : '',
emptyTranscriptMessage
)
} catch (err) {
failActiveDictation(dictationId, err)
}
},
[applyStatus, capture, failActiveDictation, run]
(emptyTranscriptMessage: string) => finishMobileDictation(run, capture, emptyTranscriptMessage),
[capture, run]
)
useLayoutEffect(() => {
finishRef.current = finishDictation
@@ -242,13 +180,37 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil
await finishDictation(dictationSessionErrorMessage('no-speech'))
}, [finishDictation])
const start = useCallback(async () => {
if ((!clientRef.current && !speechRef.current) || !enabledRef.current || activeIdRef.current) {
const start = useCallback(
async (startClient?: RpcClient | null) => {
// The caller's client, set before the next render commits it: one hook serves whichever session starts.
if (startClient !== undefined) {
clientRef.current = startClient
}
if (
(!clientRef.current && !speechRef.current) ||
!enabledRef.current ||
activeIdRef.current
) {
return
}
setError(null)
// A new dictation replaces a failed one's kept recording.
setKeptFailure(null)
recordingRef.current.clear()
await startMobileDictation(run, capture)
},
[capture, run, setKeptFailure]
)
const retry = useCallback(async () => {
const client = clientRef.current
if (!failureRef.current || !client || activeIdRef.current || !enabledRef.current) {
return
}
setError(null)
await startMobileDictation(run, capture)
}, [capture, run])
setKeptFailure(null)
await retryMobileDictationOnHost(run, client)
}, [run, setKeptFailure])
// Only the user’s own cancel (reason:null) ends silently; other interruptions call onError so the tap has a visible outcome.
const abandonDictation = useCallback(
@@ -256,11 +218,26 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil
const client = clientRef.current
const dictationId = activeIdRef.current
const wasUnderway = statusRef.current === 'starting' || statusRef.current === 'recording'
// Only the user's discard drops a kept recording; an interruption while it waits leaves it for Retry.
if (reason !== null && dictationId === null && failureRef.current) {
return
}
// An interruption keeps a recording the computer can hear again, even mid-finish; the user's cancel never does.
const kept =
reason !== null &&
dictationId !== null &&
mobileDictationFailureRetryable(recordingRef.current, engineRef.current)
if (!kept) {
setKeptFailure(null)
recordingRef.current.clear()
}
generationRef.current += 1
activeIdRef.current = null
closeDictationAudio()
// Settle before the host's cancel reply: a host that went quiet must not hold the mic button in its old state.
if (reason !== null && wasUnderway) {
if (kept) {
reportError(new Error(reason), true)
} else if (reason !== null && wasUnderway) {
reportError(new Error(reason))
} else {
applyStatus('idle')
@@ -268,7 +245,7 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil
}
await releaseMobileDictationEngine(run, client, dictationId)
},
[applyStatus, closeDictationAudio, reportError, run]
[applyStatus, closeDictationAudio, reportError, run, setKeptFailure]
)
const cancel = useCallback(() => abandonDictation(null), [abandonDictation])
@@ -295,6 +272,7 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil
generationRef.current += 1
activeIdRef.current = null
closeDictationAudio()
recordingRef.current.clear()
capture.release()
void releaseMobileDictationEngine(run, clientRef.current, dictationId)
}
@@ -307,8 +285,10 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil
isProcessing: status === 'processing',
transcriptSoFar,
error,
failure,
engine: shownEngine,
start,
retry,
stop,
cancel,
meter: useMobileDictationMeter(capture, status === 'recording')
+5 -1
View File
@@ -315,7 +315,11 @@
"forkOriginalMissingNamed": "{{agent}} could not find this response in \"{{detail}}\". Open that chat and fork from there.",
"forkOriginalUnavailable": "{{agent}} cannot fork this response in the original chat. Open it and fork from there.",
"forkOriginalUnavailableNamed": "{{agent}} cannot fork this response in \"{{detail}}\". Open that chat and fork from there.",
"pluginInputRequired": "{{agent}} stopped because the \"{{plugin}}\" plugin is waiting for input in a terminal pane. Disable the plugin for chat sessions, or run the task in a {{agent}} terminal."
"pluginInputRequired": "{{agent}} stopped because the \"{{plugin}}\" plugin is waiting for input in a terminal pane. Disable the plugin for chat sessions, or run the task in a {{agent}} terminal.",
"providerResponseFailed": "{{agent}} couldn't finish this response. Open Details for more information.",
"providerSafetyStopped": "{{agent}} stopped this response after a safety check. Review your request and send again.",
"providerUnavailable": "{{agent}} couldn't respond because the service is busy. Pick another model, or wait a little and send again.",
"selectedModel": "the selected model"
},
"fileReader": {
"reviewNotes_one": "{{count}} review note",
+28 -1
View File
@@ -1319,13 +1319,36 @@
"durationSeconds_one": "{{count}} Sekunde",
"durationSeconds_other": "{{count}} Sekunden",
"durationMinutes_one": "{{count}} Minute",
"durationMinutes_other": "{{count}} Minuten"
"durationMinutes_other": "{{count}} Minuten",
"discard": "Aufnahme verwerfen",
"retry": "Diktat wiederholen",
"retryShort": "Wiederholen"
},
"status": {
"finishingOn": "Wird auf {{computer}} abgeschlossen",
"finishingOnComputer": "Wird auf dem Computer abgeschlossen",
"movedTo": "Zu {{computer}} gewechselt",
"movedToComputer": "Zum Computer gewechselt"
},
"failure": {
"connectionLost": "Verbindung unterbrochen",
"connectionSlow": "Verbindung zu langsam",
"phoneStopped": "Auf diesem Telefon gestoppt",
"stopped": "Diktat gestoppt",
"recordingKept": "Aufnahme behalten"
},
"announce": {
"typedInto": "Eingetippt in {{target}}",
"insertedIn": "Eingefügt in {{target}}"
},
"pill": {
"open": "Öffnen",
"listening": "Hört zu",
"starting": "Startet",
"finishing": "Wird abgeschlossen",
"stopped": "Diktat gestoppt",
"label": "Diktat in {{target}}, {{duration}}",
"hint": "Doppeltippen, um zurückzukehren"
}
},
"files": {
@@ -2130,6 +2153,10 @@
"providerExitedRejection": "{{agent}} wurde gestoppt, bevor diese Nachricht gesendet wurde.",
"providerExitedRow": "{{agent}} wurde während dieser Antwort gestoppt. Die Unterhaltung kann fortgesetzt werden.",
"providerRateLimited": "{{agent}} hat das Ratenlimit erreicht und versucht es erneut.",
"providerUnavailable": "{{agent}} konnte nicht antworten, weil der Dienst ausgelastet ist. Wähle ein anderes Modell oder warte kurz und sende erneut.",
"providerSafetyStopped": "{{agent}} hat diese Antwort nach einer Sicherheitsprüfung gestoppt. Überprüfe deine Anfrage und sende sie erneut.",
"providerResponseFailed": "{{agent}} konnte diese Antwort nicht abschließen. Öffnen Sie die Details für weitere Informationen.",
"selectedModel": "das ausgewählte Modell",
"providerRejected": "{{agent}} hat diese Nachricht nicht angenommen.",
"providerRejectedQuoted": "{{agent}} hat diese Nachricht nicht angenommen: {{detail}}.",
"providerRetryLastError": "Letzter Fehler: {{detail}}.",
+28 -1
View File
@@ -534,13 +534,36 @@
"meterOnPhone": "Recording, {{duration}}, on this phone",
"meterOn": "Recording, {{duration}}, on {{computer}}",
"meterOnComputer": "Recording, {{duration}}, on the computer",
"meter": "Recording, {{duration}}"
"meter": "Recording, {{duration}}",
"discard": "Discard recording",
"retry": "Retry dictation",
"retryShort": "Retry"
},
"status": {
"finishingOn": "Finishing on {{computer}}",
"finishingOnComputer": "Finishing on the computer",
"movedTo": "Moved to {{computer}}",
"movedToComputer": "Moved to the computer"
},
"failure": {
"recordingKept": "Recording kept",
"connectionLost": "Connection lost",
"connectionSlow": "Connection too slow",
"phoneStopped": "Stopped on this phone",
"stopped": "Dictation stopped"
},
"announce": {
"typedInto": "Typed into {{target}}",
"insertedIn": "Inserted in {{target}}"
},
"pill": {
"open": "Open",
"listening": "Listening",
"starting": "Starting",
"finishing": "Finishing",
"stopped": "Dictation stopped",
"label": "Dictation to {{target}}, {{duration}}",
"hint": "Double-tap to go back"
}
},
"home": {
@@ -2615,6 +2638,10 @@
"modelUnavailable": "{{agent}} couldn't use {{detail}}. Pick another model and send again.",
"modelUnavailableUpdate": "{{agent}} couldn't use {{detail}}. Update {{agent}} to {{minimumVersion}} or later to keep it after a restart, or pick another model and send again.",
"modelNotSelected": "{{agent}} has no model selected. Check your model selection and {{agent}} sign-in, then send again.",
"providerUnavailable": "{{agent}} couldn't respond because the service is busy. Pick another model, or wait a little and send again.",
"providerSafetyStopped": "{{agent}} stopped this response after a safety check. Review your request and send again.",
"providerResponseFailed": "{{agent}} couldn't finish this response. Open Details for more information.",
"selectedModel": "the selected model",
"providerRejected": "{{agent}} didn't accept this message.",
"providerRejectedQuoted": "{{agent}} didn't accept this message: {{detail}}.",
"attachmentEmpty": "An image on this message is empty, so the message was not sent.",
+28 -1
View File
@@ -1360,13 +1360,36 @@
"durationSeconds_many": "{{count}} segundos",
"durationMinutes_one": "{{count}} minuto",
"durationMinutes_other": "{{count}} minutos",
"durationMinutes_many": "{{count}} minutos"
"durationMinutes_many": "{{count}} minutos",
"discard": "Descartar grabación",
"retry": "Reintentar dictado",
"retryShort": "Reintentar"
},
"status": {
"finishingOn": "Terminando en {{computer}}",
"finishingOnComputer": "Terminando en el ordenador",
"movedTo": "Pasado a {{computer}}",
"movedToComputer": "Pasado al ordenador"
},
"failure": {
"connectionLost": "Conexión perdida",
"connectionSlow": "Conexión demasiado lenta",
"phoneStopped": "Detenido en este teléfono",
"stopped": "Dictado detenido",
"recordingKept": "Grabación guardada"
},
"announce": {
"typedInto": "Escrito en {{target}}",
"insertedIn": "Insertado en {{target}}"
},
"pill": {
"open": "Abrir",
"listening": "Escuchando",
"starting": "Iniciando",
"finishing": "Terminando",
"stopped": "Dictado detenido",
"label": "Dictado en {{target}}, {{duration}}",
"hint": "Toca dos veces para volver"
}
},
"files": {
@@ -2198,6 +2221,10 @@
"providerExitedRejection": "{{agent}} se detuvo antes de que se enviara este mensaje.",
"providerExitedRow": "{{agent}} se detuvo mientras esta respuesta estaba en curso. Puede continuar en esta conversación.",
"providerRateLimited": "{{agent}} alcanzó un límite de solicitudes y está reintentando.",
"providerUnavailable": "{{agent}} no pudo responder porque el servicio está ocupado. Elige otro modelo o espera un poco y vuelve a enviar el mensaje.",
"providerSafetyStopped": "{{agent}} detuvo esta respuesta tras una comprobación de seguridad. Revisa tu solicitud y vuelve a enviarla.",
"providerResponseFailed": "{{agent}} no pudo terminar esta respuesta. Abre los detalles para obtener más información.",
"selectedModel": "el modelo seleccionado",
"providerRejected": "{{agent}} no aceptó este mensaje.",
"providerRejectedQuoted": "{{agent}} no aceptó este mensaje: {{detail}}.",
"providerRetryLastError": "Último error: {{detail}}.",
+28 -1
View File
@@ -1360,13 +1360,36 @@
"durationSeconds_many": "{{count}} secondes",
"durationMinutes_one": "{{count}} minute",
"durationMinutes_other": "{{count}} minutes",
"durationMinutes_many": "{{count}} minutes"
"durationMinutes_many": "{{count}} minutes",
"discard": "Supprimer l’enregistrement",
"retry": "Relancer la dictée",
"retryShort": "Réessayer"
},
"status": {
"finishingOn": "Finalisation sur {{computer}}",
"finishingOnComputer": "Finalisation sur l’ordinateur",
"movedTo": "Passé sur {{computer}}",
"movedToComputer": "Passé sur l’ordinateur"
},
"failure": {
"connectionLost": "Connexion perdue",
"connectionSlow": "Connexion trop lente",
"phoneStopped": "Arrêté sur ce téléphone",
"stopped": "Dictée arrêtée",
"recordingKept": "Enregistrement conservé"
},
"announce": {
"typedInto": "Saisi dans {{target}}",
"insertedIn": "Inséré dans {{target}}"
},
"pill": {
"open": "Ouvrir",
"listening": "Écoute",
"starting": "Démarrage",
"finishing": "Finalisation",
"stopped": "Dictée arrêtée",
"label": "Dictée vers {{target}}, {{duration}}",
"hint": "Touchez deux fois pour revenir"
}
},
"files": {
@@ -2199,6 +2222,10 @@
"providerExitedRejection": "{{agent}} s'est arrêté avant l'envoi de ce message.",
"providerExitedRow": "{{agent}} s'est arrêté pendant que cette réponse était en cours. Vous pouvez continuer dans cette conversation.",
"providerRateLimited": "{{agent}} est limité en débit et réessaie.",
"providerUnavailable": "{{agent}} n’a pas pu répondre car le service est occupé. Choisissez un autre modèle ou patientez un peu, puis renvoyez le message.",
"providerSafetyStopped": "{{agent}} a arrêté cette réponse après un contrôle de sécurité. Vérifiez votre demande et renvoyez-la.",
"providerResponseFailed": "{{agent}} n’a pas pu terminer cette réponse. Ouvrez les détails pour en savoir plus.",
"selectedModel": "le modèle sélectionné",
"providerRejected": "{{agent}} n'a pas accepté ce message.",
"providerRejectedQuoted": "{{agent}} n'a pas accepté ce message : {{detail}}.",
"providerRetryLastError": "Dernière erreur : {{detail}}.",
+28 -1
View File
@@ -1315,13 +1315,36 @@
"durationSeconds_one": "{{count}} 秒",
"durationSeconds_other": "{{count}} 秒",
"durationMinutes_one": "{{count}} 分",
"durationMinutes_other": "{{count}} 分"
"durationMinutes_other": "{{count}} 分",
"discard": "録音を破棄",
"retry": "音声入力を再試行",
"retryShort": "再試行"
},
"status": {
"finishingOn": "{{computer}} で仕上げています",
"finishingOnComputer": "コンピュータで仕上げています",
"movedTo": "{{computer}} に切り替えました",
"movedToComputer": "コンピュータに切り替えました"
},
"failure": {
"connectionLost": "接続が切れました",
"connectionSlow": "接続が遅すぎます",
"phoneStopped": "このスマートフォンで停止しました",
"stopped": "音声入力が停止しました",
"recordingKept": "録音は保持されています"
},
"announce": {
"typedInto": "{{target}} に入力しました",
"insertedIn": "{{target}} に挿入しました"
},
"pill": {
"open": "開く",
"listening": "聞き取り中",
"starting": "開始中",
"finishing": "仕上げ中",
"stopped": "音声入力が停止しました",
"label": "{{target}} への音声入力、{{duration}}",
"hint": "ダブルタップで戻る"
}
},
"files": {
@@ -2126,6 +2149,10 @@
"providerExitedRejection": "このメッセージが送信される前に {{agent}} が停止しました。",
"providerExitedRow": "この応答の途中で {{agent}} が停止しました。この会話で続けることができます。",
"providerRateLimited": "{{agent}} はレート制限を受けているため、再試行しています。",
"providerUnavailable": "サービスが混雑しているため、{{agent}} は応答できませんでした。別のモデルを選ぶか、しばらく待ってから再送してください。",
"providerSafetyStopped": "{{agent}} は安全確認の後、この応答を停止しました。リクエストを見直して再送してください。",
"providerResponseFailed": "{{agent}} はこの応答を完了できませんでした。詳細を開いて確認してください。",
"selectedModel": "選択されたモデル",
"providerRejected": "{{agent}} はこのメッセージを受け付けませんでした。",
"providerRejectedQuoted": "{{agent}} はこのメッセージを受け付けませんでした: {{detail}}。",
"providerRetryLastError": "直近のエラー: {{detail}}。",
+28 -1
View File
@@ -1315,13 +1315,36 @@
"durationSeconds_one": "{{count}}초",
"durationSeconds_other": "{{count}}초",
"durationMinutes_one": "{{count}}분",
"durationMinutes_other": "{{count}}분"
"durationMinutes_other": "{{count}}분",
"discard": "녹음 삭제",
"retry": "받아쓰기 다시 시도",
"retryShort": "다시 시도"
},
"status": {
"finishingOn": "{{computer}}에서 마무리 중",
"finishingOnComputer": "컴퓨터에서 마무리 중",
"movedTo": "{{computer}}(으)로 전환됨",
"movedToComputer": "컴퓨터로 전환됨"
},
"failure": {
"connectionLost": "연결 끊김",
"connectionSlow": "연결이 너무 느림",
"phoneStopped": "이 휴대폰에서 중지됨",
"stopped": "받아쓰기 중지됨",
"recordingKept": "녹음 보관됨"
},
"announce": {
"typedInto": "{{target}}에 입력됨",
"insertedIn": "{{target}}에 삽입됨"
},
"pill": {
"open": "열기",
"listening": "듣는 중",
"starting": "시작 중",
"finishing": "마무리 중",
"stopped": "받아쓰기 중지됨",
"label": "{{target}}에 받아쓰기, {{duration}}",
"hint": "두 번 탭하여 돌아가기"
}
},
"files": {
@@ -2126,6 +2149,10 @@
"providerExitedRejection": "이 메시지가 전송되기 전에 {{agent}}이(가) 중지되었습니다.",
"providerExitedRow": "이 응답이 진행되는 동안 {{agent}}이(가) 중지되었습니다. 이 대화에서 계속할 수 있습니다.",
"providerRateLimited": "{{agent}}이(가) 속도 제한에 걸려 다시 시도하고 있습니다.",
"providerUnavailable": "서비스가 혼잡하여 {{agent}}이(가) 응답하지 못했습니다. 다른 모델을 선택하거나 잠시 기다린 후 다시 보내세요.",
"providerSafetyStopped": "{{agent}}이(가) 안전 검사 후 이 응답을 중단했습니다. 요청을 검토한 후 다시 보내세요.",
"providerResponseFailed": "{{agent}}이(가) 이 응답을 완료하지 못했습니다. 자세한 내용을 열어 확인하세요.",
"selectedModel": "선택한 모델",
"providerRejected": "{{agent}}이(가) 이 메시지를 받아들이지 않았습니다.",
"providerRejectedQuoted": "{{agent}}이(가) 이 메시지를 받아들이지 않았습니다: {{detail}}.",
"providerRetryLastError": "마지막 오류: {{detail}}.",
+28 -1
View File
@@ -1360,13 +1360,36 @@
"durationSeconds_many": "{{count}} segundos",
"durationMinutes_one": "{{count}} minuto",
"durationMinutes_other": "{{count}} minutos",
"durationMinutes_many": "{{count}} minutos"
"durationMinutes_many": "{{count}} minutos",
"discard": "Descartar gravação",
"retry": "Tentar ditado novamente",
"retryShort": "Tentar novamente"
},
"status": {
"finishingOn": "Finalizando em {{computer}}",
"finishingOnComputer": "Finalizando no computador",
"movedTo": "Passou para {{computer}}",
"movedToComputer": "Passou para o computador"
},
"failure": {
"connectionLost": "Conexão perdida",
"connectionSlow": "Conexão muito lenta",
"phoneStopped": "Parou neste telefone",
"stopped": "Ditado interrompido",
"recordingKept": "Gravação mantida"
},
"announce": {
"typedInto": "Digitado em {{target}}",
"insertedIn": "Inserido em {{target}}"
},
"pill": {
"open": "Abrir",
"listening": "Ouvindo",
"starting": "Iniciando",
"finishing": "Finalizando",
"stopped": "Ditado interrompido",
"label": "Ditado para {{target}}, {{duration}}",
"hint": "Toque duas vezes para voltar"
}
},
"files": {
@@ -2198,6 +2221,10 @@
"providerExitedRejection": "{{agent}} parou antes de esta mensagem ser enviada.",
"providerExitedRow": "{{agent}} parou enquanto esta resposta estava em andamento. Você pode continuar nesta conversa.",
"providerRateLimited": "{{agent}} atingiu o limite de requisições e está tentando novamente.",
"providerUnavailable": "{{agent}} não conseguiu responder porque o serviço está ocupado. Escolha outro modelo ou aguarde um pouco e envie novamente.",
"providerSafetyStopped": "{{agent}} interrompeu esta resposta após uma verificação de segurança. Revise sua solicitação e envie novamente.",
"providerResponseFailed": "{{agent}} não conseguiu concluir esta resposta. Abra os detalhes para obter mais informações.",
"selectedModel": "o modelo selecionado",
"providerRejected": "{{agent}} não aceitou esta mensagem.",
"providerRejectedQuoted": "{{agent}} não aceitou esta mensagem: {{detail}}.",
"providerRetryLastError": "Último erro: {{detail}}.",
+28 -1
View File
@@ -1401,13 +1401,36 @@
"durationMinutes_one": "{{count}} минута",
"durationMinutes_other": "{{count}} минуты",
"durationMinutes_few": "{{count}} минуты",
"durationMinutes_many": "{{count}} минут"
"durationMinutes_many": "{{count}} минут",
"discard": "Удалить запись",
"retry": "Повторить диктовку",
"retryShort": "Повторить"
},
"status": {
"finishingOn": "Завершается на {{computer}}",
"finishingOnComputer": "Завершается на компьютере",
"movedTo": "Перешло на {{computer}}",
"movedToComputer": "Перешло на компьютер"
},
"failure": {
"connectionLost": "Соединение потеряно",
"connectionSlow": "Соединение слишком медленное",
"phoneStopped": "Остановлено на этом телефоне",
"stopped": "Диктовка остановлена",
"recordingKept": "Запись сохранена"
},
"announce": {
"typedInto": "Введено в {{target}}",
"insertedIn": "Вставлено в {{target}}"
},
"pill": {
"open": "Открыть",
"listening": "Слушаю",
"starting": "Запуск",
"finishing": "Завершение",
"stopped": "Диктовка остановлена",
"label": "Диктовка в {{target}}, {{duration}}",
"hint": "Дважды коснитесь, чтобы вернуться"
}
},
"files": {
@@ -2266,6 +2289,10 @@
"providerExitedRejection": "{{agent}} остановился до отправки этого сообщения.",
"providerExitedRow": "{{agent}} остановился во время ответа. Вы можете продолжить этот разговор.",
"providerRateLimited": "{{agent}} повторяет попытку из-за ограничения частоты запросов.",
"providerUnavailable": "{{agent}} не смог ответить, поскольку сервис занят. Выберите другую модель или немного подождите и отправьте сообщение снова.",
"providerSafetyStopped": "{{agent}} остановил этот ответ после проверки безопасности. Проверьте запрос и отправьте его снова.",
"providerResponseFailed": "{{agent}} не удалось завершить этот ответ. Откройте подробности, чтобы узнать больше.",
"selectedModel": "выбранную модель",
"providerRejected": "{{agent}} не принял это сообщение.",
"providerRejectedQuoted": "{{agent}} не принял это сообщение: {{detail}}.",
"providerRetryLastError": "Последняя ошибка: {{detail}}.",
+28 -1
View File
@@ -1319,13 +1319,36 @@
"durationSeconds_one": "{{count}} saniye",
"durationSeconds_other": "{{count}} saniye",
"durationMinutes_one": "{{count}} dakika",
"durationMinutes_other": "{{count}} dakika"
"durationMinutes_other": "{{count}} dakika",
"discard": "Kaydı sil",
"retry": "Dikteyi yeniden dene",
"retryShort": "Yeniden dene"
},
"status": {
"finishingOn": "{{computer}} üzerinde tamamlanıyor",
"finishingOnComputer": "Bilgisayarda tamamlanıyor",
"movedTo": "{{computer}} cihazına geçildi",
"movedToComputer": "Bilgisayara geçildi"
},
"failure": {
"connectionLost": "Bağlantı kesildi",
"connectionSlow": "Bağlantı çok yavaş",
"phoneStopped": "Bu telefonda durdu",
"stopped": "Dikte durdu",
"recordingKept": "Kayıt saklandı"
},
"announce": {
"typedInto": "{{target}} içine yazıldı",
"insertedIn": "{{target}} içine eklendi"
},
"pill": {
"open": "Aç",
"listening": "Dinleniyor",
"starting": "Başlatılıyor",
"finishing": "Tamamlanıyor",
"stopped": "Dikte durdu",
"label": "{{target}} için dikte, {{duration}}",
"hint": "Geri dönmek için iki kez dokunun"
}
},
"files": {
@@ -2130,6 +2153,10 @@
"providerExitedRejection": "Bu mesaj gönderilmeden önce {{agent}} durdu.",
"providerExitedRow": "Bu yanıt hazırlanırken {{agent}} durdu. Bu konuşmada devam edebilirsiniz.",
"providerRateLimited": "{{agent}} istek hızı sınırına ulaştı ve yeniden deniyor.",
"providerUnavailable": "Hizmet meşgul olduğu için {{agent}} yanıt veremedi. Başka bir model seçin veya biraz bekleyip yeniden gönderin.",
"providerSafetyStopped": "{{agent}}, bir güvenlik kontrolünden sonra bu yanıtı durdurdu. İsteğinizi gözden geçirip yeniden gönderin.",
"providerResponseFailed": "{{agent}} bu yanıtı tamamlayamadı. Daha fazla bilgi için ayrıntıları açın.",
"selectedModel": "seçilen modeli",
"providerRejected": "{{agent}} bu mesajı kabul etmedi.",
"providerRejectedQuoted": "{{agent}} bu mesajı kabul etmedi: {{detail}}.",
"providerRetryLastError": "Son hata: {{detail}}.",
+28 -1
View File
@@ -1315,13 +1315,36 @@
"durationSeconds_one": "{{count}} 秒",
"durationSeconds_other": "{{count}} 秒",
"durationMinutes_one": "{{count}} 分鐘",
"durationMinutes_other": "{{count}} 分鐘"
"durationMinutes_other": "{{count}} 分鐘",
"discard": "捨棄錄音",
"retry": "重試聽寫",
"retryShort": "重試"
},
"status": {
"finishingOn": "正在 {{computer}} 上完成",
"finishingOnComputer": "正在電腦上完成",
"movedTo": "已轉到 {{computer}}",
"movedToComputer": "已轉到電腦"
},
"failure": {
"connectionLost": "連線中斷",
"connectionSlow": "連線太慢",
"phoneStopped": "已在此手機上停止",
"stopped": "聽寫已停止",
"recordingKept": "錄音已保留"
},
"announce": {
"typedInto": "已輸入到 {{target}}",
"insertedIn": "已插入到 {{target}}"
},
"pill": {
"open": "開啟",
"listening": "正在聽",
"starting": "正在開始",
"finishing": "正在完成",
"stopped": "聽寫已停止",
"label": "聽寫到 {{target}},{{duration}}",
"hint": "點兩下返回"
}
},
"files": {
@@ -2126,6 +2149,10 @@
"providerExitedRejection": "{{agent}} 在傳送此訊息前已停止。",
"providerExitedRow": "{{agent}} 在產生此回覆時停止了。您可以在此對話中繼續。",
"providerRateLimited": "{{agent}} 受到速率限制,正在重試。",
"providerUnavailable": "{{agent}} 因服務忙碌而無法回覆。請選擇其他模型,或稍候片刻後重新傳送。",
"providerSafetyStopped": "{{agent}} 在安全檢查後停止了此次回覆。請檢查您的請求後重新傳送。",
"providerResponseFailed": "{{agent}} 未能完成此回覆。開啟詳細資料以取得更多資訊。",
"selectedModel": "所選模型",
"providerRejected": "{{agent}} 未接受此訊息。",
"providerRejectedQuoted": "{{agent}} 未接受此訊息:{{detail}}。",
"providerRetryLastError": "上次錯誤:{{detail}}。",
+28 -1
View File
@@ -1315,13 +1315,36 @@
"durationSeconds_one": "{{count}} 秒",
"durationSeconds_other": "{{count}} 秒",
"durationMinutes_one": "{{count}} 分钟",
"durationMinutes_other": "{{count}} 分钟"
"durationMinutes_other": "{{count}} 分钟",
"discard": "丢弃录音",
"retry": "重试听写",
"retryShort": "重试"
},
"status": {
"finishingOn": "正在 {{computer}} 上完成",
"finishingOnComputer": "正在电脑上完成",
"movedTo": "已转到 {{computer}}",
"movedToComputer": "已转到电脑"
},
"failure": {
"connectionLost": "连接已断开",
"connectionSlow": "连接太慢",
"phoneStopped": "已在此手机上停止",
"stopped": "听写已停止",
"recordingKept": "录音已保留"
},
"announce": {
"typedInto": "已输入到 {{target}}",
"insertedIn": "已插入到 {{target}}"
},
"pill": {
"open": "打开",
"listening": "正在听",
"starting": "正在开始",
"finishing": "正在完成",
"stopped": "听写已停止",
"label": "听写到 {{target}},{{duration}}",
"hint": "轻点两下返回"
}
},
"files": {
@@ -2126,6 +2149,10 @@
"providerExitedRejection": "{{agent}} 在发送此消息前已停止。",
"providerExitedRow": "{{agent}} 在生成此回复时停止了。您可以在此对话中继续。",
"providerRateLimited": "{{agent}} 已被限流,正在重试。",
"providerUnavailable": "{{agent}} 因服务繁忙而无法回复。请选择其他模型,或稍等片刻后重新发送。",
"providerSafetyStopped": "{{agent}} 在安全检查后停止了此次回复。请检查您的请求后重新发送。",
"providerResponseFailed": "{{agent}} 未能完成此回复。打开详情了解更多信息。",
"selectedModel": "所选模型",
"providerRejected": "{{agent}} 未接受此消息。",
"providerRejectedQuoted": "{{agent}} 未接受此消息:{{detail}}。",
"providerRetryLastError": "上次错误:{{detail}}。",
@@ -27,6 +27,7 @@ import { useNativeImageActions } from '../platform/native-image-actions'
import { processDeviceStore } from '../device-store/device-store'
import { serveDeviceStoreVerb } from './device-store-verb-server'
import { BRIDGE_STORE_VERB } from './bridge/bridge-store-verb'
import { useAppLeavesForeground } from './use-app-leaves-foreground'
import { useShellPageBack } from './use-shell-page-back'
import { useShellStackPop } from './use-shell-stack-pop'
import { usePageLocationOnFold } from './page-location-on-fold'
@@ -263,6 +264,7 @@ export function MobileWebShellScreen({
// The stream survives dropped frames; keep a count because diagnostics print only once per host.
onBinaryFramesDropped: reportDroppedBinaryFrames
})
useAppLeavesForeground(bridge.sendAppInactive)
// paneKey changes keep the session mounted; the host deduplicates routes and preserves in-flight frames.
useShellPageStorageRefresh(refreshStorage, bridge.publishStorage)
@@ -8,6 +8,8 @@ export type BridgeSessionBack = {
readonly storageKeys?: readonly string[]
/** The page's `ready` said it reads `connectionPath` frames. */
readonly connectionPathFrames?: true
/** The page's `ready` said it reads `appInactive` frames. */
readonly appInactiveFrames?: true
readonly terminalKeyRailClaim?: { readonly inputOwner?: string }
}
@@ -168,6 +168,8 @@ export type BridgeHost = {
* every page older than the frame; the caller then leaves the key to the navigator.
*/
sendBack: () => boolean
/** Tells a page that reads it that the app is leaving the foreground; nothing for older pages. */
sendAppInactive: () => void
// Transfer the session’s Back state on client-driven host rebuild; the mounted page never reclaims it. Ending sessions simply discard it.
readSessionBack: () => BridgeSessionBack
dispose: () => void
@@ -249,6 +249,19 @@ describe('init and state', () => {
})
})
it('tells only a page that reads them that the app is leaving the foreground', () => {
const reads = harness()
reads.host.receive(clientFrame({ type: 'ready', appInactiveFrames: true }))
reads.host.sendAppInactive()
expect(reads.last().type).toBe('appInactive')
const older = harness()
older.host.receive(clientFrame({ type: 'ready' }))
const sent = older.frames().length
older.host.sendAppInactive()
expect(older.frames()).toHaveLength(sent)
})
it('sends no path frame to a page that never said it reads them', () => {
let notifyPath = () => {}
const client = createFakeRpcClient({
@@ -1,4 +1,5 @@
import type { ConnectionState } from '../transport/connection/connection-state'
import { BRIDGE_APP_INACTIVE_FRAME } from './bridge/bridge-app-inactive'
import { BridgeCapExceededError } from './bridge-host-errors'
import { createNativeVerbServer } from './bridge-host-native-verbs'
@@ -67,6 +68,7 @@ export function createBridgeHost(options: BridgeHostOptions): BridgeHost {
// re-handshake. Null is a page older than `storageKeys`, which gets the legacy keys only.
let pageStorageKeys: readonly string[] | null = options.sessionBack?.storageKeys ?? null
let pageReadsConnectionPath = options.sessionBack?.connectionPathFrames === true
let pageReadsAppInactive = options.sessionBack?.appInactiveFrames === true
const frames = createBridgeHostFrames({
post: options.post,
@@ -218,6 +220,7 @@ export function createBridgeHost(options: BridgeHostOptions): BridgeHost {
serving = true
pageStorageKeys = message.storageKeys ?? null
pageReadsConnectionPath = message.connectionPathFrames === true
pageReadsAppInactive = message.appInactiveFrames === true
back.readReady()
// Dropped like the Back claim: a page still showing a terminal claims again on this `init`.
reportRailClaim(false)
@@ -331,11 +334,17 @@ export function createBridgeHost(options: BridgeHostOptions): BridgeHost {
publishUiLocale: (next) => {
routes.publishUiLocale(next, deliverable())
},
sendAppInactive: () => {
if (pageReadsAppInactive && deliverable()) {
send({ v: BRIDGE_PROTOCOL_VERSION, type: BRIDGE_APP_INACTIVE_FRAME })
}
},
sendBack: back.send,
readSessionBack: () => ({
...back.read(),
...(pageStorageKeys === null ? {} : { storageKeys: pageStorageKeys }),
...(pageReadsConnectionPath ? { connectionPathFrames: true as const } : {}),
...(pageReadsAppInactive ? { appInactiveFrames: true as const } : {}),
...(railClaimed ? { terminalKeyRailClaim: { inputOwner: railOwner } } : {})
}),
dispose
@@ -0,0 +1,22 @@
/**
* Shell to page, a frame: the app is leaving the foreground. iOS sends a page `visibilitychange`
* only once the app reaches the background, and a swipe-kill from the app switcher can stop it
* while it is merely inactive, so the page saves what it would save on hide when this arrives.
* Pages that read it say so in `ready`; older pages never receive one, and older shells never
* send one, so the page keeps saving on hide alone.
*/
export const BRIDGE_APP_INACTIVE_FRAME = 'appInactive'
const listeners = new Set<() => void>()
/** Page side: runs `listener` each time the shell says the app is leaving the foreground. */
export function onPageAppInactive(listener: () => void): () => void {
listeners.add(listener)
return () => listeners.delete(listener)
}
export function emitPageAppInactive(): void {
for (const listener of listeners) {
listener()
}
}
@@ -11,6 +11,7 @@ import {
type BridgeHostMessage
} from './bridge-envelope'
import { reconstructBridgeError } from './bridge-error-capture'
import { BRIDGE_APP_INACTIVE_FRAME } from './bridge-app-inactive'
export type BridgeInboundFramePort = {
requests: BridgeClientRequests
@@ -21,6 +22,7 @@ export type BridgeInboundFramePort = {
acceptConnectionPath: (connection: BridgeConnectionSnapshot) => void
acceptBack: () => void
acceptParked: () => void
acceptAppInactive: () => void
acceptTerminalKey: (key: BridgeTerminalKeyId, inputOwner?: string) => void
}
@@ -70,6 +72,9 @@ export function createBridgeInboundFrameReader(
case 'parked':
port.acceptParked()
return
case BRIDGE_APP_INACTIVE_FRAME:
port.acceptAppInactive()
return
case 'terminalKey':
port.acceptTerminalKey(message.key, message.inputOwner)
return
@@ -46,6 +46,7 @@ export function createPageReadyFrame(): Extract<BridgeClientMessage, { type: 're
v: BRIDGE_PROTOCOL_VERSION,
type: 'ready',
storageKeys: [...NEGOTIATED_PAGE_STORAGE_KEYS],
connectionPathFrames: true
connectionPathFrames: true,
appInactiveFrames: true
}
}
@@ -1,4 +1,5 @@
import * as z from 'zod'
import { BRIDGE_APP_INACTIVE_FRAME } from './bridge-app-inactive'
import { salvagedOptional } from '../../../../src/shared/zod-salvage'
import { SUPPORTED_UI_LOCALES } from '../../../../src/shared/ui-locale'
import { NODE_PLATFORM_NAMES } from '../../transport/connection/mobile-runtime-host-platform'
@@ -150,7 +151,9 @@ const BridgeClientMessageSchema = z.discriminatedUnion('type', [
.optional()
.catch(undefined),
// Pages that read `connectionPath` frames say so; older pages never receive one.
connectionPathFrames: z.literal(true).optional().catch(undefined)
connectionPathFrames: z.literal(true).optional().catch(undefined),
// Pages that read `appInactive` frames say so; older pages never receive one.
appInactiveFrames: z.literal(true).optional().catch(undefined)
}),
z.object({
v: versionSchema,
@@ -238,6 +241,8 @@ const BridgeHostMessageSchema = z.union([
z.object({ v: versionSchema, type: z.literal(BRIDGE_BACK_FRAME) }),
// Native booted this page ahead of its screen and keeps its ready for the screen that adopts it.
z.object({ v: versionSchema, type: z.literal('parked') }),
// The app is leaving the foreground: save what a hide would save (bridge-app-inactive.ts).
z.object({ v: versionSchema, type: z.literal(BRIDGE_APP_INACTIVE_FRAME) }),
// One press on the shell's key rail. Sent only to a page granted the rail, which knows the frame.
z.object({
v: versionSchema,
@@ -1,4 +1,5 @@
import type { RpcClient } from '../../transport/rpc/rpc-client-contract'
import { emitPageAppInactive } from './bridge-app-inactive'
import type { SendRequestOptions } from '../../transport/rpc/unvalidated-rpc-request-port'
import type { ConnectionState } from '../../transport/connection/connection-state'
import type { RpcResponse, RpcSuccess } from '../../transport/rpc/rpc-wire-types'
@@ -200,6 +201,7 @@ export function createBridgeRpcClient(options: BridgeRpcClientOptions): BridgeRp
acceptBack: back.press,
// Only a page booted before its screen, with no init yet, is parked; the shell answers its ready on adoption.
acceptParked: handshake.stop,
acceptAppInactive: emitPageAppInactive,
acceptTerminalKey: (key, inputOwner) => terminalKeys.accept(key, inputOwner)
})
@@ -0,0 +1,41 @@
import { useEffect, useLayoutEffect, useRef } from 'react'
import { AppState } from 'react-native'
/**
* Calls `onLeave` once each time the app leaves the foreground, before the system can kill it from the app
* switcher. iOS: `inactive` (the app switcher, Notification Centre, Face ID); a page is hidden only once the app
* reaches the background, which a swipe-kill can skip. Android: window `blur` (Recents, the notification shade, and
* the app's own dialogs and sheets), because Recents leaves the activity resumed until the swipe kills the process.
* Callers must keep the work cheap and idempotent: it runs on every such flap.
* Not covered: on Android, Recents opened over one of the app's own sheets sends nothing more (the sheet's blur
* already did), so rows streamed in while the sheet was open wait for the next save.
*/
export function useAppLeavesForeground(onLeave: () => void): void {
const onLeaveRef = useRef(onLeave)
useLayoutEffect(() => {
onLeaveRef.current = onLeave
}, [onLeave])
useEffect(() => {
let away = AppState.currentState !== 'active'
const leave = (): void => {
if (!away) {
away = true
onLeaveRef.current()
}
}
const back = (): void => {
away = false
}
const change = AppState.addEventListener('change', (next) =>
next === 'active' ? back() : leave()
)
// Window focus events come from Android only.
const blur = AppState.addEventListener('blur', leave)
const focus = AppState.addEventListener('focus', back)
return () => {
change.remove()
blur.remove()
focus.remove()
}
}, [])
}
@@ -69,6 +69,8 @@ export type MobileWebShellBridgeView = {
* serves never said it takes one — the caller then leaves the key to the navigator.
*/
readonly sendBack: () => boolean
/** Tells the mounted page the app is leaving the foreground; nothing with no host or an older page. */
readonly sendAppInactive: () => void
}
export type MobileWebShellBridgeArgs = {
@@ -342,6 +344,10 @@ export function useMobileWebShellBridge(args: MobileWebShellBridgeArgs): MobileW
sendBack: useCallback(() => {
const mounted = hostRef.current
return mounted !== null && mounted.sessionId === sessionId && mounted.host.sendBack()
}, [sessionId]),
sendAppInactive: useCallback(() => {
const mounted = hostRef.current
return mounted?.sessionId === sessionId ? mounted.host.sendAppInactive() : undefined
}, [sessionId])
}
}
+5 -1
View File
@@ -1,6 +1,10 @@
import type { DictationTerm } from '../../../src/shared/dictation-dictionary'
import type { OnDeviceSpeech } from './on-device-speech-contract'
// The session screen is a page in the shell (on-device-speech.web.ts); native screens dictate through the computer.
export function useOnDeviceSpeech(_removeFillerWords?: boolean): OnDeviceSpeech | null {
export function useOnDeviceSpeech(
_removeFillerWords?: boolean,
_dictationTerms?: readonly DictationTerm[]
): OnDeviceSpeech | null {
return null
}
+23 -12
View File
@@ -1,4 +1,5 @@
import { useLayoutEffect, useMemo, useRef } from 'react'
import type { DictationTerm } from '../../../src/shared/dictation-dictionary'
import { createDictationTextPipeline } from '../../../src/shared/dictation-text-pipeline'
import { useNativeVerbs, type NativeVerbs } from '../mobile-web-shell/bridge/use-native-verbs'
import type { OnDeviceSpeech } from './on-device-speech-contract'
@@ -9,25 +10,32 @@ const keepText = (text: string): string => text
// The phone's recognizer transcribes only the locale it started in, so that locale's language picks the fillers, as the host does for its model.
function phoneDictationTextCleaner(
locale: string | null,
removeFillerWords: boolean
removeFillerWords: boolean,
dictationTerms: readonly DictationTerm[] | undefined
): (text: string) => string {
const language = locale?.split('-')[0].toLowerCase()
const clean = createDictationTextPipeline(language ? { language } : undefined, {
removeFillerWords
})
const clean = createDictationTextPipeline(
language ? { language } : undefined,
{ removeFillerWords },
dictationTerms
)
return clean ?? keepText
}
function createPageOnDeviceSpeech(
verbs: NativeVerbs,
removeFillerWords: () => boolean
textSettings: () => {
removeFillerWords: boolean
dictationTerms: readonly DictationTerm[] | undefined
}
): OnDeviceSpeech {
let clean = keepText
return {
status: () => verbs.speechStatus(onDeviceSpeechLocale()),
start: async () => {
const started = await verbs.speechStart(onDeviceSpeechLocale())
clean = phoneDictationTextCleaner(started.locale, removeFillerWords())
const { removeFillerWords, dictationTerms } = textSettings()
clean = phoneDictationTextCleaner(started.locale, removeFillerWords, dictationTerms)
return started
},
read: async () => {
@@ -46,17 +54,20 @@ function createPageOnDeviceSpeech(
}
// Null on a shell without the verb, so dictation stays on the computer exactly as before.
// removeFillerWords is the computer's switch, read at each start.
export function useOnDeviceSpeech(removeFillerWords = true): OnDeviceSpeech | null {
// The computer's filler switch and dictionary for this worktree, read at each start.
export function useOnDeviceSpeech(
removeFillerWords = true,
dictationTerms?: readonly DictationTerm[]
): OnDeviceSpeech | null {
const verbs = useNativeVerbs()
const removeFillerWordsRef = useRef(removeFillerWords)
const textSettingsRef = useRef({ removeFillerWords, dictationTerms })
useLayoutEffect(() => {
removeFillerWordsRef.current = removeFillerWords
}, [removeFillerWords])
textSettingsRef.current = { removeFillerWords, dictationTerms }
}, [removeFillerWords, dictationTerms])
return useMemo(
() =>
verbs.canRecognizeSpeech
? createPageOnDeviceSpeech(verbs, () => removeFillerWordsRef.current)
? createPageOnDeviceSpeech(verbs, () => textSettingsRef.current)
: null,
[verbs]
)
@@ -1,5 +1,6 @@
import type { QueryClient } from '@tanstack/react-query'
import { normalizeExecutionHostId } from '../../../src/shared/execution-host'
import { accountsSnapshotFamily, accountsSnapshotKey } from '../accounts/accounts-snapshot-stream'
import {
HOST_LIST_TARGET,
hostRepoCatalogQuery,
@@ -44,6 +45,11 @@ export function firstPaintQueryKeys(hostId: string, route: URL): PersistedHostQu
if (screen === 'tasks') {
return firstPaintTaskKeys(hostId)
}
if (screen === 'accounts') {
return [persistedHostQueryKey(accountsSnapshotFamily, accountsSnapshotKey(hostId))].filter(
(key) => key !== null
)
}
if (screen === 'new-workspace') {
// The drawer's existing-workspace check and host labels.
return [
+27 -6
View File
@@ -142,25 +142,46 @@ export async function readHostQueryLive<TInput extends HostQueryParams, TData>(
}
// A cached read through the screen's `read`: reuses a fresh answer and joins a read already out. An answer
// an event marked stale as it landed predates that change, so it is read again.
// an event marked stale as it landed predates that change, so it goes to `onStale` (still the newest one) and is
// read again while `isCurrent` holds: at once after a quiet spell (a write's own event lands mid-read), else
// `floorMs` after it landed.
export async function fetchHostQuery<TInput extends HostQueryParams, TData>(
queryClient: QueryClient,
query: HostQuery<TInput, TData>,
host: { hostId: string; client: RpcClient },
target: HostQueryTarget,
input: TInput,
read: () => Promise<TData>
reader: { read: () => Promise<TData>; isCurrent: () => boolean; onStale: (data: TData) => void }
): Promise<TData> {
const { isCurrent } = reader
const options = {
...hostQueryOptions(query, host.client, host.hostId, target, input),
queryFn: read
queryFn: reader.read
}
const floorMs = query.signal?.floorMs ?? 0
const before = queryClient.getQueryState(options.queryKey)
let quiet =
before?.fetchStatus !== 'fetching' && (before?.dataUpdatedAt ?? 0) + floorMs <= Date.now()
let data = await queryClient.fetchQuery(options)
// Each pass needs a newer event, so this ends with the event burst.
while (queryClient.getQueryState(options.queryKey)?.isInvalidated) {
for (;;) {
const state = queryClient.getQueryState(options.queryKey)
// A caller that moved on never shows this answer, so it is not read again.
if (!state?.isInvalidated || !isCurrent()) {
return data
}
reader.onStale(data)
if (state.fetchStatus === 'idle') {
const wait = quiet ? 0 : state.dataUpdatedAt + floorMs - Date.now()
quiet = false
if (wait > 0) {
await new Promise((resolve) => setTimeout(resolve, wait))
if (!isCurrent()) {
return data
}
}
}
data = await queryClient.fetchQuery(options)
}
return data
}
// A read ahead of the user: skipped while the key holds current data, joins a read already out.
@@ -1,3 +1,4 @@
import { AGENT_SESSION_FAILURE_COPY } from '../../../src/shared/agent-session/failures/agent-session-failure-copy'
import type {
AgentSessionFailureCopyId,
AgentSessionFailureCopyValues
@@ -53,6 +54,26 @@ export const SEND_FAILURE_COPY = {
"{{agent}} couldn't use {{detail}}. Update {{agent}} to {{minimumVersion}} or later to keep it after a restart, or pick another model and send again.",
values
),
selectedModel: (values) =>
translate('session.failure.selectedModel', AGENT_SESSION_FAILURE_COPY.selectedModel, values),
providerUnavailable: (values) =>
translate(
'session.failure.providerUnavailable',
AGENT_SESSION_FAILURE_COPY.providerUnavailable,
values
),
providerSafetyStopped: (values) =>
translate(
'session.failure.providerSafetyStopped',
AGENT_SESSION_FAILURE_COPY.providerSafetyStopped,
values
),
providerResponseFailed: (values) =>
translate(
'session.failure.providerResponseFailed',
AGENT_SESSION_FAILURE_COPY.providerResponseFailed,
values
),
providerRejected: (values) =>
translate('session.failure.providerRejected', "{{agent}} didn't accept this message.", values),
providerRejectedQuoted: (values) =>

Some files were not shown because too many files have changed in this diff Show More