diff --git a/.github/actions/cloud-sql-rollout-lease/action-contract.test.mjs b/.github/actions/cloud-sql-rollout-lease/action-contract.test.mjs deleted file mode 100644 index 4acfc3552da..00000000000 --- a/.github/actions/cloud-sql-rollout-lease/action-contract.test.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { test } from 'node:test' - -const here = new URL('./', import.meta.url) -const action = readFileSync(new URL('action.yml', here), 'utf8') - -test('is a node24 JavaScript action with an always-run post step', () => { - // A composite action has no `post:`, so the lease could never be released on cancel or failure. - assert.match(action, /^ {2}using: node24$/m) - assert.doesNotMatch(action, /using: composite/) - assert.match(action, /^ {2}main: main\.mjs$/m) - assert.match(action, /^ {2}post: post\.mjs$/m) - assert.match(action, /^ {2}post-if: always\(\)$/m) -}) - -test('declares the inputs the wave-chain callers depend on', () => { - for (const input of ['bucket:', 'object:', 'holder-key:', 'release:']) { - assert.match(action, new RegExp(`^ {2}${input}$`, 'm'), input) - } - assert.match(action, /default: \$\{\{ github\.repository \}\}\/\$\{\{ github\.run_id \}\}/) - assert.match(action, /default: 'true'/) -}) diff --git a/.github/actions/cloud-sql-rollout-lease/storage-lease.test.mjs b/.github/actions/cloud-sql-rollout-lease/storage-lease.test.mjs index 73d1a1e6e78..469f64291d4 100644 --- a/.github/actions/cloud-sql-rollout-lease/storage-lease.test.mjs +++ b/.github/actions/cloud-sql-rollout-lease/storage-lease.test.mjs @@ -234,18 +234,6 @@ test('fails closed when the bucket answers 5xx', async () => { assert.equal(storage.state.requests.filter((request) => request.method !== 'GET').length, 0) }) -test('fails closed when permission is denied', async () => { - const storage = fakeStorage({ - faults: [{ when: (request) => request.method === 'GET', status: 403 }] - }) - - const error = await leaseFor(storage) - .acquire(HOLDER) - .catch((thrown) => thrown) - - assert.match(error.message, /lease inspection failed: 403/) -}) - test('treats an unreadable record as held, not free', async () => { const storage = fakeStorage({ object: { generation: '1500', body: { holder_key: 'stablyai/orca/9001' } } diff --git a/.github/workflows/mobile-android-release.yml b/.github/workflows/mobile-android-release.yml index f8c00264af7..ed0820862a5 100644 --- a/.github/workflows/mobile-android-release.yml +++ b/.github/workflows/mobile-android-release.yml @@ -284,10 +284,22 @@ jobs: "${{ steps.apk.outputs.checksum }}" fi - # Keep site bump advisory after publication; failure only leaves its download link on the prior APK. - bump-apk-download: + # Advisory like the site bump: a failed mirror only leaves onorca.dev's "mirror link" on the prior APK. + release-mirror-r2: needs: android-build if: needs.android-build.outputs.publish_release == 'true' + uses: ./.github/workflows/release-mirror-r2.yml + with: + tag: mobile-android-v${{ needs.android-build.outputs.version }} + assets: app-release.apk + secrets: inherit + + # Keep site bump advisory after publication; failure only leaves its download link on the prior APK. + # Why after the mirror: the site's mirror link uses the bumped version, so upload the APK first + # (success not required, so a mirror outage never blocks the bump). + bump-apk-download: + needs: [android-build, release-mirror-r2] + if: ${{ !cancelled() && needs.android-build.outputs.publish_release == 'true' }} runs-on: ubuntu-latest continue-on-error: true permissions: diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 9c0dce4ed7d..0f39b9c1f4a 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -298,8 +298,19 @@ jobs: echo 'should_run=true' >> "$GITHUB_OUTPUT" fi - - name: Setup Bun for tests + - name: Find installed Bun + id: installed-bun if: steps.test-scope.outputs.should_run != 'false' + shell: bash + working-directory: . + run: | + bun="$GITHUB_WORKSPACE/node_modules/.bin/bun" + if [ -x "$bun" ] && [ "$("$bun" --version)" = "$(cat config/.bun-version)" ]; then + echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH" + echo 'found=true' >> "$GITHUB_OUTPUT" + fi + - name: Setup Bun for tests + if: steps.test-scope.outputs.should_run != 'false' && steps.installed-bun.outputs.found != 'true' uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version-file: config/.bun-version @@ -431,7 +442,18 @@ jobs: run: node scripts/check-tests-typecheck-ratchet.mjs # Run all golden consumers, including mutant/page-bridge suites; failures name the recording and rpc:record command. + - name: Find installed Bun + id: installed-bun + shell: bash + working-directory: . + run: | + bun="$GITHUB_WORKSPACE/node_modules/.bin/bun" + if [ -x "$bun" ] && [ "$("$bun" --version)" = "$(cat config/.bun-version)" ]; then + echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH" + echo 'found=true' >> "$GITHUB_OUTPUT" + fi - name: Setup Bun for tests + if: steps.installed-bun.outputs.found != 'true' uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version-file: config/.bun-version diff --git a/.github/workflows/node-server-tests.yml b/.github/workflows/node-server-tests.yml index 4d704d4437e..18334d1e587 100644 --- a/.github/workflows/node-server-tests.yml +++ b/.github/workflows/node-server-tests.yml @@ -183,8 +183,18 @@ jobs: # Design D7 upgrade and rollback: the last Bun orcad, built from a main commit that shipped # it, using the current Bun pin beside this checkout's Node slot; hand-over skips once PROTOCOL_VERSION # moves past the Bun daemon's. Install its pinned dependencies independently of this checkout. - - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + - name: Find installed Bun + id: installed-bun if: runner.os == 'Linux' + shell: bash + run: | + bun="$GITHUB_WORKSPACE/node_modules/.bin/bun" + if [ -x "$bun" ] && [ "$("$bun" --version)" = "$(cat config/.bun-version)" ]; then + echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH" + echo 'found=true' >> "$GITHUB_OUTPUT" + fi + - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + if: runner.os == 'Linux' && steps.installed-bun.outputs.found != 'true' with: bun-version-file: config/.bun-version no-cache: true diff --git a/.github/workflows/orca-server-artifact.yml b/.github/workflows/orca-server-artifact.yml new file mode 100644 index 00000000000..2840ad7caa7 --- /dev/null +++ b/.github/workflows/orca-server-artifact.yml @@ -0,0 +1,133 @@ +name: Server-only Linux artifact + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + paths: + - 'config/scripts/orcad-distribution/server-artifact/**' + - '.github/workflows/orca-server-artifact.yml' + # The launcher relies on how the CLI picks and starts its serve runtime. + - 'src/cli/runtime/launch.ts' + - 'src/cli/runtime/orca-app-executable.ts' + - 'src/cli/runtime/serve-orcad-launch.ts' + - 'src/shared/orcad-local-serve-selection.ts' + - 'src/shared/orcad-artifacts.ts' + # Catch serve regressions on main between releases. + schedule: + - cron: '45 11 * * *' + workflow_dispatch: + # Releases pass the qualified template this run already built, so the tarball ships its exact bytes. + workflow_call: + inputs: + ref: + description: Git ref to check out, e.g. the release tag + type: string + required: true + template_artifact: + description: Name of this run's qualified orcad-template artifact; blank builds the host slot + type: string + default: '' + outputs: + packed: + description: "'true' when both tarballs were packed and passed the smoke" + value: ${{ jobs.package.outputs.packed }} + +permissions: + contents: read + +concurrency: + group: orca-server-artifact-${{ inputs.ref && format('run-{0}', github.run_id) || github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ !inputs.ref }} + +jobs: + package: + if: github.event_name != 'pull_request' || github.event.pull_request.draft != true + strategy: + fail-fast: false + matrix: + include: + - arch: x64 + runner: ubuntu-24.04 + - arch: arm64 + runner: ubuntu-24.04-arm + runs-on: ${{ matrix.runner }} + timeout-minutes: 30 + permissions: + contents: read + actions: read + env: + ORCA_BACKGROUND_LAUNCH: '1' + TARGET: linux-${{ matrix.arch }}-glibc + outputs: + packed: ${{ steps.smoke.outcome == 'success' }} + steps: + - uses: actions/checkout@v6 + with: + ref: ${{ inputs.ref }} + persist-credentials: false + # A release cut from a ref older than this workflow has nothing to pack; skip instead of failing. + - name: Check the ref can pack the tarball + id: supported + run: | + if [ -f config/scripts/orcad-distribution/server-artifact/pack-orcad-server-artifact.mjs ]; then + echo 'supported=true' >> "$GITHUB_OUTPUT" + else + echo '::notice::This ref predates the server-only tarball; skipping it.' + fi + - uses: ./.github/actions/install-node-dependencies + if: steps.supported.outputs.supported == 'true' + with: + cache-pnpm-store: ${{ !inputs.ref }} + - name: Use the qualified release template + if: steps.supported.outputs.supported == 'true' && inputs.template_artifact != '' + uses: actions/download-artifact@v8 + with: + name: ${{ inputs.template_artifact }} + path: out/orcad-template + # Without a release template, build this runner's slot the way the desktop template does. + - uses: ./.github/actions/build-mobile-web-bundle + if: steps.supported.outputs.supported == 'true' && inputs.template_artifact == '' + - name: Build this runner's template slot + if: steps.supported.outputs.supported == 'true' && inputs.template_artifact == '' + run: pnpm build:orcad-template --targets "$TARGET" + - name: Pack the tarball + if: steps.supported.outputs.supported == 'true' + run: | + pnpm build:packages + SOURCE_DATE_EPOCH="$(git log -1 --format=%ct)" node config/scripts/orcad-distribution/server-artifact/pack-orcad-server-artifact.mjs --template out/orcad-template --target "$TARGET" --out-dir out/orca-server + { + echo "### orca-server-linux-${{ matrix.arch }}" + echo '```' + ls -l out/orca-server + cat out/orca-server/*.sha256 + echo '```' + } >> "$GITHUB_STEP_SUMMARY" + - name: Start and pair on the runner + if: steps.supported.outputs.supported == 'true' + run: node config/scripts/orcad-distribution/server-artifact/smoke-orcad-server-artifact.mjs --archive "out/orca-server/orca-server-linux-${{ matrix.arch }}.tar.gz" + # Bare images with no Node, display, GTK or X11: the tarball's own Node runs the smoke. + - name: Start and pair on minimal images + id: smoke + if: steps.supported.outputs.supported == 'true' + run: | + for image in ubuntu:24.04 debian:12-slim; do + echo "::group::$image" + docker run --rm --init \ + -v "$PWD/out/orca-server:/artifacts:ro" \ + -v "$PWD/config/scripts/orcad-distribution/server-artifact:/smoke:ro" \ + "$image" sh -ec ' + mkdir -p /tmp/runtime + tar -xzf /artifacts/orca-server-linux-${{ matrix.arch }}.tar.gz -C /tmp/runtime --strip-components=1 + /tmp/runtime/runtimes/node-*/bin/node /smoke/smoke-orcad-server-artifact.mjs --archive /artifacts/orca-server-linux-${{ matrix.arch }}.tar.gz + ' + echo '::endgroup::' + done + - uses: actions/upload-artifact@v7 + if: steps.supported.outputs.supported == 'true' + with: + name: orca-server-linux-${{ matrix.arch }} + path: | + out/orca-server/orca-server-linux-${{ matrix.arch }}.tar.gz + out/orca-server/orca-server-linux-${{ matrix.arch }}.tar.gz.sha256 + if-no-files-found: error + retention-days: 7 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 578dcdd68d9..13bed76ed0c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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 diff --git a/.github/workflows/release-cut.yml b/.github/workflows/release-cut.yml index 5a98aa59bc7..01ed0b8ffe1 100644 --- a/.github/workflows/release-cut.yml +++ b/.github/workflows/release-cut.yml @@ -1039,6 +1039,21 @@ jobs: ref: refs/tags/${{ needs.cut.outputs.tag }} fast_runners: false + # Server-only Linux tarballs from the same qualified template. Nothing depends on this job, so a + # failure here never holds the desktop release. + orca-server-artifact: + needs: + - cut + - orcad-template + if: ${{ !cancelled() && needs.cut.outputs.should_release == 'true' && needs.orcad-template.result == 'success' }} + permissions: + contents: read + actions: read + uses: ./.github/workflows/orca-server-artifact.yml + with: + ref: refs/tags/${{ needs.cut.outputs.tag }} + template_artifact: orcad-template + # Gate SignPath artifact requests behind blocking tests to avoid approvals for unpublishable builds. release-preflight: needs: @@ -2241,6 +2256,39 @@ jobs: --prerelease="$prerelease" \ --repo "$GITHUB_REPOSITORY" + # After publish: the draft's asset checks and undraft never see these, and a failure here only + # leaves the server tarballs missing from an already published release. + publish-orca-server-artifact: + needs: + - cut + - publish-release + - orca-server-artifact + if: ${{ !cancelled() && needs.publish-release.result == 'success' && needs.orca-server-artifact.result == 'success' && needs.orca-server-artifact.outputs.packed == 'true' && needs.cut.outputs.tag != '' }} + runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: write + steps: + - uses: actions/download-artifact@v8 + with: + pattern: orca-server-linux-* + path: orca-server + merge-multiple: true + - name: Write the checksum manifest and upload + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ needs.cut.outputs.tag }} + working-directory: orca-server + run: | + set -euo pipefail + cat orca-server-linux-x64.tar.gz.sha256 orca-server-linux-arm64.tar.gz.sha256 > orca-server-sha256sums.txt + sha256sum -c orca-server-sha256sums.txt + gh release upload "$TAG" \ + orca-server-linux-x64.tar.gz \ + orca-server-linux-arm64.tar.gz \ + orca-server-sha256sums.txt \ + --clobber --repo "$GITHUB_REPOSITORY" + post-release-e2e: needs: - cut @@ -2305,6 +2353,17 @@ jobs: echo "::error::Failed to dispatch docs deployment for $TAG after 3 attempts." exit 1 + release-mirror-r2: + needs: + - cut + - publish-release + # Why stable-only: onorca.dev's mirror link tracks GitHub's latest release, which skips RCs. + if: ${{ !cancelled() && needs.publish-release.result == 'success' && needs.cut.outputs.tag != '' && !contains(needs.cut.outputs.tag, '-rc.') && startsWith(needs.cut.outputs.tag, 'v') }} + uses: ./.github/workflows/release-mirror-r2.yml + with: + tag: ${{ needs.cut.outputs.tag }} + secrets: inherit + homebrew-bump-published-rc-draft: needs: - cut diff --git a/.github/workflows/release-mirror-r2.yml b/.github/workflows/release-mirror-r2.yml new file mode 100644 index 00000000000..1c26596b29a --- /dev/null +++ b/.github/workflows/release-mirror-r2.yml @@ -0,0 +1,64 @@ +name: Release Mirror (R2) + +# Copy published release downloads to the public R2 bucket behind https://downloads.onorca.dev. +# onorca.dev keeps GitHub as the default download and offers this as an opt-in "mirror link" +# for when GitHub release downloads return 5xx. Called by release-cut (stable desktop tags) and +# mobile-android-release after publishing; dispatch manually to backfill a tag. + +on: + workflow_call: + inputs: + tag: + description: Published release tag to mirror (e.g. v1.4.254 or mobile-android-v0.0.64) + required: true + type: string + assets: + description: Space-separated asset names (blank = the onorca.dev download assets) + required: false + default: '' + type: string + workflow_dispatch: + inputs: + tag: + description: Published release tag to mirror (e.g. v1.4.254 or mobile-android-v0.0.64) + required: true + type: string + assets: + description: Space-separated asset names (blank = the onorca.dev download assets) + required: false + default: '' + type: string + +# Why: two releases landing close together must not interleave writes to latest/. +concurrency: + group: release-mirror-r2 + cancel-in-progress: false + +jobs: + mirror: + runs-on: ubuntu-latest + timeout-minutes: 60 + permissions: + contents: read + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Mirror release assets + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + TAG: ${{ inputs.tag }} + ASSETS: ${{ inputs.assets }} + # R2 S3 API keys with Object Read & Write on the orca-downloads bucket. + R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} + R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} + WORK_DIR: ${{ runner.temp }}/release-mirror + run: | + set -euo pipefail + if [[ -z "$R2_ACCESS_KEY_ID" || -z "$R2_SECRET_ACCESS_KEY" ]]; then + echo "::error::Set the R2_ACCESS_KEY_ID and R2_SECRET_ACCESS_KEY secrets to mirror releases to R2." + exit 1 + fi + read -r -a assets <<<"$ASSETS" + config/scripts/release/publication/mirror-release-to-r2.sh "$TAG" "${assets[@]}" diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 671ab785da7..0473b42de3b 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -94,7 +94,17 @@ jobs: run: | ELECTRON_RUN_AS_NODE=1 "$(node -p "require('electron')")" --version + - name: Find installed Bun + id: installed-bun + shell: bash + run: | + bun="$GITHUB_WORKSPACE/node_modules/.bin/bun" + if [ -x "$bun" ] && [ "$("$bun" --version)" = "$(cat config/.bun-version)" ]; then + echo "$GITHUB_WORKSPACE/node_modules/.bin" >> "$GITHUB_PATH" + echo 'found=true' >> "$GITHUB_OUTPUT" + fi - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 + if: steps.installed-bun.outputs.found != 'true' with: bun-version-file: config/.bun-version no-cache: true diff --git a/README.md b/README.md index fb1c8fac524..8daff8adc7b 100644 --- a/README.md +++ b/README.md @@ -32,20 +32,6 @@ -### Orchestrate Agents - -Hand a big task to one agent. It splits the work, starts worker agents in their own workspaces, and brings their results back to you. - -[Docs →](https://www.onorca.dev/docs/cli/orchestration) - - - - A coordinator agent splitting a task between two worker agents and reporting their results - - - - - ### Chat or Terminal Run any agent in Chat UI or as the raw CLI, and move a conversation between the two without losing context. @@ -60,6 +46,20 @@ Run any agent in Chat UI or as the raw CLI, and move a conversation between the +### Orchestrate Agents + +Hand a big task to one agent. It splits the work, starts worker agents in their own workspaces, and brings their results back to you. + +[Docs →](https://www.onorca.dev/docs/cli/orchestration) + + + + A coordinator agent splitting a task between two worker agents and reporting their results + + + + + ### Run Anywhere Pair a Remote Orca Server, work on any SSH host, or give a worktree its own cloud VM. Your agents keep running when your laptop sleeps. diff --git a/cloud/dev/scripts/run-relay-tests.test.mjs b/cloud/dev/scripts/run-relay-tests.test.mjs index 1f806f183dc..70a332ea205 100644 --- a/cloud/dev/scripts/run-relay-tests.test.mjs +++ b/cloud/dev/scripts/run-relay-tests.test.mjs @@ -110,8 +110,7 @@ for (const [name, options] of [ { env: { ORCA_IDLE_REHOME_POSTGRES_URL: 'postgres://localhost:55440/relay' } } ], ['application database', { env: { DATABASE_URL: databaseUrl } }], - ['one CPU', { parallelism: 1 }], - ['two CPUs', { parallelism: 2 }] + ['one CPU', { parallelism: 1 }] ]) { test(`retains the original single run for ${name}`, async (t) => { const h = start(t, options) diff --git a/config/build-plugins/cli-main-entry-names.ts b/config/build-plugins/cli-main-entry-names.ts index 56905221b8e..4c11dc043b1 100644 --- a/config/build-plugins/cli-main-entry-names.ts +++ b/config/build-plugins/cli-main-entry-names.ts @@ -12,6 +12,9 @@ export const CLI_MAIN_ENTRY_NAMES = [ 'orcad/orcad-stale-lock-reclaim', 'orcad/orcad-host-identity-reset', 'plugins/plugin-authoring-checks', + // `orca vm env doctor` runs its checks in the CLI process. + 'environment-doctor/environment-doctor', + 'environment-doctor/environment-doctor-host', ...[ 'access', 'active-location', diff --git a/config/build-plugins/main-build-entry-points.ts b/config/build-plugins/main-build-entry-points.ts index 1521adc3dc3..819c08e1680 100644 --- a/config/build-plugins/main-build-entry-points.ts +++ b/config/build-plugins/main-build-entry-points.ts @@ -5,7 +5,6 @@ import { CLI_MAIN_ENTRY_NAMES } from './cli-main-entry-names' /** Main-build Rollup inputs: output file name (without .js) to its source entry. */ export const MAIN_BUILD_ENTRY_POINTS: Record = { index: resolve('src/main/index.ts'), - 'browser-extension-preload': resolve('src/preload/browser-extension-preload.ts'), 'browser-extension-native-host-supervisor-entry': resolve( 'src/main/browser/extensions/native-messaging/browser-extension-native-host-supervisor-entry.ts' ), diff --git a/config/build-plugins/sandboxed-script-bundles.ts b/config/build-plugins/sandboxed-script-bundles.ts index 9b1bd0e1f21..3bef5c5c96e 100644 --- a/config/build-plugins/sandboxed-script-bundles.ts +++ b/config/build-plugins/sandboxed-script-bundles.ts @@ -8,7 +8,14 @@ import { type BundledScript = { code: string; moduleIds: string[] } +// Unminified preload keeps dependency JSDoc whose em dashes would force two-byte storage in every renderer. +export const ONE_BYTE_UNMINIFIED_OUTPUT = { + charset: 'ascii', + comments: { legal: true, annotation: true, jsdoc: false } +} as const + const GUEST_PRELOADS = [ + { entry: 'src/preload/browser-extension-preload.ts', fileName: 'browser-extension-preload.js' }, { entry: 'src/preload/browser-guest.ts', fileName: 'browser-guest-preload.js' }, { entry: 'src/preload/doc-preview-link.ts', fileName: 'doc-preview-link-preload.js' }, { entry: 'src/preload/plugin-frame-guest.ts', fileName: 'plugin-frame-guest-preload.js' } @@ -46,7 +53,7 @@ async function bundleScript( name: 'orcaBrowserExtensionScript', fileName: () => fileName }, - rollupOptions: { external: ['electron'] } + rollupOptions: { external: ['electron'], output: ONE_BYTE_UNMINIFIED_OUTPUT } } }) for (const output of Array.isArray(result) ? result : [result]) { diff --git a/config/electron-builder.config.cjs b/config/electron-builder.config.cjs index face51a2e73..b4655ee824e 100644 --- a/config/electron-builder.config.cjs +++ b/config/electron-builder.config.cjs @@ -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{,/**/*}' ], @@ -359,6 +349,8 @@ module.exports = { 'out/main/orca-profiles/profile-index-store.js', 'out/main/persistence/profile-state/**', 'out/main/plugins/plugin-authoring-checks.js', + 'out/main/environment-doctor/environment-doctor.js', + 'out/main/environment-doctor/environment-doctor-host.js', // `orca plugin test` and `orca plugin check` load the runtime, kit and hooks in Node. 'resources/plugins/declarative/*.mjs', 'out/main/skills/bundled-skill-install/bundled-skill-local-host.js', @@ -448,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). @@ -551,7 +550,6 @@ module.exports = { extraResources: [ ...commonExtraResources, ...windowsRuntimeResources, - winSpeechNativeResource, { from: 'resources/win32/bin/orca.cmd', to: 'bin/orca.cmd' @@ -608,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', @@ -631,7 +630,6 @@ module.exports = { extraResources: [ ...commonExtraResources, ...createPackagedRuntimeNodeModuleResources('darwin'), - macSpeechNativeResource, { from: 'resources/darwin/bin/orca', to: 'bin/orca' @@ -696,7 +694,6 @@ module.exports = { extraResources: [ ...commonExtraResources, ...createPackagedRuntimeNodeModuleResources('linux'), - linuxSpeechNativeResource, { from: 'native/wayland-clipboard/.build/${arch}/orca-wayland-clipboard', to: 'bin/orca-wayland-clipboard' diff --git a/config/flaky-test-pattern-baseline.txt b/config/flaky-test-pattern-baseline.txt index f6bcf6ca71e..ae202c028d9 100644 --- a/config/flaky-test-pattern-baseline.txt +++ b/config/flaky-test-pattern-baseline.txt @@ -73,9 +73,7 @@ 1 test-no-polling-loop:src/main/windows/windows-pty-job.win32.test.ts 1 test-no-polling-loop:src/main/worker-thread-child-process/worker-thread-child-process.test.ts 1 test-no-polling-loop:src/main/workspaces/removal/local-worktree-removal-recovery-live.test.ts -1 test-no-polling-loop:src/main/wsl/orcad/wsl-orcad-connection.test.ts 1 test-no-polling-loop:src/main/wsl/orcad/wsl-orcad-real-distro-lane.test.ts -1 test-no-polling-loop:src/main/wsl/orcad/wsl-orcad-stdio-bridge.test.ts 1 test-no-polling-loop:src/renderer/src/components/terminal-pane/pty-connection/emulation/fish-color-scheme-child-stdin.node-pty.test.ts 2 test-no-polling-loop:src/shared/__tests__/process-host/windows-tree-kill-late-taskkill.win32.test.ts 1 test-no-polling-loop:src/shared/darwin-terminal-names-real-ps.test.ts @@ -149,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 @@ -263,10 +260,7 @@ 1 test-no-real-time-wait:src/main/workspaces/creation/preparation/worktree-create-preparation-cancellation.test.ts 1 test-no-real-time-wait:src/main/workspaces/removal/local-worktree-removal-recovery-live.test.ts 2 test-no-real-time-wait:src/main/wsl/execution/wsl-command-loop.test.ts -1 test-no-real-time-wait:src/main/wsl/orcad/wsl-orcad-connection.test.ts 2 test-no-real-time-wait:src/main/wsl/orcad/wsl-orcad-real-distro-lane.test.ts -1 test-no-real-time-wait:src/main/wsl/orcad/wsl-orcad-stdio-bridge.test.ts -3 test-no-real-time-wait:src/main/wsl/orcad/wsl-orcad-watch.test.ts 4 test-no-real-time-wait:src/renderer/src/components/activity/activity-auto-mark-read-loop.react185.test.tsx 1 test-no-real-time-wait:src/renderer/src/components/editor/DiagramViewerModal.test.tsx 1 test-no-real-time-wait:src/renderer/src/components/editor/combined-diff/load-sections/combined-diff-stale-analysis-work-budget.test.tsx @@ -463,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 @@ -565,7 +558,7 @@ 1 test-no-wall-clock:src/main/pty/history/terminal-history-gc-fs-call-count.test.ts 2 test-no-wall-clock:src/main/pty/process-retirement/posix-pty-process-groups.integration.test.ts 4 test-no-wall-clock:src/main/pty/process-retirement/windows-live-tree-kill.win32.test.ts -17 test-no-wall-clock:src/main/rate-limits/service/service-account-target-selection.test.ts +5 test-no-wall-clock:src/main/rate-limits/service/service-account-target-selection.test.ts 1 test-no-wall-clock:src/main/rate-limits/service/service-cursor-usage.test.ts 3 test-no-wall-clock:src/main/rate-limits/service/service-minimax-usage.test.ts 3 test-no-wall-clock:src/main/rate-limits/service/service-refresh-orchestration.test.ts @@ -646,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 @@ -661,10 +653,9 @@ 1 test-no-wall-clock:src/renderer/src/lib/paired-runtime-closed-tab-resume.test.ts 2 test-no-wall-clock:src/renderer/src/lib/use-tab-agent-observed-signal-dispatch.test.tsx 2 test-no-wall-clock:src/renderer/src/lib/wake-sleeping-agents-live-unmounted-pane.test.ts -1 test-no-wall-clock:src/renderer/src/lib/workspace-terminal-host-authority.test.ts +1 test-no-wall-clock:src/renderer/src/lib/workspace/ownership/workspace-terminal-host-authority.test.ts 1 test-no-wall-clock:src/renderer/src/lib/workspace/activation/worktree-activation-emptied-workspace-reseed.test.ts 2 test-no-wall-clock:src/renderer/src/runtime/native-chat/tab-retirement/structured-agent-session-tab-retirement.test.ts -1 test-no-wall-clock:src/renderer/src/runtime/web-session-tabs-sync/closing/close-mirrored-editor-tab.test.ts 2 test-no-wall-clock:src/renderer/src/store/github/pull-requests/github-pr-branch-linked-pr-divergence.test.ts 6 test-no-wall-clock:src/renderer/src/store/slices/jira/jira.test.ts 5 test-no-wall-clock:src/renderer/src/store/slices/worktrees/metadata/worktree-meta-hosted-review.test.ts @@ -698,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 @@ -713,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 @@ -793,7 +783,6 @@ 1 test-timeout-needs-reason:src/renderer/src/lib/source-control/checks/check-run-details-log-normalization-performance.test.ts 1 test-timeout-needs-reason:src/shared/__tests__/process-host/windows-tree-kill-late-taskkill.win32.test.ts 1 test-timeout-needs-reason:src/shared/dsh-real-cli.test.ts -1 test-timeout-needs-reason:src/shared/source-control/checks/logs/check-job-log-text-performance.test.ts 1 test-timeout-needs-reason:src/shared/workspace-disk-space/workspace-space-entry-traversal.test.ts 1 test-timeout-needs-reason:src/shared/wsl-login-shell-command.test.ts 1 test-timeout-needs-reason:tests/e2e/active-view-restart-restore.spec.ts diff --git a/config/focus-setting-read-baseline.txt b/config/focus-setting-read-baseline.txt index 9e6d01f833d..4b3f4c25346 100644 --- a/config/focus-setting-read-baseline.txt +++ b/config/focus-setting-read-baseline.txt @@ -222,14 +222,14 @@ 2 src/renderer/src/lib/browser/workspace/workspace-browser-tab-open.ts 1 src/renderer/src/lib/client-creation-action-error.ts 2 src/renderer/src/lib/client-creation-action-policy.ts -1 src/renderer/src/lib/default-creation-host.ts # the sanctioned reader of the default host +1 src/renderer/src/runtime/hosts/selection/default-creation-host.ts # the sanctioned reader of the default host 1 src/renderer/src/lib/launch-ai-vault-session.ts 1 src/renderer/src/lib/local-preflight-context.ts 2 src/renderer/src/runtime/hosts/observations/provider-runtime-context.ts -2 src/renderer/src/lib/repo-runtime-owner.ts -1 src/renderer/src/lib/runtime-session-mirror-owners.ts +2 src/renderer/src/lib/workspace/ownership/repo-runtime-owner.ts +1 src/renderer/src/lib/workspace/ownership/runtime-session-mirror-owners.ts 1 src/renderer/src/lib/runtime-session-mirror-targets.ts -1 src/renderer/src/lib/single-runtime-legacy-owner.ts +1 src/renderer/src/lib/workspace/ownership/single-runtime-legacy-owner.ts 1 src/renderer/src/lib/skill-runtime-command.ts 1 src/renderer/src/lib/terminal-close-route.ts 4 src/renderer/src/lib/terminal-worktree-route.ts # resolveTerminalPtyOwner: teardown, close and PTY identity read spawn's attribution (round 3 F8), which retired the deprecated resolver's readers @@ -239,7 +239,7 @@ 1 src/renderer/src/lib/work-items/linear/linear-issue-write.ts 1 src/renderer/src/lib/workspace/activation/worktree-activation.ts 1 src/renderer/src/lib/workspace/ownership/worktree-runtime-owner.ts # a setup terminal with no row spawns on the focused runtime -1 src/renderer/src/lib/worktree-jump-navigation.ts +1 src/renderer/src/lib/workspace/activation/worktree-jump-navigation.ts 17 src/renderer/src/runtime/jira/runtime-jira-client.ts 2 src/renderer/src/runtime/jira/runtime-jira-summary-client.ts 5 src/renderer/src/runtime/jira/runtime-jira-user-fields-client.ts diff --git a/config/legacy-relay-compat-tags-baseline.txt b/config/legacy-relay-compat-tags-baseline.txt index c168b52ead7..3ed5dc0a23e 100644 --- a/config/legacy-relay-compat-tags-baseline.txt +++ b/config/legacy-relay-compat-tags-baseline.txt @@ -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 diff --git a/config/legacy-relay-importers-baseline.txt b/config/legacy-relay-importers-baseline.txt index ef18c667b27..c48864aa1ed 100644 --- a/config/legacy-relay-importers-baseline.txt +++ b/config/legacy-relay-importers-baseline.txt @@ -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 diff --git a/config/main-layout-writer-baseline.txt b/config/main-layout-writer-baseline.txt index 096973f7717..00c1afab41e 100644 --- a/config/main-layout-writer-baseline.txt +++ b/config/main-layout-writer-baseline.txt @@ -32,6 +32,7 @@ 2 src/main/persistence/migrating-orcad-catalog/orcad-destination-client-state.ts 1 src/main/persistence/migrating-orcad-catalog/orcad-destination-workspace-session.ts 3 src/main/persistence/migrating-orcad-catalog/orcad-dormant-state-records.ts +1 src/main/persistence/migrating-orcad-catalog/orcad-migration-source-retention.ts 2 src/main/persistence/migrating-orcad-catalog/orcad-source-client-subtraction.ts 1 src/main/persistence/migrating-orcad-catalog/orcad-source-dormant-state.ts 1 src/main/persistence/migrating-orcad-catalog/orcad-source-scrollback-state.ts @@ -53,11 +54,11 @@ 2 src/main/pty/scrollback/terminal-scrollback-snapshots.ts 1 src/main/runtime/browser/client-pages/client-hosted-browser-page-persistence.ts 1 src/main/runtime/client/runtime-client-state.ts -1 src/main/runtime/session-tabs/headless-editor-tabs.ts 4 src/main/runtime/orchestration/terminal-authority/runtime-legacy-worker-terminal-recovery-persistence.ts 2 src/main/runtime/session-graph/session-graph-promotion.ts 2 src/main/runtime/session-lifecycle/projection/apply-mobile-session-tab-navigation.ts 2 src/main/runtime/session-lifecycle/projection/build-headless-mobile-session-browser-tabs.ts +1 src/main/runtime/session-tabs/headless-editor-tabs.ts 2 src/main/runtime/session-tabs/headless-tab-group-moves.ts 6 src/main/runtime/session-tabs/headless-tab-properties.ts 2 src/main/runtime/session-tabs/headless-terminal-tab-titles.ts @@ -72,5 +73,4 @@ 3 src/main/runtime/terminal/surface/mobile-session-layout-projection.ts 1 src/main/runtime/workspaces/session-hosts/get-runtime-id.ts 1 src/main/runtime/workspaces/session-hosts/runtime-workspace-session-controller.ts -1 src/main/persistence/migrating-orcad-catalog/orcad-migration-source-retention.ts 1 src/main/ssh/targets/ssh-target-id-migration.ts diff --git a/config/main-sync-fs-baseline.txt b/config/main-sync-fs-baseline.txt index 19952926799..605c56591c3 100644 --- a/config/main-sync-fs-baseline.txt +++ b/config/main-sync-fs-baseline.txt @@ -116,7 +116,7 @@ 1 src/main/codex-accounts/codex-login-auth-snapshot.ts 5 src/main/codex-accounts/codex-managed-home-lifecycle.ts 6 src/main/codex-accounts/codex-managed-home-path.ts -17 src/main/codex-accounts/fs-utils.ts +17 src/main/filesystem/atomic-file-publication.ts 1 src/main/codex-accounts/guest-codex-account-homes.ts 6 src/main/codex-accounts/host-codex-managed-home-ownership.ts 2 src/main/codex-accounts/legacy-shared-auth-migration.ts @@ -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 @@ -608,6 +609,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 diff --git a/config/main-sync-spawn-baseline.txt b/config/main-sync-spawn-baseline.txt index c9d69eefb60..3c1aa15b528 100644 --- a/config/main-sync-spawn-baseline.txt +++ b/config/main-sync-spawn-baseline.txt @@ -9,7 +9,7 @@ 1 src/main/browser/network/egress/browser-route-egress-electron-launch.ts 1 src/main/browser/routing/partitions/browser-route-partition-binding-store.ts 1 src/main/claude-accounts/runtime-auth-service.ts -3 src/main/codex-accounts/fs-utils.ts +3 src/main/filesystem/atomic-file-publication.ts 2 src/main/codex-accounts/legacy-wsl-runtime-auth-drain-recovery-script-harness.ts 2 src/main/codex-accounts/legacy-wsl-runtime-auth-drain-script-harness.ts 1 src/main/codex-accounts/runtime-home-service-home-routing.ts diff --git a/config/packaged-runtime-node-modules.cjs b/config/packaged-runtime-node-modules.cjs index a5a9ed3bb33..5a3893af9e5 100644 --- a/config/packaged-runtime-node-modules.cjs +++ b/config/packaged-runtime-node-modules.cjs @@ -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 } diff --git a/config/packaged-transcribe-cpp.cjs b/config/packaged-transcribe-cpp.cjs new file mode 100644 index 00000000000..2fe3334a712 --- /dev/null +++ b/config/packaged-transcribe-cpp.cjs @@ -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 +} diff --git a/config/react-compiler-bailout-baseline.txt b/config/react-compiler-bailout-baseline.txt index c4cd51da520..d1bc3f33bea 100644 --- a/config/react-compiler-bailout-baseline.txt +++ b/config/react-compiler-bailout-baseline.txt @@ -386,6 +386,7 @@ 1 src/renderer/src/components/right-sidebar/use-right-sidebar-activity-items.ts 3 src/renderer/src/components/right-sidebar/use-right-sidebar-tab-routing.ts 1 src/renderer/src/components/runtime-access/RuntimeRepairDialog.tsx +1 src/renderer/src/components/session-search/use-session-search-status.ts 8 src/renderer/src/components/settings/accounts/AccountsPane.tsx 3 src/renderer/src/components/settings/accounts/providers/AntigravityAccountsSection.tsx 1 src/renderer/src/components/settings/accounts/providers/CursorAccountsSection.tsx @@ -422,14 +423,14 @@ 1 src/renderer/src/components/settings/privacy/PrivacyPane.tsx 1 src/renderer/src/components/settings/quick-commands/QuickCommandsPane.tsx 1 src/renderer/src/components/settings/repository/RepositoryFormatterSection.tsx -2 src/renderer/src/components/settings/repository/source-control/RepositoryGitHubAccountSection.tsx 3 src/renderer/src/components/settings/repository/RepositoryJiraProjectSection.tsx -2 src/renderer/src/components/settings/repository/source-control/RepositoryForkSyncSection.tsx 3 src/renderer/src/components/settings/repository/hosts/RepositoryHostSetupActions.tsx -2 src/renderer/src/components/settings/repository/worktrees/SparsePresetSettingsSection.tsx 2 src/renderer/src/components/settings/repository/identity/RepositoryIconPicker.tsx 1 src/renderer/src/components/settings/repository/mcp/McpConfigSection.tsx +2 src/renderer/src/components/settings/repository/source-control/RepositoryForkSyncSection.tsx +2 src/renderer/src/components/settings/repository/source-control/RepositoryGitHubAccountSection.tsx 9 src/renderer/src/components/settings/repository/source-control/repository-source-control-ai-global-ux.ts +2 src/renderer/src/components/settings/repository/worktrees/SparsePresetSettingsSection.tsx 1 src/renderer/src/components/settings/runtime-environments/catalog/use-runtime-environment-catalog.ts 3 src/renderer/src/components/settings/runtime-environments/catalog/use-runtime-environment-connection-actions.ts 2 src/renderer/src/components/settings/runtime-environments/catalog/use-runtime-environment-mutation-actions.ts @@ -441,7 +442,6 @@ 1 src/renderer/src/components/settings/session-history/SessionHistoryServerRow.tsx 2 src/renderer/src/components/settings/session-history/SessionHistorySettingsPane.tsx 1 src/renderer/src/components/settings/session-history/SessionSearchAdvancedSection.tsx -1 src/renderer/src/components/session-search/use-session-search-status.ts 1 src/renderer/src/components/settings/shortcuts/ShortcutRecorderButton.tsx 2 src/renderer/src/components/settings/source-control/AutoRenameBranchFromWorkSetting.tsx 1 src/renderer/src/components/settings/source-control/CommitMessageAiPane.tsx @@ -449,7 +449,6 @@ 1 src/renderer/src/components/settings/ssh/SshPane.tsx 1 src/renderer/src/components/settings/ssh/server-actions/SshHostDeltaMoveDialog.tsx 1 src/renderer/src/components/settings/ssh/server-actions/SshHostKeepServerVersionDialog.tsx -1 src/renderer/src/components/ssh-host-recovery/SshHostMoveAnywayAction.tsx 1 src/renderer/src/components/settings/ssh/server-actions/SshHostRecoverServerAction.tsx 1 src/renderer/src/components/settings/ssh/server-actions/SshHostRestartServerAction.tsx 1 src/renderer/src/components/settings/ssh/ssh-hosts-header-slot.tsx @@ -501,7 +500,7 @@ 2 src/renderer/src/components/sidebar/useRenderedSetupScriptPromptState.ts 2 src/renderer/src/components/sidebar/workspace-actions/context-menu/use-worktree-context-menu-commands.ts 1 src/renderer/src/components/sidebar/workspace-actions/context-menu/use-worktree-context-menu-secondary-actions.ts -2 src/renderer/src/components/sidebar/workspace-actions/deletion/DeleteNestedWorktreesDialog.tsx +1 src/renderer/src/components/sidebar/workspace-actions/deletion/DeleteNestedWorktreesDialog.tsx 1 src/renderer/src/components/sidebar/workspace-actions/deletion/RemovalUnsavedFilesNotice.tsx 1 src/renderer/src/components/sidebar/workspace-actions/deletion/WorktreeForceDeleteButton.tsx 1 src/renderer/src/components/sidebar/workspace-actions/deletion/use-delete-worktree-status-hydration.ts @@ -554,6 +553,7 @@ 1 src/renderer/src/components/skills/use-reviewed-skill-plan.ts 1 src/renderer/src/components/skills/use-skill-delete-flow.ts 1 src/renderer/src/components/sparse/SparseCheckoutPresetSelect.tsx +1 src/renderer/src/components/ssh-host-recovery/SshHostMoveAnywayAction.tsx 2 src/renderer/src/components/star-nag/StarNagAgentValueMomentObserver.tsx 1 src/renderer/src/components/stats/ShareUsageButton.tsx 2 src/renderer/src/components/status-bar/ClaudeSwitcherForOwner.tsx diff --git a/config/reliability-gates.jsonc b/config/reliability-gates.jsonc index 76de250ab2b..744d4f96f31 100644 --- a/config/reliability-gates.jsonc +++ b/config/reliability-gates.jsonc @@ -459,10 +459,10 @@ "invariant": "A prompt occurrence leaves the input region only when an accepted reply answers it (a current host's provider acknowledgment, or an older host's whole-write acceptance as before) or the user collapses it to a strip above the composer, which writes nothing and keeps the card mounted with its partial answer; status-backed occurrences are told apart by the host wait's start, so view toggles and remounts preserve them while real clear/replacement supersedes them, and a transcript-only one is dropped when the view stops observing it; obsolete results cannot change replacements; selector groups wait for complete writes before pacing; refusal or unknown handoff never causes replay; a card retires an unsubmitted composer send without writing under it or losing its text, and the hidden composer cannot send or interrupt; Collapse or Escape folds a card without writing, never during an in-flight answer, and a new occurrence shows expanded again; the phone blocks only Send while a card is expanded and shows one card per occurrence; cancellation stops unsent groups and active dictation can stop.", "oracle": "Audit2251 narrows agent-paste-draft.test.ts from 25 authored cases (26 literal cases) to four. Retained cases cover buffered readiness on PTY binding, separate spawn/composer lifetimes, real per-PTY paste/Enter serialization against a competing paste, and frame closure/no Enter after a rejected content chunk. Intentionally lost alarms include agent marker and fallback examples, direct-write failure/rejection, missing-PTY and Codex process-only timeout paths, exact nonprimary-PTY routing, full large-body chunk reconstruction, escaping/CRLF samples, internal laziness/yield work assertions, oversized preflight refusal, and exact configured delay/budget counts. No equivalent replacement, new execution, real PTY/provider delivery, rendered/native UI, deployment, measured performance or cross-platform result is claimed. Historical prior account (preserved verbatim): Mobile owner-layout policy retires whole tests and mixed registrations without equivalent replacement coverage. Retained callbacks and reduced selectors need fresh execution at their stated scope; prior measurements do not validate them. Historical oracle: Audit2003: Remove agent-prompt absence routing, throwing/live/missing-probe and cached-probe-count examples from the stale-leaf source. Controller-proven absence, unknown-liveness admission, obsolete-absence clearing and same-ID respawn fences remain at a supplied provider/row seam. Preserve the independent wire-codec receipt only in its original scope. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1991: Remove partial-runtime terminal-send guard/status/floor/query projection and argument-inventory samples. Retained RPC viewport admission, authenticated-client spoof refusal, text admission and stale-binding fences remain bounded mock-boundary behavior. The unchanged wire-codec receipt remains valid only for its original command; it does not validate this reduced RPC selector. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1908 removes the complete prompt-presentation hook and literal interactive-protocol mapping suites and narrows the interactive card and prompt-card input suites. Lost alarms include replacement approval A settling after answered B; collapse/expand composer ownership and partial-answer presentation; identical new waits after an unmounted view; collapsed transcript re-reads; answered/dismissed status-backed persistence and retirement; and literal answer-to-PTY byte arrays. The retained stale-PTY acknowledgment, cancellation/answer retry, and answered-approval remount/rebind assertions remain meaningful but are not equivalent replacement coverage. No fresh reduced-selector result, physical provider, rendered/native-focus, mixed-version deployment, soak, or measured-budget validation is claimed. The unchanged wire-codec receipt remains valid only for its exact command. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Historical pre-audit oracle account for changed sources: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Retained unchanged-selector receipts are the only current execution evidence. Reduced-source assertions await validation. Historical prior oracle: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): After acknowledged phone replies with stale host status, the exact card disappears and Send is enabled; unknown, refused or unverifiable-settlement replies retain enabled choices, while an older host's accepted reply dismisses like an acknowledged one; a same-occurrence view toggle retains pending acknowledgment and real replacements discard it. A slow 32 KiB SSH answer completes all chunks before Enter; cancellation preserves issued bytes but omits remaining groups. Paired settlement invokes the actual provider and lost callbacks remain unknown; older hosts deliver ordinary messages, launch and selector groups once and their accepted answers dismiss as before. An answered card stays hidden across a view remount; a collapsed card is a strip that frees the composer and expands back; an identical question in a new wait shows again; a composer send caught by a new card keeps its bubble without submitting or clearing the line under it. Audit2450 removes the MobileNativeChatView failure-banner callback-only example whose old banner is supplied unchanged by its props. Retain fatal-read gating and the ordering test that preserves a new delivery notice. The removed false-send/old-banner combination has no equivalent replacement; prior raw receipts and budgets retain their original source scope. No new soak, platform, performance or red/green claim.", "commands": [ - "ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/components/native-chat/prompts/NativeChatInteractiveCard.test.tsx src/renderer/src/components/native-chat/prompts/NativeChatResolvedView.prompt-card-input.test.tsx src/renderer/src/components/native-chat/surfaces/integration/NativeChatResolvedView.prompt-card-composer.test.tsx src/renderer/src/components/native-chat/conversation/turns/NativeChatResolvedView.turn-status.test.tsx src/renderer/src/runtime/hosted-terminals/inspection/runtime-terminal-inspection.test.ts src/renderer/src/lib/agent-paste-draft.test.ts src/renderer/src/lib/agent-paste-draft-submit-retry.test.ts src/main/ipc/pty/ipc/write-input-user-input.test.ts src/main/ipc/pty/pty-write-ipc-validation.test.ts src/main/runtime/terminal/input/runtime-terminal-writer.test.ts src/main/runtime/rpc/terminal-send.test.ts src/main/runtime/terminal/input/terminal-send-stale-leaf-liveness.test.ts --maxWorkers=2", + "ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/components/native-chat/prompts/NativeChatInteractiveCard.test.tsx src/renderer/src/components/native-chat/prompts/NativeChatResolvedView.prompt-card-input.test.tsx src/renderer/src/components/native-chat/surfaces/integration/NativeChatResolvedView.prompt-card-composer.test.tsx src/renderer/src/components/native-chat/conversation/turns/NativeChatResolvedView.turn-status.test.tsx src/renderer/src/runtime/hosted-terminals/inspection/runtime-terminal-inspection.test.ts src/renderer/src/lib/agent-session/messaging/paste/agent-paste-draft.test.ts src/renderer/src/lib/agent-session/messaging/paste/agent-paste-draft-submit-retry.test.ts src/main/ipc/pty/ipc/write-input-user-input.test.ts src/main/ipc/pty/pty-write-ipc-validation.test.ts src/main/runtime/terminal/input/runtime-terminal-writer.test.ts src/main/runtime/rpc/terminal-send.test.ts src/main/runtime/terminal/input/terminal-send-stale-leaf-liveness.test.ts --maxWorkers=2", "ORCA_BACKGROUND_LAUNCH=1 mobile/node_modules/.bin/vitest run --config mobile/vitest.config.ts mobile/src/session/native-chat/MobileNativeChatView.prompt-presentation.test.ts mobile/src/session/native-chat/MobileNativeChatView.failure-banner.test.ts mobile/src/session/mobile-prompt-controller.test.ts --maxWorkers=2", "ORCA_BACKGROUND_LAUNCH=1 pnpm test tests/e2e/cross-version-wire/cross-version-terminal-wire.unit.test.ts --maxWorkers=1", - "ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/components/native-chat/prompts/NativeChatInteractiveCard.test.tsx src/renderer/src/components/native-chat/prompts/NativeChatResolvedView.prompt-card-input.test.tsx src/renderer/src/components/native-chat/conversation/turns/NativeChatResolvedView.turn-status.test.tsx src/renderer/src/runtime/hosted-terminals/inspection/runtime-terminal-inspection.test.ts src/renderer/src/lib/agent-paste-draft.test.ts src/renderer/src/lib/agent-paste-draft-submit-retry.test.ts src/main/ipc/pty/ipc/write-input-user-input.test.ts src/main/ipc/pty/pty-write-ipc-validation.test.ts --maxWorkers=2", + "ORCA_BACKGROUND_LAUNCH=1 pnpm test src/renderer/src/components/native-chat/prompts/NativeChatInteractiveCard.test.tsx src/renderer/src/components/native-chat/prompts/NativeChatResolvedView.prompt-card-input.test.tsx src/renderer/src/components/native-chat/conversation/turns/NativeChatResolvedView.turn-status.test.tsx src/renderer/src/runtime/hosted-terminals/inspection/runtime-terminal-inspection.test.ts src/renderer/src/lib/agent-session/messaging/paste/agent-paste-draft.test.ts src/renderer/src/lib/agent-session/messaging/paste/agent-paste-draft-submit-retry.test.ts src/main/ipc/pty/ipc/write-input-user-input.test.ts src/main/ipc/pty/pty-write-ipc-validation.test.ts --maxWorkers=2", "ORCA_BACKGROUND_LAUNCH=1 mobile/node_modules/.bin/vitest run --config mobile/vitest.config.ts mobile/src/session/native-chat/MobileNativeChatView.prompt-presentation.test.ts mobile/src/session/native-chat/MobileNativeChatView.failure-banner.test.ts --maxWorkers=2" ], "testFiles": [ @@ -471,8 +471,8 @@ "src/renderer/src/components/native-chat/surfaces/integration/NativeChatResolvedView.prompt-card-composer.test.tsx", "src/renderer/src/components/native-chat/conversation/turns/NativeChatResolvedView.turn-status.test.tsx", "src/renderer/src/runtime/hosted-terminals/inspection/runtime-terminal-inspection.test.ts", - "src/renderer/src/lib/agent-paste-draft.test.ts", - "src/renderer/src/lib/agent-paste-draft-submit-retry.test.ts", + "src/renderer/src/lib/agent-session/messaging/paste/agent-paste-draft.test.ts", + "src/renderer/src/lib/agent-session/messaging/paste/agent-paste-draft-submit-retry.test.ts", "src/main/ipc/pty/ipc/write-input-user-input.test.ts", "src/main/ipc/pty/pty-write-ipc-validation.test.ts", "src/main/runtime/terminal/input/runtime-terminal-writer.test.ts", @@ -2175,13 +2175,13 @@ "providers": ["local", "daemon", "wsl", "ssh", "remote-runtime"], "coveredPlatforms": ["linux"], "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. Historical prior account (preserved verbatim): Audit2065 (sources2063/2064): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/startup/pty-connection-startup-cwd-fallback-notice.spec.ts: prints a terminal notice when the startup cwd fell back to the workspace root. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-coalesce.test.ts: surfaces working frames when many spinner frames arrive in one chunk. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-spinner.test.ts: surfaces normalized working and idle labels across a spinner cycle; surfaces working even when a single chunk contains multiple spinner frames. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionStartupCwdFallbackNoticeTests } from '../startup/pty-connection-startup-cwd-fallback-notice.spec'; registerPtyConnectionStartupCwdFallbackNoticeTests(). 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. Historical prior account (preserved verbatim): Audit2061 (sources2059/2060): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-agent-trust-hold.test.ts: spawns only after the answer, carrying \"let agents ask\" to main for this launch; reattaches a section terminal without asking or changing trust; spawns with today's default when the prompt is released without an answer. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). 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. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-intent.test.ts: declares the intent only when the spawn resumes an agent; reports a deferral to the pane instead of an error toast. src/renderer/src/components/terminal-pane/pty-connection/startup/in-place-resume-hold.test.ts: owns the record while the start runs, through a nested start, and releases on settle; holds nothing for a start not resuming a record, or once the pane is disposed. 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. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): The existing directory-level pnpm test selector includes eleven changed source files and automatically omits the three whole deletions. Keep this nonempty discovery command unchanged; no dated receipt uses this broad path. Removed agent admission fields, mock transport routing and terminal-id projection alarms are lost. Retained foreground state, actual headless xterm, redraw, abort/rebind reader and bridge claim progression remain scoped to their unchanged callbacks. No current-source execution, independent replacement, native transport or physical provider result is assigned. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Audit1417 intentionally reduces src/renderer/src/components/terminal-pane/pty-connection/main-pane-start-wait.test.ts: Loses joined waiter invocation/failure notification and raw terminal error/paired-host readable sentence alarms; survivors preserve hold detection and card clearing. deletes src/renderer/src/components/terminal-pane/pty-connection-hidden-tui-snapshot-replay.spec.ts: Loses rich hidden snapshot sequence replay/grid resize and forced repaint after hidden snapshot alarms, including live-trigger deduplication. deletes src/renderer/src/components/terminal-pane/pty-connection-pi-synchronized-input.test.ts: Loses typed-input forced synchronized-frame presentation alarm; setup implements the parser behavior it claims to exercise. deletes src/renderer/src/components/terminal-pane/pty-connection-unserved-ssh-pane.test.ts: Loses automatic SSH dial deduplication, passphrase gating, stale pane exclusion, and disposal cancellation alarms. deletes src/renderer/src/components/terminal-pane/pty-connection-remote-snapshot-source-grid.test.ts: Loses source grid before frame and destination grid restoration ordering alarm. deletes src/renderer/src/components/terminal-pane/pty-connection-restart-replacement.spec.ts: Loses wrapper-level hidden/visible restart resume, dispose/rebind suppression and finished-turn replay alarms; manual pipeline and mock-implemented binding invalidate the whole callbacks. No equivalent replacement coverage or fresh result is claimed. Historical coverage account: Audit1391 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1361 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1342 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): macOS daemon-backed Electron journey verifies same PID and terminal identity plus rendered output. Focused renderer contracts pass on Linux, Windows and WSL. Neighboring SSH model and replay contracts pass locally; no new live SSH or paired-runtime journey. Audit1342: src/renderer/src/components/terminal-pane/pty-connection-unanswered-command-finish.spec.ts removed. Unanswered SSH shell finish keeps/drops mocked agent row matrix disappears. src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts reduced. Happy inherited-cwd wait and transport-option forwarding sample loses its individual alarm. src/renderer/src/components/terminal-pane/pty-connection-command-input-agent-identity.spec.ts removed. Typed Droid versus process/launch identity and SSH/runtime process-evidence matrices disappear. src/renderer/src/components/terminal-pane/pty-connection/reattach-success-settle.test.ts removed. Success/no-ID/expired/superseded attach-settlement bag alarms disappear. src/renderer/src/components/terminal-pane/pty-transport-user-input.test.ts reduced. Every-write kind forwarding and synchronous driving-attempt observer/rejection/ACK call counts disappear. src/renderer/src/components/terminal-pane/pty-connection-codex-restart-input-lookup.spec.ts removed. No global tab enumeration on ordinary/stale input and known restart notice input-block mock-call alarms. src/renderer/src/components/terminal-pane/pty-connection-layout-owner-wake.test.ts removed. Hidden-to-visible single-pane start request, attach-only argument and negative local wake-record alarms are intentionally dropped; no real server wake/ack occurs. src/renderer/src/components/terminal-pane/pty-connection-completion-and-notification.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. src/renderer/src/components/terminal-pane/pty-connection-command-finished-cleanup.spec.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. src/renderer/src/components/terminal-pane/pty-connection-terminal-input-gating.spec.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Audit1361: src/renderer/src/components/terminal-pane/pty-connection/foreground-output-scan.test.ts reduced. Internal searched-character budget and ordinary/malformed no-op controls. No equivalent replacement coverage is claimed. Audit1365: focused Linux unit selection passed on source head 8880357cb420c45f1b808ae545a5bc609324624d. This new result has its own exact command; historical results keep their prior scope. Intentional test losses remain recorded in knownGaps. No physical-provider, native input, rendered E2E, p95, soak or replacement-coverage claim. Audit1369: src/renderer/src/components/terminal-pane/pty-connection/disposed-spawn-retention.test.ts removed. Rootless/removed/moved tabs, missing leaves, queued deletion and host-qualified/legacy deletion eligibility fixtures. No equivalent replacement coverage is claimed. Audit1391: src/renderer/src/components/terminal-pane/pty-connection-remote-pause-drop-notice.spec.ts reduced. Lose repeated quiet switches avoiding snapshots and legacy host without drop-report capability requesting a snapshot. Retained imported registrar uses fake transport/xterm writes, exercising real gap/restore lifecycle rather than actual terminal rendering. No equivalent replacement coverage is claimed. Audit1396: src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.spec.ts reduced. Lose standalone debug-state retention/log silence alarm. React StrictMode is not mounted; bindings manually simulate remount over mocked transport. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1400: src/renderer/src/components/terminal-pane/pty-connection/terminal-input-echo-delay.test.ts reduced. Removes two fabricated-binding pipeline registrations; retains timestamp-policy outcomes without wall-clock speed assertions. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1402: src/renderer/src/components/terminal-pane/pty-connection-park-reveal-model-snapshot.spec.ts reduced. Loses basic paired serialize/initial replay forwarding check; hidden alt-frame grid/precedence policy remains. No real terminal renderer claim. src/renderer/src/components/terminal-pane/pty-connection/main-pane-resume-banner.test.ts reduced. Loses subscription-budget and attach-start generation predicate alarms; actual restored-banner renderer is not exercised. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result.", + "coverageNotes": "Audit2694 source-only review: Remove14 authored/14 expanded cases in the renderer completion wrapper family, including the complete bell/query-reply/stale-input factory, without replacement. Retain29 authored/34 expanded cases with unchanged callback bodies. Three removals are the existing pending2203 overlap and must be adopted/count-reconciled once; eleven are fresh removals. No current-source runtime or gate execution is supplied by this packet; dated evidence retains its original source scope and does not validate the reduced factory bytes. No equivalent replacement, physical provider, mixed-version, mobile, rendered UI, cross-platform, soak or measured-performance result is claimed. The retained directory-level discovery command continues to discover the reduced family; historical wrapper mentions are not fresh import-closure or execution evidence. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2065 (sources2063/2064): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/startup/pty-connection-startup-cwd-fallback-notice.spec.ts: prints a terminal notice when the startup cwd fell back to the workspace root. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-coalesce.test.ts: surfaces working frames when many spinner frames arrive in one chunk. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-spinner.test.ts: surfaces normalized working and idle labels across a spinner cycle; surfaces working even when a single chunk contains multiple spinner frames. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionStartupCwdFallbackNoticeTests } from '../startup/pty-connection-startup-cwd-fallback-notice.spec'; registerPtyConnectionStartupCwdFallbackNoticeTests(). 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. Historical prior account (preserved verbatim): Audit2061 (sources2059/2060): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-agent-trust-hold.test.ts: spawns only after the answer, carrying \"let agents ask\" to main for this launch; reattaches a section terminal without asking or changing trust; spawns with today's default when the prompt is released without an answer. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). 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. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-intent.test.ts: declares the intent only when the spawn resumes an agent; reports a deferral to the pane instead of an error toast. src/renderer/src/components/terminal-pane/pty-connection/startup/in-place-resume-hold.test.ts: owns the record while the start runs, through a nested start, and releases on settle; holds nothing for a start not resuming a record, or once the pane is disposed. 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. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): The existing directory-level pnpm test selector includes eleven changed source files and automatically omits the three whole deletions. Keep this nonempty discovery command unchanged; no dated receipt uses this broad path. Removed agent admission fields, mock transport routing and terminal-id projection alarms are lost. Retained foreground state, actual headless xterm, redraw, abort/rebind reader and bridge claim progression remain scoped to their unchanged callbacks. No current-source execution, independent replacement, native transport or physical provider result is assigned. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Audit1417 intentionally reduces src/renderer/src/components/terminal-pane/pty-connection/main-pane-start-wait.test.ts: Loses joined waiter invocation/failure notification and raw terminal error/paired-host readable sentence alarms; survivors preserve hold detection and card clearing. deletes src/renderer/src/components/terminal-pane/pty-connection-hidden-tui-snapshot-replay.spec.ts: Loses rich hidden snapshot sequence replay/grid resize and forced repaint after hidden snapshot alarms, including live-trigger deduplication. deletes src/renderer/src/components/terminal-pane/pty-connection-pi-synchronized-input.test.ts: Loses typed-input forced synchronized-frame presentation alarm; setup implements the parser behavior it claims to exercise. deletes src/renderer/src/components/terminal-pane/pty-connection-unserved-ssh-pane.test.ts: Loses automatic SSH dial deduplication, passphrase gating, stale pane exclusion, and disposal cancellation alarms. deletes src/renderer/src/components/terminal-pane/pty-connection-remote-snapshot-source-grid.test.ts: Loses source grid before frame and destination grid restoration ordering alarm. deletes src/renderer/src/components/terminal-pane/pty-connection-restart-replacement.spec.ts: Loses wrapper-level hidden/visible restart resume, dispose/rebind suppression and finished-turn replay alarms; manual pipeline and mock-implemented binding invalidate the whole callbacks. No equivalent replacement coverage or fresh result is claimed. Historical coverage account: Audit1391 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1361 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1342 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): macOS daemon-backed Electron journey verifies same PID and terminal identity plus rendered output. Focused renderer contracts pass on Linux, Windows and WSL. Neighboring SSH model and replay contracts pass locally; no new live SSH or paired-runtime journey. Audit1342: src/renderer/src/components/terminal-pane/pty-connection-unanswered-command-finish.spec.ts removed. Unanswered SSH shell finish keeps/drops mocked agent row matrix disappears. src/renderer/src/components/terminal-pane/pty-connection-split-cwd-resolution.test.ts reduced. Happy inherited-cwd wait and transport-option forwarding sample loses its individual alarm. src/renderer/src/components/terminal-pane/pty-connection-command-input-agent-identity.spec.ts removed. Typed Droid versus process/launch identity and SSH/runtime process-evidence matrices disappear. src/renderer/src/components/terminal-pane/pty-connection/reattach-success-settle.test.ts removed. Success/no-ID/expired/superseded attach-settlement bag alarms disappear. src/renderer/src/components/terminal-pane/pty-transport-user-input.test.ts reduced. Every-write kind forwarding and synchronous driving-attempt observer/rejection/ACK call counts disappear. src/renderer/src/components/terminal-pane/pty-connection-codex-restart-input-lookup.spec.ts removed. No global tab enumeration on ordinary/stale input and known restart notice input-block mock-call alarms. src/renderer/src/components/terminal-pane/pty-connection-layout-owner-wake.test.ts removed. Hidden-to-visible single-pane start request, attach-only argument and negative local wake-record alarms are intentionally dropped; no real server wake/ack occurs. src/renderer/src/components/terminal-pane/pty-connection-completion-and-notification.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. src/renderer/src/components/terminal-pane/pty-connection-command-finished-cleanup.spec.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. src/renderer/src/components/terminal-pane/pty-connection-terminal-input-gating.spec.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Audit1361: src/renderer/src/components/terminal-pane/pty-connection/foreground-output-scan.test.ts reduced. Internal searched-character budget and ordinary/malformed no-op controls. No equivalent replacement coverage is claimed. Audit1365: focused Linux unit selection passed on source head 8880357cb420c45f1b808ae545a5bc609324624d. This new result has its own exact command; historical results keep their prior scope. Intentional test losses remain recorded in knownGaps. No physical-provider, native input, rendered E2E, p95, soak or replacement-coverage claim. Audit1369: src/renderer/src/components/terminal-pane/pty-connection/disposed-spawn-retention.test.ts removed. Rootless/removed/moved tabs, missing leaves, queued deletion and host-qualified/legacy deletion eligibility fixtures. No equivalent replacement coverage is claimed. Audit1391: src/renderer/src/components/terminal-pane/pty-connection-remote-pause-drop-notice.spec.ts reduced. Lose repeated quiet switches avoiding snapshots and legacy host without drop-report capability requesting a snapshot. Retained imported registrar uses fake transport/xterm writes, exercising real gap/restore lifecycle rather than actual terminal rendering. No equivalent replacement coverage is claimed. Audit1396: src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.spec.ts reduced. Lose standalone debug-state retention/log silence alarm. React StrictMode is not mounted; bindings manually simulate remount over mocked transport. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1400: src/renderer/src/components/terminal-pane/pty-connection/terminal-input-echo-delay.test.ts reduced. Removes two fabricated-binding pipeline registrations; retains timestamp-policy outcomes without wall-clock speed assertions. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1402: src/renderer/src/components/terminal-pane/pty-connection-park-reveal-model-snapshot.spec.ts reduced. Loses basic paired serialize/initial replay forwarding check; hidden alt-frame grid/precedence policy remains. No real terminal renderer claim. src/renderer/src/components/terminal-pane/pty-connection/main-pane-resume-banner.test.ts reduced. Loses subscription-budget and attach-start generation predicate alarms; actual restored-banner renderer is not exercised. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result.", "motivatingLinks": [ "https://github.com/user-attachments/assets/e8c6d1dc-6150-4c3d-b55a-3d12efefdd04", "https://github.com/user-attachments/assets/b0328f88-34ac-4d51-8119-9efe17072435" ], "invariant": "Adopting a prestarted terminal preserves its existing process and paints snapshot-covered startup output once while retaining subsequent live output. Missing sequence proof or blank snapshots must not authorize dropping output.", - "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. Historical prior account (preserved verbatim): Audit2065 (sources2063/2064): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/startup/pty-connection-startup-cwd-fallback-notice.spec.ts: prints a terminal notice when the startup cwd fell back to the workspace root. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-coalesce.test.ts: surfaces working frames when many spinner frames arrive in one chunk. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-spinner.test.ts: surfaces normalized working and idle labels across a spinner cycle; surfaces working even when a single chunk contains multiple spinner frames. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionStartupCwdFallbackNoticeTests } from '../startup/pty-connection-startup-cwd-fallback-notice.spec'; registerPtyConnectionStartupCwdFallbackNoticeTests(). 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. Historical prior account (preserved verbatim): Audit2061 (sources2059/2060): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-agent-trust-hold.test.ts: spawns only after the answer, carrying \"let agents ask\" to main for this launch; reattaches a section terminal without asking or changing trust; spawns with today's default when the prompt is released without an answer. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). 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. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-intent.test.ts: declares the intent only when the spawn resumes an agent; reports a deferral to the pane instead of an error toast. src/renderer/src/components/terminal-pane/pty-connection/startup/in-place-resume-hold.test.ts: owns the record while the start runs, through a nested start, and releases on settle; holds nothing for a start not resuming a record, or once the pane is disposed. 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. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): The existing directory-level pnpm test selector includes eleven changed source files and automatically omits the three whole deletions. Keep this nonempty discovery command unchanged; no dated receipt uses this broad path. Removed agent admission fields, mock transport routing and terminal-id projection alarms are lost. Retained foreground state, actual headless xterm, redraw, abort/rebind reader and bridge claim progression remain scoped to their unchanged callbacks. No current-source execution, independent replacement, native transport or physical provider result is assigned. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Historical pre-audit oracle account for changed sources: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Pass snapshot sequence and proven zero keyboard flags through real IPC transport projection. Deliver snapshot-covered and newer output before reattach resolves; drain replay parse callbacks and require one startup marker and the newer output. Repeat with no sequence and blank snapshot to retain unproven bytes. In Electron select a prestarted workspace, type a generated marker and compare PID and stable terminal identities before and after.", + "oracle": "Audit2694 source-only review: Remove14 authored/14 expanded cases in the renderer completion wrapper family, including the complete bell/query-reply/stale-input factory, without replacement. Retain29 authored/34 expanded cases with unchanged callback bodies. Three removals are the existing pending2203 overlap and must be adopted/count-reconciled once; eleven are fresh removals. No current-source runtime or gate execution is supplied by this packet; dated evidence retains its original source scope and does not validate the reduced factory bytes. No equivalent replacement, physical provider, mixed-version, mobile, rendered UI, cross-platform, soak or measured-performance result is claimed. The retained directory-level discovery command continues to discover the reduced family; historical wrapper mentions are not fresh import-closure or execution evidence. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2065 (sources2063/2064): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/startup/pty-connection-startup-cwd-fallback-notice.spec.ts: prints a terminal notice when the startup cwd fell back to the workspace root. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-coalesce.test.ts: surfaces working frames when many spinner frames arrive in one chunk. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-spinner.test.ts: surfaces normalized working and idle labels across a spinner cycle; surfaces working even when a single chunk contains multiple spinner frames. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionStartupCwdFallbackNoticeTests } from '../startup/pty-connection-startup-cwd-fallback-notice.spec'; registerPtyConnectionStartupCwdFallbackNoticeTests(). 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. Historical prior account (preserved verbatim): Audit2061 (sources2059/2060): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-agent-trust-hold.test.ts: spawns only after the answer, carrying \"let agents ask\" to main for this launch; reattaches a section terminal without asking or changing trust; spawns with today's default when the prompt is released without an answer. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). 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. Historical prior account (preserved verbatim): Audit2056 (sources2054/2055): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-spawn-intent.test.ts: declares the intent only when the spawn resumes an agent; reports a deferral to the pane instead of an error toast. src/renderer/src/components/terminal-pane/pty-connection/startup/in-place-resume-hold.test.ts: owns the record while the start runs, through a nested start, and releases on settle; holds nothing for a start not resuming a record, or once the pane is disposed. 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. Historical prior account (preserved verbatim): Audit1939 (sources1934/1935): The existing directory-level pnpm test selector includes eleven changed source files and automatically omits the three whole deletions. Keep this nonempty discovery command unchanged; no dated receipt uses this broad path. Removed agent admission fields, mock transport routing and terminal-id projection alarms are lost. Retained foreground state, actual headless xterm, redraw, abort/rebind reader and bridge claim progression remain scoped to their unchanged callbacks. No current-source execution, independent replacement, native transport or physical provider result is assigned. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Historical pre-audit oracle account for changed sources: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Pass snapshot sequence and proven zero keyboard flags through real IPC transport projection. Deliver snapshot-covered and newer output before reattach resolves; drain replay parse callbacks and require one startup marker and the newer output. Repeat with no sequence and blank snapshot to retain unproven bytes. In Electron select a prestarted workspace, type a generated marker and compare PID and stable terminal identities before and after.", "commands": [ "pnpm test src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-hidden-replay.test.ts", "pnpm test src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-connect-spawn.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-hidden-replay.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-visibility-and-exit.test.ts", @@ -2242,6 +2242,7 @@ "Exercise live SSH and paired-runtime snapshot adoption before claiming full provider coverage." ], "knownGaps": [ + "Audit2694 intentional coverage losses (source-only, no replacement): src/renderer/src/components/terminal-pane/pty-connection/input/pty-connection-command-finished-interrupt-arbitration.spec.ts: 'drops the command-finished status when pending interrupt inference is rejected': Loses the standalone rejected-inference-to-drop alarm; the delayed-write rows remain but are not equivalent to this immediate rejection example. src/renderer/src/components/terminal-pane/pty-connection/input/pty-connection-bell-query-reply-and-stale-input.spec.ts: 'forwards raw onData after a bell as a query reply': Loses raw onData forwarding after the manually raised bell, including its hibernation-counter expectations. src/renderer/src/components/terminal-pane/pty-connection/input/pty-connection-bell-query-reply-and-stale-input.spec.ts: 'blocks onData on a stale codex pane': The real isCodexPaneStale guard executes, and removing it would allow the typed a to reach transport. Intentionally loses this genuine stale-account typing refusal alarm. No retained query-reply test is claimed equivalent. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'omits byte-parser callbacks from the local transport options': Loses local main-authority callback omission and lifecycle callback presence checks. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'keeps byte-parser callbacks on remote-runtime transports': Loses remote-runtime parser callback preservation and factory-argument alarm, including this compatibility boundary; no mixed-version execution is covered. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'consumes pty:sideEffect facts with the live-path policy after spawn': Loses title/bell fact routing and exact 250ms delayed fake notification example. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'schedules the completion notification for genuine working→idle facts': Loses positive main-fact working-to-idle scheduling alarm. Retained stale/race cases do not replace this positive example. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'drops the agent status from a command-finished fact like the byte path did': Loses command-finished fact-to-drop routing and removeAgentStatus noncall alarm. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'routes pr-link facts to the worktree PR observer': Loses PR-link fact forwarding, worktree/tab/PTY arguments alarm; retained raw-byte nonconsumption is not equivalent. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'seeds and settles Command Code status from command-code facts': Real Command Code seed/settle policy runs. Loses positive seed, prompt payload, and 1499+1ms completion boundary alarm; retained newer-working cancellation is not equivalent. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'does not byte-scan Command Code output — facts are the only consumer': Loses Command Code-specific no-byte-parser alarm. Retained PR/OSC raw-byte exclusion does not cover this parser. src/renderer/src/components/terminal-pane/pty-connection/notifications/pty-connection-notification-settings-gating.spec.ts: 'shares one raw store subscriber for agent-complete notification settings across panes': Actual shared subscribe/unsubscribe runs. Loses shared single-subscription and final-pane unsubscribe lifetime alarm, with no replacement claimed. src/renderer/src/components/terminal-pane/pty-connection/notifications/pty-connection-task-complete-dispatch.spec.ts: 'dispatches agent-task-complete for generic Codex spinner titles after process identity is confirmed': Real coordinator evidence path runs over fake process answers. Loses positive generic-title/confirmed-Codex completion and inspectProcess-argument alarm. src/renderer/src/components/terminal-pane/pty-connection/notifications/pty-connection-task-complete-dispatch.spec.ts: 'normalizes Pi-compatible remote titles to authoritative OMP launch identity': Real owner-compatible normalization runs. Loses Pi-to-OMP title/status normalization, active tab label, OSC observation, and retained launch-identity example; no real remote transport or equivalent replacement. Wrapper cleanup removes only the deleted bell factory import and its registration-only describe block; no additional authored removal credit. Audit2694 source-only review: Remove14 authored/14 expanded cases in the renderer completion wrapper family, including the complete bell/query-reply/stale-input factory, without replacement. Retain29 authored/34 expanded cases with unchanged callback bodies. Three removals are the existing pending2203 overlap and must be adopted/count-reconciled once; eleven are fresh removals. No current-source runtime or gate execution is supplied by this packet; dated evidence retains its original source scope and does not validate the reduced factory bytes. No equivalent replacement, physical provider, mixed-version, mobile, rendered UI, cross-platform, soak or measured-performance result is claimed. The retained directory-level discovery command continues to discover the reduced family; historical wrapper mentions are not fresh import-closure or execution evidence.", "Audit2133 current-parent preparation (988 authored removals; independently reviewed2099/2107/2115/2116 decisions; upstream clear-buffer and recovery-image regressions retained): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-hidden-replay.test.ts: structural support changed only; no new authored removal credit. src/renderer/src/components/terminal-pane/pty-connection/spawn/unbound-pane-spawn-recovery.test.ts: requests a tab remount for an unbound spawn; leaves recovery to a remote transport that armed its own retry; requests a remount when the transport reports no recovery of its own; settles the spawn as failed before requesting a remount; prefers the restored leaf id when reporting the anomaly; falls back to the pane leaf id when no restored leaf exists. src/renderer/src/components/terminal-pane/pty-connection/output-restore/pty-connection-dropped-output-snapshot-healing.spec.ts: repaints from the main-owned snapshot when main drops pending output at the cap. src/renderer/src/components/terminal-pane/pty-connection/input/pty-connection-deferred-input-forwarding.spec.ts: routes terminal input through deferPtyInput so the host can withhold it; forwards terminal input directly when the host supplies no deferPtyInput. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-mode2031-raw-subscription.spec.ts: records a mode 2031 subscribe from the raw chunk boundary without answering. src/renderer/src/components/terminal-pane/pty-connection/output/pty-connection-fresh-native-follow-reset.spec.ts: retries a fresh-spawn native follow reset when renderer dimensions return. src/renderer/src/components/terminal-pane/pty-connection/notifications/pty-connection-terminal-bell-attention.spec.ts: forwards onBell to pane attention and notification policy; hands the bell to the attention module with its pane even when pane attention is off. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-foreground-agent.test.ts: remove only literal registration import/call pairs import { registerPtyConnectionDeferredInputForwardingTests } from '../input/pty-connection-deferred-input-forwarding.spec', registerPtyConnectionDeferredInputForwardingTests(); no additional authored credit. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-input-and-repaint.test.ts: remove only literal registration import/call pairs import { registerPtyConnectionFreshNativeFollowResetTests } from '../output/pty-connection-fresh-native-follow-reset.spec', registerPtyConnectionFreshNativeFollowResetTests(); no additional authored credit. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: remove only literal registration import/call pairs import { registerPtyConnectionTerminalBellAttentionTests } from '../notifications/pty-connection-terminal-bell-attention.spec', registerPtyConnectionTerminalBellAttentionTests(); no additional authored credit. Current changed source bytes, wrapper registrations and reduced selectors have no fresh execution or red/green credit. Unrelated surviving receipt objects keep their original narrow scope; current literal graph reachability does not establish historical import closure or equivalent replacement coverage. Current conservative command/import graph reaches src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-hidden-replay.test.ts, src/renderer/src/components/terminal-pane/pty-connection/output-restore/pty-connection-dropped-output-snapshot-healing.spec.ts, src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-mode2031-raw-subscription.spec.ts, src/renderer/src/components/terminal-pane/pty-connection/input/pty-connection-deferred-input-forwarding.spec.ts, src/renderer/src/components/terminal-pane/pty-connection/notifications/pty-connection-terminal-bell-attention.spec.ts, src/renderer/src/components/terminal-pane/pty-connection/output/pty-connection-fresh-native-follow-reset.spec.ts, src/renderer/src/components/terminal-pane/pty-connection/spawn/unbound-pane-spawn-recovery.test.ts, src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-foreground-agent.test.ts, src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-input-and-repaint.test.ts, src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts. Unresolved local/computed edges remain explicit debt.", "Audit2065 (sources2063/2064): Intentionally retire these low-value alarms without replacement: src/renderer/src/components/terminal-pane/pty-connection/startup/pty-connection-startup-cwd-fallback-notice.spec.ts: prints a terminal notice when the startup cwd fell back to the workspace root. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-coalesce.test.ts: surfaces working frames when many spinner frames arrive in one chunk. src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-pi-spinner.test.ts: surfaces normalized working and idle labels across a spinner cycle; surfaces working even when a single chunk contains multiple spinner frames. src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionStartupCwdFallbackNoticeTests } from '../startup/pty-connection-startup-cwd-fallback-notice.spec'; registerPtyConnectionStartupCwdFallbackNoticeTests(). 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.", "Composer draft creation and cancellation are not implemented by this gate.", @@ -2378,23 +2379,23 @@ "providers": ["local", "ssh", "remote-runtime"], "coveredPlatforms": ["macos"], "coveredProviders": [], - "coverageNotes": "Audit2266 reduces cmd-j-host-qualified-candidate-ownership.test.ts to the scoped open-tab hidden same-ID legacy ambiguity refusal. Separate browser/simulator paired-runtime alias and current-row projections, generic workspace host projection and hostless explicit-owner refusal examples are removed without equivalent replacement. No fresh gate execution, browser activation, physical host, simulator or remote delivery evidence is claimed. Historical dated receipts and budgets remain raw-byte exact. Prior coverage account: Audit1899 replays sealed Audit1895: workspace-session-schema.test.ts keeps only cross-workspace truncated-tab salvage and legacy browser-history cap normalization. Four current commands and testFiles retain that reduced source; no current assertionRef or active receipt selects it. SSH file-owner, isolated browser partition, launch/title/quick-command fields, recency, structured-chat/view-mode and remote browser identity hydration alarms are intentionally lost. Existing retired receipt strings and unrelated active receipts remain verbatim. No equivalent replacement, new Cmd-J gate execution, native simulator or remote/browser restore proof is claimed. Historical coverage account before Audit1899: Audit1494 removes use-open-tab-search.test.ts. Supplied host/worktree/title/ranking projections, simple subscription updates and result-array identity alarms are retired. No actual activation or navigation occurred in that suite. No equivalent replacement coverage or fresh Cmd-J gate validation is claimed. Historical receipts remain scoped to their original selectors. Audit1433 narrows worktree-checks-review-index.test.ts to same-ID local/SSH object-key review isolation. Local provider/cache lookup, GitLab preference, suppression/legacy fallback, explicit-PR authority, physical-versus-runtime review isolation, and branchless-workspace alarms are intentionally removed. No equivalent replacement coverage is claimed. Historical receipts and commands remain unchanged and do not certify the reduced source. Historical coverage account: Audit1396 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1308 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Deterministic candidate-builder contracts inject local and paired-runtime worktrees with the same bare id into the real aggregated tab buckets, including folder workspaces and a paired runtime transporting an SSH-owned worktree. A mirror contract preserves distinct same-id runtime tabs. A paired Electron journey verifies both visible browser rows and both visible simulator rows, then requires each selection to render its owning active tab and update backing host-qualified state. The test-value audit narrowed simulator-palette-search.test.ts to the recency tie, same-id host isolation, ambiguous legacy host rejection and oversized-input getter tripwire. Supplied timestamp, empty-query context ordering, host projection, alias/range, metadata matching, active-tab score, over-token/whitespace and malformed display-name fallback examples were removed. Their separate alarms are lost; retained candidate and activation contracts do not establish equivalent coverage. Historical run commands and results remain historical. The audit also removed the standalone workspace-tab-palette-search suite: supplied row, title, metadata, alias, range, ranking and ownership examples no longer provide their separate alarms. Other retained contracts are not replacement coverage. The mirror-identity fixture now retains same-id sibling-runtime isolation and the repeated-frame subscriber tripwire only. Supplied field, owner, alias and mapping examples are removed; their separate alarms are lost. The retained sibling-runtime case is not equivalent coverage for them. The test-value audit removed tabs-open-close-lifecycle host-stamping examples and ordinary tab/group operations from tabs-pane-layout-operations. Local-null, explicit-runtime and SSH-without-active-host stamp assertions are lost; retained mobile/MRU and subscriber/atomic split cases do not replace them. Candidate and live Cmd-J evidence retains its own scope. Historical commands, outcomes and narratives remain historical. Audit1308: src/renderer/src/lib/browser-palette-search.test.ts removed. Browser-palette token and pasted-query size-guard work alarms disappear. No equivalent replacement coverage is claimed. Audit1386: src/renderer/src/lib/open-mobile-emulator-tab.test.ts reduced. Duplicate attach count and null-tab creation retry/guard reset standalone alarms removed; no simulator device used. No equivalent replacement coverage is claimed. Existing exact unaffected receipts and their platform/provider/budget claims remain scoped to unchanged selectors. Changed optional selectors have no new execution result. Audit1396: src/renderer/src/lib/simulator-palette-search.test.ts reduced. Lose simulator-specific lastFocusedAt tie-order alarm; identity/routing and pre-scan size fence remain. No native simulator or real remote launch claim. No equivalent replacement coverage is claimed. Audit1402: src/renderer/src/runtime/web-session-tabs-sync-mirror-identity.test.ts reduced. Loses repeated no-op frame store-notification budget; independent cross-runtime resource preservation remains. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result.", + "coverageNotes": "Audit2729 reduces browser-page-palette-activation.test.ts: separate SSH/paired-runtime alias forwarding, distinct multigroup views accepted, and remote-folder activation forwarding alarms are removed. Collision refusal, preactivation address-bar focus capture, owning-group activation state and missing-tab refusal remain byte-identical. No equivalent replacement, fresh gate execution or actual host/browser delivery evidence is claimed. Prior coverage account: Audit2697 browser source review (metadata followup2702): Reduce src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts by four authored/expanded cases without replacement. The remaining three cases preserve only their existing same-ID execution-host separation, absent stamped-owner refusal and ambiguous legacy-bucket refusal scope. Intentionally lose duplicate backing-tab-ID suppression, multiple unified-browser claims of one workspace, foreign-worktree unified-tab rejection, and the 1000-workspace output/internal getter-read budget alarm. These are real removed alarms; the retained host cases are not equivalent replacements. Current test-value policy rejects internal getter/read budgets; no replacement performance or measured-cost claim is made. Keep existing nonempty selectors and the retained same-ID browser assertionRef. No fresh gate execution or reduced-source validation is supplied; dated receipts, results, commands and historical coverage accounts remain within their original source scope. No live browser activation, physical provider, mixed-version execution, mobile, native UI, platform hardware, soak or timing result is added. Prior coverage account (preserved verbatim): Audit2266 reduces cmd-j-host-qualified-candidate-ownership.test.ts to the scoped open-tab hidden same-ID legacy ambiguity refusal. Separate browser/simulator paired-runtime alias and current-row projections, generic workspace host projection and hostless explicit-owner refusal examples are removed without equivalent replacement. No fresh gate execution, browser activation, physical host, simulator or remote delivery evidence is claimed. Historical dated receipts and budgets remain raw-byte exact. Prior coverage account: Audit1899 replays sealed Audit1895: workspace-session-schema.test.ts keeps only cross-workspace truncated-tab salvage and legacy browser-history cap normalization. Four current commands and testFiles retain that reduced source; no current assertionRef or active receipt selects it. SSH file-owner, isolated browser partition, launch/title/quick-command fields, recency, structured-chat/view-mode and remote browser identity hydration alarms are intentionally lost. Existing retired receipt strings and unrelated active receipts remain verbatim. No equivalent replacement, new Cmd-J gate execution, native simulator or remote/browser restore proof is claimed. Historical coverage account before Audit1899: Audit1494 removes use-open-tab-search.test.ts. Supplied host/worktree/title/ranking projections, simple subscription updates and result-array identity alarms are retired. No actual activation or navigation occurred in that suite. No equivalent replacement coverage or fresh Cmd-J gate validation is claimed. Historical receipts remain scoped to their original selectors. Audit1433 narrows worktree-checks-review-index.test.ts to same-ID local/SSH object-key review isolation. Local provider/cache lookup, GitLab preference, suppression/legacy fallback, explicit-PR authority, physical-versus-runtime review isolation, and branchless-workspace alarms are intentionally removed. No equivalent replacement coverage is claimed. Historical receipts and commands remain unchanged and do not certify the reduced source. Historical coverage account: Audit1396 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1308 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Deterministic candidate-builder contracts inject local and paired-runtime worktrees with the same bare id into the real aggregated tab buckets, including folder workspaces and a paired runtime transporting an SSH-owned worktree. A mirror contract preserves distinct same-id runtime tabs. A paired Electron journey verifies both visible browser rows and both visible simulator rows, then requires each selection to render its owning active tab and update backing host-qualified state. The test-value audit narrowed simulator-palette-search.test.ts to the recency tie, same-id host isolation, ambiguous legacy host rejection and oversized-input getter tripwire. Supplied timestamp, empty-query context ordering, host projection, alias/range, metadata matching, active-tab score, over-token/whitespace and malformed display-name fallback examples were removed. Their separate alarms are lost; retained candidate and activation contracts do not establish equivalent coverage. Historical run commands and results remain historical. The audit also removed the standalone workspace-tab-palette-search suite: supplied row, title, metadata, alias, range, ranking and ownership examples no longer provide their separate alarms. Other retained contracts are not replacement coverage. The mirror-identity fixture now retains same-id sibling-runtime isolation and the repeated-frame subscriber tripwire only. Supplied field, owner, alias and mapping examples are removed; their separate alarms are lost. The retained sibling-runtime case is not equivalent coverage for them. The test-value audit removed tabs-open-close-lifecycle host-stamping examples and ordinary tab/group operations from tabs-pane-layout-operations. Local-null, explicit-runtime and SSH-without-active-host stamp assertions are lost; retained mobile/MRU and subscriber/atomic split cases do not replace them. Candidate and live Cmd-J evidence retains its own scope. Historical commands, outcomes and narratives remain historical. Audit1308: src/renderer/src/lib/browser-palette-search.test.ts removed. Browser-palette token and pasted-query size-guard work alarms disappear. No equivalent replacement coverage is claimed. Audit1386: src/renderer/src/lib/open-mobile-emulator-tab.test.ts reduced. Duplicate attach count and null-tab creation retry/guard reset standalone alarms removed; no simulator device used. No equivalent replacement coverage is claimed. Existing exact unaffected receipts and their platform/provider/budget claims remain scoped to unchanged selectors. Changed optional selectors have no new execution result. Audit1396: src/renderer/src/lib/simulator-palette-search.test.ts reduced. Lose simulator-specific lastFocusedAt tie-order alarm; identity/routing and pre-scan size fence remain. No native simulator or real remote launch claim. No equivalent replacement coverage is claimed. Audit1402: src/renderer/src/runtime/web-session-tabs-sync-mirror-identity.test.ts reduced. Loses repeated no-op frame store-notification budget; independent cross-runtime resource preservation remains. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result.", "motivatingLinks": [ "https://linear.app/stably/issue/STA-4965", "https://github.com/stablyai/orca/pull/15371" ], "invariant": "Candidate identity is the tuple of execution-host identity and worktree identity: same-id sibling hosts retain separate correct browser, simulator, and workspace tabs, each tab appears exactly once, and selection activates its owning host.", - "oracle": "Audit2266 current retained source checks only that scoped open-tab search rejects hostless legacy browser, simulator and workspace tabs when a hidden same-ID sibling host remains in the ownership catalog. Reduced selectors require fresh validation; existing historical receipts do not validate the changed source. Prior oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Aggregate two hosts' tabs under one intentionally colliding worktree id, stamp each unified tab with its execution host, and require exactly one candidate per owner. Repeat with an SSH physical owner transported by a paired-runtime alias. Independently require each browser and simulator Cmd-J selection to update activeWorkspaceExecutionHostId plus its owning workspace/group and render the selected tab active. Ambiguous legacy tabs without ownership fail closed.", + "oracle": "Audit2697 browser source review (metadata followup2702): Reduce src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts by four authored/expanded cases without replacement. The remaining three cases preserve only their existing same-ID execution-host separation, absent stamped-owner refusal and ambiguous legacy-bucket refusal scope. Intentionally lose duplicate backing-tab-ID suppression, multiple unified-browser claims of one workspace, foreign-worktree unified-tab rejection, and the 1000-workspace output/internal getter-read budget alarm. These are real removed alarms; the retained host cases are not equivalent replacements. Current test-value policy rejects internal getter/read budgets; no replacement performance or measured-cost claim is made. Keep existing nonempty selectors and the retained same-ID browser assertionRef. No fresh gate execution or reduced-source validation is supplied; dated receipts, results, commands and historical coverage accounts remain within their original source scope. No live browser activation, physical provider, mixed-version execution, mobile, native UI, platform hardware, soak or timing result is added. Prior coverage account (preserved verbatim): Audit2266 current retained source checks only that scoped open-tab search rejects hostless legacy browser, simulator and workspace tabs when a hidden same-ID sibling host remains in the ownership catalog. Reduced selectors require fresh validation; existing historical receipts do not validate the changed source. Prior oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Aggregate two hosts' tabs under one intentionally colliding worktree id, stamp each unified tab with its execution host, and require exactly one candidate per owner. Repeat with an SSH physical owner transported by a paired-runtime alias. Independently require each browser and simulator Cmd-J selection to update activeWorkspaceExecutionHostId plus its owning workspace/group and render the selected tab active. Ambiguous legacy tabs without ownership fail closed.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/cmd-j/worktree-checks-review-index.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/worktree-jump/WorktreeJumpPalette.test.tsx", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts src/renderer/src/lib/simulator-palette-search.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts src/renderer/src/lib/simulator/search/simulator-palette-search.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/cmd-j-host-qualified-candidate-ownership.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts src/renderer/src/lib/simulator-palette-search.test.ts src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts src/shared/workspace-session/workspace-session-schema.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/cmd-j-host-qualified-candidate-ownership.test.ts src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts src/renderer/src/lib/simulator-palette-search.test.ts src/renderer/src/lib/browser/palette/browser-page-palette-activation.test.ts src/renderer/src/lib/simulator-tab-palette-activation.test.ts src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts src/renderer/src/runtime/web-session-tabs-sync/identity/web-session-tabs-sync-mirror-identity.test.ts src/shared/workspace-session/workspace-session-schema.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/cmd-j/worktree-checks-review-index.test.ts src/renderer/src/components/worktree-jump/WorktreeJumpPalette.test.tsx src/renderer/src/lib/cmd-j-host-qualified-candidate-ownership.test.ts src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts src/renderer/src/lib/simulator-palette-search.test.ts src/renderer/src/lib/browser/palette/browser-page-palette-activation.test.ts src/renderer/src/lib/simulator-tab-palette-activation.test.ts src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts src/renderer/src/runtime/web-session-tabs-sync/identity/web-session-tabs-sync-mirror-identity.test.ts src/shared/workspace-session/workspace-session-schema.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/cmd-j/worktree-checks-review-index.test.ts src/renderer/src/components/worktree-jump/WorktreeJumpPalette.test.tsx src/renderer/src/lib/cmd-j-host-qualified-candidate-ownership.test.ts src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts src/renderer/src/lib/simulator-palette-search.test.ts src/renderer/src/lib/browser/palette/browser-page-palette-activation.test.ts src/renderer/src/lib/simulator-tab-palette-activation.test.ts src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts src/renderer/src/lib/open-mobile-emulator-tab.test.ts src/renderer/src/runtime/web-session-tabs-sync/identity/web-session-tabs-sync-mirror-identity.test.ts src/shared/workspace-session/workspace-session-schema.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts src/renderer/src/lib/simulator/search/simulator-palette-search.test.ts src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts src/shared/workspace-session/workspace-session-schema.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/cmd-j-host-qualified-candidate-ownership.test.ts src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts src/renderer/src/lib/simulator/search/simulator-palette-search.test.ts src/renderer/src/lib/browser/palette/browser-page-palette-activation.test.ts src/renderer/src/lib/simulator/tabs/simulator-tab-palette-activation.test.ts src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts src/renderer/src/runtime/web-session-tabs-sync/identity/web-session-tabs-sync-mirror-identity.test.ts src/shared/workspace-session/workspace-session-schema.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/cmd-j/worktree-checks-review-index.test.ts src/renderer/src/components/worktree-jump/WorktreeJumpPalette.test.tsx src/renderer/src/lib/cmd-j-host-qualified-candidate-ownership.test.ts src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts src/renderer/src/lib/simulator/search/simulator-palette-search.test.ts src/renderer/src/lib/browser/palette/browser-page-palette-activation.test.ts src/renderer/src/lib/simulator/tabs/simulator-tab-palette-activation.test.ts src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts src/renderer/src/runtime/web-session-tabs-sync/identity/web-session-tabs-sync-mirror-identity.test.ts src/shared/workspace-session/workspace-session-schema.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/cmd-j/worktree-checks-review-index.test.ts src/renderer/src/components/worktree-jump/WorktreeJumpPalette.test.tsx src/renderer/src/lib/cmd-j-host-qualified-candidate-ownership.test.ts src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts src/renderer/src/lib/simulator/search/simulator-palette-search.test.ts src/renderer/src/lib/browser/palette/browser-page-palette-activation.test.ts src/renderer/src/lib/simulator/tabs/simulator-tab-palette-activation.test.ts src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts src/renderer/src/lib/simulator/launch/open-mobile-emulator-tab.test.ts src/renderer/src/runtime/web-session-tabs-sync/identity/web-session-tabs-sync-mirror-identity.test.ts src/shared/workspace-session/workspace-session-schema.test.ts", "pnpm exec playwright test tests/e2e/paired-cmd-j-host-qualified-tabs.spec.ts --config tests/playwright.config.ts --project electron-headless --workers=1", "SKIP_BUILD=1 pnpm exec playwright test tests/e2e/paired-cmd-j-host-qualified-tabs.spec.ts --config tests/playwright.config.ts --project electron-headless --workers=1" ], @@ -2403,11 +2404,11 @@ "src/renderer/src/components/worktree-jump/WorktreeJumpPalette.test.tsx", "src/renderer/src/lib/cmd-j-host-qualified-candidate-ownership.test.ts", "src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts", - "src/renderer/src/lib/simulator-palette-search.test.ts", + "src/renderer/src/lib/simulator/search/simulator-palette-search.test.ts", "src/renderer/src/lib/browser/palette/browser-page-palette-activation.test.ts", - "src/renderer/src/lib/simulator-tab-palette-activation.test.ts", - "src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts", - "src/renderer/src/lib/open-mobile-emulator-tab.test.ts", + "src/renderer/src/lib/simulator/tabs/simulator-tab-palette-activation.test.ts", + "src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts", + "src/renderer/src/lib/simulator/launch/open-mobile-emulator-tab.test.ts", "src/renderer/src/runtime/web-session-tabs-sync/identity/web-session-tabs-sync-mirror-identity.test.ts", "tests/e2e/paired-cmd-j-host-qualified-tabs.spec.ts", "src/shared/workspace-session/workspace-session-schema.test.ts" @@ -2425,7 +2426,7 @@ ] }, { - "file": "src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts", + "file": "src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts", "assertions": [ "same-id folder simulator reuse selects the active owning host", "inactive local simulator creation remains host-stamped amid a collision", @@ -2485,7 +2486,7 @@ "result": "failed", "durationSeconds": 0.8, "summary": "The final-review oracle failed 4/16 before the follow-up: same-id folder simulator reuse selected no owning tab, inactive local simulator creation was unstamped, the paired SSH/runtime alias resolved local metadata, and an explicit unknown owner fell back locally. Historical command preserved after the test-value audit removed the palette repo resolver suite. currentCommand is an administrative link to a remaining gate command; this historical run has not validated that command or equivalent coverage.", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts" + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts" }, { "date": "2026-08-20", @@ -2495,7 +2496,7 @@ "result": "failed", "durationSeconds": 0.1, "summary": "The final reviewer repo-label oracle failed 1/6 before the follow-up: a paired SSH worktree resolved the local bare-id repository instead of its runtime-owned repository. Historical command preserved after the test-value audit removed the palette repo resolver suite. currentCommand is an administrative link to a remaining gate command; this historical run has not validated that command or equivalent coverage.", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts" + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts" }, { "date": "2026-08-20", @@ -2505,7 +2506,7 @@ "result": "failed", "durationSeconds": 0.1, "summary": "The final clean-round fail-closed oracle failed 1/7 before the follow-up: an unavailable explicit runtime owner borrowed physical SSH repository metadata. Historical command preserved after the test-value audit removed the palette repo resolver suite. currentCommand is an administrative link to a remaining gate command; this historical run has not validated that command or equivalent coverage.", - "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts" + "currentCommand": "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts" }, { @@ -2570,6 +2571,8 @@ "Add a live paired-runtime-over-SSH journey when the E2E harness can provision that combined topology." ], "knownGaps": [ + "Audit2729 retires browser palette standalone paired-runtime SSH alias forwarding, multigroup-view acceptance and remote-folder forwarding alarms without equivalent replacement. The retained partial suite has no fresh execution result; existing exact receipts and budgets stay scoped to their unchanged selectors.", + "Audit2697/2702 intentional palette coverage losses: 'omits a browser row whose backing tab id is duplicated': Remove malformed duplicate unified-tab-ID fixture and its empty result. Real duplicate-ID suppression alarm is lost; this narrow private inventory has no palette selection or activation flow. 'omits a workspace claimed by more than one unified browser tab': Remove two unified browser claims of one workspace. Real first-indexed-foreign-versus-later-owned collision rejection alarm is lost; same-host and ambiguous legacy cases do not replace it. 'omits a workspace whose single unified browser tab is not owned by this worktree': Remove one unique workspace backed by foreign-worktree unified tab fixture. Real foreign-tab/worktree rejection alarm is lost; stamped host tests are not equivalent to foreign worktree mismatch. 'indexes workspace tabs when building a large browser palette': Remove internal getter read budget over1000workspaces: current main policy explicitly rejects getter/Proxy/read counts and says performance changes get correctness tests only. Loses direct quadratic-indexing cost alarm and positive1000workspace output check; no equivalent replacement claimed. The same source review also deletes browser-link-profile-isolation.test.ts (two authored/five expanded) and removes two HTTP-routing declarations (three expanded). Exact tracked-tree filename/case search finds no active gate selector/assertionRef for those navigation sources; their local profile isolation/reuse, deferred minted-profile privacy/lifetime, foreground view/group projection and contextless must-create-page alarms still disappear without replacement. This palette gate is not credited with coverage of those unrelated navigation cases. Historical shard timings are retained unchanged. Audit2697 browser source review (metadata followup2702): Reduce src/renderer/src/lib/browser/palette/browser-palette-page-entries.test.ts by four authored/expanded cases without replacement. The remaining three cases preserve only their existing same-ID execution-host separation, absent stamped-owner refusal and ambiguous legacy-bucket refusal scope. Intentionally lose duplicate backing-tab-ID suppression, multiple unified-browser claims of one workspace, foreign-worktree unified-tab rejection, and the 1000-workspace output/internal getter-read budget alarm. These are real removed alarms; the retained host cases are not equivalent replacements. Current test-value policy rejects internal getter/read budgets; no replacement performance or measured-cost claim is made. Keep existing nonempty selectors and the retained same-ID browser assertionRef. No fresh gate execution or reduced-source validation is supplied; dated receipts, results, commands and historical coverage accounts remain within their original source scope. No live browser activation, physical provider, mixed-version execution, mobile, native UI, platform hardware, soak or timing result is added.", "Live Linux, Windows, and paired-runtime-over-SSH journeys are not collected; the SSH/runtime dual-owner topology is deterministic renderer coverage.", "The paired Electron simulator path seeds renderer state because remote web clients cannot launch a native emulator.", "The paired Electron journey proves a real host mirror stamp before injecting the same-id sibling state; it does not create the collision through the wire.", @@ -4448,7 +4451,7 @@ "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. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2043: Remove the registration-wait, webview-security, preview-authorization, guest-lifecycle and grant-IPC unit suites and the sibling-directory assertion reference. Runtime and browser capability consumers also lose removed imported examples. Remaining document-policy, file-reader and grant-registry assertions do not replace those alarms. Preserve the 27 independent dated receipts at their original unchanged selectors; reduced prospective unit selectors have no fresh result or equivalent replacement claim. Historical prior account (preserved verbatim): Audit1973: Delete the browser RPC forwarding/schema/scalar suite and its prospective selector. Preserve all27 unrelated dated receipts; no actual browser operation alarm is replaced. Whole original changed dated receipts are retired, never narrowed or transferred. This metadata review claims no fresh execution, equivalent replacement, provider/PTY, live remote/mobile, rendered, cross-platform, soak or measured-budget result. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): The complete terminal-file-link-actions suite is removed. Lose supplied local/remote menu-row inventories, browser label/order/download/reveal callback forwarding, platform-copy and source-group pinning examples. No OS reveal/download, real remote preview or browser navigation was exercised; the other real document-preview sources are not equivalent replacements. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1709 retires changed-source assertion and execution scope without equivalent replacement coverage. Existing unchanged-selector receipts remain scoped to their original sources. Historical prior-source oracle: Audit1687 retires changed-source assertion and execution scope without equivalent replacement coverage. Existing unchanged-selector receipts remain scoped to their original sources. Historical prior-source oracle: Audit1421 narrows renderer unit coverage as recorded in coverageNotes. Prior oracle descriptions are historical for the changed suite. The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Retained unchanged-selector receipts are the only current execution evidence. Reduced-source assertions await validation. Historical prior oracle: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): In paired Electron, write an HTML fixture that declares its own title on the host, invoke the Explorer preview action on the client, and require the document text to be readable out of the orca-preview guest before judging any absence. With that presence established, require the client to hold exactly one browser workspace more than its baseline and that workspace to be the document one: page and tab url blank, the document path mirrored onto both, the tab named by the document's title, the chip naming the file, no editor row of the retired preview species anywhere, and the guest URL carrying the orca-preview scheme. Ask the host through its own page registry as well as through the tab snapshot, and in the same run open an ordinary URL browser tab from the same client and require that one to arrive in both — the presence precondition without which “the host gained nothing” is satisfied just as well by an oracle that cannot see browser pages at all. Require the preview to sit in a group other than the source editor's while the active group and tab remain the source editor's. Then click away to the terminal, click the preview tab, require it to reactivate and still render, close it with its own X, and require the document tab to be gone while the host still holds only the URL tab and the source group, source editor and terminal survive. Quit the client with a document tab open and relaunch it on the same profile: require the same workspace row to come back, blank and named by the document, rendering the document again over a grant URL that differs from the one that was quit, with no preview-scheme or document-named page anywhere in what the host holds. Prove the halves are live by flipping one product property at a time and requiring the run to fail: publish document workspaces to the host like ordinary ones, and stop mirroring the document onto the workspace row. Have the fixture document attempt its own egress on every load — an unattended window.open and location.href to an off-machine URL, plus an inline ICE gathering probe — and require the same baseline counts and a candidate count of zero, so the document's own attempts are measured rather than assumed. Then, as a separate phase after the close oracle has already run, bring the client window to the front, press the document's heading with a real mouse event, and require the document to report that the same press drove it to attempt a second window.open and location.href while both browser counts stay at that phase's baseline and nothing routes — the case a recent-input gate cannot distinguish from the press's own effect. Only then press the target=_blank link with a real mouse event and require both a recorded routing call that returned success and a browser count above that baseline, with the preview tab still open. Drive the preload's click policy as a unit oracle over a real document: a dispatched click, a trusted press on an external anchor, an anchor reached through what it wraps, an SVG animated href, a sibling preview link, fragment and percent-encoded fragment targets, a bare hash, and a middle click. Create a browser page located by a workspace document, handing creation a live grant URL, and require its stored url, its mirrored tab url and the written session payload all to be blank with no orca-preview string anywhere in what was written, while an ordinary page created the same way keeps the URL it was given and asks for the address bar the document page never does. Parse the written page and tab through the session schema and require the document to survive both halves. Hydrate them back and require the document page to return blank and still named — including when its page row was salvaged away and only the tab's own copy remains, and when a foreign session carried a grant URL into both rows. Drive the mirror across a page switch out of the document and back, and across a repair in which the document is the only mirrored field that differs. Name a document page from its document and require the tab to take that name, name it with an empty title and require the file, name it with a live grant URL and require the file again with no preview scheme anywhere in the written session, and require an ordinary blank browser tab beside it to still be called New Tab. Dispatch a title update out of a rendered preview's own guest and require it to reach the page state while the identity chip still reads the document's workspace-relative path. Attach a browsing guest and a workspace-document guest through the same method in one run and require the browsing one to take clicked-link routing, popup handling and auth-identity detach tracking while the document guest takes none of them, stays inside the grant it is showing, denies every window it asks for, and is dropped from the page-keyed document registry by the same teardown that frees its id for a later attach. Register a browsing guest and attach a workspace-document guest in one run against the real manager, require the one door to answer each page with the guest of its own half, and require the document page to be absent from the browsing map and from its enumeration. Drive both browsing registration entry points with a page the document half already holds and require them to register nothing, and drive the mint channel with a page the browsing half already holds and require it to refuse; and drive the offscreen one with a guest that is missing and with one already destroyed, requiring the same refusal. Arm a grab on a live preview target, drive the unregister channel at that same target in the window before the queued operation runs, and require the grab to reach the guest anyway — then drive the same sequence for an ordinary browser page and require its grab state to be disposed after all. Hold one viewport-bridge op open, queue a second behind it, swap the page's guest while that second op waits, and require the injection to land in the guest the page has then. Revoke a grant after a tool has run against its page and require that page's grab state to be cancelled and disposed. Ask a tool for a document page whose guest has not attached, require the request to park in the registration wait, attach the guest, and require the same request to arm on it; require a page nothing ever renders to answer not-ready once that wait elapses. With a document open, ask a tool for a browsing page id and require it to be answered by the browsing half or not at all, with the same channel reaching the document guest under the page it really renders. Drive open-externally for a document whose per-file owner is remote while the workspace-scoped owner is unresolved, for a runtime-owned worktree whose preview tab carries no runtime id of its own, and for a worktree that resolves no runtime owner while the tab still carries one, requiring the download route in each; and for an owner that cannot be resolved at all, and for an unknown workspace root while nothing names another host, requiring a refusal that neither opens nor downloads. Drive the headless backend with a page the document half already holds and require it to reject, destroy the window, and unregister nothing — then shut the backend down and require it still to have unregistered nothing. Navigate a bound preview guest at a second grant through both latch events and require it to stay on the grant it bound to. Mount a preview while a renderer drag is already in flight and require its guest to be click-through at the moment it is appended, not a turn later. Render the editor panel shell in each remaining tab mode and require the path header exactly where the surface does not already name itself. Drive the preview action and require a browser tab located by the document rather than an editor tab, require a second open of the same document to activate the tab it is already in, and require closing that tab to revoke its grant while a URL tab closed beside it revokes none. Publish a worktree holding a document tab and a URL tab and require only the URL tab to reach the mobile snapshot. Install the shared partition policies for a preview partition and for an ordinary browsing partition in the same run, fire each one's own will-download listener, and require the preview's to cancel while the browsing one still reaches the download router — then require the preview protocol installer to be what asks for that deny. In the same run, require the cancelled download to raise a reader-facing notice and the routed one to raise none. require the guest registry to name the bound grant for a live preview guest and nothing for a contents that is not one, has committed no document, or is gone. Drive the shell with a refusal and require one fixed sentence, still one row after three more refusals, standing beside an asset failure rather than being counted with it, gone behind the failure panel, and ignored when it names another preview's grant. Drive the main-side report gate directly for a sender that is no preview guest, a guest with no bound or a revoked grant, a genuine press Electron's webview focus flag misreports as unfocused, and non-web URLs; drive the reader-facing confirmation for accept, cancel, and a confirmed tab the browser refuses; and drive will-attach-webview in both preload directions. Run the per-owner reader, grant-containment, scheme-admission, guest-policy, and plan-routing contracts as unit oracles, including a host-reported truncation, an over-cap binary, and an out-of-worktree paired path. Drive the reader-facing component with the payloads the reader can actually produce — the entry document fails only as truncated or unreadable, a subresource additionally as a refused format — and require the asset case to leave the guest mounted. Drive the closed-tab cleanup hook, the window installer, and the grant IPC handlers directly, requiring the grant to be released when the preview tab closes, cleared at window creation and on a cross-document main-frame navigation, and refused to any sender that is not the trusted renderer. For the browser creations this gate still owns, run the unchanged contract oracle for direct create and side-preview callers with absent status, unknown capabilities, and a mixed-version host, requiring the original unsupported error or visible toast, zero RPCs, and no retained new split; hold a real navigation response beyond the 15-second client deadline after host creation and require the first RPC to return the exact host inventory page ID, one host page, and no retry; repeat reconciliation faults against headless serve and retain the separate exact-page reconciliation rollback oracle. Audit2452 removes the whole fake-effect browser-close routing suite. Active selectors and assertion references no longer select it. Its requested-worktree default close, sibling-page close and explicit missing-page typed reply alarms are intentionally retired without equivalent replacement. Prior dated receipts remain unchanged and scoped to their original sources; no fresh execution of the reduced gate, rendered browser, live remote, mobile or cross-platform validation is claimed.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/browser/client-pages/orca-runtime-browser.test.ts src/renderer/src/runtime/web-session-tabs-sync/navigation/web-session-tabs-sync-focus-intent.test.ts src/renderer/src/runtime/web-session-tabs-sync/placement/web-session-tabs-sync-browser-tabs.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/document-preview/doc-preview-grant-registry.test.ts src/main/browser/document-preview/doc-preview-file-reader.test.ts src/main/browser/document-preview/doc-preview-guest-policy.test.ts src/main/browser/document-preview/doc-preview-failure-notice.test.ts src/shared/document-preview/doc-preview-scheme.test.ts src/renderer/src/lib/doc-preview-grants.test.ts src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/document-preview/doc-preview-grant-registry.test.ts src/main/browser/document-preview/doc-preview-file-reader.test.ts src/main/browser/document-preview/doc-preview-guest-policy.test.ts src/main/browser/document-preview/doc-preview-failure-notice.test.ts src/shared/document-preview/doc-preview-scheme.test.ts src/renderer/src/lib/browser/documents/doc-preview-grants.test.ts src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/sessions/partition-policies/browser-session-partition-policies.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/sessions/partition-policies/browser-session-partition-policies.test.ts src/main/browser/document-preview/doc-preview-guest-policy.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/document-preview/doc-preview-guest-policy.test.ts", @@ -4487,7 +4490,7 @@ "src/renderer/src/components/browser-pane/workspace-doc/use-doc-preview-guest-tools.test.ts", "src/renderer/src/components/browser-pane/workspace-doc/HtmlDocPreview.toolbar.test.tsx", "src/shared/document-preview/doc-preview-scheme.test.ts", - "src/renderer/src/lib/doc-preview-grants.test.ts", + "src/renderer/src/lib/browser/documents/doc-preview-grants.test.ts", "src/renderer/src/components/browser-pane/workspace-doc/doc-preview-external-link-confirmation.test.ts", "src/renderer/src/components/link-actions/LinkActionPopover.test.tsx", "src/renderer/src/runtime/sync-runtime-graph/sync-runtime-graph-editor-diff-tabs.test.ts", @@ -4991,7 +4994,7 @@ "pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/rpc/methods/browser/browser-client-host-reconciliation.test.ts src/main/runtime/browser-host/leases/browser-host-lease-registry.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/client-pages/execution/browser-client-page-command-executor.test.ts src/main/browser/client-pages/execution/browser-client-page-command-integration.test.ts src/main/browser/client-pages/lifecycle/browser-client-page-inventory.test.ts src/main/browser/client-hosts/lifecycle/paired-runtime-browser-client-host-composition.test.ts src/main/browser/client-hosts/leases/paired-runtime-browser-host-lease.test.ts src/main/runtime/browser-host/leases/browser-host-lease-registry.test.ts src/main/runtime/rpc/methods/browser/browser-client-host.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/client-pages/lifecycle/browser-client-page-reconciliation-adapters.test.ts src/main/browser/routing/sessions/browser-route-prepared-page-rekey.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/shared/browser-network-tunnel-protocol.test.ts src/main/browser/network/tunnels/browser-network-tunnel-session.test.ts src/main/browser/network/tunnels/remote-browser-socks-server.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/shared/browser/network/tunnels/browser-network-tunnel-protocol.test.ts src/main/browser/network/tunnels/browser-network-tunnel-session.test.ts src/main/browser/network/tunnels/remote-browser-socks-server.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/network/tunnels/browser-network-tunnel-client.test.ts src/main/browser/network/execution-routes/paired-runtime-browser-network-route.test.ts src/main/runtime/rpc/methods/browser/browser-network-tunnel.test.ts src/main/runtime/browser/network/browser-network-tunnel-paired-runtime.integration.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/network/tunnels/browser-network-tunnel-outbound-memory-budget.test.ts src/main/browser/network/tunnels/browser-network-tunnel-session-aggregate-memory.test.ts src/shared/ws-outbound-backpressure-queue.test.ts src/shared/remote-runtime/remote-runtime-client.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/shared/ws-outbound-backpressure-queue.test.ts src/shared/remote-runtime/remote-runtime-client.test.ts src/main/runtime/browser-host/leases/browser-host-lease-registry.test.ts src/main/runtime/rpc/server/runtime-rpc-browser-host-admission.test.ts src/main/runtime/rpc/methods/browser/browser-client-host.test.ts src/main/runtime/rpc/methods/browser/browser-network-tunnel.test.ts src/main/browser/client-hosts/leases/paired-runtime-browser-host-lease.test.ts src/main/browser/network/execution-routes/paired-runtime-browser-network-route.test.ts src/main/runtime/browser/network/browser-network-tunnel-paired-runtime.integration.test.ts src/main/browser/network/tunnels/browser-network-tunnel-client.test.ts src/main/browser/network/tunnels/browser-network-tunnel-session.test.ts src/main/browser/network/tunnels/browser-network-tunnel-session-aggregate-memory.test.ts src/main/browser/network/tunnels/browser-network-tunnel-outbound-memory-budget.test.ts src/main/browser/network/tunnels/remote-browser-socks-server.test.ts", @@ -5013,7 +5016,7 @@ "testFiles": [ "src/main/browser/routing/guest-authority/browser-route-webcontents-registry.test.ts", "src/main/runtime/browser/client-pages/runtime-browser-client-page-recovery.test.ts", - "src/shared/browser-network-tunnel-protocol.test.ts", + "src/shared/browser/network/tunnels/browser-network-tunnel-protocol.test.ts", "src/main/runtime/browser-host/reconciliation/browser-host-page-retirement.test.ts", "src/main/runtime/browser-host/reconciliation/browser-host-page-placement-replacement.test.ts", "src/main/runtime/browser-host/reconciliation/browser-host-page-placement.test.ts", @@ -5152,7 +5155,7 @@ ] }, { - "file": "src/shared/browser-network-tunnel-protocol.test.ts", + "file": "src/shared/browser/network/tunnels/browser-network-tunnel-protocol.test.ts", "assertions": [ "remote DNS names round-trip without client resolution", "unknown versions, opcodes, oversized payloads, and length mismatches fail closed" @@ -7371,7 +7374,7 @@ "providers": ["local", "daemon", "ssh", "wsl", "remote-runtime"], "coveredPlatforms": ["macos"], "coveredProviders": ["local", "daemon", "ssh", "wsl", "remote-runtime"], - "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. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2003: Delete the complete pure orphan-topology suite and its file membership; preserve the other selectors from its combined command after archiving the original command string. Lost alarms are synthetic current-layout preservation, one-anchor grafting and ambiguous-anchor appending examples. Do not transfer their ownership/topology scope to sibling suites. Preserve all5 independent historical receipts exactly. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the mocked agent-session suite and its prospective selector and aliases. Retire all3 whole dated changed-selector receipts, preserving their original raw objects in historical gaps without transferring counts or durations. Preserve5 unrelated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Partial agent-operation service suite retains only concurrent retry joining with changed-fingerprint conflict. Retire its complete three-title assertion object: old-owner legacy fallback before side effects, nested SSH Pi transcript refusal and completed/ambiguous physical-commit replay fences are no longer backed. Other probe/launch option/ledger/failure/remote-inventory examples disappear as detailed below. No actual provider spawn, live SSH or physical commit proof is retained by this source. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1911: The complete provider PTY-inspection mock suite is removed: missing-provider rejection, stale-PTY renderer unverifiable mapping, preserved supplied renderer failures, and supplied transport-loss mapping alarms are intentionally lost. No actual terminal teardown, daemon error or remote transport was exercised. Only the deleted explicit source tokens, testFile and whole assertionRef are removed. Meaningful remaining source selectors/assertions and unaffected dated receipts retain their original scope. No equivalent replacement, fresh reduced-gate, native/platform/provider, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1627 removes low-value mocked daemon projections, scalar tables and duplicate terminal examples without equivalent replacement coverage. Per-source reviews record retained terminal content preservation, process ownership refusal and recovery boundaries together with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1623 removes low-value mocked daemon projections, scalar tables and duplicate terminal examples without equivalent replacement coverage. Per-source reviews record retained terminal content preservation, process ownership refusal and recovery boundaries together with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1495 intentionally deletes the orphan-owner suite: explicit owner/host predicate examples are retired; no equivalent replacement coverage or fresh result is claimed. Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Audit1417 intentionally deletes src/renderer/src/components/terminal-pane/agent-completion-coordinator-pending-title-inspection.test.ts: Loses obsolete pending title process races, inspection failure suppression, explicit completion precedence and delayed remote inspection alarms. No equivalent replacement coverage or fresh result is claimed. Historical coverage account: Audit1342 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audits1301 and1308 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Deterministic macOS tests cover controller claims, daemon and SSH/relay operation replay, mixed-version selection, runtime ownership, exact provisional handoff, durable terminal retirement, two independent viewer mirrors, guarded adoption of legacy live PTYs, and completion classification when either the outer remote transport or authoritative host/provider process inspection becomes unreachable. The adoption harness models v1.4.150 agent/setup/shell tabs, current-generation restart and reconnect, exact handle/incarnation/worktree/host checks, topology CAS, competing clients, split-pane/group restoration, WSL ownership, and SSH owner rejection. The secondary parity repro runs independent clients against one headless remote Orca runtime over encrypted pairing and a real daemon-backed PTY, with tokened fixture-process identity separated from unrelated Codex app-server startup probes. The automated primary topology runs an isolated headed macOS Orca desktop server plus a separate paired web client and proves viewer-local fresh/resume focus, exact legacy placement, writable PTYs, unrelated-terminal survival, and host/client cleanup. SSH coverage is provider/relay contract and fault-injection coverage only; it does not substitute for paired-server coverage. Live Windows, Linux, WSL, SSH, and physical paired-Linux hosts remain gaps. The isolated intent-owner ledger suite was removed. web-runtime-session.test.ts retains exact post-create handoff confirmation only; its previous fresh/resume presentation and publication-replay assertions are no longer current references. Those direct owner-partition, cap and RPC/focus alarms are lost; other agent-session evidence does not establish equivalence. Structured handoff and adopted-leaf focus references now point to their dedicated surviving fixtures. Mixed-version recovery retains actual old-host recovery followed by a new CLI tab; its unsupported/missing-evidence tables are removed. Orphan recovery retains in-flight adoption-conflict serialization only; previous topology/pruning and absence/adoption examples are removed. These removed projection, capability and adoption-shape alarms are lost; retained cases do not replace them. Audit1301: src/renderer/src/runtime/remote-runtime-session-tabs-inflight.test.ts reduced. Direct dedupe eviction/count and equal receipt-position sample loses authored alarm. No equivalent replacement coverage is claimed. Audit1308: src/renderer/src/runtime/web-session-tabs-sync-agent-handoff.test.ts removed. Exact provisional replacement and post-create exit confirmation handoff pipeline alarms disappear. No equivalent replacement coverage is claimed. Audit1313: src/main/runtime/terminal-orphan-topology.test.ts: Retain actual topology merge algorithms preserving disjoint subtrees and grafted/ambiguous shared anchors with independent expected trees. Remove duplicate leaf validator and empty/no-change passthrough examples. Lose basic validation and no-group/noop characterization; no renderer layout proof. Reduced selectors require fresh validation; prior full-suite receipts do not validate removed or changed coverage. No equivalent replacement or physical-provider claim. Audit1342: src/renderer/src/components/terminal-pane/pty-connection-completion-and-notification.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Audit1383: src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts reduced. Lose command-list/receipt/default/background activation matrices whose provider spawn returns canned IDs. Retained test proves actual tab allocation separation, not terminal startup. No equivalent replacement coverage is claimed. Existing exact unaffected receipts and their platform/provider/budget claims remain scoped to unchanged selectors. Changed optional selectors have no new execution result. Audit1401: src/main/runtime/orca-runtime-tests/mobile-session-tabs-duplicate-pty-repair.spec.ts removed. Loses listing-on-already-repaired-data alarm; it never established runtime repair invocation. src/main/runtime/orca-runtime-tests/mobile-session-tabs-split-agent-tab.spec.ts removed. Loses actual mobile split sibling shell versus recorded-agent resume command alarms; no equivalent coverage asserted. src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts removed. Loses separate setup/startup tab result in that manually assembled path. src/main/runtime/orca-runtime.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result.", + "coverageNotes": "Audit2694 source-only review: Remove14 authored/14 expanded cases in the renderer completion wrapper family, including the complete bell/query-reply/stale-input factory, without replacement. Retain29 authored/34 expanded cases with unchanged callback bodies. Three removals are the existing pending2203 overlap and must be adopted/count-reconciled once; eleven are fresh removals. No current-source runtime or gate execution is supplied by this packet; dated evidence retains its original source scope and does not validate the reduced factory bytes. No equivalent replacement, physical provider, mixed-version, mobile, rendered UI, cross-platform, soak or measured-performance result is claimed. The existing command and testFiles selector retain tests/pty-connection-completion-and-notification.test.ts; no wrapper-specific assertionRef is removed. Historical selector results do not validate its changed reachable factories. Historical prior account (preserved verbatim): Audit2709 removes src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts: intentionally retire waiting out an older inventory and sharing a fresh post-operation request among concurrent callers. No equivalent replacement or fresh execution is claimed. Dated receipts remain historical evidence for their unchanged selectors only; they do not validate the reduced commands or full current gate. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2003: Delete the complete pure orphan-topology suite and its file membership; preserve the other selectors from its combined command after archiving the original command string. Lost alarms are synthetic current-layout preservation, one-anchor grafting and ambiguous-anchor appending examples. Do not transfer their ownership/topology scope to sibling suites. Preserve all5 independent historical receipts exactly. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the mocked agent-session suite and its prospective selector and aliases. Retire all3 whole dated changed-selector receipts, preserving their original raw objects in historical gaps without transferring counts or durations. Preserve5 unrelated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Partial agent-operation service suite retains only concurrent retry joining with changed-fingerprint conflict. Retire its complete three-title assertion object: old-owner legacy fallback before side effects, nested SSH Pi transcript refusal and completed/ambiguous physical-commit replay fences are no longer backed. Other probe/launch option/ledger/failure/remote-inventory examples disappear as detailed below. No actual provider spawn, live SSH or physical commit proof is retained by this source. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1911: The complete provider PTY-inspection mock suite is removed: missing-provider rejection, stale-PTY renderer unverifiable mapping, preserved supplied renderer failures, and supplied transport-loss mapping alarms are intentionally lost. No actual terminal teardown, daemon error or remote transport was exercised. Only the deleted explicit source tokens, testFile and whole assertionRef are removed. Meaningful remaining source selectors/assertions and unaffected dated receipts retain their original scope. No equivalent replacement, fresh reduced-gate, native/platform/provider, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1627 removes low-value mocked daemon projections, scalar tables and duplicate terminal examples without equivalent replacement coverage. Per-source reviews record retained terminal content preservation, process ownership refusal and recovery boundaries together with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1623 removes low-value mocked daemon projections, scalar tables and duplicate terminal examples without equivalent replacement coverage. Per-source reviews record retained terminal content preservation, process ownership refusal and recovery boundaries together with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1495 intentionally deletes the orphan-owner suite: explicit owner/host predicate examples are retired; no equivalent replacement coverage or fresh result is claimed. Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Audit1417 intentionally deletes src/renderer/src/components/terminal-pane/agent-completion-coordinator-pending-title-inspection.test.ts: Loses obsolete pending title process races, inspection failure suppression, explicit completion precedence and delayed remote inspection alarms. No equivalent replacement coverage or fresh result is claimed. Historical coverage account: Audit1342 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audits1301 and1308 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Deterministic macOS tests cover controller claims, daemon and SSH/relay operation replay, mixed-version selection, runtime ownership, exact provisional handoff, durable terminal retirement, two independent viewer mirrors, guarded adoption of legacy live PTYs, and completion classification when either the outer remote transport or authoritative host/provider process inspection becomes unreachable. The adoption harness models v1.4.150 agent/setup/shell tabs, current-generation restart and reconnect, exact handle/incarnation/worktree/host checks, topology CAS, competing clients, split-pane/group restoration, WSL ownership, and SSH owner rejection. The secondary parity repro runs independent clients against one headless remote Orca runtime over encrypted pairing and a real daemon-backed PTY, with tokened fixture-process identity separated from unrelated Codex app-server startup probes. The automated primary topology runs an isolated headed macOS Orca desktop server plus a separate paired web client and proves viewer-local fresh/resume focus, exact legacy placement, writable PTYs, unrelated-terminal survival, and host/client cleanup. SSH coverage is provider/relay contract and fault-injection coverage only; it does not substitute for paired-server coverage. Live Windows, Linux, WSL, SSH, and physical paired-Linux hosts remain gaps. The isolated intent-owner ledger suite was removed. web-runtime-session.test.ts retains exact post-create handoff confirmation only; its previous fresh/resume presentation and publication-replay assertions are no longer current references. Those direct owner-partition, cap and RPC/focus alarms are lost; other agent-session evidence does not establish equivalence. Structured handoff and adopted-leaf focus references now point to their dedicated surviving fixtures. Mixed-version recovery retains actual old-host recovery followed by a new CLI tab; its unsupported/missing-evidence tables are removed. Orphan recovery retains in-flight adoption-conflict serialization only; previous topology/pruning and absence/adoption examples are removed. These removed projection, capability and adoption-shape alarms are lost; retained cases do not replace them. Audit1301: src/renderer/src/runtime/remote-runtime-session-tabs-inflight.test.ts reduced. Direct dedupe eviction/count and equal receipt-position sample loses authored alarm. No equivalent replacement coverage is claimed. Audit1308: src/renderer/src/runtime/web-session-tabs-sync-agent-handoff.test.ts removed. Exact provisional replacement and post-create exit confirmation handoff pipeline alarms disappear. No equivalent replacement coverage is claimed. Audit1313: src/main/runtime/terminal-orphan-topology.test.ts: Retain actual topology merge algorithms preserving disjoint subtrees and grafted/ambiguous shared anchors with independent expected trees. Remove duplicate leaf validator and empty/no-change passthrough examples. Lose basic validation and no-group/noop characterization; no renderer layout proof. Reduced selectors require fresh validation; prior full-suite receipts do not validate removed or changed coverage. No equivalent replacement or physical-provider claim. Audit1342: src/renderer/src/components/terminal-pane/pty-connection-completion-and-notification.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Audit1383: src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts reduced. Lose command-list/receipt/default/background activation matrices whose provider spawn returns canned IDs. Retained test proves actual tab allocation separation, not terminal startup. No equivalent replacement coverage is claimed. Existing exact unaffected receipts and their platform/provider/budget claims remain scoped to unchanged selectors. Changed optional selectors have no new execution result. Audit1401: src/main/runtime/orca-runtime-tests/mobile-session-tabs-duplicate-pty-repair.spec.ts removed. Loses listing-on-already-repaired-data alarm; it never established runtime repair invocation. src/main/runtime/orca-runtime-tests/mobile-session-tabs-split-agent-tab.spec.ts removed. Loses actual mobile split sibling shell versus recorded-agent resume command alarms; no equivalent coverage asserted. src/main/runtime/orca-runtime-tests/worktree-native-chat-setup.spec.ts removed. Loses separate setup/startup tab result in that manually assembled path. src/main/runtime/orca-runtime.test.ts reduced. Driver registration/import of a whole-deleted selected spec is removed; directly authored cases remain unchanged. No extra authored removal credit. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result.", "motivatingLinks": [ "https://github.com/stablyai/orca/issues/8878", "https://github.com/stablyai/orca/issues/9151", @@ -7381,10 +7384,10 @@ "https://github.com/stablyai/orca/pull/10193" ], "invariant": "For every claim-capable execution route, one provider-session identity has at most one live PTY owner and one canonical host surface across concurrent clients, retries, reconnects, and stale publications. For paired structured fresh and resume requests, the authenticated owning runtime creates in background without a renderer window; activate=true focuses the exact requested leaf only on the requesting viewer, while activate=false changes no viewer focus. A live orphan may be adopted only when the controller proves its exact handle and incarnation, its worktree and host owner match, no competing visual owner exists, and a host topology CAS wins. A viewer may classify completion only from successful host/provider inspection or explicit lifecycle evidence; transport, handle, or provider unavailability remains unknown and breaks any consecutive-idle proof. A physical exit retires that exact incarnation durably so stale client state and host restart cannot recreate it. Mixed-version routes select the unchanged legacy request before any authority side effect or execution-owner-local filesystem access.", - "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. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2003: Delete the complete pure orphan-topology suite and its file membership; preserve the other selectors from its combined command after archiving the original command string. Lost alarms are synthetic current-layout preservation, one-anchor grafting and ambiguous-anchor appending examples. Do not transfer their ownership/topology scope to sibling suites. Preserve all5 independent historical receipts exactly. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the mocked agent-session suite and its prospective selector and aliases. Retire all3 whole dated changed-selector receipts, preserving their original raw objects in historical gaps without transferring counts or durations. Preserve5 unrelated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Partial agent-operation service suite retains only concurrent retry joining with changed-fingerprint conflict. Retire its complete three-title assertion object: old-owner legacy fallback before side effects, nested SSH Pi transcript refusal and completed/ambiguous physical-commit replay fences are no longer backed. Other probe/launch option/ledger/failure/remote-inventory examples disappear as detailed below. No actual provider spawn, live SSH or physical commit proof is retained by this source. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1911: The complete provider PTY-inspection mock suite is removed: missing-provider rejection, stale-PTY renderer unverifiable mapping, preserved supplied renderer failures, and supplied transport-loss mapping alarms are intentionally lost. No actual terminal teardown, daemon error or remote transport was exercised. Only the deleted explicit source tokens, testFile and whole assertionRef are removed. Meaningful remaining source selectors/assertions and unaffected dated receipts retain their original scope. No equivalent replacement, fresh reduced-gate, native/platform/provider, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Historical pre-audit oracle account for changed sources: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Race independent clients and repeated operation IDs, then assert one physical spawn and one canonical PTY/surface; inject exit-before-reply, provider disconnect, conflicting claim scope, old daemon/relay capabilities, reused handles, stale incarnations, owner mismatch, and topology revision conflict; assert safe adoption or explicit failure without a second spawn or wrong-process attachment. Run fresh/resume with activate true/false against an isolated headed desktop host and a separate paired client, then against isolated headless serve: assert host presentation stays background, only the requesting viewer focuses the exact leaf, inactive calls preserve client/DOM focus, a same-version publication replay cannot lose focus intent, and sibling-first split publication cannot consume exact-leaf intent. Restore legacy split panes and groups beside a newer host-owned tab, preserving exact predecessor/new/successor order, output, input, resize, titles, tab/leaf identity, active group, and multi-client convergence. For completion, drive a known running agent through outer transport loss, authoritative provider rejection, reconnect, explicit stop, real exit status, and successful hook completion; assert unavailable evidence never dispatches completion and two fresh authoritative idle samples are required after the gap. After exact exit, assert terminal and tab listings omit the surface, a stale publication cannot restore it, restart cannot resurrect it, exact tokened fixture PIDs are dead, and unrelated tabs/processes survive until scoped cleanup.", + "oracle": "Audit2694 source-only review: Remove14 authored/14 expanded cases in the renderer completion wrapper family, including the complete bell/query-reply/stale-input factory, without replacement. Retain29 authored/34 expanded cases with unchanged callback bodies. Three removals are the existing pending2203 overlap and must be adopted/count-reconciled once; eleven are fresh removals. No current-source runtime or gate execution is supplied by this packet; dated evidence retains its original source scope and does not validate the reduced factory bytes. No equivalent replacement, physical provider, mixed-version, mobile, rendered UI, cross-platform, soak or measured-performance result is claimed. The existing command and testFiles selector retain tests/pty-connection-completion-and-notification.test.ts; no wrapper-specific assertionRef is removed. Historical selector results do not validate its changed reachable factories. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2086 (sources2082/2083): Current reduced suites intentionally retire the alarms listed in knownGaps; prior dated execution and replacement claims do not validate changed source bytes or selectors. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2003: Delete the complete pure orphan-topology suite and its file membership; preserve the other selectors from its combined command after archiving the original command string. Lost alarms are synthetic current-layout preservation, one-anchor grafting and ambiguous-anchor appending examples. Do not transfer their ownership/topology scope to sibling suites. Preserve all5 independent historical receipts exactly. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, physical provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the mocked agent-session suite and its prospective selector and aliases. Retire all3 whole dated changed-selector receipts, preserving their original raw objects in historical gaps without transferring counts or durations. Preserve5 unrelated receipts. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Partial agent-operation service suite retains only concurrent retry joining with changed-fingerprint conflict. Retire its complete three-title assertion object: old-owner legacy fallback before side effects, nested SSH Pi transcript refusal and completed/ambiguous physical-commit replay fences are no longer backed. Other probe/launch option/ledger/failure/remote-inventory examples disappear as detailed below. No actual provider spawn, live SSH or physical commit proof is retained by this source. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1911: The complete provider PTY-inspection mock suite is removed: missing-provider rejection, stale-PTY renderer unverifiable mapping, preserved supplied renderer failures, and supplied transport-loss mapping alarms are intentionally lost. No actual terminal teardown, daemon error or remote transport was exercised. Only the deleted explicit source tokens, testFile and whole assertionRef are removed. Meaningful remaining source selectors/assertions and unaffected dated receipts retain their original scope. No equivalent replacement, fresh reduced-gate, native/platform/provider, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Retained exact unchanged-source receipts remain the only current execution evidence. Reduced selectors have no fresh execution result. Historical pre-audit oracle account for changed sources: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Race independent clients and repeated operation IDs, then assert one physical spawn and one canonical PTY/surface; inject exit-before-reply, provider disconnect, conflicting claim scope, old daemon/relay capabilities, reused handles, stale incarnations, owner mismatch, and topology revision conflict; assert safe adoption or explicit failure without a second spawn or wrong-process attachment. Run fresh/resume with activate true/false against an isolated headed desktop host and a separate paired client, then against isolated headless serve: assert host presentation stays background, only the requesting viewer focuses the exact leaf, inactive calls preserve client/DOM focus, a same-version publication replay cannot lose focus intent, and sibling-first split publication cannot consume exact-leaf intent. Restore legacy split panes and groups beside a newer host-owned tab, preserving exact predecessor/new/successor order, output, input, resize, titles, tab/leaf identity, active group, and multi-client convergence. For completion, drive a known running agent through outer transport loss, authoritative provider rejection, reconnect, explicit stop, real exit status, and successful hook completion; assert unavailable evidence never dispatches completion and two fresh authoritative idle samples are required after the gap. After exact exit, assert terminal and tab listings omit the surface, a stale publication cannot restore it, restart cannot resurrect it, exact tokened fixture PIDs are dead, and unrelated tabs/processes survive until scoped cleanup.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/runtime/web-session-tabs-sync/inventory/web-runtime-session.test.ts src/renderer/src/runtime/web-session-tabs-sync/navigation/web-session-tabs-sync-focus-intent.test.ts", - "pnpm exec vitest run --config config/vitest.config.ts src/shared/claimed-agent-pty-owner.test.ts src/main/daemon/providers/adapter/testing/daemon-pty-adapter.test.ts src/main/runtime/session-construction/agent-session/orca-runtime-agent-session-operation.test.ts src/main/runtime/session-construction/agent-session/remote-agent-session-host-authority.integration.test.ts src/main/runtime/terminal/surface/orca-runtime-terminal-retirement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-session-launch.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts src/renderer/src/runtime/web-session-tabs-sync/inventory/web-runtime-session.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/shared/claimed-agent-pty-owner.test.ts src/main/daemon/providers/adapter/testing/daemon-pty-adapter.test.ts src/main/runtime/session-construction/agent-session/orca-runtime-agent-session-operation.test.ts src/main/runtime/session-construction/agent-session/remote-agent-session-host-authority.integration.test.ts src/main/runtime/terminal/surface/orca-runtime-terminal-retirement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-session-launch.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/runtime/web-session-tabs-sync/inventory/web-runtime-session.test.ts", "pnpm exec vitest run --config config/vitest.config.ts tests/e2e/remote-terminal-tab-retirement.unit.test.ts", "pnpm run build:cli && pnpm run build:electron-vite && node config/scripts/diagnostics/remote-agent-authority/remote-agent-session-authority-repro.mjs", "node --check config/scripts/development/remote-session-cleanup/remote-agent-session-process-cleanup.mjs && node config/scripts/diagnostics/remote-agent-authority/remote-agent-session-authority-repro.mjs", @@ -7413,7 +7416,6 @@ "src/main/runtime/terminal/surface/orca-runtime-terminal-retirement.test.ts", "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-session-launch.test.ts", "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-handoff.test.ts", - "src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts", "src/renderer/src/runtime/web-session-tabs-sync/inventory/web-runtime-session.test.ts", "tests/e2e/remote-agent-session-focus-authority.spec.ts", "config/scripts/diagnostics/remote-agent-authority/remote-agent-session-authority-repro.mjs", @@ -7593,6 +7595,7 @@ "Add live SSH/WSL provider evidence before claiming full provider coverage; Docker SSH proves only the SSH provider/relay path." ], "knownGaps": [ + "Audit2694 intentional coverage losses (source-only, no replacement): src/renderer/src/components/terminal-pane/pty-connection/input/pty-connection-command-finished-interrupt-arbitration.spec.ts: 'drops the command-finished status when pending interrupt inference is rejected': Loses the standalone rejected-inference-to-drop alarm; the delayed-write rows remain but are not equivalent to this immediate rejection example. src/renderer/src/components/terminal-pane/pty-connection/input/pty-connection-bell-query-reply-and-stale-input.spec.ts: 'forwards raw onData after a bell as a query reply': Loses raw onData forwarding after the manually raised bell, including its hibernation-counter expectations. src/renderer/src/components/terminal-pane/pty-connection/input/pty-connection-bell-query-reply-and-stale-input.spec.ts: 'blocks onData on a stale codex pane': The real isCodexPaneStale guard executes, and removing it would allow the typed a to reach transport. Intentionally loses this genuine stale-account typing refusal alarm. No retained query-reply test is claimed equivalent. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'omits byte-parser callbacks from the local transport options': Loses local main-authority callback omission and lifecycle callback presence checks. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'keeps byte-parser callbacks on remote-runtime transports': Loses remote-runtime parser callback preservation and factory-argument alarm, including this compatibility boundary; no mixed-version execution is covered. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'consumes pty:sideEffect facts with the live-path policy after spawn': Loses title/bell fact routing and exact 250ms delayed fake notification example. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'schedules the completion notification for genuine working→idle facts': Loses positive main-fact working-to-idle scheduling alarm. Retained stale/race cases do not replace this positive example. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'drops the agent status from a command-finished fact like the byte path did': Loses command-finished fact-to-drop routing and removeAgentStatus noncall alarm. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'routes pr-link facts to the worktree PR observer': Loses PR-link fact forwarding, worktree/tab/PTY arguments alarm; retained raw-byte nonconsumption is not equivalent. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'seeds and settles Command Code status from command-code facts': Real Command Code seed/settle policy runs. Loses positive seed, prompt payload, and 1499+1ms completion boundary alarm; retained newer-working cancellation is not equivalent. src/renderer/src/components/terminal-pane/pty-connection/emulation/pty-connection-main-side-effect-authority.spec.ts: 'does not byte-scan Command Code output — facts are the only consumer': Loses Command Code-specific no-byte-parser alarm. Retained PR/OSC raw-byte exclusion does not cover this parser. src/renderer/src/components/terminal-pane/pty-connection/notifications/pty-connection-notification-settings-gating.spec.ts: 'shares one raw store subscriber for agent-complete notification settings across panes': Actual shared subscribe/unsubscribe runs. Loses shared single-subscription and final-pane unsubscribe lifetime alarm, with no replacement claimed. src/renderer/src/components/terminal-pane/pty-connection/notifications/pty-connection-task-complete-dispatch.spec.ts: 'dispatches agent-task-complete for generic Codex spinner titles after process identity is confirmed': Real coordinator evidence path runs over fake process answers. Loses positive generic-title/confirmed-Codex completion and inspectProcess-argument alarm. src/renderer/src/components/terminal-pane/pty-connection/notifications/pty-connection-task-complete-dispatch.spec.ts: 'normalizes Pi-compatible remote titles to authoritative OMP launch identity': Real owner-compatible normalization runs. Loses Pi-to-OMP title/status normalization, active tab label, OSC observation, and retained launch-identity example; no real remote transport or equivalent replacement. Wrapper cleanup removes only the deleted bell factory import and its registration-only describe block; no additional authored removal credit. Audit2694 source-only review: Remove14 authored/14 expanded cases in the renderer completion wrapper family, including the complete bell/query-reply/stale-input factory, without replacement. Retain29 authored/34 expanded cases with unchanged callback bodies. Three removals are the existing pending2203 overlap and must be adopted/count-reconciled once; eleven are fresh removals. No current-source runtime or gate execution is supplied by this packet; dated evidence retains its original source scope and does not validate the reduced factory bytes. No equivalent replacement, physical provider, mixed-version, mobile, rendered UI, cross-platform, soak or measured-performance result is claimed. The existing command and testFiles selector retain tests/pty-connection-completion-and-notification.test.ts; no wrapper-specific assertionRef is removed. Historical selector results do not validate its changed reachable factories.", "Audit2145 accepts removal of canned runtime metadata/guard/forwarding, fake in-memory persistence, private work-count and wrapper-duplication tests from the construction/orca-runtime.test.ts aggregate, plus the two automation run-context guards from runtime-workspace-launch-contracts.test.ts. Retained race, framing, physical completion and ownership callbacks remain byte-identical. Existing commands remain valid selectors; historical receipts stay unchanged and provide no fresh validation or replacement coverage for the reduced suites.", "Audit2133 current-parent preparation (988 authored removals; independently reviewed2099/2107/2115/2116 decisions; upstream clear-buffer and recovery-image regressions retained): Intentionally retire these low-value alarms without replacement: src/main/runtime/construction/orca-runtime.test.ts: remove only literal registration import/call pairs await import('../orca-runtime-tests/worktree-setup-and-startup.spec'), await import('../orca-runtime-tests/gitlab-and-pr-bases.spec'); no additional authored credit. src/main/runtime/orca-runtime-tests/targeting-and-resilience.spec.ts: routes tab switch and capture start by explicit page id; accepts focus on tab switch without altering bridge args (focus is main-side concern); keeps terminal cwd resolution fail-soft when the provider is unavailable. src/main/runtime/orca-runtime-tests/worktree-removal-and-reconciliation-part-04.spec.ts: drops the bounded scan cache when orphan-cleanup removal completes; clears optimistic reconcile tokens when a CLI worktree removal succeeds; emits drift without mutating when the fetched base fast-forwards created HEAD; emits base_changed without mutation when the fetched base rewrote history; skips stale-token reconciles without mutating or emitting stale status; emits unknown without mutation when fetch fails or the base ref is missing. src/main/runtime/orca-runtime-tests/worktree-removal-and-reconciliation-part-03.spec.ts: routes runtime preserved-branch force-delete through the selected WSL project runtime; replies to a waiting client with the error of a delete that fails after acceptance; treats forced runtime deletion of an already-missing unregistered worktree as cleanup; treats normal runtime deletion of an already-missing unregistered worktree as cleanup. src/main/runtime/orca-runtime-tests/worktree-removal-and-reconciliation-part-02.spec.ts: warns that a missing-repo removal only forgot the workspace; restores runtime watchers when CLI worktree deletion fails after teardown; does not re-spend the drain budget on a removal after a wedged install was abandoned; routes runtime worktree removal through the selected WSL project runtime; force-deletes a branch that was preserved by runtime worktree removal. src/main/runtime/orca-runtime-tests/gitlab-and-pr-bases-part-02.spec.ts: records GitLab pasted-project recents only after successful runtime lookup; threads explicit origin preference through runtime WSL PR base resolution; resolves local GitLab fork MR bases from the target project MR head ref; captures the fork MR head from a dedicated ref, not the shared FETCH_HEAD; keeps the durable MR head when the head fetch fails but the local ref resolves; routes runtime GitLab fork MR base git calls through the selected WSL project runtime. src/main/runtime/orca-runtime-tests/gitlab-and-pr-bases.spec.ts: passes SSH connection ids through GitLab task operations; routes runtime GitLab issue, MR, work-item, and todo actions through the selected WSL project runtime; routes runtime GitLab MR details, review-management, job, and pasted URL actions through the selected WSL project runtime; normalizes runtime GitLab issue list arguments like the desktop IPC path. src/main/runtime/orca-runtime-tests/worktree-setup-and-startup-part-03.spec.ts: does not warn when setup is explicitly skipped for CLI-created worktrees; puts the agent a create starts in the first default tab, as the window does; keeps the 8s main-runtime startup readiness budget for agents without an override; gives OpenCode the 20s main-runtime startup readiness budget; launches explicit startup agents with prompts for CLI-created worktrees. src/main/runtime/orca-runtime-tests/worktree-setup-and-startup.spec.ts: returns a setup launch payload for CLI-created worktrees when hooks are explicitly enabled; does not hand the window a setup main never tried to start; passes the selected Windows setup shell into runtime runner generation; follows normal setup policy for CLI-created worktrees without activating them; uses returned WSL setup shell metadata when runtime spawns setup; uses the shell-aware setup runner for windowless creates without a startup command; reports the in-process setup hook as running when nothing can launch the runner. src/main/runtime/orca-runtime-tests/terminal-sleep-and-teardown-part-02.spec.ts: coalesces two clients sleeping the same host worktree; stops exactly the expected live PTYs for a worktree; explains a refused workspace close instead of throwing the raw refusal enum. src/main/runtime/orca-runtime-tests/mobile-summaries-part-03.spec.ts: marks the desktop-active worktree as isActive; includes SSH-backed worktrees in the mobile worktree summary; caches repeated malformed path misses before normalizing them again. src/main/runtime/orca-runtime-tests/mobile-summaries-part-02.spec.ts: keeps title-only foreground work ahead of monitoring in another pane; keeps a local hook row while a connected PTY still backs its pane; keeps an OSC row via its connected PTY after the pane binding is cleared. src/main/runtime/orca-runtime-tests/mobile-summaries.spec.ts: resolves files through a source-visible linked-checkout worktree; marks saved session tabs with live PTYs as host sidebar activity; attributes live legacy PTYs from saved layout bindings when their panes are hidden; marks saved browser tabs as host sidebar activity like desktop; falls back to the path-keyed GitHub cache entry; includes folder workspaces in compact worktree summaries for mobile; attaches inline agent rows from the latest OSC 9999 status; projects monitoring over a title-derived working status. src/main/runtime/orca-runtime-tests/mobile-creation-and-orchestration-part-03.spec.ts: pushes to an idle pane when the only live waiter filters out the message type; resolves a registered waiter without PTY-injecting when the leaf is already idle; keeps already-idle status after tui-idle wait for immediate message delivery; resolves message waiters when notifyMessageArrived is called; does not resolve type-filtered message waiters for unrelated message types; removes message waiter abort listeners after message arrival; resolves message waiters on timeout when no message arrives. src/main/runtime/orca-runtime-tests/mobile-creation-and-orchestration-part-02.spec.ts: delivers pending mail via notifyMessageArrived when the recipient is already idle; does not keep retrying when every pending row was already pointed; repoints pending rows restored with a live-idle coordinator. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-13.spec.ts: rolls back a half-created terminal whose surface never publishes. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-12.spec.ts: rejects startup prompts for agents that require post-ready stdin; uses portable Unix quoting for mobile agent launch commands in WSL project runtimes; keeps PowerShell quoting for mobile agent launch commands in Windows host runtimes; uses cmd.exe quoting for mobile agent launch commands in local Windows host runtimes; publishes headless mobile session agent identity with synthesized PTY status; rejects disabled mobile session agent launches before spawning; validates mobile terminal insertion anchors before resolving agent launch commands. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-11.spec.ts: coalesces a reconnect close burst onto one authoritative PTY inventory; keeps an explicit user close destructive while the PTY is live; builds mobile session agent launch commands on the runtime host; injects mobile quick-command prompts into the host-built agent startup command. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-10.spec.ts: closes persisted headless terminal parents before any prior list call; tears down a serve-owned headless tab on close while a renderer is attached so it cannot resurrect; defers a renderer-published pending tab to the renderer instead of tearing it down; returns a delegated close outcome with no selection tombstone when the renderer owns the outcome; tears down a runtime pending shell the renderer never adopted on close. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-08.spec.ts: materializes a plain shell when the pending tab has no launch agent; hydrates legacy persisted terminal tabs without layout entries; reads and indexes the full agent-status snapshot once per mobile projection; kills persisted SSH PTYs when closing hydrated headless tabs before pane metadata is restored; materializes hydrated pending headless terminals with the persisted session identity. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-07.spec.ts: hydrates a persisted SSH-owned pane before an attached renderer publishes its graph. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-05.spec.ts: publishes the desktop's tab name over the live agent title, and the live title without one; uses fresh neutral PTY titles over stale mobile snapshot and OSC titles; operates PTY-backed mobile session terminals without a renderer graph; reuses pane close for live PTYs that do not own a renderer tab; lists PTY-backed mobile session terminals without a renderer graph; shows and resolves active PTY-backed mobile session terminals without a renderer graph. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-04.spec.ts: creates mobile session terminals for folder workspaces in a headless runtime server; spawns fresh headless SSH mobile session terminals instead of reattaching synthetic local ids; hydrates headless mobile session terminals from the host workspace session; keeps live headless mobile session terminals when a desktop renderer publishes without them; publishes laptop-created remote runtime split terminals to phone session tabs. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-02.spec.ts: does not report headless wake degradation without sleeping records; does not wake slept agents for non-mobile session-only activation; does not rewrite unread metadata when a mobile activation finds the worktree already read; returns unread:false from worktree.ps after a mobile activation clears the flag; materializes pending mobile session terminals without focusing desktop clients; closes browser mobile session tabs when addressed by browser workspace id. src/main/runtime/orca-runtime-tests/mobile-session-tabs.spec.ts: resolves mobile terminal surfaces by exact split leaf; closes the matching mobile terminal UUID leaf without closing the whole tab; closes the whole mobile terminal tab when addressed by parent tab id; activates the active split leaf when addressed by parent tab id; clears unread metadata on mobile worktree activation without focusing desktop clients; wakes slept agents on the host renderer when a phone activates a worktree. src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-05.spec.ts: publishes the hook provider session on a headless mobile tab so native chat can address the transcript; recovers the agent type from the hook row when the pane was launched without an agent hint; reads one agent-status snapshot per projection, not one per terminal tab; waits for unknown-launch foreground owner before publishing Pi-compatible mobile status; keeps Pi-compatible mobile session status as Pi for an unknown-launch foreground pi PTY; keeps renderer-vetted mobile agent status for custom-titled terminals. src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-04.spec.ts: publishes terminal surface agent status for paired web clients; preserves authoritative OMP identity for Pi-compatible remote terminal snapshots; normalizes a remote OMP title without republishing omitted launch identity; skips the foreground-process probe when the PTY launch agent is already known; probes the foreground process only on a status transition for unknown launch agents; passes the client signal and the slept-worktree refusal to the spawn. src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-03.spec.ts: does not use stale runtime-created PTY status when a neutral PTY title exists; recognizes runtime-created Codex PTY handles from the ready prompt; recognizes runtime-created Antigravity PTY handles from the ready prompt; recognizes live leaf Antigravity terminals from the ready prompt; recognizes a later Antigravity header with a prompt but no model line; keeps mobile terminal surfaces visible while their leaf handle is pending. src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-02.spec.ts: lets Claude agents management titles clear stale runtime-created title status; does not recognize live Claude agents panes from a Claude foreground process; does not let stale tab-level agent titles override current neutral pane titles; lists live terminals with fresh pane titles over stale tab titles; lets adopted neutral pane titles use non-shell foreground fallback; lets adopted neutral pane titles retry wrapper foregrounds until recognized; authorizes settled CLI prompts only after positive %s foreground identity; does not recognize arbitrary foreground TUIs as running agents; lets live neutral pane titles retry wrapper foregrounds until recognized; lets current Claude agents PTY titles override stale runtime-created OSC titles; does not let stale Claude agents OSC titles suppress current PTY title activity. src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status.spec.ts: keeps preallocated terminal handles valid across renderer reloads; preserves runtime-created PTY process identity after graph unavailable; keeps prompt bindings fenced across runtime restarts without provider incarnation; recognizes runtime-created PTY handles with agent launch titles; does not treat a bare Cursor Agent native title as a running agent session; uses stale runtime-created PTY status when there is no title or foreground evidence. src/main/runtime/orca-runtime-tests/terminal-output-and-worker-recovery-part-07.spec.ts: keeps orphaned list and show writability aligned with the send gate. src/main/runtime/orca-runtime-tests/terminal-output-and-worker-recovery-part-04.spec.ts: cancels a coalesced SSH worker recovery retry when its provider disconnects. src/main/runtime/orca-runtime-tests/terminal-output-and-worker-recovery-part-03.spec.ts: retries renderer reveal before clearing an adopted legacy worker sleeping record. src/main/runtime/orca-runtime-tests/terminal-output-and-worker-recovery-part-02.spec.ts: recovers exported ORCA_TERMINAL_HANDLE from discovered live PTY sessions. src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-12.spec.ts: applies ANSI erase-from-start line controls in retained previews; applies ANSI stripping for private or intermediate CSI line controls; applies ANSI stripping for unsupported erase-line modes; reveals an agent terminal under the pane the caller reserved; keeps a fresh %s pane host-owned when a desktop window is available; keeps desktop publication %s separate from the reserved host spawn; mints its own pane when the reserved leaf is malformed, and reports the one it used; starts an agent terminal with the model the caller picked; starts an agent terminal without a model flag when no pick was made; attributes a startup-agent launch named %s as %s; attributes a fresh agent session the host builds as unknown; leaves a bare agent command the user typed out of launch attribution. src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-11.spec.ts: trims oversized terminal output bursts without per-line array shifts; builds terminal previews without mapping the full retained tail; keeps recent PTY replay output capped without needing previous data for large chunks; applies terminal redraw controls before retaining previews; applies ANSI terminal redraw controls before retaining previews; retains multi-line ANSI footer redraws instead of appending old frames; keeps the cursor column when erasing full lines in multi-line redraws; applies ANSI split redraw controls without leaking raw params. src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-10.spec.ts: returns renderer visible screen lines through terminal.read RPC JSON result; separates composer drafts from provider-owned terminal screens. src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-09.spec.ts: reports an in-flight PTY focus as not navigated when its notifier disappears; reports graph-leaf focus as not navigated without a host notifier; grounds the provider mode tracker before a later chunk, in the emulator order; grounds an in-flight provider snapshot capture so it cannot publish the pre-reset screen; waits for terminal exit and resolves with the exit status; keeps terminal read payloads bounded while retained output remains pageable; trims terminal read preview character budget without per-line array shifts. src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-08.spec.ts: submits a silent Claude composer once after the bounded render fallback; chunks large terminal.send text before provider writes; yields chunked terminal input through immediates between writes; yields while validating accepted large terminal.send text before provider writes; reveals a background terminal session when focusing its handle; replays captured launch config when focusing a background agent session; reveals background terminal sessions with the freshest PTY title; renames background terminal handles without requiring a visible tab; keeps a background terminal handle stable while reveal adoption is racing. src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-07.spec.ts: resolves tui-idle when a stale Codex prompt is followed by Antigravity readiness; returns an agent-neutral blocked wait result for update prompts; returns an agent-neutral blocked wait result for workspace trust prompts; returns an agent-neutral blocked wait result for cwd selection prompts; returns a blocked wait result for Codex model migration prompts; returns a blocked wait result for Codex startup hook review prompts; returns an agent-neutral blocked wait result for generic interactive prompts; splits text and enter writes for background terminal handles; types the lead line for %s: %s; submits through the agent-specific PTY timing policy for %s. src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-06.spec.ts: waits for exit on background terminal handles; keeps retained PTY transcript memory when controller refresh fails; resolves tui-idle from an Antigravity ready prompt preview; resolves Antigravity ready prompts with newline-heavy pasted tails without splitting; resolves live-leaf tui-idle from an Antigravity ready prompt preview. src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-03.spec.ts: spawns the available Qoder command for a captured same-session resume: %s; does not use the local Windows shell setting for remote Windows bare agent creates; matches canonical bare agent commands when a command override is configured; keeps non-bare agent command terminal creates unchanged; keeps disabled bare agent command terminal creates unchanged; injects runtime hook receiver env into terminal sessions; creates background terminal sessions for a $label; creates background terminal sessions for a $label; enables Claude Agent Teams only for direct Claude launches when configured in-process; reveals Claude Agent Teams launches with the rewritten launch config; preserves Claude Agent Teams for sequenced Claude launches. src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness.spec.ts: creates visible terminal sessions without asking the renderer to focus a tab; asks the pty controller for the requested shell instead of a startup command; knows the agent a flagged launch command names before any process read; retires a flagged command pane identity when the command exits; retires only receipted restored PTY authority on command completion and exit; forgets synthetic handles when disconnected PTY records are pruned. src/main/runtime/orca-runtime-tests/headless-snapshots.spec.ts: returns OSC titles from headless main terminal snapshots; adopts renderer-seeded titles into headless main terminal snapshots; returns cwd metadata from seeded headless main terminal snapshots; adopts OSC7 host metadata from seeded headless terminal scrollback; falls back to the renderer snapshot for hidden-output recovery without headless state; keeps an empty headless snapshot authoritative for hidden-output recovery; advances the absolute output sequence across a daemon stream gap; emits explicit OSC 9999 agent status from runtime PTY data. src/main/runtime/orca-runtime-tests/terminal-side-effect-facts-part-02.spec.ts: falls back to the provider snapshot for a restored PTY with no mounted renderer; falls back to the available mirror when authoritative provider history is unavailable; keeps an empty renderer snapshot when the provider has no retained content; keeps restored provider history authoritative after later live output; uses provider alternate-screen state while a partial model is unsafe; prefers the tracked title over the headless emulator lastTitle; keeps the cursor-agent literal in record-fallback snapshots only without a tracker title; touches mobile snapshots once for decorative spinner ticks, again on idle. src/main/runtime/orca-runtime-tests/local-worktree-creation-part-02.spec.ts: creates a same-repo PR branch override from a resolved head SHA and matching push target; skips broad remote fetch for an existing full-SHA PR base; creates a selected Bitbucket PR branch override from a matching remote branch; suffixes an existing PR when a matching push target lacks selected PR metadata; suffixes a matching push target branch when selected PR metadata has no PR number; suffixes a matching push target branch when the existing PR is different; suffixes a selected PR remote conflict when the PR lookup fails; checks out an unused runtime PR branch only when it is at the resolved head SHA; suffixes only the runtime worktree path when an exact PR branch checkout path exists. src/main/runtime/orca-runtime-tests/local-worktree-creation.spec.ts: returns runtime local base update suggestions from addWorktree; creates a runtime local worktree from a usable persisted local branch base; does not create a runtime local worktree when the refresh fails and no local base ref exists; creates a branchNameOverride worktree from the selected matching remote base ref. Current changed source bytes, wrapper registrations and reduced selectors have no fresh execution or red/green credit. Unrelated surviving receipt objects keep their original narrow scope; current literal graph reachability does not establish historical import closure or equivalent replacement coverage. Current conservative command/import graph reaches src/main/runtime/construction/orca-runtime.test.ts, src/main/runtime/orca-runtime-tests/targeting-and-resilience.spec.ts, src/main/runtime/orca-runtime-tests/worktree-removal-and-reconciliation-part-04.spec.ts, src/main/runtime/orca-runtime-tests/worktree-removal-and-reconciliation-part-03.spec.ts, src/main/runtime/orca-runtime-tests/worktree-removal-and-reconciliation-part-02.spec.ts, src/main/runtime/orca-runtime-tests/gitlab-and-pr-bases-part-02.spec.ts, src/main/runtime/orca-runtime-tests/gitlab-and-pr-bases.spec.ts, src/main/runtime/orca-runtime-tests/worktree-setup-and-startup-part-03.spec.ts, src/main/runtime/orca-runtime-tests/worktree-setup-and-startup.spec.ts, src/main/runtime/orca-runtime-tests/terminal-sleep-and-teardown-part-02.spec.ts, src/main/runtime/orca-runtime-tests/mobile-summaries-part-03.spec.ts, src/main/runtime/orca-runtime-tests/mobile-summaries-part-02.spec.ts, src/main/runtime/orca-runtime-tests/mobile-summaries.spec.ts, src/main/runtime/orca-runtime-tests/mobile-creation-and-orchestration-part-03.spec.ts, src/main/runtime/orca-runtime-tests/mobile-creation-and-orchestration-part-02.spec.ts, src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-13.spec.ts, src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-12.spec.ts, src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-11.spec.ts, src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-10.spec.ts, src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-08.spec.ts, src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-07.spec.ts, src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-05.spec.ts, src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-04.spec.ts, src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-02.spec.ts, src/main/runtime/orca-runtime-tests/mobile-session-tabs.spec.ts, src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-05.spec.ts, src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-04.spec.ts, src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-03.spec.ts, src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status-part-02.spec.ts, src/main/runtime/orca-runtime-tests/terminal-handles-and-agent-status.spec.ts, src/main/runtime/orca-runtime-tests/terminal-output-and-worker-recovery-part-07.spec.ts, src/main/runtime/orca-runtime-tests/terminal-output-and-worker-recovery-part-04.spec.ts, src/main/runtime/orca-runtime-tests/terminal-output-and-worker-recovery-part-03.spec.ts, src/main/runtime/orca-runtime-tests/terminal-output-and-worker-recovery-part-02.spec.ts, src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-12.spec.ts, src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-11.spec.ts, src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-10.spec.ts, src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-09.spec.ts, src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-08.spec.ts, src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-07.spec.ts, src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-06.spec.ts, src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness-part-03.spec.ts, src/main/runtime/orca-runtime-tests/terminal-creation-and-readiness.spec.ts, src/main/runtime/orca-runtime-tests/headless-snapshots.spec.ts, src/main/runtime/orca-runtime-tests/terminal-side-effect-facts-part-02.spec.ts, src/main/runtime/orca-runtime-tests/local-worktree-creation-part-02.spec.ts, src/main/runtime/orca-runtime-tests/local-worktree-creation.spec.ts. Unresolved local/computed edges remain explicit debt.", "Audit2095 current-parent preparation2126 (approved2092/2093 removals; source refresh2109/independent2112): Intentionally retire these low-value alarms without replacement: src/main/runtime/orca-runtime-tests/terminal-sleep-and-teardown-part-03.spec.ts: rejects exact terminal stop for multiple expected PTYs before stopping anything; omits stale renderer leaves when fresh PTY liveness is required; omits unbound renderer placeholders when fresh PTY liveness is required; captures the event method before the nested sleep receipt changes it; returns the close receipt without requiring a PTY stop; uses the same stop result as an empty explicit stop. src/main/runtime/orca-runtime-tests/mobile-creation-and-orchestration-part-04.spec.ts: builds a compact worktree summary from persisted and live runtime state; reads the linked-PR state from the renderer repoId-keyed GitHub cache; carries persisted worktree host ownership in mobile summaries; emits only instance- and boundary-validated lineage parents in mobile summaries; resolves WSL platforms only for repos represented in mobile summaries; omits worktrees hidden by the host visibility policy from mobile summaries; applies linked-checkout source visibility to mobile summaries. src/main/runtime/orca-runtime-tests/hooks-and-hosted-review-part-02.spec.ts: routes runtime GitHub PR details and actions through the selected WSL project runtime; passes SSH connection context through hosted review creation flows; routes local WSL project hosted review flows through runtime git options; treats SSH worktree drift as unknown without local git probes. src/main/runtime/orca-runtime-tests/terminal-listing.spec.ts: emits one mobile session terminal tab per live PTY even if two tabs resolve to it; resolves projected split authority from the parent layout PTY binding; keeps explicit-id terminal lists from resolving all worktrees; keeps explicit-id cold-cache terminal lists from classifying unrelated same-repo worktrees; keeps unknown bare terminal-list ids on the no-scan exact-id path; matches explicit-id cwd PTYs for folder workspace instance IDs; routes PTY output through the PTY leaf index in large terminal graphs. src/main/runtime/orca-runtime-tests/window-authority.spec.ts: claims the first window as authoritative and ignores later windows; transfers authority from the headless sentinel to the first real window; relays terminal browser launches only while headless owns the graph; marks live headless PTYs for renderer reattach before desktop promotion; reports the activation gate state while no desktop window is available; bumps the epoch and enters reloading when the authoritative window reloads; can mark the graph ready for the authoritative window; drops back to unavailable and clears authority when the window disappears; hands the graph back to headless when a promoted serve window closes (#27292); keeps a crashed promoted serve renderer on its own window while the window is open; stays unavailable during initial loads before a graph is published. Current changed source bytes, wrapper registrations and reduced selectors have no fresh execution or red/green credit. Unrelated surviving receipt objects keep their original narrow scope; current literal graph reachability does not establish historical import closure or equivalent replacement coverage. Current conservative command/import graph reaches src/main/runtime/orca-runtime-tests/terminal-sleep-and-teardown-part-03.spec.ts, src/main/runtime/orca-runtime-tests/mobile-creation-and-orchestration-part-04.spec.ts, src/main/runtime/orca-runtime-tests/hooks-and-hosted-review-part-02.spec.ts, src/main/runtime/orca-runtime-tests/terminal-listing.spec.ts, src/main/runtime/orca-runtime-tests/window-authority.spec.ts. Unresolved local/computed edges remain explicit debt.", @@ -7643,7 +7646,8 @@ "Audit2056 (sources2054/2055): 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/mobile-session-tabs-part-14.spec'). src/main/runtime/orca-runtime-tests/terminal-side-effect-facts-part-03.spec.ts: arms the stale-title timer for a seeded working title; arms the Command Code scrape from the noted spawn command; prefers the tracked title over a stale renderer lastTitle in the hydration seed; writes recent output into the current runtime output map; uses a later title handler replacement with the runtime receiver; calls the current injected listener with the runtime receiver; keeps optional reconciliation lazy after its callback is removed. src/main/runtime/orca-runtime-tests/mobile-session-tabs-part-14.spec.ts: lists them, so a paired client can mirror a migrated editor; closes one by retiring it from the host session; keeps an unsaved draft unless the close is forced; shares aggregate work but leaves a replacement pending promise alone; lets a targeted refresh finish while an aggregate refresh waits; refuses a close when the store lacks %s before the guard; keeps a later missing %s on the original caught failure path. 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.", "Audit2061 (sources2059/2060): 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/mobile-session-tabs-headless-chat-rebuild.spec'); await import('./orca-runtime-tests/mobile-session-tabs-cold-serve-hydrate.spec'); await import('./orca-runtime-tests/worktree-removal-execution-host.spec'); await import('./orca-runtime-tests/terminal-spawn-dispatch.spec'). src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-completion-and-notification.test.ts: ordinary registration cleanup removes only import { registerPtyConnectionSshHookStatusAuthorityTests } from '../host-ownership/pty-connection-ssh-hook-status-authority.spec'; registerPtyConnectionSshHookStatusAuthorityTests(). src/main/runtime/orca-runtime-tests/headless-snapshots-part-02.spec.ts: replaces a cwd parsed before late WSL context with the provider cwd; keeps a live WSL cwd that arrives during late-context snapshot recovery; infers local reconstructed WSL context from a WSL UNC worktree; clears stale terminal file URI hostnames after empty-host OSC7 cwd updates; serializes SSH headless OSC7 cwd as POSIX when the desktop runtime is on Windows; keeps Windows SSH OSC7 cwd as a drive path when the desktop runtime is POSIX; serializes Windows SSH headless OSC7 cwd as a drive path on POSIX desktops; infers restored SSH connection identity from app-scoped PTY ids. src/main/runtime/orca-runtime-tests/mobile-session-tabs-headless-chat-rebuild.spec.ts: survives the rebuild that closing a saved editor tab forces; keeps its place in the tab order when the host lists the workspace again; lists tabs to phones in the order desktop clients draw after a rebuild; keeps the place a window gave a chat across a graph resend before the chat is restored. src/main/runtime/orca-runtime-tests/mobile-session-tabs-cold-serve-hydrate.spec.ts: lists every persisted terminal of a windowless host after a cold restart; lists every persisted terminal in the all-worktrees inventory after a cold restart; lists persisted editor tabs beside the terminals after a cold restart; restores a persisted split group layout on the cold rebuild; restores the saved active group of a split even when it is not the first group; falls back to the active tab group when the saved active group was not restored; keeps the headless group active when there is no persisted split; keeps phone and CLI creates in the group they joined across a cold restart. src/main/runtime/orca-runtime-tests/worktree-removal-failed-retry.spec.ts: lists the leftover with its error, though Git no longer does; takes the normal delete once Git registers a checkout at the path again; joins a retry another client started while this Delete listed Git; shows the failed row with its error, not the scan cached before the delete. src/main/runtime/orca-runtime-tests/worktree-removal-execution-host.spec.ts: refuses an SSH row whose host is unreachable instead of deleting here; refuses a runtime row with no nested SSH target rather than deleting locally; refuses a runtime row that also names a nested SSH target; retains runtime purge dispatch in a recovery job; uses the runtime helper override before resuming an interrupted removal; uses the runtime helper override before retrying a failed removal; captures the watcher callback and retains its job-host receiver; reads the current runtime removal queue. src/main/runtime/orca-runtime-tests/terminal-spawn-dispatch.spec.ts: reports the spawn request before it leaves for the pty controller; reports it even when the spawn itself then fails; does not report it when the create fails before any spawn request; captures the admission method before reading the incarnation; captures the record method before evaluating its state object; skips database payload serialization when no database exists; skips a throwing database payload when no database exists; keeps the database method and receiver captured before its payload; captures the canonical map method before a binding getter changes it; completes the captured replacement fence without another map lookup. src/renderer/src/components/terminal-pane/pty-connection/host-ownership/pty-connection-ssh-hook-status-authority.spec.ts: leaves SSH IPC OSC 9999 status ownership in the main runtime. 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.", "Module layout policy correction: retire the remaining program-status-osc.spec.ts event-projection case (production/mock-derived pane-key oracle) and sign-in timeout case (real setTimeout wait with Date-only fake clocks). The runtime test registrar no longer imports that file. No replacement coverage or fresh execution is claimed for these losses; historical receipts retain their original source scope.", - "Module layout policy correction: retire the two remaining worktree-ps-agent-row-dismissal.spec.ts registrations. The remint/dismissal/exit case computed expected snapshotVersion increments from a production snapshot and used real-clock vi.waitFor; the legacy OSC case derived its expected paneKey from the production layout-owner switch. The runtime registrar no longer imports this file. These public projection scenarios have no replacement coverage or fresh execution claimed; all historical receipts and earlier loss notes retain their original source scope." + "Module layout policy correction: retire the two remaining worktree-ps-agent-row-dismissal.spec.ts registrations. The remint/dismissal/exit case computed expected snapshotVersion increments from a production snapshot and used real-clock vi.waitFor; the legacy OSC case derived its expected paneKey from the production layout-owner switch. The runtime registrar no longer imports this file. These public projection scenarios have no replacement coverage or fresh execution claimed; all historical receipts and earlier loss notes retain their original source scope.", + "Audit2709 removes src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts: intentionally retire waiting out an older inventory and sharing a fresh post-operation request among concurrent callers. No equivalent replacement or fresh execution is claimed. Dated receipts remain historical evidence for their unchanged selectors only; they do not validate the reduced commands or full current gate. Original prospective command before removal: pnpm exec vitest run --config config/vitest.config.ts src/shared/claimed-agent-pty-owner.test.ts src/main/daemon/providers/adapter/testing/daemon-pty-adapter.test.ts src/main/runtime/session-construction/agent-session/orca-runtime-agent-session-operation.test.ts src/main/runtime/session-construction/agent-session/remote-agent-session-host-authority.integration.test.ts src/main/runtime/terminal/surface/orca-runtime-terminal-retirement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-session-launch.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts src/renderer/src/runtime/web-session-tabs-sync/inventory/web-runtime-session.test.ts" ], "demotionRule": "Keep experimental or demote if the focused gate flakes without a product or harness bug, if a retry can physically spawn twice, if a stale exit/publication can replace or resurrect a terminal, or if mixed-version fallback occurs after an authority side effect." }, @@ -9622,7 +9626,7 @@ "providers": ["ssh", "remote-runtime", "wsl"], "coveredPlatforms": ["macos"], "coveredProviders": ["ssh", "remote-runtime"], - "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. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/ssh/connection/ssh-connection-manager.test.ts: tears a failed startup down quietly, so its error is not replaced by a disconnect; marks a dial that never reached the host, so setup reports SSH’s reason; removes the registration when bulk teardown fails; leaves a connection whose own reconnect is asking the user alone; clears the pool entry when the closed connection is still the registered one; still reuses a connection that is already up; dials a user's connection test. 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. Historical prior account (preserved verbatim): Audit2052 (sources2049/2050/2051): Remove complete low-value restored-pane-title and pane-visibility-identity suites and their current selectors. Their supplied snapshot/title and nullable identity-comparison alarms are intentionally lost without replacement. Unrelated dated evidenceRuns remain unchanged and do not validate the reduced commands. No fresh gate execution, actual PTY/provider, rendered, remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the terminal-create idempotency forwarding suite and its prospective selector. Preserve2 unrelated receipts without claiming the lost forwarding alarm was replaced. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete complete transport-unmount and queued-initial-CWD helper suites: despite lifecycle-shaped fixtures, the unmount owner returns a Boolean PTY-id predicate, while CWD cases check nullish field selection and callback counts. Lose their detach/destroy/teardown and one-shot-CWD supplied examples. Partial queued-pane-startup loses three identical/empty/nonowner identity examples, retaining four exact one-shot/replacement ownership callbacks. No assertion object maps to these three sources, so unrelated alias objects remain byte-exact. Preserve the current81ed prior removal of pane-split-startup; stale bd948 source metadata snapshots are not replayed. No actual process/PTY startup, transport shutdown, live SSH or rendered recovery is proven by this metadata change. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Delete the sole supplied public-SSH-state spread/sanitized-error projection and its provider-authority-pair alias. Also delete the complete tiny one-shot split-startup wrapper suite: callback-visible temporary field/reset, sequential payload and thrown-sentinel reset alarms disappear. No SSH provider epoch handoff, connection, process startup or actual terminal split was performed by either deleted suite. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1903 removes whole mocked detach, supplied geometry and/or close-request suites selected by this gate. Their pending-CWD/PTY-binding argument/order, fabricated hit-test and close bookkeeping alarms are intentionally lost without replacement. Valid remaining selectors/assertions and unchanged-selector execution receipts retain their original scope. Reduced unit selections have no fresh broad gate, real PTY/provider, rendered focus, or measured-budget validation. Historical prior account (preserved verbatim): Audit1645 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1342 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1301 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Deterministic renderer coverage proves retained native and runtime SSH payloads are admitted through production routes only with valid complete authority, stale cleanup cannot unregister a replacement runtime terminal, direct SSH Git and folder panes keep their PTY bindings through disconnect and reconnect, one authority chain stops after two automatic attempts even when each timeout exceeds the rolling window, rejected acknowledgements mutate no store maps, and one shared exact attempt admits every concurrent split-pane spawn and reattach while preserving the first PTY as the tab fallback. A later sibling failure rotates the tab once, stale callbacks from the prior attempt mutate no state, split remount activity suppression is counted per leaf, primary PTY exit promotes a bound survivor or preserves an empty continuation gap for a late sibling, and primary, non-primary, or null-PTY detach preserves exact authority on both resulting tabs. Intentional pane disposal cancels its settlement timer without breaking StrictMode remount timeout ownership. A mounted remote-runtime terminal survives repeated transport partitions without changing PTY identity. A real encrypted-WebSocket oracle proves a successful reachability probe can replace a pre-ready shared-control socket without rejecting or duplicating the waiting RPC. Direct SSH coordinator tests cover immediate terminal finalization, hydration correction, damping, bounded retry, and telemetry non-interference. Client/server heartbeat tests cover timer suspension, socket generations fence stale callbacks, cold restored-terminal attachment retries, cached pixels remain unhealthy until authoritative replay, automatic retries stop after one minute, manual reconnect preserves the PTY, and pane closure releases recovery UI state. Current-transport recovery clears every error that transport surfaced without clearing or displaying a sibling pane's errors, while transport suppression, pane retention, and the rendered surface are independently bounded. Current macOS Electron journeys against an ephemeral Linux Docker SSH target cover exact-authority repo/worktree hydration, live terminal recovery after disconnect/reconnect, and eager six-terminal remount after renderer reload. A Windows remote-runtime smoke covers reachability and PTY round-trip. Multi-target live fanout, paired-close, WSL, and patched live partition journeys remain gaps. The test-value audit narrowed resolved-worktree-execution-host.test.ts to cache reuse and invalidation. Its direct hydrated-worktree, missing-folder, restored-owner, host-stamp and empty-runtime selection alarms are lost. Other routing and recovery suites do not establish equivalent selector coverage; historical run commands and results remain historical. The test-value audit removes standalone unwritten/released renderer-authority and cross-scope request-count examples. The retained synthetic mirror/store/sidebar and pending-inventory checks do not establish real PTY byte ownership, SSH reconnection or equivalent replacement coverage; historical commands and results remain historical. The test-value audit removes direct join/label ledgers, immediate failure and negative-only stale/removal/partial-authority examples, plus the standalone retained/live event projection. Retained synthetic store/hydration compositions do not establish real SSH continuity, remote authority delivery or equivalent replacement alarms. Historical commands and results remain historical. The renderer scheduling fixture retains in-flight coalescing only. Its immediate publication and negative stale-SSH-cleanup call ledgers were removed; the retained SSH recovery evidence does not replace those alarms. The accepted-handle-events observer suite is removed, including its scoped listener and settlement-release assertions. These observer alarms are lost; retained SSH/transport journeys are not equivalent replacement coverage. The test-value audit removed repeated remote-handle rotation inventories and snapshot-first pending-restart migration examples from terminal-pty-identity-replacement.test.ts, plus direct foreground metadata setter, confirmation, evidence-enum, and prefix/worktree cleanup examples. Those rotation, pending-restart, snapshot-first migration, and foreground scalar-update alarms are lost. The retained replacement case observes pane and tab identities in one subscriber publication; it does not establish equivalent migration, process-evidence, or input-routing coverage. Historical commands and results remain historical. The test-value audit narrows terminals-hydration.test.ts to a real reconnect batch with one measured store publication and hydration-seeded history consumed by a subsequent visit/Back check. Direct split-layout, runtime/folder/floating restoration, dead-leaf focus, cold/known-absent SSH deferral, title, default-tab marker, navigation initialization, and hydrationSucceeded scalar examples are removed; those specific alarms are lost. No actual target-removal transition, live SSH connection, session writer, or persisted restart is exercised by the retained cases. The old target-scoped/snapshot assertion references are retired because the current file does not contain those oracles. Other suites and historical runs do not establish equivalent replacement coverage. Audit1299 removes tests/e2e/terminal-cold-activation-deferral.spec.ts. Private-state/work-budget/assembled-fixture alarms are intentionally lost; retained suites are not equivalent replacement coverage. No new runtime/platform evidence is claimed. Audit1301: src/renderer/src/runtime/remote-runtime-session-tabs-inflight.test.ts reduced. Direct dedupe eviction/count and equal receipt-position sample loses authored alarm. No equivalent replacement coverage is claimed. Audit1318: src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts: Retain real local encrypted WebSocket regressions for pre-ready socket replacement preserving a request, close-before-ready logical subscription cleanup, unrelated RPC surviving another deadline, and pending setup abort leaving a sibling pending. Host server is synthetic and uses production crypto; kept scenarios also retain internal diagnostics/memory assertions unchanged. Remove happy routing, authority-envelope, unknown-ID/log, cleanup enum, binary, keepalive/liveness and production-budget/private socket inventories; intentionally lose those alarms, no physical host authorization, independent crypto or remote provider claim. Reduced selectors need fresh validation; historical full-suite receipts do not validate the changed coverage. No equivalent replacement or physical-provider claim. Audit1342: src/renderer/src/hooks/ipc-events/direct-ssh-connect-reply-routing.test.ts removed. Initial and event-triggered partial-authority hydration fixture alarms disappear. src/renderer/src/components/terminal-pane/terminal-error-accumulation.test.ts removed. Multiline dedup/storm bounds, resource classification/collision, scoped clear/reconnect strip and1000-pane map count alarms disappear. No equivalent replacement coverage is claimed. Audit1396: src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.spec.ts reduced. Lose standalone debug-state retention/log silence alarm. React StrictMode is not mounted; bindings manually simulate remount over mocked transport. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1400: src/main/ipc/ssh/ssh.test.ts reduced. Lose trivial missing target and mocked publication inventory. Preexisting unresolved ../ssh/ssh-port-scanner mock is recorded, not fixed. src/renderer/src/runtime/sync-runtime-graph-scheduling.test.ts removed. Removes whole coalescing call-count suite; no newest-state delivery or replacement claim. src/renderer/src/store/slices/terminal-pty-identity-replacement.test.ts reduced. Removes three no-op/work-count registrations; retains externally observed ownership consistency. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1412: src/main/ssh/ssh-provider-authority.test.ts removed. Loses real AbortController revocation/target isolation/reentrancy outcomes, recreated-target generation-floor/session rollover behavior, stale mutation refusal and settled-registration cleanup alarms. These useful alarms are deliberately lost; no equivalent cancellation coverage is claimed. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1743 removes the standalone line-height clamp/default and pane cwd fallback helper tests (5 authored cases). These trivial-helper alarms are intentionally lost, with no equivalent replacement. Only current commands/testFiles lose the deleted selectors; historical receipts and evidenceRuns remain unchanged and do not validate the reduced commands.", + "coverageNotes": "Audit2709 removes src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts: intentionally retire waiting out an older inventory and sharing a fresh post-operation request among concurrent callers. No equivalent replacement or fresh execution is claimed. Dated receipts remain historical evidence for their unchanged selectors only; they do not validate the reduced commands or full current gate. Historical prior account (preserved verbatim): 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. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/ssh/connection/ssh-connection-manager.test.ts: tears a failed startup down quietly, so its error is not replaced by a disconnect; marks a dial that never reached the host, so setup reports SSH’s reason; removes the registration when bulk teardown fails; leaves a connection whose own reconnect is asking the user alone; clears the pool entry when the closed connection is still the registered one; still reuses a connection that is already up; dials a user's connection test. 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. Historical prior account (preserved verbatim): Audit2052 (sources2049/2050/2051): Remove complete low-value restored-pane-title and pane-visibility-identity suites and their current selectors. Their supplied snapshot/title and nullable identity-comparison alarms are intentionally lost without replacement. Unrelated dated evidenceRuns remain unchanged and do not validate the reduced commands. No fresh gate execution, actual PTY/provider, rendered, remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the terminal-create idempotency forwarding suite and its prospective selector. Preserve2 unrelated receipts without claiming the lost forwarding alarm was replaced. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete complete transport-unmount and queued-initial-CWD helper suites: despite lifecycle-shaped fixtures, the unmount owner returns a Boolean PTY-id predicate, while CWD cases check nullish field selection and callback counts. Lose their detach/destroy/teardown and one-shot-CWD supplied examples. Partial queued-pane-startup loses three identical/empty/nonowner identity examples, retaining four exact one-shot/replacement ownership callbacks. No assertion object maps to these three sources, so unrelated alias objects remain byte-exact. Preserve the current81ed prior removal of pane-split-startup; stale bd948 source metadata snapshots are not replayed. No actual process/PTY startup, transport shutdown, live SSH or rendered recovery is proven by this metadata change. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Delete the sole supplied public-SSH-state spread/sanitized-error projection and its provider-authority-pair alias. Also delete the complete tiny one-shot split-startup wrapper suite: callback-visible temporary field/reset, sequential payload and thrown-sentinel reset alarms disappear. No SSH provider epoch handoff, connection, process startup or actual terminal split was performed by either deleted suite. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1903 removes whole mocked detach, supplied geometry and/or close-request suites selected by this gate. Their pending-CWD/PTY-binding argument/order, fabricated hit-test and close bookkeeping alarms are intentionally lost without replacement. Valid remaining selectors/assertions and unchanged-selector execution receipts retain their original scope. Reduced unit selections have no fresh broad gate, real PTY/provider, rendered focus, or measured-budget validation. Historical prior account (preserved verbatim): Audit1645 removes low-value test projections, mock wiring, private-state assertions, inventories and duplicate examples without equivalent replacement coverage. Per-source reviews record retained public behavior and refusal boundaries with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1640 removes low-value IPC, SSH, workspace and transcript-watcher tests without equivalent replacement coverage. Per-source reviews record retained public refusal, cancellation, execution-host and real-filesystem outcomes with injected/native/remote limits. Affected historical receipts are retired; gates without active current evidence are downgraded. Historical scope before this audit: Audit1342 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Audit1301 changes referenced sources. Retained unchanged-source receipts apply only to their unchanged commands; the reduced selectors have no new execution result. Historical coverage account (not a current claim for changed sources): Deterministic renderer coverage proves retained native and runtime SSH payloads are admitted through production routes only with valid complete authority, stale cleanup cannot unregister a replacement runtime terminal, direct SSH Git and folder panes keep their PTY bindings through disconnect and reconnect, one authority chain stops after two automatic attempts even when each timeout exceeds the rolling window, rejected acknowledgements mutate no store maps, and one shared exact attempt admits every concurrent split-pane spawn and reattach while preserving the first PTY as the tab fallback. A later sibling failure rotates the tab once, stale callbacks from the prior attempt mutate no state, split remount activity suppression is counted per leaf, primary PTY exit promotes a bound survivor or preserves an empty continuation gap for a late sibling, and primary, non-primary, or null-PTY detach preserves exact authority on both resulting tabs. Intentional pane disposal cancels its settlement timer without breaking StrictMode remount timeout ownership. A mounted remote-runtime terminal survives repeated transport partitions without changing PTY identity. A real encrypted-WebSocket oracle proves a successful reachability probe can replace a pre-ready shared-control socket without rejecting or duplicating the waiting RPC. Direct SSH coordinator tests cover immediate terminal finalization, hydration correction, damping, bounded retry, and telemetry non-interference. Client/server heartbeat tests cover timer suspension, socket generations fence stale callbacks, cold restored-terminal attachment retries, cached pixels remain unhealthy until authoritative replay, automatic retries stop after one minute, manual reconnect preserves the PTY, and pane closure releases recovery UI state. Current-transport recovery clears every error that transport surfaced without clearing or displaying a sibling pane's errors, while transport suppression, pane retention, and the rendered surface are independently bounded. Current macOS Electron journeys against an ephemeral Linux Docker SSH target cover exact-authority repo/worktree hydration, live terminal recovery after disconnect/reconnect, and eager six-terminal remount after renderer reload. A Windows remote-runtime smoke covers reachability and PTY round-trip. Multi-target live fanout, paired-close, WSL, and patched live partition journeys remain gaps. The test-value audit narrowed resolved-worktree-execution-host.test.ts to cache reuse and invalidation. Its direct hydrated-worktree, missing-folder, restored-owner, host-stamp and empty-runtime selection alarms are lost. Other routing and recovery suites do not establish equivalent selector coverage; historical run commands and results remain historical. The test-value audit removes standalone unwritten/released renderer-authority and cross-scope request-count examples. The retained synthetic mirror/store/sidebar and pending-inventory checks do not establish real PTY byte ownership, SSH reconnection or equivalent replacement coverage; historical commands and results remain historical. The test-value audit removes direct join/label ledgers, immediate failure and negative-only stale/removal/partial-authority examples, plus the standalone retained/live event projection. Retained synthetic store/hydration compositions do not establish real SSH continuity, remote authority delivery or equivalent replacement alarms. Historical commands and results remain historical. The renderer scheduling fixture retains in-flight coalescing only. Its immediate publication and negative stale-SSH-cleanup call ledgers were removed; the retained SSH recovery evidence does not replace those alarms. The accepted-handle-events observer suite is removed, including its scoped listener and settlement-release assertions. These observer alarms are lost; retained SSH/transport journeys are not equivalent replacement coverage. The test-value audit removed repeated remote-handle rotation inventories and snapshot-first pending-restart migration examples from terminal-pty-identity-replacement.test.ts, plus direct foreground metadata setter, confirmation, evidence-enum, and prefix/worktree cleanup examples. Those rotation, pending-restart, snapshot-first migration, and foreground scalar-update alarms are lost. The retained replacement case observes pane and tab identities in one subscriber publication; it does not establish equivalent migration, process-evidence, or input-routing coverage. Historical commands and results remain historical. The test-value audit narrows terminals-hydration.test.ts to a real reconnect batch with one measured store publication and hydration-seeded history consumed by a subsequent visit/Back check. Direct split-layout, runtime/folder/floating restoration, dead-leaf focus, cold/known-absent SSH deferral, title, default-tab marker, navigation initialization, and hydrationSucceeded scalar examples are removed; those specific alarms are lost. No actual target-removal transition, live SSH connection, session writer, or persisted restart is exercised by the retained cases. The old target-scoped/snapshot assertion references are retired because the current file does not contain those oracles. Other suites and historical runs do not establish equivalent replacement coverage. Audit1299 removes tests/e2e/terminal-cold-activation-deferral.spec.ts. Private-state/work-budget/assembled-fixture alarms are intentionally lost; retained suites are not equivalent replacement coverage. No new runtime/platform evidence is claimed. Audit1301: src/renderer/src/runtime/remote-runtime-session-tabs-inflight.test.ts reduced. Direct dedupe eviction/count and equal receipt-position sample loses authored alarm. No equivalent replacement coverage is claimed. Audit1318: src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts: Retain real local encrypted WebSocket regressions for pre-ready socket replacement preserving a request, close-before-ready logical subscription cleanup, unrelated RPC surviving another deadline, and pending setup abort leaving a sibling pending. Host server is synthetic and uses production crypto; kept scenarios also retain internal diagnostics/memory assertions unchanged. Remove happy routing, authority-envelope, unknown-ID/log, cleanup enum, binary, keepalive/liveness and production-budget/private socket inventories; intentionally lose those alarms, no physical host authorization, independent crypto or remote provider claim. Reduced selectors need fresh validation; historical full-suite receipts do not validate the changed coverage. No equivalent replacement or physical-provider claim. Audit1342: src/renderer/src/hooks/ipc-events/direct-ssh-connect-reply-routing.test.ts removed. Initial and event-triggered partial-authority hydration fixture alarms disappear. src/renderer/src/components/terminal-pane/terminal-error-accumulation.test.ts removed. Multiline dedup/storm bounds, resource classification/collision, scoped clear/reconnect strip and1000-pane map count alarms disappear. No equivalent replacement coverage is claimed. Audit1396: src/renderer/src/components/terminal-pane/pty-connection-pending-spawn.spec.ts reduced. Lose standalone debug-state retention/log silence alarm. React StrictMode is not mounted; bindings manually simulate remount over mocked transport. No equivalent replacement coverage is claimed. The existing primary-selector receipt and its claims remain scoped to their unchanged sources; the broad optional command has no new execution result. Audit1400: src/main/ipc/ssh/ssh.test.ts reduced. Lose trivial missing target and mocked publication inventory. Preexisting unresolved ../ssh/ssh-port-scanner mock is recorded, not fixed. src/renderer/src/runtime/sync-runtime-graph-scheduling.test.ts removed. Removes whole coalescing call-count suite; no newest-state delivery or replacement claim. src/renderer/src/store/slices/terminal-pty-identity-replacement.test.ts reduced. Removes three no-op/work-count registrations; retains externally observed ownership consistency. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1412: src/main/ssh/ssh-provider-authority.test.ts removed. Loses real AbortController revocation/target isolation/reentrancy outcomes, recreated-target generation-floor/session rollover behavior, stale mutation refusal and settled-registration cleanup alarms. These useful alarms are deliberately lost; no equivalent cancellation coverage is claimed. No equivalent replacement coverage is claimed. Existing exact unaffected receipts remain unchanged and apply only to their unchanged selectors. Changed optional selectors have no new execution result. Audit1743 removes the standalone line-height clamp/default and pane cwd fallback helper tests (5 authored cases). These trivial-helper alarms are intentionally lost, with no equivalent replacement. Only current commands/testFiles lose the deleted selectors; historical receipts and evidenceRuns remain unchanged and do not validate the reduced commands.", "motivatingLinks": [ "https://linear.app/stably/issue/STA-3107", "https://github.com/stablyai/orca/pull/12664", @@ -9640,7 +9644,7 @@ "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. Historical prior account (preserved verbatim): Audit2076 (sources2073/2074): Intentionally retire these low-value alarms without replacement: src/main/ssh/connection/ssh-connection-manager.test.ts: tears a failed startup down quietly, so its error is not replaced by a disconnect; marks a dial that never reached the host, so setup reports SSH’s reason; removes the registration when bulk teardown fails; leaves a connection whose own reconnect is asking the user alone; clears the pool entry when the closed connection is still the registered one; still reuses a connection that is already up; dials a user's connection test. 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. Historical prior account (preserved verbatim): Audit2052 (sources2049/2050/2051): Remove complete low-value restored-pane-title and pane-visibility-identity suites and their current selectors. Their supplied snapshot/title and nullable identity-comparison alarms are intentionally lost without replacement. Unrelated dated evidenceRuns remain unchanged and do not validate the reduced commands. No fresh gate execution, actual PTY/provider, rendered, remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1983: Delete the terminal-create idempotency forwarding suite and its prospective selector. Preserve2 unrelated receipts without claiming the lost forwarding alarm was replaced. Changed-source prior results do not validate reduced-source bytes. No fresh execution, equivalent replacement, red/green, measured budget, soak, provider/PTY, rendered, live remote/mobile or cross-platform result is claimed. Historical prior account (preserved verbatim): Audit1931 (sources1928/1929): Delete complete transport-unmount and queued-initial-CWD helper suites: despite lifecycle-shaped fixtures, the unmount owner returns a Boolean PTY-id predicate, while CWD cases check nullish field selection and callback counts. Lose their detach/destroy/teardown and one-shot-CWD supplied examples. Partial queued-pane-startup loses three identical/empty/nonowner identity examples, retaining four exact one-shot/replacement ownership callbacks. No assertion object maps to these three sources, so unrelated alias objects remain byte-exact. Preserve the current81ed prior removal of pane-split-startup; stale bd948 source metadata snapshots are not replayed. No actual process/PTY startup, transport shutdown, live SSH or rendered recovery is proven by this metadata change. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1925 (sources1922/1923): Delete the sole supplied public-SSH-state spread/sanitized-error projection and its provider-authority-pair alias. Also delete the complete tiny one-shot split-startup wrapper suite: callback-visible temporary field/reset, sequential payload and thrown-sentinel reset alarms disappear. No SSH provider epoch handoff, connection, process startup or actual terminal split was performed by either deleted suite. Preserve meaningful remaining selectors/assertions and unchanged dated receipts within their original scope. Reduced selectors have no fresh gate execution evidence in this metadata packet. No equivalent replacement, physical watcher/PTY/provider, live SSH/remote/mobile, rendered, cross-platform, soak or measured-budget result is claimed. Historical prior account (preserved verbatim): Audit1903 removes whole mocked detach, supplied geometry and/or close-request suites selected by this gate. Their pending-CWD/PTY-binding argument/order, fabricated hit-test and close bookkeeping alarms are intentionally lost without replacement. Valid remaining selectors/assertions and unchanged-selector execution receipts retain their original scope. Reduced unit selections have no fresh broad gate, real PTY/provider, rendered focus, or measured-budget validation. Historical prior account (preserved verbatim): Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: Existing exact unchanged-selector receipts remain the only current execution evidence. Changed source selectors have no fresh execution result. Historical prior-source oracle account: The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): The retained unchanged-source receipts are the only current execution evidence; reduced-source assertions await validation. Historical oracle account (not a current claim for changed sources): Deterministic tests cover bounded stale-handle replacement, suspended heartbeat clocks, cold and established subscription failure, ten partition/recovery cycles, automatic-recovery cutoff, manual reconnect, and direct SSH binding retention. They assert SSH state changes leave PTY bindings in place, relay identity survives, and another target/local/WSL/runtime panes remain byte-identical through target snapshot hydration and reconnect. Both remount callbacks consume split-count activity suppression, intentional dispose emits no failure/timeout, and a same-attempt StrictMode remount still owns one timeout. Hydration clears an untrusted PTY hint without clearing its current pending owner, healthy current-authority bindings suppress correction, hydration finalizes once, and reconnect emits no paired close lifecycle. A provider-level session-ID reattach returns an incarnation, then a legacy exit without an incarnation must resolve to that returned identity rather than minting a fallback identity. The shared-control oracle withholds the first encrypted ready frame, starts one RPC, triggers the successful-probe refresh, then requires exactly two client connections, one host request, a successful response, zero pending calls, and zero retained request bytes. Tests also assert one unsubscribe per remote-runtime epoch, observable recovery phases, stable PTY identity, resumed snapshot/output/input, no healthy state before replay, no retry or input after cutoff, a new manual epoch against the same PTY, quiet recovery UI with an explicit Reconnect action, pane-close state cleanup, one stable create mutation id, old-runtime no-retry behavior, cross-process PTY adoption, and bounded in-flight coordination. A focused recovery oracle surfaces two distinct failures through one transport, completes authoritative replay, and requires both matching clear callbacks; pane-state tests require only the active pane's error to render, matching-pane recovery to preserve sibling and unrelated errors, dismissal to re-admit later failures, and distinct storms to retain only the newest eight messages within 24 lines and 4,000 characters. The retained store replacement assertion observes one atomic pane/tab subscriber publication; repeated rotations and snapshot-first pending-restart migration no longer have their direct store examples.", "commands": [ "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/paired-reconnect-multi-pane-materialization.test.ts src/renderer/src/runtime/web-session-tabs-sync/agent-status/paired-reconnect-sidebar-agent-count.test.ts --reporter=dot", - "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/resolved-worktree-execution-host.test.ts src/renderer/src/components/terminal/background-terminal-worktree-mount.test.ts src/renderer/src/components/terminal-pane/mounting/queued-pane-startup.test.ts src/renderer/src/components/terminal-pane/parking/one-shot-park-replay.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts src/renderer/src/store/terminals/terminal-pty-identity-replacement.test.ts", + "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/resolved-worktree-execution-host.test.ts src/renderer/src/components/terminal/background-terminal-worktree-mount.test.ts src/renderer/src/components/terminal-pane/mounting/queued-pane-startup.test.ts src/renderer/src/components/terminal-pane/parking/one-shot-park-replay.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/store/terminals/terminal-pty-identity-replacement.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-reattach-admission.test.ts src/renderer/src/components/terminal-pane/pty-transport/ipc/pty-transport-detach-attach-handoff.test.ts", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-attach-subscription.test.ts --reporter=dot", "pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-attach-subscription.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-expired-pane-recovery.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-outcome-recovery.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/remote-runtime-pty-recovery-state.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/TerminalRemoteRuntimeReconnectBanner.test.tsx src/shared/remote-runtime/remote-runtime-socket-liveness.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-socket-generation.test.ts src/shared/remote-runtime/remote-runtime-client-error-classification.test.ts src/main/runtime/rpc/remote-runtime-server-heartbeat.test.ts src/main/runtime/terminal/launch/orca-runtime-terminal-create-idempotency.test.ts", @@ -9668,7 +9672,6 @@ "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-handoff.test.ts", "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/remote-runtime-pty-recovery-state.test.ts", "src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/TerminalRemoteRuntimeReconnectBanner.test.tsx", - "src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts", "src/renderer/src/store/terminals/terminal-pty-identity-replacement.test.ts", "src/shared/remote-runtime/remote-runtime-socket-liveness.test.ts", "src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts", @@ -9927,7 +9930,8 @@ "Audit1983 historical original commands object, preserved verbatim; retired objects are not active execution evidence or replacement coverage:\n\"pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-attach-subscription.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-expired-pane-recovery.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-outcome-recovery.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-create-handoff.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/remote-runtime-pty-recovery-state.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/recovery/TerminalRemoteRuntimeReconnectBanner.test.tsx src/shared/remote-runtime/remote-runtime-socket-liveness.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-connection.test.ts src/shared/remote-runtime/control/remote-runtime-shared-control-socket-generation.test.ts src/shared/remote-runtime/remote-runtime-client-error-classification.test.ts src/main/runtime/rpc/remote-runtime-server-heartbeat.test.ts src/main/runtime/rpc/methods/terminal/terminal-create-idempotency.test.ts src/main/runtime/terminal/launch/orca-runtime-terminal-create-idempotency.test.ts\"", "Audit1983 historical original testFiles object, preserved verbatim; retired objects are not active execution evidence or replacement coverage:\n\"src/main/runtime/rpc/methods/terminal/terminal-create-idempotency.test.ts\"", "Audit2052 (sources2049/2050/2051): Remove complete low-value restored-pane-title and pane-visibility-identity suites and their current selectors. Their supplied snapshot/title and nullable identity-comparison alarms are intentionally lost without replacement. Unrelated dated evidenceRuns remain unchanged and do not validate the reduced commands. No fresh gate execution, actual PTY/provider, rendered, remote/mobile or cross-platform result is claimed.", - "Audit2195 removes the low-value startup admission boolean and host deferral predicate inventories from background-terminal-worktree-mount.test.ts. The reduced source retains concrete targeted mount, prune and reveal ownership transitions, not those oracle assertions. Existing selectors remain unexecuted here; no equivalent replacement or new runtime/provider/platform/budget result is claimed. Original retired assertion object verbatim:\n{\n \"file\": \"src/renderer/src/components/terminal/background-terminal-worktree-mount.test.ts\",\n \"assertions\": [\n \"startup waits for hydration before mounting terminal panes while degraded mode remains interactive\",\n \"only an explicit local execution host can defer cold activation\",\n \"SSH, remote-runtime, and unresolved owners remain eager\"\n ]\n }" + "Audit2195 removes the low-value startup admission boolean and host deferral predicate inventories from background-terminal-worktree-mount.test.ts. The reduced source retains concrete targeted mount, prune and reveal ownership transitions, not those oracle assertions. Existing selectors remain unexecuted here; no equivalent replacement or new runtime/provider/platform/budget result is claimed. Original retired assertion object verbatim:\n{\n \"file\": \"src/renderer/src/components/terminal/background-terminal-worktree-mount.test.ts\",\n \"assertions\": [\n \"startup waits for hydration before mounting terminal panes while degraded mode remains interactive\",\n \"only an explicit local execution host can defer cold activation\",\n \"SSH, remote-runtime, and unresolved owners remain eager\"\n ]\n }", + "Audit2709 removes src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts: intentionally retire waiting out an older inventory and sharing a fresh post-operation request among concurrent callers. No equivalent replacement or fresh execution is claimed. Dated receipts remain historical evidence for their unchanged selectors only; they do not validate the reduced commands or full current gate. Original prospective command before removal: pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/lib/resolved-worktree-execution-host.test.ts src/renderer/src/components/terminal/background-terminal-worktree-mount.test.ts src/renderer/src/components/terminal-pane/mounting/queued-pane-startup.test.ts src/renderer/src/components/terminal-pane/parking/one-shot-park-replay.test.ts src/renderer/src/components/terminal-pane/pty-connection/tests/pty-connection-spawn-and-startup.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-host-surface-replacement.test.ts src/renderer/src/components/terminal-pane/pty-transport/remote-runtime/remote-runtime-pty-transport-stream-reconnect.test.ts src/renderer/src/runtime/web-session-tabs-sync/inventory/remote-runtime-session-tabs-inflight.test.ts src/renderer/src/store/terminals/terminal-pty-identity-replacement.test.ts" ], "demotionRule": "Cannot promote if provider failure can close panes or if the oracle is screenshot-only." }, @@ -10883,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", @@ -10893,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", @@ -10911,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", @@ -10946,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": [ @@ -11034,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": { @@ -11068,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.", diff --git a/config/renderer-layout-writer-baseline.txt b/config/renderer-layout-writer-baseline.txt index 96f667bb196..1c132f4e79c 100644 --- a/config/renderer-layout-writer-baseline.txt +++ b/config/renderer-layout-writer-baseline.txt @@ -27,6 +27,7 @@ 3 src/renderer/src/lib/workspace/persistence/workspace-session-staged-browser-tabs.ts 1 src/renderer/src/lib/workspace/persistence/workspace-session-unified-tabs.ts 17 src/renderer/src/lib/workspace/persistence/workspace-session.ts +13 src/renderer/src/runtime/browser/creation/testing/web-runtime-browser-creation-placement-test-rig.ts 3 src/renderer/src/runtime/hosted-terminals/recovery/adoption/web-session-terminal-recovery-snapshot-validation.ts 1 src/renderer/src/runtime/hosted-terminals/recovery/surfaces/web-session-terminal-orphan-recovery-surface.ts 2 src/renderer/src/runtime/hosted-terminals/recovery/surfaces/web-session-terminal-orphan-topology.ts @@ -35,15 +36,14 @@ 10 src/renderer/src/runtime/sync-runtime-graph/mobile-session-group-projection.ts 2 src/renderer/src/runtime/sync-runtime-graph/mobile-session-snapshots.ts 2 src/renderer/src/runtime/sync-runtime-graph/sync-key.ts -13 src/renderer/src/runtime/browser/creation/testing/web-runtime-browser-creation-placement-test-rig.ts -1 src/renderer/src/runtime/web-session-tabs-sync/inventory/web-runtime-session-snapshot.ts -3 src/renderer/src/runtime/web-session-tabs-sync/placement/web-session-client-owned-tab-placement.ts 1 src/renderer/src/runtime/web-session-tabs-sync/agent-status-primitives.ts 8 src/renderer/src/runtime/web-session-tabs-sync/apply-active-state.ts 18 src/renderer/src/runtime/web-session-tabs-sync/apply-final-patch.ts 2 src/renderer/src/runtime/web-session-tabs-sync/apply-preparation-groups.ts 5 src/renderer/src/runtime/web-session-tabs-sync/apply-terminal-records.ts 4 src/renderer/src/runtime/web-session-tabs-sync/apply-worktree-records.ts +1 src/renderer/src/runtime/web-session-tabs-sync/inventory/web-runtime-session-snapshot.ts +3 src/renderer/src/runtime/web-session-tabs-sync/placement/web-session-client-owned-tab-placement.ts 2 src/renderer/src/runtime/web-session-tabs-sync/session-tabs-inventory-absence.ts 10 src/renderer/src/store/slices/browser/cleanup/browser-close-actions.ts 2 src/renderer/src/store/slices/browser/create-browser-slice.ts @@ -57,7 +57,7 @@ 9 src/renderer/src/store/slices/editor/checks/check-run-details-actions.ts 6 src/renderer/src/store/slices/editor/closing/close-file-action.ts 10 src/renderer/src/store/slices/editor/closing/recently-closed-editor-tabs.ts -3 src/renderer/src/store/slices/editor/file-ids/hydrated-editor-file-ids.ts +1 src/renderer/src/store/slices/editor/file-ids/hydrated-editor-file-ids.ts 2 src/renderer/src/store/slices/editor/file-ids/hydrated-editor-file-selection.ts 1 src/renderer/src/store/slices/editor/file-ids/open-file-path-rekey.ts 2 src/renderer/src/store/slices/editor/file-ids/rekey-open-files-action.ts @@ -82,7 +82,7 @@ 4 src/renderer/src/store/slices/tabs/tab-group-state.ts 9 src/renderer/src/store/slices/tabs/tabs-close-actions.ts 14 src/renderer/src/store/slices/tabs/tabs-create-actions.ts -23 src/renderer/src/store/slices/tabs/tabs-drag-preview-actions.ts +22 src/renderer/src/store/slices/tabs/tabs-drag-preview-actions.ts 11 src/renderer/src/store/slices/tabs/tabs-drop-actions.ts 8 src/renderer/src/store/slices/tabs/tabs-empty-workspace.ts 4 src/renderer/src/store/slices/tabs/tabs-focus-actions.ts @@ -91,11 +91,13 @@ 1 src/renderer/src/store/slices/tabs/tabs-hydration.ts 8 src/renderer/src/store/slices/tabs/tabs-label-actions.ts 10 src/renderer/src/store/slices/tabs/tabs-move-actions.ts -9 src/renderer/src/store/slices/tabs/tabs-reconciliation.ts +4 src/renderer/src/store/slices/tabs/tabs-reconciliation-batch.ts # split from tabs-reconciliation.ts (9 -> 2 + 4) +2 src/renderer/src/store/slices/tabs/tabs-reconciliation.ts 4 src/renderer/src/store/slices/tabs/tabs-session-actions.ts 1 src/renderer/src/store/slices/tabs/tabs-split-ratio-actions.ts 5 src/renderer/src/store/slices/tabs/tabs-surface.ts -24 src/renderer/src/store/slices/tabs/worktree-layout-lifecycle.ts +19 src/renderer/src/store/slices/tabs/worktree-layout-lifecycle.ts +3 src/renderer/src/store/slices/tabs/worktree-terminal-tab-respawn.ts # moved unchanged out of worktree-layout-lifecycle.ts (24 -> 19 + 3) 5 src/renderer/src/store/slices/worktrees/session/set-active-worktree.ts 2 src/renderer/src/store/slices/worktrees/session/worktree-slice-lookups.ts 6 src/renderer/src/store/terminals/create-terminal-slice.ts @@ -112,7 +114,7 @@ 10 src/renderer/src/store/terminals/terminal-tab-creation.ts 7 src/renderer/src/store/terminals/terminal-tab-navigation.ts 3 src/renderer/src/store/terminals/terminal-tab-presentation.ts -4 src/renderer/src/store/terminals/terminal-tab-title-batch.ts +2 src/renderer/src/store/terminals/terminal-tab-title-batch.ts 5 src/renderer/src/store/terminals/workspace-terminal-hydration-patch.ts 2 src/renderer/src/store/terminals/workspace-terminal-hydration.ts 2 src/renderer/src/store/terminals/workspace-terminal-reconnect.ts diff --git a/config/scripts/ci/sharding/ci-shard-timings.json b/config/scripts/ci/sharding/ci-shard-timings.json index da79a66c8cf..afd1ef5bf40 100644 --- a/config/scripts/ci/sharding/ci-shard-timings.json +++ b/config/scripts/ci/sharding/ci-shard-timings.json @@ -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, @@ -1336,7 +1281,7 @@ "src/main/codex-accounts/codex-login-session-wsl-open.test.ts": 184, "src/main/codex-accounts/codex-managed-home-path-wsl-check.test.ts": 71, "src/main/codex-accounts/codex-reset-credit-ledger.test.ts": 283, - "src/main/codex-accounts/fs-utils.test.ts": 127, + "src/main/filesystem/atomic-file-publication.test.ts": 127, "src/main/codex-accounts/guest-codex-account-homes.test.ts": 86, "src/main/codex-accounts/host-codex-managed-home-ownership.test.ts": 51, "src/main/codex-accounts/legacy-shared-auth-migration.test.ts": 134, @@ -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, @@ -5001,13 +4930,10 @@ "src/renderer/src/components/editor/save/queue/editor-save-lossless-baseline.test.ts": 1990, "src/renderer/src/components/editor/save/transforms/editor-save-plugin-hook.test.ts": 2122, "src/renderer/src/components/editor/save/queue/editor-save-queue-bytes-owner.test.ts": 1667, - "src/renderer/src/components/editor/save/queue/editor-save-queue-closed-view-records.test.ts": 2137, "src/renderer/src/components/editor/save/queue/editor-save-queue-closed-view.test.ts": 2075, - "src/renderer/src/components/editor/save/queue/editor-save-queue-records.test.ts": 2036, "src/renderer/src/components/editor/save/queue/editor-save-queue-shared-records.test.ts": 2043, "src/renderer/src/components/editor/save/queue/editor-save-queue.test.ts": 1814, "src/renderer/src/components/editor/save/queue/editor-save-shared-model-dirty.test.ts": 1250, - "src/renderer/src/components/editor/save/queue/editor-save-shared-model.test.ts": 1239, "src/renderer/src/components/editor/model-lifetime/buffer-text/editor-shared-record-clean-view.test.ts": 1998, "src/renderer/src/components/editor/save/commands/editor-untitled-save-lifecycle.test.ts": 1485, "src/renderer/src/components/editor/image-png-export.chromium.test.ts": 212, @@ -5591,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, @@ -5612,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, @@ -5857,7 +5781,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, @@ -5927,7 +5850,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, @@ -6014,7 +5936,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, @@ -6376,9 +6297,9 @@ "src/renderer/src/i18n/ui-intl-formatters.test.ts": 208, "src/renderer/src/lib/activate-ai-vault-structured-session-host.test.ts": 589, "src/renderer/src/lib/activate-ai-vault-structured-session-reveal.test.ts": 2099, - "src/renderer/src/lib/activate-tab-and-focus-pane.test.ts": 54, - "src/renderer/src/lib/active-agent-note-send-explicit-target.test.ts": 980, - "src/renderer/src/lib/active-agent-note-send-focused-session.test.ts": 536, + "src/renderer/src/lib/workspace/tabs/activate-tab-and-focus-pane.test.ts": 54, + "src/renderer/src/lib/agent-session/messaging/terminal/active-agent-note-send-explicit-target.test.ts": 980, + "src/renderer/src/lib/agent-session/messaging/terminal/active-agent-note-send-focused-session.test.ts": 536, "src/renderer/src/lib/activity-thread-display.test.ts": 134, "src/renderer/src/lib/agent-account-restart-startup.test.ts": 1780, "src/renderer/src/lib/agent-session/launch/background/agent-background-session-launch-host.test.ts": 1910, @@ -6395,10 +6316,10 @@ "src/renderer/src/lib/agent-session/launch/pane/agent-launch-tab-main-written.test.ts": 2084, "src/renderer/src/lib/agent-session/launch/pane/agent-launch-tab-publication.test.ts": 1855, "src/renderer/src/lib/agent-session/launch/pane/agent-launch-through-host.test.ts": 1975, - "src/renderer/src/lib/agent-message-send.test.ts": 182, - "src/renderer/src/lib/agent-paste-draft-submit-retry.test.ts": 315, - "src/renderer/src/lib/agent-paste-draft.test.ts": 445, - "src/renderer/src/lib/agent-resume-launch-target.test.ts": 3911, + "src/renderer/src/lib/agent-session/messaging/agent-message-send.test.ts": 182, + "src/renderer/src/lib/agent-session/messaging/paste/agent-paste-draft-submit-retry.test.ts": 315, + "src/renderer/src/lib/agent-session/messaging/paste/agent-paste-draft.test.ts": 445, + "src/renderer/src/lib/agent-session/resume/agent-resume-launch-target.test.ts": 3911, "src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-after-failure.test.ts": 870, "src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-close-race.test.ts": 983, "src/renderer/src/lib/agent-session/launch/structured-agent-session-launch-create-message.test.ts": 2521, @@ -6417,10 +6338,9 @@ "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/agent-skill-cli-prerequisite.test.ts": 219, - "src/renderer/src/lib/agent-startup-delayed-delivery-perf.test.ts": 1708, - "src/renderer/src/lib/agent-status-evidence-clock.test.ts": 88, - "src/renderer/src/lib/agent-status.test.ts": 172, + "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, "src/renderer/src/lib/agent-session/resume/history/ai-vault-antigravity-reference-host.test.ts": 678, "src/renderer/src/lib/agent-session/resume/history/ai-vault-resume-command.drop-repin.test.ts": 541, "src/renderer/src/lib/agent-session/resume/history/ai-vault-resume-command.test.ts": 665, @@ -6451,7 +6371,6 @@ "src/renderer/src/lib/clipboard-image-copy.test.ts": 243, "src/renderer/src/lib/cmd-j-host-qualified-candidate-ownership.test.ts": 526, "src/renderer/src/lib/cmd-j-linear-issue-intent.test.ts": 42, - "src/renderer/src/lib/code-editor-theme.test.ts": 101, "src/renderer/src/lib/code-host-error-copy.test.ts": 297, "src/renderer/src/lib/codex-pane-selection-lane.test.ts": 543, "src/renderer/src/lib/agent-session/accounts/codex/codex-session-restart-shell-flap.test.ts": 1745, @@ -6461,24 +6380,22 @@ "src/renderer/src/lib/comment-body-line-count.test.ts": 84, "src/renderer/src/lib/comment-body-submit-state.test.ts": 55, "src/renderer/src/lib/composer-submit-cancellation.test.ts": 41, - "src/renderer/src/lib/connection-context.test.ts": 1817, + "src/renderer/src/lib/workspace/ownership/connection-context.test.ts": 1817, "src/renderer/src/lib/crash-diagnostics.test.ts": 176, "src/renderer/src/lib/create-untitled-markdown.test.ts": 566, "src/renderer/src/lib/desktop-created-server-tabs.test.ts": 1933, - "src/renderer/src/lib/direct-ssh-target-scope.test.ts": 48, + "src/renderer/src/lib/workspace/ownership/direct-ssh-target-scope.test.ts": 48, "src/renderer/src/lib/workspace/creation/work-item/direct-work-item-setup-callers.test.tsx": 2436, "src/renderer/src/lib/workspace/creation/work-item/direct-work-item-setup.test.ts": 2072, - "src/renderer/src/lib/doc-preview-grants.test.ts": 2094, - "src/renderer/src/lib/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/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/emulator-error-copy.test.ts": 415, "src/renderer/src/lib/ensure-hooks-confirmed.test.ts": 799, - "src/renderer/src/lib/ensure-simulator-tab-behavior.test.ts": 3601, - "src/renderer/src/lib/execute-open-editor-path-move.test.ts": 2458, - "src/renderer/src/lib/execution-host-facts.test.ts": 1796, + "src/renderer/src/lib/simulator/tabs/ensure-simulator-tab-behavior.test.ts": 3601, + "src/renderer/src/runtime/hosts/platform/execution-host-facts.test.ts": 1796, "src/renderer/src/lib/feature-education-telemetry.test.ts": 52, "src/renderer/src/lib/feedback-image-attachments.test.ts": 557, - "src/renderer/src/lib/file-preview-link-open.test.ts": 2311, + "src/renderer/src/lib/browser/documents/file-preview-link-open.test.ts": 2311, "src/renderer/src/lib/file-search-selection.test.ts": 51, "src/renderer/src/lib/find-query-bounds.test.ts": 45, "src/renderer/src/lib/finished-agent-resume-resurrection.test.ts": 1872, @@ -6517,11 +6434,10 @@ "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, - "src/renderer/src/lib/monaco-editor-gutter-disposal.test.ts": 295, + "src/renderer/src/lib/editor/monaco/monaco-editor-gutter-disposal.test.ts": 295, "src/renderer/src/lib/monaco-languages/markdown-heading-outline.test.ts": 70, "src/renderer/src/lib/monaco-languages/monarch-embed-entry-recursion.test.ts": 697, "src/renderer/src/lib/monaco-languages/plugin-grammar-tokenization.test.ts": 282, @@ -6540,7 +6456,7 @@ "src/renderer/src/lib/non-secure-context-crypto.repro.test.ts": 1691, "src/renderer/src/lib/onboarding-folder-cancellation.test.ts": 2486, "src/renderer/src/lib/open-agent-message-sender.test.ts": 1497, - "src/renderer/src/lib/open-mobile-emulator-tab.test.ts": 545, + "src/renderer/src/lib/simulator/launch/open-mobile-emulator-tab.test.ts": 545, "src/renderer/src/lib/orca-yaml-trust-prompt-slot-eviction.test.ts": 884, "src/renderer/src/lib/order-empty-query-worktrees.test.ts": 62, "src/renderer/src/lib/os-file-drop-cancellation-guard.test.ts": 204, @@ -6620,7 +6536,7 @@ "src/renderer/src/lib/react-commit-cascade-observer.test.ts": 189, "src/renderer/src/lib/react-commit-cascade-telemetry.test.ts": 159, "src/renderer/src/lib/react-error-boundary-reporting.test.ts": 55, - "src/renderer/src/lib/remap-open-editor-tabs-for-path-change.test.ts": 2178, + "src/renderer/src/lib/editor/file-operations/remap-open-editor-tabs-for-path-change.test.ts": 2178, "src/renderer/src/lib/rename-user-named-tab-access.test.ts": 2804, "src/renderer/src/lib/renderer-agent-status-observation-ingress.test.ts": 81, "src/renderer/src/lib/renderer-app-platform.test.ts": 197, @@ -6651,11 +6567,11 @@ "src/renderer/src/lib/sidebar-ended-creations.test.ts": 1889, "src/renderer/src/lib/sidebar-pending-layer.test.ts": 338, "src/renderer/src/lib/sidebar-shadow/workspace-activity-shadow.test.ts": 1728, - "src/renderer/src/lib/simulator-launch-coordination.test.ts": 43, - "src/renderer/src/lib/simulator-palette-search.test.ts": 515, - "src/renderer/src/lib/simulator-pane-shutdown-scheduler.test.ts": 1679, - "src/renderer/src/lib/simulator-tab-layout-owner.test.ts": 2398, - "src/renderer/src/lib/simulator-tab-palette-activation.test.ts": 1903, + "src/renderer/src/lib/simulator/launch/simulator-launch-coordination.test.ts": 43, + "src/renderer/src/lib/simulator/search/simulator-palette-search.test.ts": 515, + "src/renderer/src/lib/simulator/tabs/simulator-pane-shutdown-scheduler.test.ts": 1679, + "src/renderer/src/lib/simulator/tabs/simulator-tab-layout-owner.test.ts": 2398, + "src/renderer/src/lib/simulator/tabs/simulator-tab-palette-activation.test.ts": 1903, "src/renderer/src/lib/sleeping-agent-session-launch-windows-quoting.test.ts": 547, "src/renderer/src/lib/source-control/remote/source-control-remote-error.test.ts": 340, "src/renderer/src/lib/ssh-config-passive-sync.test.ts": 1513, @@ -6690,7 +6606,7 @@ "src/renderer/src/lib/windows-terminal-capabilities-race.test.ts": 450, "src/renderer/src/lib/windows-terminal-capabilities.test.ts": 585, "src/renderer/src/lib/windows-terminal-capability-reprobe.test.ts": 198, - "src/renderer/src/lib/workspace-activation-path-gate.test.ts": 2107, + "src/renderer/src/lib/workspace/activation/workspace-activation-path-gate.test.ts": 2107, "src/renderer/src/lib/browser/workspace/workspace-browser-tab-open-placement.test.ts": 1996, "src/renderer/src/lib/workspace-doc-address-input.test.ts": 470, "src/renderer/src/lib/workspace-file-drag.test.ts": 70, @@ -6701,7 +6617,7 @@ "src/renderer/src/lib/workspace/persistence/workspace-session-ssh-partition-ownership.test.ts": 309, "src/renderer/src/lib/workspace/persistence/workspace-session-ssh-partition-round-trip.test.ts": 1775, "src/renderer/src/lib/workspace/search/tabs/workspace-tab-palette-activation.store.test.ts": 1994, - "src/renderer/src/lib/workspace-terminal-host-authority.test.ts": 2066, + "src/renderer/src/lib/workspace/ownership/workspace-terminal-host-authority.test.ts": 2066, "src/renderer/src/lib/workspace/activation/worktree-activation-automation-filter.test.ts": 2431, "src/renderer/src/lib/workspace/activation/worktree-activation-created-agent.test.ts": 2295, "src/renderer/src/lib/workspace/activation/worktree-activation-emptied-workspace-reseed.test.ts": 3630, @@ -6709,26 +6625,24 @@ "src/renderer/src/lib/workspace/activation/worktree-activation-structured-chat-surface.test.ts": 2043, "src/renderer/src/lib/workspace/activation/worktree-activation-web-runtime.test.ts": 2768, "src/renderer/src/lib/workspace/activation/worktree-agent-activation-seam.test.ts": 3440, - "src/renderer/src/lib/workspace/activation/worktree-agent-live-surface-adoption-layout-owner.test.ts": 1898, "src/renderer/src/lib/workspace/creation/worktree-creation-backend-startup-focus.test.ts": 2267, "src/renderer/src/lib/workspace/creation/worktree-creation-initial-surface.test.ts": 5258, "src/renderer/src/lib/workspace/creation/worktree-creation-structured-session-lifecycle.test.ts": 2633, "src/renderer/src/lib/workspace/creation/worktree-creation-structured-session-prompts.test.tsx": 4554, - "src/renderer/src/lib/worktree-live-terminal-surface-owners.test.ts": 266, - "src/renderer/src/lib/worktree-operation-route-index.test.ts": 262, - "src/renderer/src/lib/worktree-operation-route.test.ts": 342, + "src/renderer/src/lib/workspace/ownership/worktree-live-terminal-surface-owners.test.ts": 266, + "src/renderer/src/lib/workspace/ownership/worktree-operation-route-index.test.ts": 262, + "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/worktree-reactivation-preserved-pane-replacement.test.ts": 2268, - "src/renderer/src/lib/worktree-reactivation-tab-forkbomb.test.ts": 4131, + "src/renderer/src/lib/workspace/activation/worktree-reactivation-preserved-pane-replacement.test.ts": 2268, + "src/renderer/src/lib/workspace/activation/worktree-reactivation-tab-forkbomb.test.ts": 4131, "src/renderer/src/lib/workspace/ownership/worktree-runtime-owner-index.detected.test.ts": 121, "src/renderer/src/lib/workspace/ownership/worktree-runtime-owner.test.ts": 380, "src/renderer/src/lib/worktree-status-spinner-launch-agent.test.ts": 271, "src/renderer/src/lib/worktree-status.test.ts": 306, - "src/renderer/src/lib/wsl-move-renderer-store-rewrites.test.ts": 1072, + "src/renderer/src/lib/workspace/persistence/wsl-move-renderer-store-rewrites.test.ts": 1072, "src/renderer/src/runtime/rpc/calls/abortable-runtime-environment-call.test.ts": 189, "src/renderer/src/runtime/provider-accounts/observations/claude-agent-view-observations.test.ts": 105, "src/renderer/src/runtime/web-session-tabs-sync/closing/close-mirrored-editor-tab.test.ts": 397, @@ -6744,7 +6658,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, @@ -6758,8 +6671,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, @@ -6770,7 +6681,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, @@ -6945,7 +6855,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, @@ -6964,7 +6873,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, @@ -6973,7 +6881,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, @@ -6983,7 +6890,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, @@ -7034,7 +6940,7 @@ "src/renderer/src/store/slices/settings/settings.test.ts": 1938, "src/renderer/src/store/slices/worktrees/create/sparse-presets.test.ts": 217, "src/renderer/src/store/slices/ssh/ssh.test.ts": 1843, - "src/renderer/src/lib/active-worktree-removal-successor.test.ts": 1867, + "src/renderer/src/lib/workspace/activation/active-worktree-removal-successor.test.ts": 1867, "src/renderer/src/store/slices/worktrees/session/store-active-worktree-selection.test.ts": 2039, "src/renderer/src/store/terminals/store-create-tab-start-in-main.test.ts": 1801, "src/renderer/src/store/slices/tabs/store-open-to-side-layout-owner.test.ts": 1919, @@ -7061,7 +6967,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, @@ -7074,7 +6979,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, @@ -7098,7 +7002,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, @@ -7127,7 +7030,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, @@ -7196,7 +7098,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, @@ -7302,7 +7203,6 @@ "src/shared/agent-status/transport/agent-status-osc-pending-retention.test.ts": 154, "src/shared/agent-status/transport/agent-status-osc.test.ts": 104, "src/shared/agent-status/store/agent-status-store-reopen.test.ts": 199, - "src/shared/agent-status/contracts/agent-status-subject.test.ts": 171, "src/shared/agent-status/title/agent-status-tracker-program-activity.test.ts": 77, "src/shared/agent-launch/startup/agent-tui-input-clear.test.ts": 57, "src/shared/ai-vault/resume/ai-vault-resume-command.test.ts": 70, @@ -7331,13 +7231,13 @@ "src/shared/automation-schedules.test.ts": 174, "src/shared/automation-session-reuse.test.ts": 51, "src/shared/bounded-map.test.ts": 69, - "src/shared/browser-annotation-viewport-live-target.test.ts": 259, + "src/shared/browser/annotations/browser-annotation-viewport-live-target.test.ts": 259, "src/shared/browser/extensions/browser-extension-permission-warnings.test.ts": 57, "src/shared/browser/extensions/browser-extension-url.test.ts": 278, "src/shared/browser/extensions/browser-extension-webstore.test.ts": 235, "src/shared/browser-load-failure.test.ts": 238, - "src/shared/browser-network-tunnel-protocol.test.ts": 47, - "src/shared/browser-network-tunnel-stream-framing.test.ts": 1645, + "src/shared/browser/network/tunnels/browser-network-tunnel-protocol.test.ts": 47, + "src/shared/browser/network/tunnels/browser-network-tunnel-stream-framing.test.ts": 1645, "src/shared/browser-url.test.ts": 268, "src/shared/bundled-web-client-manifest.test.ts": 66, "src/shared/source-control/checks/logs/check-job-log-excerpt.test.ts": 114, @@ -8357,7 +8257,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, diff --git a/config/scripts/ci/unit-selection/check-test-file-runners.mjs b/config/scripts/ci/unit-selection/check-test-file-runners.mjs index 24993494bd6..09f620398b7 100644 --- a/config/scripts/ci/unit-selection/check-test-file-runners.mjs +++ b/config/scripts/ci/unit-selection/check-test-file-runners.mjs @@ -34,13 +34,6 @@ const NON_UNIT_TEST_RUNNERS = [ sources: ['tests/e2e/vitest.config.ts'], mirrors: ["'tests/e2e/computer-*.e2e.ts'"] }, - { - name: 'agent-status benchmark', - manual: true, - include: ['config/scripts/performance/agent-lineage/agent-status-hot-path-benchmark.ts'], - sources: ['config/vitest.agent-status-benchmark.config.ts'], - mirrors: ["'config/scripts/performance/agent-lineage/agent-status-hot-path-benchmark.ts'"] - }, { name: 'mobile', include: ['mobile/src/**/*.test.ts', 'mobile/src/**/*.test.tsx', 'mobile/scripts/**/*.test.ts'], diff --git a/config/scripts/ci/unit-selection/dependency-graph/ci-unit-files.mjs b/config/scripts/ci/unit-selection/dependency-graph/ci-unit-files.mjs index 567d2c83bf9..0f946b7faba 100644 --- a/config/scripts/ci/unit-selection/dependency-graph/ci-unit-files.mjs +++ b/config/scripts/ci/unit-selection/dependency-graph/ci-unit-files.mjs @@ -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', diff --git a/config/scripts/locale-catalog/locale-translation-policy-ko-round5.test.mjs b/config/scripts/locale-catalog/locale-translation-policy-ko-round5.test.mjs index e03157e0bc6..6d8561bcdcc 100644 --- a/config/scripts/locale-catalog/locale-translation-policy-ko-round5.test.mjs +++ b/config/scripts/locale-catalog/locale-translation-policy-ko-round5.test.mjs @@ -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( diff --git a/config/scripts/locale-catalog/locale-translation-policy.es-round5.test.mjs b/config/scripts/locale-catalog/locale-translation-policy.es-round5.test.mjs deleted file mode 100644 index 3bf5a77fb3a..00000000000 --- a/config/scripts/locale-catalog/locale-translation-policy.es-round5.test.mjs +++ /dev/null @@ -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') - }) -}) diff --git a/config/scripts/locale-catalog/locale-translation-policy.ja-relocalization.test.mjs b/config/scripts/locale-catalog/locale-translation-policy.ja-relocalization.test.mjs index 433a3e4b537..0ab813ce684 100644 --- a/config/scripts/locale-catalog/locale-translation-policy.ja-relocalization.test.mjs +++ b/config/scripts/locale-catalog/locale-translation-policy.ja-relocalization.test.mjs @@ -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', diff --git a/config/scripts/locale-catalog/locale-translation-policy.ja-round5.test.mjs b/config/scripts/locale-catalog/locale-translation-policy.ja-round5.test.mjs deleted file mode 100644 index 1955a9eef24..00000000000 --- a/config/scripts/locale-catalog/locale-translation-policy.ja-round5.test.mjs +++ /dev/null @@ -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 リポジトリ、または多数のリポジトリを含むフォルダー') - }) -}) diff --git a/config/scripts/native-build/linux/verify-linux-glibc-floor.cjs b/config/scripts/native-build/linux/verify-linux-glibc-floor.cjs index a82ff3b1f3e..ab288f7ea91 100644 --- a/config/scripts/native-build/linux/verify-linux-glibc-floor.cjs +++ b/config/scripts/native-build/linux/verify-linux-glibc-floor.cjs @@ -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. diff --git a/config/scripts/orcad-distribution/server-artifact/pack-orcad-server-artifact.mjs b/config/scripts/orcad-distribution/server-artifact/pack-orcad-server-artifact.mjs new file mode 100644 index 00000000000..7dd14db6070 --- /dev/null +++ b/config/scripts/orcad-distribution/server-artifact/pack-orcad-server-artifact.mjs @@ -0,0 +1,273 @@ +#!/usr/bin/env node +// Packs one target's qualified template slot, its pinned Node and a launcher into the server-only +// tarball `orca serve` runs from on hosts without the desktop app. +// node pack-orcad-server-artifact.mjs --template out/orcad-template --target linux-x64-glibc [--out-dir out/orca-server] +import { createHash } from 'node:crypto' +import { + chmodSync, + copyFileSync, + mkdirSync, + readFileSync, + readdirSync, + rmSync, + writeFileSync +} from 'node:fs' +import { dirname, join, relative, resolve } from 'node:path' +import { c as createTar } from 'tar' +import { + ORCAD_NODE_RUNTIME_DIR_PREFIX, + ORCAD_RUNTIMES_DIRNAME, + ORCAD_SERVER_ENTRY_FILENAME, + ORCAD_TEMPLATE_MANIFEST_FILENAME, + ORCAD_TEMPLATE_TARGETS_DIR, + ORCAD_VERSION_FILENAME, + ORCAD_CLI_ENTRY_FILENAME, + orcadNodeRuntimeExecutable, + orcadTemplateCommonFilenames, + orcadTemplateTargetFilenames +} from '../../../../src/shared/orcad-artifacts.ts' +import { ORCAD_LOCAL_SERVE_SELECTION_ENTRY } from '../../../../src/shared/orcad-local-serve-selection.ts' +import { + NODE_RUNTIME_PIN, + nodeRuntimeExecutablePath, + nodeRuntimeReleaseUrl, + pinnedNodeRuntimeAsset +} from '../../../../src/shared/node-runtime-pin.ts' +import { + ensurePinnedNodeExecutable, + fetchPinnedFile, + pinnedNodeCacheDir +} from '../prebuilds/pinned-node-downloads.mjs' +import { extract } from '../../node-runtime/archive-identity/update-node-runtime-pin.mjs' +import { computeOrcadFullVersion } from '../server-bundle/orcad-artifact-version.mjs' +import { assertNotDarkBuild } from '../../../dark-build-switches.cjs' +import { isDirectInvocation } from '../../tool-invocation/script-entry-detection.mjs' + +const root = resolve(import.meta.dirname, '../../../..') +const SLOT_DIR = 'orcad' +const LAUNCHER = 'bin/orca-ide' + +/** Published name without the libc suffix: only glibc slots are published. */ +export function orcaServerArtifactName(target) { + const match = /^(linux|darwin)-(x64|arm64)(?:-glibc)?$/.exec(target) + if (!match) { + throw new Error( + `No server-only artifact for ${target}; use linux-x64-glibc or linux-arm64-glibc` + ) + } + return `orca-server-${match[1]}-${match[2]}` +} + +function sha256(path) { + return createHash('sha256').update(readFileSync(path)).digest('hex') +} + +function isExecutable(filename) { + return /(?:^|\/)(?:rg|spawn-helper)$/.test(filename) +} + +function copyVerified(source, destination, expectedSha256, executable) { + mkdirSync(dirname(destination), { recursive: true }) + copyFileSync(source, destination) + const actual = sha256(destination) + if (actual !== expectedSha256) { + throw new Error(`${source} hashed ${actual}; the template manifest expects ${expectedSha256}`) + } + if (executable) { + chmodSync(destination, 0o755) + } +} + +/** Copies exactly the slot files the desktop deploys over SSH, each checked against the manifest. */ +function stageSlot(templateDir, target, slotDir) { + const manifest = JSON.parse( + readFileSync(join(templateDir, ORCAD_TEMPLATE_MANIFEST_FILENAME), 'utf8') + ) + const targetManifest = manifest.targets?.[target] + if (!targetManifest) { + throw new Error(`${templateDir} has no ${target} slot`) + } + const mobileWebAssets = Object.keys(manifest.commonSha256).filter((name) => + name.startsWith('out/mobile-web/') + ) + const common = orcadTemplateCommonFilenames([]) + const commonFiles = [...new Set([...common, ...mobileWebAssets])] + for (const filename of commonFiles) { + const expected = manifest.commonSha256[filename] + if (!expected) { + throw new Error(`Template manifest omits ${filename}`) + } + copyVerified( + join(templateDir, ...filename.split('/')), + join(slotDir, ...filename.split('/')), + expected, + isExecutable(filename) + ) + } + for (const filename of orcadTemplateTargetFilenames(target)) { + const expected = targetManifest.files?.[filename] + if (!expected) { + throw new Error(`Template manifest omits ${target} ${filename}`) + } + copyVerified( + join(templateDir, ORCAD_TEMPLATE_TARGETS_DIR, target, ...filename.split('/')), + join(slotDir, ...filename.split('/')), + expected, + isExecutable(filename) + ) + } + // Hashed like a desktop slot without the optional browser, which this tarball omits. + const version = computeOrcadFullVersion(slotDir, { target, agentBrowserFilename: null }) + writeFileSync(join(slotDir, ORCAD_VERSION_FILENAME), `${version}\n`) + return version +} + +// Why sh: it must run before any Node exists on the host. ELECTRON_RUN_AS_NODE=1 is how the packaged +// app's CLI runs, and the CLI strips it from the server's environment; the other two would point +// `serve` at a desktop app this install does not have. +function launcherScript(nodeRelativePath) { + return `#!/bin/sh +# Orca server-only launcher: runs the bundled Orca CLI under the bundled Node. +set -e +self=$0 +if command -v readlink >/dev/null 2>&1 && resolved=$(readlink -f -- "$self" 2>/dev/null); then + self=$resolved +fi +root=$(CDPATH= cd -- "$(dirname -- "$self")/.." && pwd -P) +node="$root/${nodeRelativePath}" +unset ORCA_APP_EXECUTABLE ORCA_SERVE_RUNTIME +ELECTRON_RUN_AS_NODE=1 +export ELECTRON_RUN_AS_NODE +exec "$node" "$root/${SLOT_DIR}/${ORCAD_CLI_ENTRY_FILENAME}" "$@" +` +} + +// The CLI asks `/out/main/.js` which server to run; here the answer is fixed. +function selectionEntryScript() { + return `'use strict' +// Answers \`orca serve\`'s runtime question for the server-only artifact (src/shared/orcad-local-serve-selection.ts). +const { readFileSync } = require('node:fs') +const { join } = require('node:path') +const flag = process.argv.indexOf('--app-root') +const root = flag === -1 ? join(__dirname, '..', '..', '..') : process.argv[flag + 1] +const slot = join(root, ${JSON.stringify(SLOT_DIR)}) +let selection +try { + const version = readFileSync(join(slot, ${JSON.stringify(ORCAD_VERSION_FILENAME)}), 'utf8').trim() + selection = { kind: 'orcad', runtime: process.execPath, entry: join(slot, ${JSON.stringify(ORCAD_SERVER_ENTRY_FILENAME)}), version } +} catch (error) { + process.stderr.write('This Orca server install is incomplete; extract the release archive again.\\n') + process.exit(1) +} +process.stdout.write('ORCA_SERVE_RUNTIME ' + JSON.stringify(selection) + '\\n') +` +} + +/** Node's notice ships with its binary; it comes from the same hash-checked archive. */ +async function copyNodeLicense(target, destination) { + const asset = pinnedNodeRuntimeAsset(target) + const cacheDir = pinnedNodeCacheDir() + const archive = await fetchPinnedFile({ + url: nodeRuntimeReleaseUrl(asset.source, asset.archive), + destination: join(cacheDir, asset.archive), + sha256: asset.archiveSha256 + }) + const topLevel = nodeRuntimeExecutablePath(target, asset.archive).replace(/\/bin\/node$/, '') + const extractDir = join(cacheDir, `license-${asset.archiveSha256.slice(0, 12)}`) + extract(archive, extractDir, `${topLevel}/LICENSE`) + copyFileSync(join(extractDir, topLevel, 'LICENSE'), destination) +} + +function listEntries(dir, base = dir) { + const entries = [] + for (const name of readdirSync(dir, { withFileTypes: true }).sort((a, b) => + a.name < b.name ? -1 : a.name > b.name ? 1 : 0 + )) { + const path = join(dir, name.name) + entries.push(relative(base, path)) + if (name.isDirectory()) { + entries.push(...listEntries(path, base)) + } + } + return entries +} + +export async function packOrcaServerArtifact({ templateDir, target, outDir }) { + // A dark build's template must never ship as a server either. + assertNotDarkBuild([templateDir]) + const name = orcaServerArtifactName(target) + const { version: appVersion } = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')) + const topDir = `orca-server-${appVersion}-${name.slice('orca-server-'.length)}` + const stagingRoot = join(outDir, '.staging') + const staging = join(stagingRoot, topDir) + rmSync(stagingRoot, { recursive: true, force: true }) + mkdirSync(staging, { recursive: true }) + + const orcadVersion = stageSlot(templateDir, target, join(staging, SLOT_DIR)) + const runtimeAsset = pinnedNodeRuntimeAsset(target) + const nodeRelativePath = [ + ORCAD_RUNTIMES_DIRNAME, + `${ORCAD_NODE_RUNTIME_DIR_PREFIX}${runtimeAsset.executableSha256}`, + orcadNodeRuntimeExecutable(target) + ].join('/') + copyVerified( + await ensurePinnedNodeExecutable({ target }), + join(staging, ...nodeRelativePath.split('/')), + runtimeAsset.executableSha256, + true + ) + const launcher = join(staging, ...LAUNCHER.split('/')) + mkdirSync(dirname(launcher), { recursive: true }) + writeFileSync(launcher, launcherScript(nodeRelativePath), { mode: 0o755 }) + chmodSync(launcher, 0o755) + const selectionEntry = join(staging, 'out', 'main', `${ORCAD_LOCAL_SERVE_SELECTION_ENTRY}.js`) + mkdirSync(dirname(selectionEntry), { recursive: true }) + writeFileSync(selectionEntry, selectionEntryScript()) + writeFileSync( + join(staging, 'VERSION'), + `orca ${appVersion}\norcad ${orcadVersion}\nnode ${NODE_RUNTIME_PIN.version}\ntarget ${target}\n` + ) + copyFileSync(join(root, 'LICENSE'), join(staging, 'LICENSE')) + await copyNodeLicense(target, join(staging, ORCAD_RUNTIMES_DIRNAME, 'NODE-LICENSE')) + + const archive = join(outDir, `${name}.tar.gz`) + rmSync(archive, { force: true }) + createTar( + { + file: archive, + sync: true, + cwd: stagingRoot, + gzip: { level: 9 }, + portable: true, + noDirRecurse: true, + // Fixed mtime: rebuilding the same tag yields the same bytes. + mtime: new Date(Number(process.env.SOURCE_DATE_EPOCH ?? 0) * 1000) + }, + [topDir, ...listEntries(staging).map((entry) => `${topDir}/${entry}`)] + ) + rmSync(stagingRoot, { recursive: true, force: true }) + const digest = sha256(archive) + writeFileSync(`${archive}.sha256`, `${digest} ${name}.tar.gz\n`) + return { archive, sha256: digest, topDir, orcadVersion } +} + +function argument(argv, name) { + const index = argv.indexOf(name) + return index === -1 ? null : (argv[index + 1] ?? null) +} + +if (isDirectInvocation(import.meta.url, process.argv[1])) { + const templateDir = argument(process.argv, '--template') + const target = argument(process.argv, '--target') + if (!templateDir || !target) { + throw new Error( + 'Usage: pack-orcad-server-artifact.mjs --template --target [--out-dir ]' + ) + } + const result = await packOrcaServerArtifact({ + templateDir: resolve(templateDir), + target, + outDir: resolve(argument(process.argv, '--out-dir') ?? join(root, 'out', 'orca-server')) + }) + process.stdout.write(`${JSON.stringify(result)}\n`) +} diff --git a/config/scripts/orcad-distribution/server-artifact/smoke-orcad-server-artifact.mjs b/config/scripts/orcad-distribution/server-artifact/smoke-orcad-server-artifact.mjs new file mode 100644 index 00000000000..c4c96330aac --- /dev/null +++ b/config/scripts/orcad-distribution/server-artifact/smoke-orcad-server-artifact.mjs @@ -0,0 +1,135 @@ +#!/usr/bin/env node +// Installs a server-only tarball the documented way, starts `orca serve --recipe-json`, then pairs a +// second CLI profile with the printed code. Uses only node: builtins so the archive's own Node can run it +// on an image that has nothing else. +// node smoke-orcad-server-artifact.mjs --archive out/orca-server/orca-server-linux-x64.tar.gz +import { execFileSync, spawnSync } from 'node:child_process' +import { createHash } from 'node:crypto' +import { + closeSync, + existsSync, + mkdirSync, + mkdtempSync, + openSync, + readFileSync, + rmSync +} from 'node:fs' +import { tmpdir } from 'node:os' +import { basename, join, resolve } from 'node:path' + +const argv = process.argv.slice(2) +const archiveArg = argv[argv.indexOf('--archive') + 1] +if (!argv.includes('--archive') || !archiveArg) { + fail('Usage: smoke-orcad-server-artifact.mjs --archive ') +} +const archive = resolve(archiveArg) +const work = mkdtempSync(join(tmpdir(), 'orca-server-smoke-')) +const install = join(work, 'install') +const projectRoot = join(work, 'project') +const serverProfile = join(work, 'server-profile') +const clientProfile = join(work, 'client-profile') +// Linux names the CLI orca-ide, like the desktop package. +const orca = join(install, 'bin', 'orca-ide') + +try { + verifyChecksum() + for (const dir of [install, projectRoot, serverProfile, clientProfile]) { + mkdirSync(dir, { recursive: true }) + } + execFileSync('tar', ['-xzf', archive, '-C', install, '--strip-components=1'], { + stdio: 'inherit' + }) + const version = run([orca, '--version'], serverProfile) + assert(version.status === 0, `orca --version failed:\n${version.stderr}`) + console.log(`installed ${version.stdout.trim()}`) + + const started = Date.now() + const serve = run( + [orca, 'serve', '--recipe-json', '--project-root', projectRoot, '--port', '0'], + serverProfile, + { timeout: 120_000 } + ) + assert(serve.status === 0, `serve --recipe-json exited ${serve.status}:\n${serve.stderr}`) + const recipe = JSON.parse(serve.stdout.trim().split('\n').at(-1)) + const pairingCode = recipe.pairingCode ?? recipe.connection?.pairingCode + assert( + typeof pairingCode === 'string' && pairingCode.length > 0, + `no pairing code: ${serve.stdout}` + ) + assert( + (recipe.projectRoot ?? recipe.connection?.projectRoot) === projectRoot, + `recipe JSON names another project root: ${serve.stdout}` + ) + console.log(`PASS serve --recipe-json printed a pairing code in ${Date.now() - started} ms`) + + const status = run([orca, '--pairing-code', pairingCode, 'status', '--json'], clientProfile, { + timeout: 60_000 + }) + assert(status.status === 0, `paired status failed:\n${status.stderr}\n${status.stdout}`) + const result = JSON.parse(status.stdout).result ?? {} + assert( + result.runtime?.state === 'ready' && result.runtime?.reachable !== false, + `paired client did not reach a ready server: ${status.stdout}` + ) + console.log( + `PASS a second profile paired and saw runtime ${result.runtime.runtimeId ?? ''} ready` + ) +} finally { + stopServersFrom(install) + rmSync(work, { recursive: true, force: true }) +} + +function verifyChecksum() { + const sums = `${archive}.sha256` + if (!existsSync(sums)) { + return + } + const [expected, name] = readFileSync(sums, 'utf8').trim().split(/\s+/) + const actual = createHash('sha256').update(readFileSync(archive)).digest('hex') + assert(name === basename(archive) && actual === expected, `${archive} does not match ${sums}`) + console.log('PASS checksum') +} + +// stderr goes to a file: the detached server keeps it open, and a pipe would hold spawnSync until timeout. +function run(command, profile, { timeout = 30_000 } = {}) { + const [program, ...args] = command + const log = join(work, `${basename(profile)}.stderr.log`) + const fd = openSync(log, 'a') + try { + const result = spawnSync(program, args, { + cwd: projectRoot, + encoding: 'utf8', + timeout, + stdio: ['ignore', 'pipe', fd], + env: { ...process.env, ORCA_USER_DATA_PATH: profile, ORCA_BACKGROUND_LAUNCH: '1' } + }) + return { ...result, stderr: readFileSync(log, 'utf8').slice(-4000) } + } finally { + closeSync(fd) + } +} + +// --recipe-json leaves the server running on purpose; this smoke must not. +function stopServersFrom(dir) { + const listing = spawnSync('ps', ['-eo', 'pid=,args='], { encoding: 'utf8' }) + for (const line of (listing.stdout ?? '').split('\n')) { + const match = /^\s*(\d+)\s+(.*)$/.exec(line) + if (match && match[2].includes(dir) && Number(match[1]) !== process.pid) { + try { + process.kill(Number(match[1]), 'SIGKILL') + } catch {} + } + } +} + +function assert(condition, message) { + if (!condition) { + fail(message) + } +} + +function fail(message) { + console.error(`FAIL ${message}`) + process.exitCode = 1 + throw new Error(message) +} diff --git a/config/scripts/orcad-distribution/server-bundle/orcad-child-artifacts.test.mjs b/config/scripts/orcad-distribution/server-bundle/orcad-child-artifacts.test.mjs deleted file mode 100644 index 0ab57b04a53..00000000000 --- a/config/scripts/orcad-distribution/server-bundle/orcad-child-artifacts.test.mjs +++ /dev/null @@ -1,12 +0,0 @@ -import { expect, it } from 'vitest' -import { ORCAD_ARTIFACTS } from '../../../../src/shared/orcad-artifacts.ts' -import { ORCAD_CHILD_ENTRY_POINTS, orcadChildOutputFilename } from './orcad-entry-build.mjs' - -// A child built but not listed never reaches remote hosts, so its client fails there. -it.each(Object.entries(ORCAD_CHILD_ENTRY_POINTS))( - 'ships the %s child bundle as an orcad artifact', - (_name, entryPoint) => { - const filenames = ORCAD_ARTIFACTS.map((artifact) => artifact.filename) - expect(filenames).toContain(orcadChildOutputFilename(entryPoint)) - } -) diff --git a/config/scripts/performance/agent-lineage/agent-inspection-cadence-batching-benchmark.mjs b/config/scripts/performance/agent-lineage/agent-inspection-cadence-batching-benchmark.mjs deleted file mode 100644 index ac0f0ec31af..00000000000 --- a/config/scripts/performance/agent-lineage/agent-inspection-cadence-batching-benchmark.mjs +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env node -// Measure real cadence picker against independent ±10% jitter over simulated time. -// TTL-deduped same-tick work shares one capture, so count distinct wake instants rather than pane wakes. -import { spawnSync } from 'node:child_process' -import fs from 'node:fs' -import nodeModule from 'node:module' -import path from 'node:path' -import process from 'node:process' -import { fileURLToPath, pathToFileURL } from 'node:url' - -if (!process.execArgv.includes('--experimental-transform-types')) { - const result = spawnSync( - process.execPath, - ['--experimental-transform-types', '--no-warnings', import.meta.filename], - { stdio: 'inherit' } - ) - process.exit(result.status ?? 1) -} - -nodeModule.registerHooks({ - resolve(specifier, context, nextResolve) { - if (specifier.startsWith('.') && !/\.[cm]?[jt]s$/.test(specifier) && context.parentURL) { - const candidate = new URL(`${specifier}.ts`, context.parentURL) - if (fs.existsSync(fileURLToPath(candidate))) { - return { url: candidate.href, shortCircuit: true } - } - } - return nextResolve(specifier, context) - } -}) - -const ROOT = path.resolve(import.meta.dirname, '../../../..') -const WINDOW_MS = Number(process.env.ORCA_INSPECTION_BENCH_WINDOW_MS ?? '60000') -const PANE_COUNTS = (process.env.ORCA_INSPECTION_BENCH_PANES ?? '1,2,4,8') - .split(',') - .map((value) => Number(value.trim())) - -if (!Number.isSafeInteger(WINDOW_MS) || WINDOW_MS <= 0) { - throw new Error(`ORCA_INSPECTION_BENCH_WINDOW_MS must be a positive integer, got ${WINDOW_MS}`) -} -for (const paneCount of PANE_COUNTS) { - if (!Number.isSafeInteger(paneCount) || paneCount <= 0) { - throw new Error(`ORCA_INSPECTION_BENCH_PANES entries must be positive, got ${paneCount}`) - } -} - -const { nextCadenceInspectionDelayMs } = await import( - pathToFileURL( - path.join( - ROOT, - 'src/renderer/src/components/terminal-pane/agent-completion/agent-completion-poll-interval.ts' - ) - ).href -) -const { POLL_TIER_INTERVAL_MS } = await import( - pathToFileURL( - path.join( - ROOT, - 'src/renderer/src/components/terminal-pane/agent-completion/agent-completion-poll-cadence.ts' - ) - ).href -) -const { PROCESS_TABLE_SNAPSHOT_MAX_STALENESS_MS } = await import( - pathToFileURL(path.join(ROOT, 'src/shared/process-table-snapshot-reader.ts')).href -) - -// Pre-change: independent ±10% jitter per pane, re-rolled on every reschedule. -function baselineDelayMs(baseMs) { - return Math.round(baseMs * (1 + (Math.random() * 0.2 - 0.1))) -} - -function simulate(paneCount, baseMs, pickDelay) { - const startedAt = 1_700_000_000_000 - const wakes = [] - for (let pane = 0; pane < paneCount; pane += 1) { - // Panes mount at arbitrary moments, which is what spreads them apart in the first place. - let clock = startedAt + Math.floor(Math.random() * baseMs) - while ((clock += pickDelay(baseMs, clock)) < startedAt + WINDOW_MS) { - wakes.push(clock) - } - } - // Snapshot TTL starts at actual capture, not epoch grid; nearby wakes reuse it. - let captures = 0 - let snapshotExpiresAt = -Infinity - for (const wakeAt of wakes.sort((left, right) => left - right)) { - if (wakeAt >= snapshotExpiresAt) { - captures += 1 - snapshotExpiresAt = wakeAt + PROCESS_TABLE_SNAPSHOT_MAX_STALENESS_MS - } - } - return captures -} - -function medianOf(rounds, run) { - const samples = Array.from({ length: rounds }, run).sort((left, right) => left - right) - return samples[Math.floor(samples.length / 2)] -} - -const baseMs = POLL_TIER_INTERVAL_MS.idle -console.log( - `Agent-completion cadence — whole-host \`ps\` captures over ${WINDOW_MS / 1000}s at the idle tier (${baseMs}ms)\n` -) -console.log('| visible panes | before | after | reduction |') -console.log('| --- | --- | --- | --- |') -for (const paneCount of PANE_COUNTS) { - const before = medianOf(21, () => simulate(paneCount, baseMs, baselineDelayMs)) - const after = medianOf(21, () => - simulate(paneCount, baseMs, (base, now) => - nextCadenceInspectionDelayMs({ - baseMs: base, - hasConsecutiveErrors: false, - alignToSharedGrid: true, - now - }) - ) - ) - // Short windows may yield no baseline captures; avoid meaningless division by zero. - const reduction = before > 0 ? `${(((before - after) / before) * 100).toFixed(0)}%` : 'n/a' - console.log(`| ${paneCount} | ${before} | ${after} | ${reduction} |`) -} - -// Detection latency must not regress: the grid deadline is always within one interval. -let worstDelay = 0 -for (let sample = 0; sample < 100_000; sample += 1) { - const now = 1_700_000_000_000 + sample * 7 - worstDelay = Math.max( - worstDelay, - nextCadenceInspectionDelayMs({ - baseMs, - hasConsecutiveErrors: false, - alignToSharedGrid: true, - now - }) - ) -} -if (worstDelay > baseMs) { - throw new Error(`grid alignment delayed a poll to ${worstDelay}ms, above the ${baseMs}ms tier`) -} -console.log( - `\nWorst observed wait: ${worstDelay}ms (tier interval ${baseMs}ms) — no inspection is ever delayed.` -) diff --git a/config/scripts/performance/agent-lineage/agent-lineage-cycle-cleanup-benchmark.mjs b/config/scripts/performance/agent-lineage/agent-lineage-cycle-cleanup-benchmark.mjs deleted file mode 100644 index 0693bc025a0..00000000000 --- a/config/scripts/performance/agent-lineage/agent-lineage-cycle-cleanup-benchmark.mjs +++ /dev/null @@ -1,90 +0,0 @@ -// Run: node --expose-gc config/scripts/agent-lineage-cycle-cleanup-benchmark.mjs [baseline-ref] -import assert from 'node:assert/strict' -import { execFileSync } from 'node:child_process' -import { readFile } from 'node:fs/promises' -import { performance } from 'node:perf_hooks' -import { transform } from 'esbuild' -import { buildCounterbalancedSchedule } from '../measurement/counterbalanced-benchmark-schedule.mjs' - -const sourcePath = 'src/renderer/src/components/dashboard/agent-row-lineage-model.ts' -const baseline = process.argv[2] ?? '20ab9950654' -const beforeSource = execFileSync('git', ['show', `${baseline}:${sourcePath}`], { - encoding: 'utf8', - windowsHide: true -}) -async function load(source) { - const { code } = await transform(source, { loader: 'ts', format: 'esm' }) - return (await import(`data:text/javascript;base64,${Buffer.from(code).toString('base64')}`)) - .buildAgentRowLineageTree -} -const before = await load(beforeSource) -const after = await load(await readFile(sourcePath, 'utf8')) - -function row(index, parent) { - return { - paneKey: `pane-${index}`, - entry: { - terminalHandle: `term-${index}`, - orchestration: parent === undefined ? undefined : { parentPaneKey: `pane-${parent}` } - } - } -} - -// Exercise duplicate keys, disconnected cycles, missing parents, and handle fallback. -let seed = 7391 -function random(max) { - seed = (Math.imul(seed, 1664525) + 1013904223) >>> 0 - return seed % max -} -for (let sample = 0; sample < 500; sample++) { - const rows = Array.from({ length: 40 }, () => { - const value = row(random(30), random(40)) - value.entry.orchestration.parentTerminalHandle = `term-${random(40)}` - value.entry.orchestration.coordinatorHandle = `term-${random(40)}` - return value - }) - if (sample % 2 === 0) { - rows.unshift(row('root', undefined)) - } - assert.deepEqual(after(rows), before(rows)) -} - -const results = [] -for (const [topology, count] of [ - ['flat', 1000], - ['all-cycles', 1000], - ['mixed-cycles', 100], - ['mixed-cycles', 500], - ['mixed-cycles', 1000] -]) { - const rows = Array.from({ length: count }, (_, index) => - row(index, topology === 'flat' ? undefined : index ^ 1) - ) - if (topology === 'mixed-cycles') { - rows.unshift(row('root', undefined)) - } - assert.deepEqual(after(rows), before(rows)) - for (let warmup = 0; warmup < 30; warmup++) { - before(rows) - after(rows) - } - const samples = { before: [], after: [] } - for (const pair of buildCounterbalancedSchedule(8, 'before', 'after')) { - for (const arm of pair) { - global.gc?.() - const run = arm === 'before' ? before : after - const cpu = process.cpuUsage() - const start = performance.now() - for (let iteration = 0; iteration < 30; iteration++) { - run(rows) - } - const wallMs = (performance.now() - start) / 30 - const used = process.cpuUsage(cpu) - samples[arm].push({ wallMs, cpuMs: (used.user + used.system) / 30_000 }) - } - } - results.push({ topology, count, samples }) -} -console.log( - JSON.stringify({ baseline, node: process.version, parityGraphs: 500, results }, null, 2) -) diff --git a/config/scripts/performance/agent-lineage/agent-lineage-reachability-benchmark.mjs b/config/scripts/performance/agent-lineage/agent-lineage-reachability-benchmark.mjs deleted file mode 100644 index bf881a2be79..00000000000 --- a/config/scripts/performance/agent-lineage/agent-lineage-reachability-benchmark.mjs +++ /dev/null @@ -1,118 +0,0 @@ -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { performance } from 'node:perf_hooks' -import { transform } from 'esbuild' -import { buildCounterbalancedSchedule } from '../measurement/counterbalanced-benchmark-schedule.mjs' -import { summarizeBenchmarkSamples } from '../measurement/benchmark-sample-summary.mjs' - -// git show :src/renderer/src/components/dashboard/agent-row-lineage-model.ts | node config/scripts/agent-lineage-reachability-benchmark.mjs -async function load(source) { - const { code } = await transform(source, { loader: 'ts', format: 'esm' }) - return (await import(`data:text/javascript;base64,${Buffer.from(code).toString('base64')}`)) - .buildAgentRowLineageTree -} -const implementations = { - before: await load(readFileSync(0, 'utf8')), - after: await load( - readFileSync('src/renderer/src/components/dashboard/agent-row-lineage-model.ts', 'utf8') - ) -} -function orderedTree(tree) { - return { - roots: tree.rootRows, - children: [...tree.childrenByParentPaneKey], - childKeys: [...tree.childPaneKeys] - } -} - -let seed = 42 -const random = (max) => { - seed = (Math.imul(seed, 1664525) + 1013904223) >>> 0 - return Math.floor((seed / 2 ** 32) * max) -} -let differentialCases = 0 -for (let trial = 0; trial < 5000; trial += 1) { - const count = random(100) - const rows = Object.freeze( - Array.from({ length: count }, (_, index) => - Object.freeze({ - paneKey: `pane-${random(count + 4)}`, - index, - entry: Object.freeze({ - terminalHandle: random(2) ? `term-${random(count)}` : undefined, - orchestration: Object.freeze({ - parentPaneKey: random(3) ? `pane-${random(count + 4)}` : undefined, - parentTerminalHandle: random(2) ? `term-${random(count)}` : undefined, - coordinatorHandle: random(2) ? `term-${random(count)}` : undefined - }) - }) - }) - ) - ) - assert.deepEqual( - orderedTree(implementations.after(rows)), - orderedTree(implementations.before(rows)) - ) - differentialCases += 1 -} - -const results = [] -for (const count of [8, 32, 128, 512, 1024]) { - for (const topology of ['flat', 'fanout', 'balanced', 'chain']) { - const rows = Array.from({ length: count }, (_, index) => { - const parent = - topology === 'fanout' - ? 0 - : topology === 'balanced' - ? Math.floor((index - 1) / 4) - : index - 1 - return { - paneKey: `pane-${index}`, - entry: { - orchestration: - index > 0 && topology !== 'flat' ? { parentPaneKey: `pane-${parent}` } : undefined - } - } - }) - const expected = orderedTree(implementations.before(rows)) - assert.deepEqual(orderedTree(implementations.after(rows)), expected) - const iterations = Math.max(5, Math.floor(10_000 / count)) - for (let warmup = 0; warmup < 20; warmup += 1) { - implementations.before(rows) - implementations.after(rows) - } - /** @type {{ before: number[], after: number[] }} */ - const samples = { before: [], after: [] } - for (const pair of buildCounterbalancedSchedule(8, 'before', 'after')) { - for (const arm of pair) { - let result - const started = performance.now() - for (let repeat = 0; repeat < iterations; repeat += 1) { - result = implementations[arm](rows) - } - samples[arm].push(performance.now() - started) - assert.deepEqual(orderedTree(result), expected) - } - } - results.push({ - count, - topology, - iterations, - meanMicrosecondsPerTree: Object.fromEntries( - Object.entries(samples).map(([arm, values]) => [ - arm, - (values.reduce((sum, ms) => sum + ms, 0) * 1000) / values.length / iterations - ]) - ), - before: summarizeBenchmarkSamples(samples.before), - after: summarizeBenchmarkSamples(samples.after) - }) - } -} -console.log( - JSON.stringify( - { node: process.version, platform: process.platform, differentialCases, results }, - null, - 2 - ) -) diff --git a/config/scripts/performance/agent-lineage/agent-status-hot-path-benchmark.ts b/config/scripts/performance/agent-lineage/agent-status-hot-path-benchmark.ts deleted file mode 100644 index 774c2411787..00000000000 --- a/config/scripts/performance/agent-lineage/agent-status-hot-path-benchmark.ts +++ /dev/null @@ -1,255 +0,0 @@ -// Compare identical benchmark APIs on baseline/candidate; separate instrumented allocation counts from clean timing to avoid patch-induced deoptimization. -// Run: ORCA_BACKGROUND_LAUNCH=1 pnpm exec vitest run --config config/vitest.agent-status-benchmark.config.ts -// Reported-user scale: 423 worktrees/634 tabs, rather than the 100-worktree fixture. -import { writeFileSync } from 'node:fs' -import { tmpdir } from 'node:os' -import { join } from 'node:path' -import { describe, expect, it } from 'vitest' -import type { AppState } from '@/store/types' -import type { AgentStatusBatchUpdate } from '@/store/slices/agent-status/agent-status-contract' -import '@/store/slices/agent-status/agent-status' -import { MAX_LIVE_AGENT_STATUSES } from '@/store/slices/agent-status/agent-status-capacity-eviction' -import type { createTestStore } from '@/store/testing/app-store-test-fixture' -import { - createAgentStatusPaneRoutingIndex, - resolvePaneKeyFromRoutingIndex -} from '@/hooks/ipc-events/agent-status-pane-routing-index' -import { buildAgentStatusScaleFixture } from '@/store/slices/agent-status/agent-status-scale.test-fixture' -import { resolvePaneKey } from '@/hooks/ipc-events/agent-status-routing' - -const WORKTREES = 423 -const EVENTS = 1_000 -const BATCH_SIZE = 8 -const BASE_TIME = 2_000_000_000 - -const counters = { maps: 0, sets: 0, tabComparisons: 0 } - -const NativeMap = globalThis.Map -const NativeSet = globalThis.Set - -function withAllocationCounting(run: () => T): T { - class CountingMap extends NativeMap { - constructor(entries?: Iterable | null) { - super(entries) - counters.maps += 1 - } - } - class CountingSet extends NativeSet { - constructor(values?: Iterable | null) { - super(values) - counters.sets += 1 - } - } - counters.maps = 0 - counters.sets = 0 - globalThis.Map = CountingMap - globalThis.Set = CountingSet - try { - return run() - } finally { - globalThis.Map = NativeMap - globalThis.Set = NativeSet - } -} - -function buildFixture(countTabIteration: boolean) { - const fixture = buildAgentStatusScaleFixture( - countTabIteration - ? () => { - counters.tabComparisons += 1 - } - : undefined - ) - fixture.store.setState({ setGeneratedTabTitlesFromAgentPrompts: () => {} }) - return fixture -} - -function measure(run: () => void): number { - const start = performance.now() - run() - return performance.now() - start -} - -function per1k(value: number): number { - return Math.round((value / EVENTS) * 1000) -} - -/** One burst-shaped pass: a fresh index per batch, one pane resolution per event. */ -function runIndexedRouting(store: ReturnType, paneKeys: string[]): void { - for (let event = 0; event < EVENTS; event += 1) { - if (event % BATCH_SIZE === 0) { - store.setState({ agentStatusEpoch: event }) - } - const index = createAgentStatusPaneRoutingIndex(store.getState()) - resolvePaneKeyFromRoutingIndex(index, paneKeys[event % paneKeys.length]) - } -} - -function runStandaloneRouting(state: AppState, paneKeys: string[]): void { - for (let event = 0; event < EVENTS; event += 1) { - resolvePaneKey(state, paneKeys[event % paneKeys.length]) - } -} - -function buildBatches( - owners: { tabId: string; worktreeId: string }[], - paneKeys: string[] -): AgentStatusBatchUpdate[][] { - const batches: AgentStatusBatchUpdate[][] = [] - for (let event = 0; event < EVENTS; event += 1) { - const batchIndex = Math.floor(event / BATCH_SIZE) - const owner = owners[event % owners.length] - batches[batchIndex] ??= [] - batches[batchIndex].push({ - paneKey: paneKeys[event % paneKeys.length], - payload: { state: 'working', prompt: `turn ${event}`, agentType: 'claude' }, - timing: { updatedAt: BASE_TIME + event, stateStartedAt: BASE_TIME + event }, - routing: { tabId: owner.tabId, worktreeId: owner.worktreeId } - }) - } - return batches -} - -const nextTick = (): Promise => - new Promise((resolve) => { - queueMicrotask(resolve) - }) - -async function runCommitPass( - store: ReturnType, - batches: AgentStatusBatchUpdate[][], - onBatch?: (elapsed: number) => void -): Promise { - for (const batch of batches) { - const elapsed = measure(() => { - store.getState().setAgentStatuses(batch) - }) - onBatch?.(elapsed) - // Each 33 ms burst is its own tick in production; let the deferred freshness scan run. - await nextTick() - } -} - -describe('agent-status hot path benchmark', () => { - it('reports routing, resolution and commit cost at 423 worktrees', async () => { - const report: Record = {} - const fixture = buildFixture(false) - const index = createAgentStatusPaneRoutingIndex(fixture.store.getState()) - for (const [position, paneKey] of fixture.paneKeys.entries()) { - const resolved = resolvePaneKeyFromRoutingIndex(index, paneKey) - expect(resolved).toMatchObject({ - exists: true, - owningWorktreeId: fixture.owners[position].worktreeId - }) - expect(resolved).toEqual(resolvePaneKey(fixture.store.getState(), paneKey)) - } - - { - const alloc = buildFixture(false) - withAllocationCounting(() => runIndexedRouting(alloc.store, alloc.paneKeys)) - report['routing.indexed.mapAllocationsPer1kEvents'] = per1k(counters.maps) - report['routing.indexed.setAllocationsPer1kEvents'] = per1k(counters.sets) - - const warm = buildFixture(false) - runIndexedRouting(warm.store, warm.paneKeys) - const clean = buildFixture(false) - report['routing.indexed.ms'] = Number( - measure(() => runIndexedRouting(clean.store, clean.paneKeys)).toFixed(2) - ) - } - - { - const alloc = buildFixture(true) - counters.tabComparisons = 0 - withAllocationCounting(() => runStandaloneRouting(alloc.store.getState(), alloc.paneKeys)) - report['routing.standalone.tabComparisonsPer1kEvents'] = per1k(counters.tabComparisons) - report['routing.standalone.mapAllocationsPer1kEvents'] = per1k(counters.maps) - - const warm = buildFixture(false) - runStandaloneRouting(warm.store.getState(), warm.paneKeys) - const clean = buildFixture(false) - report['routing.standalone.ms'] = Number( - measure(() => runStandaloneRouting(clean.store.getState(), clean.paneKeys)).toFixed(2) - ) - } - - { - const alloc = buildFixture(true) - counters.tabComparisons = 0 - runIndexedRouting(alloc.store, alloc.paneKeys) - report['routing.indexed.tabComparisonsPer1kEvents'] = per1k(counters.tabComparisons) - } - - // Store commits: 1,000 updates folded in 125 transactions, one microtask tick per transaction. - { - const counted = buildFixture(false) - const nativeObjectAssign = Object.assign - const nativeObjectValues = Object.values - let objectAssignCalls = 0 - let objectAssignPropertyCopies = 0 - let freshnessEntryVisits = 0 - // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: `Object.assign` is an overload set no single arrow can satisfy; this wrapper only counts calls and forwards every argument to the captured native implementation. - Object.assign = (( - target: Record, - ...sources: readonly Record[] - ) => { - objectAssignCalls += 1 - for (const source of sources) { - if (source && typeof source === 'object') { - objectAssignPropertyCopies += Object.keys(source).length - } - } - return nativeObjectAssign(target, ...sources) - }) as typeof Object.assign - // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: same overload-set limit as the `Object.assign` wrapper above; this one counts visited entries and returns the native result unchanged. - Object.values = ((value: Record) => { - const result = nativeObjectValues(value) - freshnessEntryVisits += result.length - return result - }) as typeof Object.values - const countedBatches = buildBatches(counted.owners, counted.paneKeys) - try { - await runCommitPass(counted.store, countedBatches) - } finally { - Object.assign = nativeObjectAssign - Object.values = nativeObjectValues - } - report['commit.objectAssignCallsPer1kUpdates'] = per1k(objectAssignCalls) - report['commit.stagedPropertyCopiesPer1kUpdates'] = per1k(objectAssignPropertyCopies) - report['commit.freshnessEntryVisitsPer1kUpdates'] = per1k(freshnessEntryVisits) - report['commit.transactions'] = countedBatches.length - const committed = counted.store.getState().agentStatusByPaneKey - const expected = new Map( - countedBatches - .flat() - .slice(-MAX_LIVE_AGENT_STATUSES) - .map((update) => [update.paneKey, update]) - ) - expect(Object.keys(committed).sort()).toEqual([...expected.keys()].sort()) - for (const [paneKey, update] of expected) { - expect(committed[paneKey]).toMatchObject({ - ...update.payload, - ...update.timing, - ...update.routing - }) - } - - const warm = buildFixture(false) - await runCommitPass(warm.store, buildBatches(warm.owners, warm.paneKeys)) - const clean = buildFixture(false) - let elapsed = 0 - await runCommitPass(clean.store, buildBatches(clean.owners, clean.paneKeys), (batchMs) => { - elapsed += batchMs - }) - report['commit.ms'] = Number(elapsed.toFixed(2)) - } - - const outputPath = - process.env.ORCA_AGENT_STATUS_BENCH_OUTPUT ?? - join(tmpdir(), 'agent-status-hot-path-benchmark.json') - writeFileSync( - outputPath, - `${JSON.stringify({ worktrees: WORKTREES, events: EVENTS, report }, null, 2)}\n` - ) - }) -}) diff --git a/config/scripts/performance/claude-usage/claude-usage-cache-representation-check.mjs b/config/scripts/performance/claude-usage/claude-usage-cache-representation-check.mjs deleted file mode 100644 index 212ec5a974b..00000000000 --- a/config/scripts/performance/claude-usage/claude-usage-cache-representation-check.mjs +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/bin/env node -import assert from 'node:assert/strict' -import { appendFile, mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises' -import { createHash } from 'node:crypto' -import { tmpdir } from 'node:os' -import { join } from 'node:path' -import { fileURLToPath } from 'node:url' -import { parseArgs } from 'node:util' -import { runProcessSync } from '@orca/process-host' -import { - loadClaudeUsageBenchmarkScanner, - readClaudeUsageBenchmarkBaselineSources -} from './claude-usage-benchmark-scanner.mjs' - -const ROOT = fileURLToPath(new URL('../../../..', import.meta.url)) -const STORE_PATH = 'src/main/claude-usage/store.ts' -const { values } = parseArgs({ - options: { - 'baseline-ref': { type: 'string', default: '51e7181850b022bae2d41091fe1229accef4bd50' }, - 'usage-keys': { type: 'string', default: '16384' }, - output: { type: 'string' } - } -}) -const usageKeys = Number(values['usage-keys']) -assert( - Number.isSafeInteger(usageKeys) && usageKeys > 7, - 'usage-keys must be an integer above seven' -) -process.env.ORCA_CLAUDE_USAGE_APPEND_BENCH_BASELINE = values['baseline-ref'] - -function serializationIndent(source) { - const indent = /jsonIndent:\s*(\d+)/.exec(source) - return indent ? Number(indent[1]) : undefined -} - -function sourceHash(source) { - return createHash('sha256').update(source).digest('hex') -} - -function persistedState(result) { - return { - schemaVersion: 6, - worktreeFingerprint: '[]', - processedFiles: result.processedFiles, - sessions: result.sessions, - dailyAggregates: result.dailyAggregates, - scanState: { - enabled: true, - lastScanStartedAt: 1, - lastScanCompletedAt: 2, - lastScanError: null - } - } -} - -function usageRecord(cwd, index, inputTokens = 100) { - return `${JSON.stringify({ - type: 'assistant', - sessionId: 'active-session', - timestamp: new Date(Date.UTC(2026, 9, 9, 12, 0, index)).toISOString(), - requestId: `request-${index}`, - cwd, - gitBranch: 'benchmark', - message: { - id: `message-${index}`, - model: 'claude-sonnet-4-6', - usage: { - input_tokens: inputTokens, - output_tokens: 10, - cache_read_input_tokens: 0, - cache_creation_input_tokens: 20, - cache_creation: { ephemeral_1h_input_tokens: 5 } - } - } - })}\n` -} - -const home = await mkdtemp(join(tmpdir(), 'orca-claude-cache-representation-')) -try { - const project = join(home, '.claude', 'projects', 'benchmark') - const cwd = join(home, 'repo') - await mkdir(project, { recursive: true }) - await mkdir(cwd) - const transcriptPath = join(project, 'active-session.jsonl') - const history = Array.from({ length: usageKeys }, (_, index) => usageRecord(cwd, index)).join('') - const baseline = await readClaudeUsageBenchmarkBaselineSources() - const storeRead = runProcessSync({ - program: 'git', - args: ['show', `${baseline.baselineCommit}:${STORE_PATH}`], - cwd: ROOT, - timeoutMs: 10_000, - maxOutputBytes: 1024 * 1024, - env: { ...process.env, ORCA_BACKGROUND_LAUNCH: '1' } - }) - assert.equal(storeRead.code, 0, storeRead.stderr) - const currentStore = await readFile(join(ROOT, ...STORE_PATH.split('/')), 'utf8') - const stores = { baseline: storeRead.stdout, current: currentStore } - const loaded = await Promise.all([ - loadClaudeUsageBenchmarkScanner(home, baseline.sources, new Map(), baseline.baselineCommit), - loadClaudeUsageBenchmarkScanner(home) - ]) - const arms = {} - const results = [] - for (const [index, arm] of ['baseline', 'current'].entries()) { - const { scanner, bundleSha256, sourceFingerprints } = loaded[index] - await writeFile(transcriptPath, history) - const cold = await scanner.scanClaudeUsageFiles([], [], undefined, []) - await appendFile(transcriptPath, usageRecord(cwd, 7, 2_000)) - const result = await scanner.scanClaudeUsageFiles( - [], - JSON.parse(JSON.stringify(cold.processedFiles)), - undefined, - [] - ) - const fresh = await scanner.scanClaudeUsageFiles([], [], undefined, []) - assert.deepEqual(result, fresh, `${arm} resume differs from a fresh scan`) - assert.equal(result.processedFiles[0].ownedDedupeKeys.length, usageKeys) - assert.equal(result.sessions[0].totalInputTokens, usageKeys * 100 + 1_900) - const state = persistedState(result) - const compact = JSON.stringify(state) - const indented = JSON.stringify(state, null, 2) - const indent = serializationIndent(stores[arm]) - assert.deepEqual(JSON.parse(compact), JSON.parse(indented)) - assert.deepEqual(structuredClone(state), state) - arms[arm] = { - compactFullStateBytes: Buffer.byteLength(compact), - indentedFullStateBytes: Buffer.byteLength(indented), - productionFullStateBytes: Buffer.byteLength(JSON.stringify(state, null, indent)), - productionIndent: indent ?? null, - storeSha256: sourceHash(stores[arm]), - ownedKeys: result.processedFiles[0].ownedDedupeKeys.length, - bundleSha256, - sourceFingerprints - } - results.push(result) - } - assert.deepEqual(results[0].sessions, results[1].sessions) - assert.deepEqual(results[0].dailyAggregates, results[1].dailyAggregates) - const report = { - purpose: 'Actual scanner cache representation byte counts; no timing or peak-memory claim.', - node: process.version, - platform: process.platform, - arch: process.arch, - baselineRef: baseline.baselineRef, - baselineCommit: baseline.baselineCommit, - usageKeys, - historyBytes: Buffer.byteLength(history), - stateFields: 'schema v6; source cache, session/daily projections and fixed scan-state metadata', - exactColdParity: true, - crossArmProjectionParity: true, - serializationParity: true, - structuredCloneParity: true, - toolingSha256: sourceHash(await readFile(import.meta.filename)), - arms - } - if (values.output) { - await writeFile(values.output, `${JSON.stringify(report, null, 2)}\n`) - } - console.log(JSON.stringify(report)) -} finally { - await rm(home, { recursive: true, force: true }) -} diff --git a/config/scripts/performance/native-chat/native-chat-live-session-benchmark.ts b/config/scripts/performance/native-chat/native-chat-live-session-benchmark.ts deleted file mode 100644 index bb1db7cef21..00000000000 --- a/config/scripts/performance/native-chat/native-chat-live-session-benchmark.ts +++ /dev/null @@ -1,291 +0,0 @@ -// Run pnpm exec tsx config/scripts/native-chat-live-session-benchmark.ts. Synthetic 2KB messages stress fallback-key normalization. -// Excludes parsing, IPC/remote latency, React/DOM; results are not average production size or end-to-end frame latency. - -import { deepStrictEqual, strictEqual } from 'node:assert' -import { performance } from 'node:perf_hooks' -import type { - NativeChatMessage, - NativeChatSession -} from '../../../../src/shared/native-chat/native-chat-types' -import { getVerifiedNativeChatCommands } from '../../../../src/shared/native-chat/native-chat-agent-profiles' -import { surfaceSkillInvocationUserTurns } from '../../../../src/shared/native-chat/native-chat-command-envelope' -import { prepareNativeChatLiveMessages } from '../../../../src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-live-message-preparation' -import { mergeNativeChatLiveSession } from '../../../../src/shared/native-chat/native-chat-live-status' -import { assembleNativeChatSession } from '../../../../src/renderer/src/components/native-chat/session/terminal/assembly/native-chat-session-assembler' - -type Operation = (index: number) => number -type ExpectedChecksum = (iterations: number) => number -type Calibration = { iterations: number; elapsedMs: number; capped: boolean } - -const TARGET_SAMPLE_MS = 50 -const MAX_ITERATIONS = 16_777_216 -const ROUNDS = 10 -let checksum = 0 -let expectedChecksum = 0 -let validatedCases = 0 -let cappedCalibrations = 0 -const sessionSink: { value: NativeChatSession | null } = { value: null } -let messageArraySink: NativeChatMessage[] | null = null -let contentSink = '' -const benchmarkStartedAt = performance.now() - -function proseFixture(count: number, bytes: number, withTurnId: boolean): NativeChatMessage[] { - const payload = 'Ab Cd '.repeat(Math.ceil(bytes / 7)).slice(0, bytes) - return Array.from({ length: count }, (_, index) => ({ - id: `message-${index}`, - role: index % 2 === 0 ? ('user' as const) : ('assistant' as const), - blocks: [{ type: 'text' as const, text: `${payload}-${index}` }], - timestamp: index, - source: 'transcript' as const, - ...(withTurnId ? { turnId: `turn-${index}` } : {}) - })) -} - -function toolFixture(count: number): NativeChatMessage[] { - return Array.from({ length: count }, (_, index) => ({ - id: `tool-${index}`, - role: index % 2 === 0 ? ('assistant' as const) : ('tool' as const), - blocks: - index % 2 === 0 - ? [ - { - type: 'tool-call' as const, - name: 'read', - input: { path: `${index}.txt`, context: 'x'.repeat(512) } - } - ] - : [{ type: 'tool-result' as const, output: `result-${index}-${'x'.repeat(512)}` }], - timestamp: index, - source: 'transcript' as const - })) -} - -function legacySession(messages: NativeChatMessage[]): NativeChatSession { - return assembleNativeChatSession({ - sources: { transcript: messages }, - sessionId: 'benchmark', - agent: 'claude' - }) -} - -function legacyMessageUpdateSession(messages: NativeChatMessage[]): NativeChatSession { - const commandNames = new Set( - getVerifiedNativeChatCommands('claude').map((command) => command.name) - ) - return legacySession(surfaceSkillInvocationUserTurns(messages, commandNames)) -} - -function directMessageUpdateSession(messages: NativeChatMessage[]): NativeChatSession { - return mergeNativeChatLiveSession({ - messages: prepareNativeChatLiveMessages(messages, 'claude'), - sessionId: 'benchmark', - agent: 'claude', - hookState: null - }) -} - -function blockContent(message: NativeChatMessage): string { - const block = message.blocks[0] - if (!block) { - return '' - } - if (block.type === 'text') { - return block.text - } - if (block.type === 'tool-call') { - return block.name - } - if (block.type === 'tool-result') { - return block.output - } - if (block.type === 'image-ref') { - return block.path ?? block.url ?? block.alt ?? '' - } - return block.type === 'background-task' ? block.taskId : block.groupId -} - -function messageWeight(message: NativeChatMessage, content: string): number { - const idTail = message.id.length > 0 ? message.id.charCodeAt(message.id.length - 1) : 0 - const contentTail = content.length > 0 ? content.charCodeAt(content.length - 1) : 0 - return message.id.length + idTail + message.role.charCodeAt(0) + content.length + contentTail -} - -function consumeSession(session: NativeChatSession, index: number): number { - sessionSink.value = session - messageArraySink = session.messages - const message = session.messages[index % session.messages.length] - if (!message) { - contentSink = '' - return session.status.charCodeAt(0) - } - contentSink = blockContent(message) - return session.status.charCodeAt(0) + messageWeight(message, contentSink) -} - -function cyclicChecksum(values: readonly number[], iterations: number): number { - if (values.length === 0) { - return 0 - } - const cycle = values.reduce((sum, value) => sum + value, 0) - const fullCycles = Math.floor(iterations / values.length) - let total = cycle * fullCycles - for (let index = 0; index < iterations % values.length; index += 1) { - total += values[index]! - } - return total -} - -function sessionExpectedChecksum(session: NativeChatSession): ExpectedChecksum { - const statusWeight = session.status.charCodeAt(0) - const weights = session.messages.map((message) => { - const content = blockContent(message) - return messageWeight(message, content) - }) - return (iterations) => statusWeight * iterations + cyclicChecksum(weights, iterations) -} - -function runSample(operation: Operation, expected: ExpectedChecksum, iterations: number): number { - let sampleChecksum = 0 - const startedAt = performance.now() - for (let index = 0; index < iterations; index += 1) { - sampleChecksum += operation(index) - } - const elapsedMs = performance.now() - startedAt - checksum += sampleChecksum - expectedChecksum += expected(iterations) - return elapsedMs -} - -function median(samples: number[]): number { - return [...samples].sort((left, right) => left - right)[Math.floor(samples.length / 2)]! -} - -function calibrate(operation: Operation, expected: ExpectedChecksum): Calibration { - let iterations = 1 - let reachedTarget = false - while (true) { - const elapsedMs = runSample(operation, expected, iterations) - if (elapsedMs >= TARGET_SAMPLE_MS) { - if (reachedTarget) { - return { iterations, elapsedMs, capped: false } - } - reachedTarget = true - continue - } - if (iterations >= MAX_ITERATIONS) { - return { iterations, elapsedMs, capped: true } - } - reachedTarget = false - iterations = Math.min(iterations * 2, MAX_ITERATIONS) - } -} - -function benchmark( - name: string, - baseline: Operation, - optimized: Operation, - expected: ExpectedChecksum -): void { - const baselineValue = baseline(0) - const optimizedValue = optimized(0) - strictEqual(optimizedValue, baselineValue, `${name}: timed arms returned different checksums`) - validatedCases += 1 - const baselineCalibration = calibrate(baseline, expected) - const optimizedCalibration = calibrate(optimized, expected) - cappedCalibrations += Number(baselineCalibration.capped) + Number(optimizedCalibration.capped) - const baselineSamples: number[] = [] - const optimizedSamples: number[] = [] - for (let round = 0; round < ROUNDS; round += 1) { - if (round % 2 === 0) { - baselineSamples.push( - runSample(baseline, expected, baselineCalibration.iterations) / - baselineCalibration.iterations - ) - optimizedSamples.push( - runSample(optimized, expected, optimizedCalibration.iterations) / - optimizedCalibration.iterations - ) - } else { - optimizedSamples.push( - runSample(optimized, expected, optimizedCalibration.iterations) / - optimizedCalibration.iterations - ) - baselineSamples.push( - runSample(baseline, expected, baselineCalibration.iterations) / - baselineCalibration.iterations - ) - } - } - const baselineMs = median(baselineSamples) - const optimizedMs = median(optimizedSamples) - const speedup = baselineMs / Math.max(optimizedMs, Number.EPSILON) - console.log( - `${name}\t${baselineCalibration.iterations}\t${optimizedCalibration.iterations}\t${baselineCalibration.elapsedMs.toFixed(1)}\t${optimizedCalibration.elapsedMs.toFixed(1)}\t${baselineMs.toFixed(6)}\t${optimizedMs.toFixed(6)}\t${speedup.toFixed(1)}x` - ) -} - -function benchmarkSessionArms( - name: string, - baselineSession: () => NativeChatSession, - optimizedSession: () => NativeChatSession -): void { - const expectedSession = baselineSession() - deepStrictEqual(optimizedSession(), expectedSession, `${name}: session mismatch`) - const expected = sessionExpectedChecksum(expectedSession) - benchmark( - name, - (index) => consumeSession(baselineSession(), index), - (index) => consumeSession(optimizedSession(), index), - expected - ) -} - -function benchmarkMessageUpdate(name: string, messages: NativeChatMessage[]): void { - benchmarkSessionArms( - name, - () => legacyMessageUpdateSession(messages), - () => directMessageUpdateSession(messages) - ) -} - -const prose300 = proseFixture(300, 2_048, false) -const fixtures = [ - ['300 x 2KB prose, no turnId', prose300], - ['300 x 2KB prose, with turnId', proseFixture(300, 2_048, true)], - ['300 tool-heavy, no turnId', toolFixture(300)], - ['100 x 2KB prose, no turnId', proseFixture(100, 2_048, false)], - ['500 x 2KB prose, no turnId', proseFixture(500, 2_048, false)] -] as const - -console.log( - `Node ${process.version}; ${ROUNDS} alternating interleaved median rounds; ${TARGET_SAMPLE_MS} ms calibration target; ${MAX_ITERATIONS} iteration cap` -) -console.log( - 'case\tbaseline iters\toptimized iters\tbaseline cal ms\toptimized cal ms\tbaseline ms/op\toptimized ms/op\tspeedup' -) - -for (const [name, messages] of fixtures) { - benchmarkMessageUpdate(name, messages) -} - -benchmarkSessionArms( - '300 x 2KB status-only frame', - () => legacySession(prose300), - () => - mergeNativeChatLiveSession({ - messages: prose300, - sessionId: 'benchmark', - agent: 'claude', - hookState: null - }) -) - -strictEqual(checksum, expectedChecksum, 'benchmark checksum accounting drifted') -strictEqual(sessionSink.value?.sessionId, 'benchmark', 'session outputs did not escape') -strictEqual(Array.isArray(messageArraySink), true, 'message arrays did not escape') -strictEqual(contentSink.length > 0, true, 'message content did not escape') -console.log( - `validated=${validatedCases} cases, checksum=${checksum}, capped calibrations=${cappedCalibrations}, runtime=${( - performance.now() - benchmarkStartedAt - ).toFixed(0)} ms` -) diff --git a/config/scripts/performance/session-search/session-search-pass-benchmark.ts b/config/scripts/performance/session-search/session-search-pass-benchmark.ts deleted file mode 100644 index 143ab0b6eda..00000000000 --- a/config/scripts/performance/session-search/session-search-pass-benchmark.ts +++ /dev/null @@ -1,87 +0,0 @@ -import assert from 'node:assert/strict' -import { mkdir, mkdtemp, rename, rm } from 'node:fs/promises' -import { tmpdir } from 'node:os' -import { basename, join } from 'node:path' -import { isolatedScanRoots } from '../../../../src/main/ai-vault/session-scanner-test-fixtures' -import { resetSessionParseCacheForTests } from '../../../../src/main/ai-vault/parse-cache/session-parse-cache-store' -import { resetTranscriptConsumersForTests } from '../../../../src/main/ai-vault/transcripts/session-transcript-consumers' -import { SessionSearchIndexer } from '../../../../src/main/ai-vault-search/session-search-indexer' -import { writeSyntheticTranscriptCorpus } from '../../../../src/main/ai-vault-search/session-search-synthetic-corpus' - -// Bundle with esbuild --bundle --platform=node and run on target host over synthetic corpus only; never use real transcripts. -// Price warm stat-only cycle/sweep used to choose reconcile interval, without setting it or reading already-current content. - -const SESSIONS = 5_000 -const TURNS_PER_SESSION = 4 -const PROJECTS = 40 - -const corpus = await writeSyntheticTranscriptCorpus({ - sessions: SESSIONS, - turnsPerSession: TURNS_PER_SESSION -}) -const root = await mkdtemp(join(tmpdir(), 'orca-search-pass-')) -const roots = isolatedScanRoots(root) -const databasePath = join(root, 'index', 'session-search.sqlite') - -try { - // Spread synthetic corpus over project dirs to model discovery’s readdir cost instead of one flat listing. - for (let index = 0; index < PROJECTS; index++) { - await mkdir(join(roots.claudeProjectsDir, `project-${index}`), { recursive: true }) - } - await Promise.all( - corpus.files.map((path, index) => - rename(path, join(roots.claudeProjectsDir, `project-${index % PROJECTS}`, basename(path))) - ) - ) - - resetSessionParseCacheForTests() - resetTranscriptConsumersForTests() - const errors: unknown[] = [] - const indexer = new SessionSearchIndexer({ - databasePath, - roots, - historyDays: null, - // Finish cold indexing before warm measurement; deadline would contaminate timings with backlog. - passDeadlineMs: Number.MAX_SAFE_INTEGER, - onError: (error) => errors.push(error) - }) - try { - const coldStarted = performance.now() - await indexer.start() - const coldMs = performance.now() - coldStarted - assert.deepEqual(errors, []) - assert.equal(indexer.status().filesIndexed, SESSIONS, 'indexed file count') - - const sweepStarted = performance.now() - await indexer.reconcile({ full: true }) - const sweepMs = performance.now() - sweepStarted - - const cycleStarted = performance.now() - await indexer.reconcile({ full: false }) - const cycleMs = performance.now() - cycleStarted - - assert.deepEqual(errors, []) - assert.equal(indexer.status().filesDue, 0, 'nothing owed after a warm sweep') - console.log( - JSON.stringify( - { - transcripts: SESSIONS, - projectDirectories: PROJECTS, - transcriptMb: Math.round((corpus.transcriptBytes / (1024 * 1024)) * 100) / 100, - coldBuildMs: Math.round(coldMs), - warmSweepMs: Math.round(sweepMs), - warmCycleMs: Math.round(cycleMs) - }, - null, - 2 - ) - ) - } finally { - indexer.close() - resetTranscriptConsumersForTests() - resetSessionParseCacheForTests() - } -} finally { - await rm(corpus.root, { recursive: true, force: true }) - await rm(root, { recursive: true, force: true }) -} diff --git a/config/scripts/performance/session-search/session-search-retention-benchmark.ts b/config/scripts/performance/session-search/session-search-retention-benchmark.ts deleted file mode 100644 index 7ad77f618ae..00000000000 --- a/config/scripts/performance/session-search/session-search-retention-benchmark.ts +++ /dev/null @@ -1,143 +0,0 @@ -import assert from 'node:assert/strict' -import { mkdtemp, rm, stat } from 'node:fs/promises' -import { tmpdir } from 'node:os' -import { join } from 'node:path' -import { setImmediate as yieldToEventLoop } from 'node:timers/promises' -import { - syntheticCandidate, - syntheticSession, - userMessages -} from '../../../../src/main/ai-vault-search/session-search-index-test-fixture' -import { SessionSearchStore } from '../../../../src/main/ai-vault-search/session-search-store' -import SyncDatabase from '../../../../src/main/sqlite/sync-database' - -// Bundle with esbuild --bundle --platform=node and run on target host. All arms seed through store; only whole-file baseline bypasses shipped purge. - -const ROWS = 60_000 - -/** The purge yields with `setImmediate` between chunks, so a peer chain samples each gap. */ -async function sampleLoopStalls(running: () => boolean, intervals: number[]): Promise { - let previous = performance.now() - while (running()) { - await yieldToEventLoop() - const now = performance.now() - intervals.push(now - previous) - previous = now - } -} - -/** What a search would still return: rows whose session row is still there. */ -function visibleRows(db: SyncDatabase): number { - return ( - db - .prepare(`SELECT count(*) AS n FROM messages m JOIN sessions s ON s.id = m.session_row_id`) - .get() as { n: number } - ).n -} - -const root = await mkdtemp(join(tmpdir(), 'orca-search-retention-bench-')) -try { - for (const mode of ['whole-file', 'batched', 'batched-pinned-reader']) { - const path = join(root, `${mode}.sqlite`) - const errors: unknown[] = [] - const store = new SessionSearchStore(path, (error) => errors.push(error)) - let reader: SyncDatabase | null = null - try { - const write = store.beginWrite(syntheticCandidate(), 'replace', 0)! - for (const message of userMessages( - 'synthetic benchmark needle repeated context for a representative coding conversation with commands and paths src/example.ts', - ROWS - )) { - write.add(message) - } - assert.equal( - write.commit({ - session: syntheticSession(), - byteOffset: 4096, - incomplete: false - }), - true - ) - assert.deepEqual(errors, []) - // Truncating first is what makes walBytes below the purge's own growth. - const checkpoint = new SyncDatabase(path) - checkpoint.pragma('wal_checkpoint(TRUNCATE)') - checkpoint.close() - if (mode === 'batched-pinned-reader') { - reader = new SyncDatabase(path, { readonly: true }) - reader.exec('BEGIN') - reader.prepare('SELECT count(*) FROM messages').get() - } - const probe = new SyncDatabase(path, { readonly: true }) - const intervals: number[] = [] - const started = performance.now() - if (mode === 'whole-file') { - const raw = new SyncDatabase(path) - try { - raw.exec('BEGIN IMMEDIATE') - const ids = raw.prepare('SELECT id FROM messages').all() as { - id: number - }[] - for (const { id } of ids) { - raw.prepare('DELETE FROM messages_fts WHERE rowid=?').run(id) - } - raw.exec('DELETE FROM messages; DELETE FROM sessions; DELETE FROM files; COMMIT') - } finally { - raw.close() - } - intervals.push(performance.now() - started) - } else { - let purging = true - const purge = store.purgeOlderThan(Date.now() + 60_000) - // First transaction cuts session from file, hiding search results immediately before chunked deletion finishes. - const hiddenEarly = yieldToEventLoop().then(() => visibleRows(probe)) - const sampler = sampleLoopStalls(() => purging, intervals) - await purge - purging = false - await sampler - assert.equal(await hiddenEarly, 0) - assert.deepEqual(errors, []) - } - const wallMs = performance.now() - started - probe.close() - reader?.exec('COMMIT') - reader?.close() - reader = null - const after = new SyncDatabase(path, { readonly: true }) - try { - for (const table of ['messages_fts']) { - assert.equal( - ( - after.prepare(`SELECT count(*) AS n FROM ${table}`).get() as { - n: number - } - ).n, - 0 - ) - } - } finally { - after.close() - } - const walBytes = (await stat(`${path}-wal`)).size - intervals.sort((a, b) => a - b) - console.log( - JSON.stringify({ - mode, - platform: process.platform, - node: process.version, - rows: ROWS, - wallMs: Math.round(wallMs), - samples: intervals.length, - maxStepMs: Math.round(intervals.at(-1) ?? 0), - p95StepMs: Math.round(intervals[Math.floor(intervals.length * 0.95)] ?? 0), - walBytes - }) - ) - } finally { - reader?.close() - store.close() - } - } -} finally { - await rm(root, { recursive: true, force: true }) -} diff --git a/config/scripts/performance/session-transcripts/markdown-note-line-scan-benchmark.mjs b/config/scripts/performance/session-transcripts/markdown-note-line-scan-benchmark.mjs index 1cbb8c3b037..811fa997a3b 100644 --- a/config/scripts/performance/session-transcripts/markdown-note-line-scan-benchmark.mjs +++ b/config/scripts/performance/session-transcripts/markdown-note-line-scan-benchmark.mjs @@ -6,11 +6,12 @@ import { performance } from 'node:perf_hooks' import { build } from 'esbuild' import { buildCounterbalancedSchedule } from '../measurement/counterbalanced-benchmark-schedule.mjs' -const sourcePath = 'src/renderer/src/lib/markdown-review-notes.ts' +const sourcePath = 'src/renderer/src/lib/editor/markdown/review-notes/markdown-review-notes.ts' +const baselineSourcePath = 'src/renderer/src/lib/markdown-review-notes.ts' const baseline = process.argv[2] ?? '20ab9950654' -async function load(contents) { +async function load(contents, inputPath) { const result = await build({ - stdin: { contents, loader: 'ts', resolveDir: dirname(resolve(sourcePath)) }, + stdin: { contents, loader: 'ts', resolveDir: dirname(resolve(inputPath)) }, bundle: true, platform: 'node', format: 'esm', @@ -21,9 +22,10 @@ async function load(contents) { ) } const before = await load( - execFileSync('git', ['show', `${baseline}:${sourcePath}`], { encoding: 'utf8' }) + execFileSync('git', ['show', `${baseline}:${baselineSourcePath}`], { encoding: 'utf8' }), + baselineSourcePath ) -const after = await load(readFileSync(sourcePath, 'utf8')) +const after = await load(readFileSync(sourcePath, 'utf8'), sourcePath) const results = [] for (const [name, lineCount, width, count, iterations] of [ ['small', 20, 40, 1, 1000], diff --git a/config/scripts/performance/terminal-stream/codex-capacity-status-benchmark.ts b/config/scripts/performance/terminal-stream/codex-capacity-status-benchmark.ts deleted file mode 100644 index 006dcc785a1..00000000000 --- a/config/scripts/performance/terminal-stream/codex-capacity-status-benchmark.ts +++ /dev/null @@ -1,137 +0,0 @@ -// Run: ORCA_BACKGROUND_LAUNCH=1 node --import tsx config/scripts/codex-capacity-status-benchmark.ts -import { readFileSync } from 'node:fs' -import { performance } from 'node:perf_hooks' -import { createCodexCapacityNoticeTracker } from '../../../../src/shared/codex-native-notice' -import { HeadlessEmulator } from '../../../../src/main/daemon/emulation/headless-emulator' -import { observeCodexCapacityTerminalStatus } from '../../../../src/main/runtime/terminal/output/codex-notice-terminal-status' - -const fixture = readFileSync( - new URL( - '../../../../src/main/runtime/__fixtures__/codex-model-capacity-fullscreen.txt', - import.meta.url - ), - 'utf8' -) -const notice = fixture.indexOf('■ Selected model') -if (notice === -1) { - throw new Error('Capacity notice missing from benchmark fixture') -} -const redraw = fixture.slice(0, fixture.lastIndexOf('\x1b[?2026h', notice)) -const scenarios = [ - { name: 'plain-4K', data: 'x'.repeat(4096), iterations: 30_000 }, - { name: 'captured-TUI', data: redraw, iterations: 30_000 }, - { - name: 'warning-footer', - data: '\x1b[?2026h\x1b[21;1H⚠ 1 warning · f2 to view\x1b[?2026l', - iterations: 30_000 - }, - { name: 'tiny-typing', data: 'a', iterations: 30_000 }, - { name: 'marker-flood', data: '■'.repeat(4096), iterations: 1000 }, - { - name: 'large-after-warning', - data: `⚠ unrelated\n${'x'.repeat(1024 * 1024)}`, - iterations: 128 - } -] - -function measure(iterations: number, observe: () => void): number { - const start = performance.now() - for (let index = 0; index < iterations; index++) { - observe() - } - return performance.now() - start -} - -for (const scenario of scenarios) { - const run = () => { - const tracker = createCodexCapacityNoticeTracker() - let screenReads = 0 - const readScreen = () => { - screenReads++ - return [] - } - const elapsedMs = measure(scenario.iterations, () => tracker.observe(scenario.data, readScreen)) - if (screenReads !== 0) { - throw new Error(`${scenario.name} read the screen ${screenReads} times`) - } - return elapsedMs - } - run() - const samples = Array.from({ length: 5 }, run).sort((left, right) => left - right) - const elapsedMs = samples[2] - textResult(scenario.name, elapsedMs, scenario.iterations, scenario.data.length) -} - -for (const launchAgent of [undefined, 'codex'] as const) { - const emulator = new HeadlessEmulator({ cols: 80, rows: 24 }) - const data = 'x'.repeat(4096) - const iterations = 30_000 - let statusReads = 0 - const readStatus = () => { - statusReads++ - return undefined - } - try { - const observe = () => - observeCodexCapacityTerminalStatus( - emulator, - data, - 'node /some/wrapper.cjs', - launchAgent, - readStatus, - 1 - ) - measure(iterations, observe) - const samples = Array.from({ length: 5 }, () => measure(iterations, observe)).sort( - (left, right) => left - right - ) - if (statusReads !== 0) { - throw new Error(`Ordinary output read status ${statusReads} times`) - } - textResult(launchAgent ?? 'unrelated-terminal', samples[2], iterations, data.length) - } finally { - emulator.dispose() - } -} - -async function measureScreenRead(): Promise { - const emulator = new HeadlessEmulator({ cols: 40, rows: 24 }) - try { - await emulator.write(fixture) - for (const name of ['screen-only', 'capacity-parse-and-screen']) { - const observe = () => { - if (name === 'screen-only') { - emulator.getVisibleLines() - } else if ( - !createCodexCapacityNoticeTracker().observe(fixture, () => emulator.getVisibleLines()) - ) { - throw new Error('Captured capacity notice was not detected') - } - } - measure(1000, observe) - const samples = Array.from({ length: 5 }, () => measure(1000, observe)).sort( - (left, right) => left - right - ) - textResult(name, samples[2], 1000, fixture.length) - } - } finally { - emulator.dispose() - } -} - -void measureScreenRead().catch((error: unknown) => { - console.error(error) - process.exitCode = 1 -}) - -function textResult(name: string, elapsedMs: number, iterations: number, chars: number): void { - console.log( - JSON.stringify({ - name, - chars, - iterations, - microsecondsPerChunk: Number(((elapsedMs * 1000) / iterations).toFixed(3)), - millisecondsPerMiB: Number((elapsedMs / ((chars * iterations) / 1048576)).toFixed(3)) - }) - ) -} diff --git a/config/scripts/performance/transport/benchmark-browser-tunnel-framing.mjs b/config/scripts/performance/transport/benchmark-browser-tunnel-framing.mjs index e91fd0887f6..902d64115b2 100644 --- a/config/scripts/performance/transport/benchmark-browser-tunnel-framing.mjs +++ b/config/scripts/performance/transport/benchmark-browser-tunnel-framing.mjs @@ -4,10 +4,19 @@ import { readFileSync } from 'node:fs' import { stripTypeScriptTypes } from 'node:module' import { performance } from 'node:perf_hooks' -// Run from the worktree root: node config/scripts/benchmark-browser-tunnel-framing.mjs [base-ref] -const path = 'src/shared/browser-network-tunnel-stream-framing.ts' +// Run from the worktree root: node config/scripts/performance/transport/benchmark-browser-tunnel-framing.mjs [base-ref] +const path = 'src/shared/browser/network/tunnels/browser-network-tunnel-stream-framing.ts' +const historicalPath = 'src/shared/browser-network-tunnel-stream-framing.ts' const baselineRef = process.argv[2] ?? 'HEAD' -const beforeSource = execFileSync('git', ['show', `${baselineRef}:${path}`], { +const baselinePaths = execFileSync( + 'git', + ['ls-tree', '--name-only', baselineRef, '--', path, historicalPath], + { encoding: 'utf8' } +) + .trim() + .split('\n') +const baselinePath = baselinePaths.includes(path) ? path : historicalPath +const beforeSource = execFileSync('git', ['show', `${baselineRef}:${baselinePath}`], { encoding: 'utf8' }) const afterSource = readFileSync(path, 'utf8') diff --git a/config/scripts/preflight/changed-checks/check-changed-selection.mjs b/config/scripts/preflight/changed-checks/check-changed-selection.mjs index 99d3c46bff0..f8f576a27a5 100644 --- a/config/scripts/preflight/changed-checks/check-changed-selection.mjs +++ b/config/scripts/preflight/changed-checks/check-changed-selection.mjs @@ -47,6 +47,7 @@ const RATCHET_INPUTS = { 'check-render-path-translate-ratchet.mjs': ['src/renderer/src/'], 'check-repo-host-read-ratchet.mjs': ['src/cli/', 'src/main/', 'src/shared/'], 'check-runtime-electron-ratchet.mjs': ['src/main/', 'src/cli/', 'src/shared/'], + 'check-tab-map-seam-ratchet.mjs': ['src/renderer/src/'], 'check-unproven-pty-retirement-ratchet.mjs': ['src/main/'], 'check-workspace-record-read-ratchet.mjs': ['src/renderer/src/'], 'check-worktree-id-composer-ratchet.mjs': ['src/', 'mobile/src/'] diff --git a/config/scripts/preflight/changed-checks/run-lint.mjs b/config/scripts/preflight/changed-checks/run-lint.mjs index 0a2bbe3c723..e882fcb03d2 100644 --- a/config/scripts/preflight/changed-checks/run-lint.mjs +++ b/config/scripts/preflight/changed-checks/run-lint.mjs @@ -39,6 +39,7 @@ export const LINT_STEPS = [ 'check:mobile-shared-dependency-versions', 'check:ts-nocheck-ratchet', 'check:workspace-record-read-ratchet', + 'check:tab-map-seam-ratchet', 'check:unproven-pty-retirement-ratchet', 'check:daemon-blocking-call-ratchet', 'check:main-sync-fs-ratchet', diff --git a/config/scripts/release/publication/mirror-release-to-r2.sh b/config/scripts/release/publication/mirror-release-to-r2.sh new file mode 100755 index 00000000000..f32992eaafd --- /dev/null +++ b/config/scripts/release/publication/mirror-release-to-r2.sh @@ -0,0 +1,187 @@ +#!/usr/bin/env bash +# Needs bash 4+ (mapfile); on macOS use Homebrew bash. +# Mirror Orca release assets from GitHub Releases to the public R2 bucket +# served at https://downloads.onorca.dev. onorca.dev's "Download started" page +# offers these as an opt-in "mirror link" for when GitHub returns 5xx. +# Run by .github/workflows/release-mirror-r2.yml after each published release. +# +# Usage: +# mirror-release-to-r2.sh # latest desktop release, website assets +# mirror-release-to-r2.sh v1.4.254 # a specific desktop tag +# mirror-release-to-r2.sh mobile-android-v0.0.64 app-release.apk +# ALL_ASSETS=1 mirror-release-to-r2.sh # every asset except sourcemaps +# +# Layout written to the bucket: +# releases// immutable, versioned copy +# latest/ stable desktop tags (vX.Y.Z) only — what the mirror link points at +# android/latest/ mobile-android-v* tags only +# latest/release.json {tag, mirroredAt, assets[]} for the desktop alias +# +# Requires: gh (authenticated), curl, jq, and an uploader: +# - aws CLI + R2 S3 keys (R2_ACCESS_KEY_ID / R2_SECRET_ACCESS_KEY): preferred, +# multipart uploads, no size limit. Create keys in Cloudflare dashboard → +# R2 → Manage API tokens (Object Read & Write on orca-downloads). +# - otherwise wrangler (authenticated), which caps each file at 300 MiB. +# Downloads are retried aggressively and resumed, and every file is checked +# against the size and sha256 digest GitHub reports before upload. + +set -euo pipefail + +REPO="${REPO:-stablyai/orca}" +BUCKET="${BUCKET:-orca-downloads}" +PUBLIC_BASE="${PUBLIC_BASE:-https://downloads.onorca.dev}" +WEBSITE_ASSETS=(orca-macos-arm64.dmg orca-macos-x64.dmg orca-windows-setup.exe orca-linux.AppImage) +CLOUDFLARE_ACCOUNT_ID="${CLOUDFLARE_ACCOUNT_ID:-57e6ddd3bb755dbf8e8dc7ff557e9014}" +R2_ENDPOINT="https://$CLOUDFLARE_ACCOUNT_ID.r2.cloudflarestorage.com" +# wrangler r2 object put caps single uploads at 300 MiB; the S3 path has no such cap. +WRANGLER_MAX_BYTES=$((300 * 1024 * 1024)) +if [[ -n "${R2_ACCESS_KEY_ID:-}" && -n "${R2_SECRET_ACCESS_KEY:-}" ]]; then + UPLOADER="s3" + export AWS_ACCESS_KEY_ID="$R2_ACCESS_KEY_ID" AWS_SECRET_ACCESS_KEY="$R2_SECRET_ACCESS_KEY" + export AWS_DEFAULT_REGION=auto AWS_EC2_METADATA_DISABLED=true + # Newer aws CLIs send extra default checksums R2 has rejected; only send them when required. + export AWS_REQUEST_CHECKSUM_CALCULATION=when_required AWS_RESPONSE_CHECKSUM_VALIDATION=when_required +else + UPLOADER="wrangler" +fi + +log() { printf '[mirror] %s\n' "$*" >&2; } + +# Retry any command with backoff: GitHub's 504s come and go. +retry() { + local attempts="$1"; shift + local n=1 delay=3 + until "$@"; do + if (( n >= attempts )); then log "giving up after $n attempts: $*"; return 1; fi + log "attempt $n failed, retrying in ${delay}s: $*" + sleep "$delay"; n=$((n + 1)); delay=$(( delay < 60 ? delay * 2 : 60 )) + done +} + +TAG="${1:-}" +shift || true +REQUESTED_ASSETS=("$@") + +if [[ -z "$TAG" ]]; then + TAG="$(retry 10 gh api "repos/$REPO/releases/latest" --jq .tag_name)" +fi +log "release: $TAG (uploading via $UPLOADER)" + +RELEASE_JSON="$(retry 10 gh api "repos/$REPO/releases/tags/$TAG")" + +if (( ${#REQUESTED_ASSETS[@]} == 0 )); then + if [[ "${ALL_ASSETS:-0}" == "1" ]]; then + mapfile -t REQUESTED_ASSETS < <(jq -r '.assets[].name | select(startswith("orca-sourcemaps") | not)' <<<"$RELEASE_JSON") + elif [[ "$TAG" == v* ]]; then + REQUESTED_ASSETS=("${WEBSITE_ASSETS[@]}") + else + mapfile -t REQUESTED_ASSETS < <(jq -r '.assets[].name' <<<"$RELEASE_JSON") + fi +fi + +# Why: GitHub's /releases/latest skips RCs, so an RC must never move latest/. +if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + ALIAS_PREFIX="latest" +elif [[ "$TAG" == mobile-android-v* ]]; then + ALIAS_PREFIX="android/latest" +else + ALIAS_PREFIX="" +fi + +WORK_DIR="${WORK_DIR:-${TMPDIR:-/tmp}/orca-release-mirror/$TAG}" +mkdir -p "$WORK_DIR" +log "working dir: $WORK_DIR" + +sha256_of() { + if command -v sha256sum >/dev/null; then sha256sum "$1" | cut -d' ' -f1; else shasum -a 256 "$1" | cut -d' ' -f1; fi +} + +content_type_for() { + case "$1" in + *.dmg) echo "application/x-apple-diskimage" ;; + *.exe) echo "application/vnd.microsoft.portable-executable" ;; + *.apk) echo "application/vnd.android.package-archive" ;; + *.yml) echo "text/yaml" ;; + *.json) echo "application/json" ;; + *.zip) echo "application/zip" ;; + *.deb) echo "application/vnd.debian.binary-package" ;; + *.rpm) echo "application/x-rpm" ;; + *) echo "application/octet-stream" ;; + esac +} + +verify() { + local file="$1" size="$2" digest="$3" + [[ -f "$file" ]] || return 1 + local actual_size + actual_size="$(wc -c <"$file" | tr -d ' ')" + [[ "$actual_size" == "$size" ]] || { log "size mismatch for $file: $actual_size != $size"; return 1; } + if [[ "$digest" == sha256:* ]]; then + [[ "$(sha256_of "$file")" == "${digest#sha256:}" ]] || { log "sha256 mismatch for $file"; return 1; } + fi +} + +download() { + local url="$1" out="$2" size="$3" digest="$4" + # -C - resumes partial downloads; a corrupt partial is discarded and refetched. + curl -fL --retry 8 --retry-all-errors --retry-delay 5 --connect-timeout 20 \ + -H "Accept: application/octet-stream" -C - -o "$out" "$url" || true + verify "$out" "$size" "$digest" && return 0 + rm -f "$out" + return 1 +} + +upload() { + local file="$1" key="$2" cache="$3" type="$4" + local disposition + disposition="attachment; filename=\"$(basename "$file")\"" + if [[ "$UPLOADER" == "s3" ]]; then + # aws s3 cp switches to multipart above the threshold, so file size is unbounded. + retry 5 aws s3 cp "$file" "s3://$BUCKET/$key" --endpoint-url "$R2_ENDPOINT" \ + --content-type "$type" --cache-control "$cache" --content-disposition "$disposition" \ + --only-show-errors + else + retry 5 wrangler r2 object put "$BUCKET/$key" --remote --file "$file" \ + --content-type "$type" --cache-control "$cache" --content-disposition "$disposition" >/dev/null + fi + log "uploaded $PUBLIC_BASE/$key" +} + +MIRRORED=() +for name in "${REQUESTED_ASSETS[@]}"; do + asset="$(jq -c --arg n "$name" '.assets[] | select(.name == $n)' <<<"$RELEASE_JSON")" + if [[ -z "$asset" ]]; then log "asset not in $TAG: $name"; exit 1; fi + size="$(jq -r .size <<<"$asset")" + digest="$(jq -r '.digest // ""' <<<"$asset")" + url="https://github.com/$REPO/releases/download/$TAG/$name" + out="$WORK_DIR/$name" + + if [[ "$UPLOADER" == "wrangler" ]] && (( size > WRANGLER_MAX_BYTES )); then + log "$name is $size bytes, over wrangler's 300 MiB limit — set R2_ACCESS_KEY_ID/R2_SECRET_ACCESS_KEY to upload via S3 multipart" + exit 1 + fi + + if verify "$out" "$size" "$digest" 2>/dev/null; then + log "already downloaded: $name" + else + log "downloading $name ($size bytes)" + retry 10 download "$url" "$out" "$size" "$digest" + fi + + type="$(content_type_for "$name")" + upload "$out" "releases/$TAG/$name" "public, max-age=31536000, immutable" "$type" + if [[ -n "$ALIAS_PREFIX" ]]; then + # Short TTL so the alias moves to the next release quickly. + upload "$out" "$ALIAS_PREFIX/$name" "public, max-age=300" "$type" + fi + MIRRORED+=("$name") +done + +if [[ -n "$ALIAS_PREFIX" ]]; then + manifest="$WORK_DIR/release.json" + jq -n --arg tag "$TAG" --arg at "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \ + '{tag: $tag, mirroredAt: $at, assets: $ARGS.positional}' --args "${MIRRORED[@]}" >"$manifest" + upload "$manifest" "$ALIAS_PREFIX/release.json" "public, max-age=60" application/json +fi + +log "done: ${#MIRRORED[@]} assets from $TAG" diff --git a/config/scripts/runtime-verification/desktop-transport/verify-computer-native.mjs b/config/scripts/runtime-verification/desktop-transport/verify-computer-native.mjs index 574e3f6984e..f0c1e76f622 100644 --- a/config/scripts/runtime-verification/desktop-transport/verify-computer-native.mjs +++ b/config/scripts/runtime-verification/desktop-transport/verify-computer-native.mjs @@ -54,12 +54,6 @@ const checks = [ ], enabled: process.platform === 'linux' }, - { - name: 'Linux set_value tests', - command: 'python3', - args: ['native/computer-use-linux/set_value_test.py'], - enabled: true - }, { name: 'Windows provider PowerShell parse', command: process.platform === 'win32' ? 'powershell.exe' : 'pwsh', @@ -83,7 +77,7 @@ const checks = [ enabled: process.platform === 'win32' }, { - name: 'Windows snapshot renderer tests', + name: 'Windows pointer safety tests', command: 'powershell.exe', args: [ '-NoLogo', @@ -91,7 +85,7 @@ const checks = [ '-ExecutionPolicy', 'Bypass', '-File', - 'native/computer-use-windows/runtime-render.test.ps1' + 'native/computer-use-windows/runtime-pointer.test.ps1' ], enabled: process.platform === 'win32' }, diff --git a/config/scripts/static-analysis/ratchets/renderer-state/check-layout-writer-ratchets.mjs b/config/scripts/static-analysis/ratchets/renderer-state/check-layout-writer-ratchets.mjs index 29b0247827e..009f48c981c 100644 --- a/config/scripts/static-analysis/ratchets/renderer-state/check-layout-writer-ratchets.mjs +++ b/config/scripts/static-analysis/ratchets/renderer-state/check-layout-writer-ratchets.mjs @@ -320,6 +320,24 @@ function isSameNameCopy(property, name) { return ts.isPropertyAccessExpression(value) && value.name.text === name } +// The transition seam names the fields it tracks in `const SEAM_*_FIELDS = [...] as const` lists; names, not writes. +function isSeamFieldNameConstant(literal) { + let list = literal.parent + if (!ts.isArrayLiteralExpression(list)) { + return false + } + let declaration = list.parent + while (ts.isAsExpression(declaration) || ts.isSatisfiesExpression(declaration)) { + declaration = declaration.parent + } + return ( + ts.isVariableDeclaration(declaration) && + ts.isIdentifier(declaration.name) && + /^SEAM_[A-Z_]+_FIELDS$/.test(declaration.name.text) && + (declaration.parent.flags & ts.NodeFlags.Const) !== 0 + ) +} + /** Layout writes in one file under one ratchet's rules. */ export function countLayoutWrites(sourceText, ratchet, fileName = 'file.tsx') { const names = [...ratchet.writerNames, ...ratchet.assignedFields] @@ -392,7 +410,8 @@ export function countLayoutWrites(sourceText, ratchet, fileName = 'file.tsx') { node.parent.expression.expression.text === 'Object' && node.parent.expression.name.text === 'hasOwn' ) && - !ts.isLiteralTypeNode(node.parent) + !ts.isLiteralTypeNode(node.parent) && + !isSeamFieldNameConstant(node) ) { count += 1 } diff --git a/config/scripts/static-analysis/ratchets/renderer-state/check-tab-map-seam-ratchet.mjs b/config/scripts/static-analysis/ratchets/renderer-state/check-tab-map-seam-ratchet.mjs new file mode 100644 index 00000000000..c6743a1ae76 --- /dev/null +++ b/config/scripts/static-analysis/ratchets/renderer-state/check-tab-map-seam-ratchet.mjs @@ -0,0 +1,380 @@ +import fs from 'node:fs' +import path from 'node:path' +import process from 'node:process' +import { pathToFileURL } from 'node:url' +import ts from 'typescript-api' + +// The tab-map transition seam (store/keyed-record-transitions.ts) only works if its writers annotate and its +// consumers enumerate whole maps only on named cold paths; this pins both for the repaired modules, nothing wider. + +const R = 'src/renderer/src/' +const STATUS = `${R}components/native-chat/session/status/` + +/** + * Repaired consumers: the only functions allowed to walk a whole map (`coldPaths`), which callers + * may reach a cold helper (`helpers`), and the only values they may import, so a new walking helper + * can't arrive through an import unreviewed. + */ +export const CONSUMERS = new Map([ + [ + `${STATUS}structured-agent-session-tabs.ts`, + { + coldPaths: new Set(['rebuildFromSnapshot']), + helpers: { rebuildFromSnapshot: ['advance'] }, + imports: new Set(['structuredAgentSessionPaneKey', 'isStructuredTab', 'readTabMapChanges']) + } + ], + [ + `${STATUS}StructuredAgentSessionStatusBridge.tsx`, + { + coldPaths: new Set(['reconcileFromSnapshot']), + helpers: { + getStructuredAgentSessionTabs: ['reconcileFromSnapshot'], + reconcileFromSnapshot: ['reconcile'] + }, + imports: new Set([ + 'useEffect', + 'projectStatus', + 'getStructuredAgentSessionLaunchLifecycle', + 'subscribeStructuredAgentLaunchStatus', + 'getStructuredAgentSessionLaunchFailedAt', + 'useAppStore', + 'structuredAgentSessionTargetForHost', + 'getStructuredAgentSessionStatusFeed', + 'structuredAgentSessionStatusFeedKey', + 'getStructuredAgentSessionTabs', + 'getStructuredAgentSessionTabsInWorkspace', + 'readTabMapChanges', + 'createTabOwnerCache', + 'ownerInputChanged', + 'ownerInputs', + 'createStructuredSessionMembership', + 'sameSemanticTab' + ]) + } + ], + [ + `${STATUS}structured-agent-session-status-membership.ts`, + { + coldPaths: new Set(), + helpers: { getStructuredAgentSessionTabs: [] }, + imports: new Set(['structuredAgentSessionPaneKey']) + } + ] +]) +const ENUMERATING_CALLS = new Set(['keys', 'values', 'entries']) + +/** Shared tab-map writers wired to the seam: a raw record literal for these fields bypasses provenance. */ +export const WRITERS = [ + 'src/renderer/src/runtime/web-session-tabs-sync/scoped-patch-annotation.ts', + 'src/renderer/src/runtime/web-session-tabs-sync/store-patch.ts', + 'src/renderer/src/runtime/workspace-layout/frames/workspace-layout-frame-sync.ts', + 'src/renderer/src/store/slices/browser/pages/browser-page-state-actions.ts', + 'src/renderer/src/store/slices/editor/file-ids/hydrated-editor-file-ids.ts', + 'src/renderer/src/store/slices/editor/hydration/restored-editor-owner-in-place.ts', + 'src/renderer/src/store/slices/editor/hydration/restored-editor-owner-transition.ts', + 'src/renderer/src/store/slices/editor/markdown/markdown-preview-actions.ts', + 'src/renderer/src/store/slices/editor/opening/open-file-mutations.ts', + 'src/renderer/src/store/slices/ssh/ssh-target-cleanup.ts', + 'src/renderer/src/store/slices/tabs/rename-worktree-layout.ts', + 'src/renderer/src/store/slices/tabs/tab-group-state.ts', + 'src/renderer/src/store/slices/tabs/tabs-close-actions.ts', + 'src/renderer/src/store/slices/tabs/tabs-create-actions.ts', + 'src/renderer/src/store/slices/tabs/tabs-drag-preview-actions.ts', + 'src/renderer/src/store/slices/tabs/tabs-drop-actions.ts', + 'src/renderer/src/store/slices/tabs/tabs-focus-actions.ts', + 'src/renderer/src/store/slices/tabs/tabs-group-actions.ts', + 'src/renderer/src/store/slices/tabs/tabs-host-mirroring.ts', + 'src/renderer/src/store/slices/tabs/tabs-label-actions.ts', + 'src/renderer/src/store/slices/tabs/tabs-move-actions.ts', + 'src/renderer/src/store/slices/tabs/tabs-reconciliation.ts', + 'src/renderer/src/store/slices/tabs/tabs-session-actions.ts', + 'src/renderer/src/store/slices/tabs/tabs-split-ratio-actions.ts', + 'src/renderer/src/store/slices/tabs/worktree-layout-lifecycle.ts', + 'src/renderer/src/store/slices/tabs/worktree-terminal-tab-respawn.ts', + 'src/renderer/src/store/slices/worktrees/session/set-active-worktree.ts', + 'src/renderer/src/store/slices/worktrees/session/worktree-identity-rename-state.ts', + 'src/renderer/src/store/slices/worktrees/session/worktree-slice-lookups.ts', + 'src/renderer/src/store/slices/worktrees/teardown/record-key-omission.ts', + 'src/renderer/src/store/terminals/terminal-tab-close.ts', + 'src/renderer/src/store/terminals/terminal-tab-creation.ts', + 'src/renderer/src/store/terminals/terminal-tab-navigation.ts', + 'src/renderer/src/store/terminals/terminal-tab-title-batch.ts', + 'src/renderer/src/store/terminals/workspace-terminal-hydration-patch.ts', + 'src/renderer/src/store/terminals/workspace-terminal-hydration.ts', + 'src/renderer/src/store/terminals/workspace-terminal-reconnect.ts', + 'src/renderer/src/store/workspace-layout/frames/workspace-layout-frame-store-patch.ts' +] +export const SEAM_FIELDS = new Set([ + 'tabsByWorktree', + 'unifiedTabsByWorktree', + 'terminalLayoutsByTabId', + 'ptyIdsByTabId', + 'lastKnownRelayPtyIdByTabId', + 'runtimePaneTitlesByTabId', + 'pendingStartupByTabId', + 'pendingReconnectPtyIdByTabId', + 'sleepingAgentSessionsByPaneKey', + 'layoutByWorktree', + 'groupsByWorktree', + 'activeGroupIdByWorktree' +]) + +function parse(file, text) { + return ts.createSourceFile(file, text, ts.ScriptTarget.Latest, true, ts.ScriptKind.TSX) +} + +function line(source, node) { + return source.getLineAndCharacterOfPosition(node.getStart(source)).line + 1 +} + +function enclosingFunctionNames(node) { + const names = [] + for (let current = node.parent; current; current = current.parent) { + if (ts.isFunctionDeclaration(current) && current.name) { + names.push(current.name.text) + } else if ( + (ts.isArrowFunction(current) || ts.isFunctionExpression(current)) && + ts.isVariableDeclaration(current.parent) && + ts.isIdentifier(current.parent.name) + ) { + names.push(current.parent.name.text) + } + } + return names +} + +function valueImports(source) { + const imported = [] + for (const statement of source.statements) { + const clause = ts.isImportDeclaration(statement) ? statement.importClause : null + if (!clause || clause.isTypeOnly) { + continue + } + if (clause.name) { + imported.push(clause.name) + } + const bindings = clause.namedBindings + if (bindings && ts.isNamespaceImport(bindings)) { + imported.push(bindings.name) + } else if (bindings) { + imported.push( + ...bindings.elements.filter((element) => !element.isTypeOnly).map((e) => e.name) + ) + } + } + return imported +} + +function isHelperReference(node, helpers) { + if (!ts.isIdentifier(node) || !Object.hasOwn(helpers, node.text)) { + return false + } + const parent = node.parent + const declares = + ((ts.isVariableDeclaration(parent) || ts.isFunctionDeclaration(parent)) && + parent.name === node) || + (ts.isPropertyAccessExpression(parent) && parent.name === node) || + (ts.isPropertyAssignment(parent) && parent.name === node) || + ts.isImportSpecifier(parent) + return !declares +} + +export function consumerViolations(file, text, { coldPaths, helpers, imports }) { + const source = parse(file, text) + const violations = [] + for (const name of valueImports(source)) { + if (!imports.has(name.text)) { + violations.push( + `${file}:${line(source, name)} imports ${name.text}; repaired consumers import only reviewed helpers` + ) + } + } + const visit = (node) => { + let what = null + let allowed = coldPaths + if ( + ts.isPropertyAccessExpression(node) && + ts.isIdentifier(node.expression) && + node.expression.text === 'Object' && + ENUMERATING_CALLS.has(node.name.text) + ) { + // Any reference, called or aliased (`const keys = Object.keys`). + what = `Object.${node.name.text}` + } else if (isHelperReference(node, helpers)) { + // Calls, aliases (`const resync = reconcileFromSnapshot`) and callbacks alike. + what = `${node.text}()` + allowed = new Set(helpers[node.text]) + } else if (ts.isForInStatement(node)) { + what = 'for…in' + } + if (what && !enclosingFunctionNames(node).some((name) => allowed.has(name))) { + violations.push(`${file}:${line(source, node)} ${what} outside a named cold path`) + } + if ( + ts.isFunctionDeclaration(node) && + node.name?.text === 'rebuildFromSnapshot' && + node.modifiers?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword) + ) { + violations.push(`${file}:${line(source, node)} rebuildFromSnapshot must stay module-private`) + } + ts.forEachChild(node, visit) + } + visit(source) + return violations +} + +function isRawRecord(expression) { + if (ts.isObjectLiteralExpression(expression)) { + return expression.properties.some((property) => ts.isSpreadAssignment(property)) + } + return ( + ts.isCallExpression(expression) && + ts.isPropertyAccessExpression(expression.expression) && + ts.isIdentifier(expression.expression.expression) && + expression.expression.expression.text === 'Object' && + ['fromEntries', 'assign'].includes(expression.expression.name.text) + ) +} + +// Only an explicit cold-path mark certifies a record built outside a construction helper or draft. +const ANNOTATED_ARGUMENT = { + markFullResync: 0 +} + +function enclosingScope(node) { + let current = node.parent + while (current && !ts.isFunctionLike(current) && !ts.isSourceFile(current)) { + current = current.parent + } + return current +} + +/** The value a local name holds at `use`: its declaration's initializer, followed through aliases. */ +function bindingSource(name, scope, use, seen = new Set()) { + if (seen.has(name)) { + return null + } + seen.add(name) + let found = null + const visit = (node) => { + if (node.pos >= use.pos) { + return + } + if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.name.text === name) { + found = node.initializer ?? null + } else if ( + ts.isBinaryExpression(node) && + node.operatorToken.kind === ts.SyntaxKind.EqualsToken && + ts.isIdentifier(node.left) && + node.left.text === name + ) { + found = node.right + } + ts.forEachChild(node, visit) + } + visit(scope) + if (found && ts.isIdentifier(found)) { + const aliased = bindingSource(found.text, scope, use, seen) + return aliased && { ...aliased, names: [name, ...aliased.names] } + } + return found && { value: found, names: [name] } +} + +/** Whether a seam helper annotates one of `names` in place before `use` publishes it. */ +function annotatedBefore(names, scope, use) { + let annotated = false + const visit = (node) => { + if (node.pos >= use.pos) { + return + } + if ( + node.end <= use.pos && + ts.isCallExpression(node) && + ts.isIdentifier(node.expression) && + Object.hasOwn(ANNOTATED_ARGUMENT, node.expression.text) + ) { + const argument = node.arguments[ANNOTATED_ARGUMENT[node.expression.text]] + annotated ||= + argument !== undefined && ts.isIdentifier(argument) && names.includes(argument.text) + } + ts.forEachChild(node, visit) + } + visit(scope) + return annotated +} + +function rawValue(node) { + const initializer = ts.isShorthandPropertyAssignment(node) ? node.name : node.initializer + if (isRawRecord(initializer)) { + return true + } + if (!ts.isIdentifier(initializer)) { + return false + } + // Follow the local binding and its aliases; the record must be annotated before it is published. + for (let scope = enclosingScope(node); scope; scope = scope.parent && enclosingScope(scope)) { + const binding = bindingSource(initializer.text, scope, node) + if (binding) { + return isRawRecord(binding.value) && !annotatedBefore(binding.names, scope, node) + } + if (ts.isSourceFile(scope)) { + break + } + } + return false +} + +export function writerViolations(file, text) { + const source = parse(file, text) + const violations = [] + const visit = (node) => { + if ( + (ts.isPropertyAssignment(node) || ts.isShorthandPropertyAssignment(node)) && + (ts.isIdentifier(node.name) || ts.isStringLiteral(node.name)) && + SEAM_FIELDS.has(node.name.text) && + rawValue(node) + ) { + violations.push( + `${file}:${line(source, node)} raw ${node.name.text} record; build it with a replace helper or draft, or mark it full resync` + ) + } + ts.forEachChild(node, visit) + } + visit(source) + return violations +} + +export function collect(root = process.cwd()) { + const violations = [] + for (const [file, rules] of CONSUMERS) { + violations.push( + ...consumerViolations(file, fs.readFileSync(path.join(root, file), 'utf8'), rules) + ) + } + for (const file of WRITERS) { + violations.push(...writerViolations(file, fs.readFileSync(path.join(root, file), 'utf8'))) + } + return violations +} + +export function main(root = process.cwd()) { + const violations = collect(root) + if (violations.length) { + for (const violation of violations) { + console.error(violation) + } + console.error( + 'Tab-map seam: ordinary handlers use addressed deltas (readTabMapChanges); whole-map walks belong only in the named cold paths.' + ) + return 1 + } + console.log( + `tab-map-seam ratchet OK — ${CONSUMERS.size} consumer and ${WRITERS.length} writer modules pinned.` + ) + return 0 +} + +if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { + process.exit(main(process.cwd())) +} diff --git a/config/scripts/static-analysis/ratchets/renderer-state/check-tab-map-seam-ratchet.test.mjs b/config/scripts/static-analysis/ratchets/renderer-state/check-tab-map-seam-ratchet.test.mjs new file mode 100644 index 00000000000..7f4a6dfb6b1 --- /dev/null +++ b/config/scripts/static-analysis/ratchets/renderer-state/check-tab-map-seam-ratchet.test.mjs @@ -0,0 +1,87 @@ +import { describe, expect, it } from 'vitest' +import { CONSUMERS, consumerViolations, writerViolations } from './check-tab-map-seam-ratchet.mjs' + +const BRIDGE = + 'src/renderer/src/components/native-chat/session/status/StructuredAgentSessionStatusBridge.tsx' +const rules = CONSUMERS.get(BRIDGE) + +describe('tab-map seam guard', () => { + it('rejects an ordinary handler reaching the cold path or walking a map', () => { + const text = [ + 'const reconcileFromSnapshot = () => getStructuredAgentSessionTabs(source)', + 'const reconcile = () => reconcileFromSnapshot()', + 'const ordinary = () => { reconcileFromSnapshot(); Object.keys(source) }' + ].join('\n') + expect(consumerViolations('bridge.tsx', text, rules)).toEqual([ + 'bridge.tsx:3 reconcileFromSnapshot() outside a named cold path', + 'bridge.tsx:3 Object.keys outside a named cold path' + ]) + }) + + it('rejects an unreviewed value import, not type imports', () => { + const text = [ + "import { wholeMap } from './new-walk'", + "import type { Walk } from './new-walk'" + ].join('\n') + expect(consumerViolations('bridge.tsx', text, rules)).toEqual([ + 'bridge.tsx:1 imports wholeMap; repaired consumers import only reviewed helpers' + ]) + }) + + it('follows a raw record through a local binding unless it is marked full resync', () => { + const text = [ + 'function raw(state) {', + ' const next = { ...state.unifiedTabsByWorktree, [id]: tabs }', + ' set({ unifiedTabsByWorktree: next })', + '}', + 'function annotated(state) {', + ' const next = { ...state.unifiedTabsByWorktree, [id]: tabs }', + ' markFullResync(next, "hydration")', + ' set({ unifiedTabsByWorktree: next })', + '}' + ].join('\n') + expect(writerViolations('writer.ts', text)).toEqual([ + 'writer.ts:3 raw unifiedTabsByWorktree record; build it with a replace helper or draft, or mark it full resync' + ]) + }) + + it('follows aliases of cold helpers and enumerators', () => { + const text = [ + 'const reconcileFromSnapshot = () => getStructuredAgentSessionTabs(source)', + 'const reconcile = () => reconcileFromSnapshot()', + 'const resync = reconcileFromSnapshot', + 'const keys = Object.keys' + ].join('\n') + expect(consumerViolations('bridge.tsx', text, rules)).toEqual([ + 'bridge.tsx:3 reconcileFromSnapshot() outside a named cold path', + 'bridge.tsx:4 Object.keys outside a named cold path' + ]) + }) + + it('follows aliased raw records and requires annotation before publication', () => { + const raw = + 'raw unifiedTabsByWorktree record; build it with a replace helper or draft, or mark it full resync' + const text = [ + 'function aliased(state) {', + ' const next = { ...state.unifiedTabsByWorktree, [id]: tabs }', + ' const unifiedTabsByWorktree = next', + ' set({ unifiedTabsByWorktree })', + '}', + 'function late(state) {', + ' const next = { ...state.unifiedTabsByWorktree, [id]: tabs }', + ' set({ unifiedTabsByWorktree: next })', + ' markFullResync(next, "hydration")', + '}', + 'function early(state) {', + ' const next = { ...state.unifiedTabsByWorktree, [id]: tabs }', + ' const alias = next', + ' markFullResync(alias, "hydration")', + ' set({ unifiedTabsByWorktree: alias })', + '}' + ].join('\n') + expect(writerViolations('writer.ts', text)).toEqual([ + `writer.ts:4 ${raw}`, + `writer.ts:8 ${raw}` + ]) + }) +}) diff --git a/config/scripts/test-runtime/sqlite-admission/vitest-node-runtime-files.mjs b/config/scripts/test-runtime/sqlite-admission/vitest-node-runtime-files.mjs index d8942881e55..7f9ba3b8138 100644 --- a/config/scripts/test-runtime/sqlite-admission/vitest-node-runtime-files.mjs +++ b/config/scripts/test-runtime/sqlite-admission/vitest-node-runtime-files.mjs @@ -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', diff --git a/config/scripts/workflow/source-routing/pr-code-change-scope.mjs b/config/scripts/workflow/source-routing/pr-code-change-scope.mjs index c6c1856325e..971ee6708a7 100644 --- a/config/scripts/workflow/source-routing/pr-code-change-scope.mjs +++ b/config/scripts/workflow/source-routing/pr-code-change-scope.mjs @@ -209,7 +209,7 @@ const CROSS_VERSION_WIRE_PREFIXES = [ 'src/shared/protocol-version', 'src/shared/terminal/stream/terminal-stream-protocol', 'src/shared/browser/client-hosting/browser-client-host-protocol', - 'src/shared/browser-network-tunnel-protocol', + 'src/shared/browser/network/tunnels/browser-network-tunnel-protocol', // Both released/current WebSocket transports must accept web upgrade marker (cross-version-web-upgrade-marker). 'src/main/runtime/rpc/ws-transport.ts', 'src/shared/web-origin-security.ts', diff --git a/config/scripts/workflow/source-routing/pr-e2e-source-routing.mjs b/config/scripts/workflow/source-routing/pr-e2e-source-routing.mjs index 509507aa49f..7da6a6823ae 100644 --- a/config/scripts/workflow/source-routing/pr-e2e-source-routing.mjs +++ b/config/scripts/workflow/source-routing/pr-e2e-source-routing.mjs @@ -259,7 +259,7 @@ export const PR_E2E_SOURCE_ROUTES = [ MANAGED_SSH_HARNESS.test(file) || /^tests\/e2e\/helpers\/browser-split-(?:guest-probes|page-server)\.ts$/.test(file) || (isProductSource(file) && - /^src\/renderer\/src\/(?:lib\/(?:file-preview|workspace-file-drag|worktree-runtime-owner|connection-context)\.ts|components\/(?:right-sidebar\/file-explorer\/panel\/FileExplorer(?:Row|VirtualRows)\.tsx|browser-pane\/(?:navigate\/use-browser-page-navigation-downloads\.ts|host-guest\/attach-browser-page-webview\.ts)))$/.test( + /^src\/renderer\/src\/(?:lib\/(?:browser\/documents\/file-preview|workspace-file-drag|worktree-runtime-owner)\.ts|lib\/workspace\/ownership\/connection-context\.ts|components\/(?:right-sidebar\/file-explorer\/panel\/FileExplorer(?:Row|VirtualRows)\.tsx|browser-pane\/(?:navigate\/use-browser-page-navigation-downloads\.ts|host-guest\/attach-browser-page-webview\.ts)))$/.test( file )) }, @@ -280,7 +280,7 @@ export const PR_E2E_SOURCE_ROUTES = [ MANAGED_SSH_HARNESS.test(file) || file === 'tests/e2e/helpers/terminal-workspace-root-link.ts' || (isProductSource(file) && - /^src\/renderer\/src\/(?:components\/terminal-pane\/terminal-(?:worktree-path-link|file-link-actions|file-link-hit-testing|file-open-routing|link-handlers)\.ts|lib\/(?:workspace-file-host-routing|worktree-owner-route|worktree-operation-route|worktree-operation-catalog-route)\.ts)$/.test( + /^src\/renderer\/src\/(?:components\/terminal-pane\/terminal-(?:worktree-path-link|file-link-actions|file-link-hit-testing|file-open-routing|link-handlers)\.ts|(?:runtime\/files\/workspace-file-host-routing|lib\/workspace\/ownership\/(?:worktree-owner-route|worktree-operation-route|worktree-operation-catalog-route))\.ts)$/.test( file )) }, diff --git a/config/scripts/workflow/source-routing/pr-editor-preview-e2e-source-routes.mjs b/config/scripts/workflow/source-routing/pr-editor-preview-e2e-source-routes.mjs index 20e97e8d2f9..22ff77e7998 100644 --- a/config/scripts/workflow/source-routing/pr-editor-preview-e2e-source-routes.mjs +++ b/config/scripts/workflow/source-routing/pr-editor-preview-e2e-source-routes.mjs @@ -25,8 +25,8 @@ export const PR_EDITOR_PREVIEW_E2E_SOURCE_ROUTES = [ (file.startsWith('src/renderer/src/components/editor/model-lifetime/identity/') || [ 'src/renderer/src/components/editor/useEditorPanelFileContentLoader.ts', - 'src/renderer/src/lib/editor-file-operation-owner.ts', - 'src/renderer/src/lib/editor-file-operation-provenance.ts' + 'src/renderer/src/lib/editor/file-operations/editor-file-operation-owner.ts', + 'src/renderer/src/lib/editor/file-operations/editor-file-operation-provenance.ts' ].includes(file)) }, { diff --git a/config/scripts/workflow/source-routing/pr-layout-oracle-route.mjs b/config/scripts/workflow/source-routing/pr-layout-oracle-route.mjs index 0b31fb8b6f5..ac16f8b4df8 100644 --- a/config/scripts/workflow/source-routing/pr-layout-oracle-route.mjs +++ b/config/scripts/workflow/source-routing/pr-layout-oracle-route.mjs @@ -29,7 +29,7 @@ const LAYOUT_ORACLE_PREFIXES = [ 'src/renderer/src/attention/orca-window-foreground-focus.ts', 'src/renderer/src/attention/notification-workspace-labels.ts', 'src/renderer/src/lib/agent-session/identity/pane-agent-session-id.ts', - 'src/renderer/src/lib/wsl-host-availability.ts', + 'src/renderer/src/runtime/hosts/wsl/wsl-host-availability.ts', 'src/renderer/src/lib/workspace/ownership/workspace-runtime-environment.ts', 'src/renderer/src/components/tab-group/tab-drag-drop-commit.ts', 'src/renderer/src/app-shell/use-runtime-graph-sync.ts', diff --git a/config/scripts/workflow/source-routing/pr-package-test-paths.mjs b/config/scripts/workflow/source-routing/pr-package-test-paths.mjs index 627cfe9031b..2bae139d3bb 100644 --- a/config/scripts/workflow/source-routing/pr-package-test-paths.mjs +++ b/config/scripts/workflow/source-routing/pr-package-test-paths.mjs @@ -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', @@ -160,7 +159,6 @@ export const WINDOWS_BOUNDARY_TESTS = [ 'src/main/windows/windows-registry-addon.test.ts', 'src/main/daemon/executable-host/windows/testing/daemon-host-process-package.test.ts', 'src/shared/windows-security-addon.win32.test.ts', - 'src/shared/windows-private-credential-file.test.ts', 'config/scripts/desktop-distribution/runtime-verification/package-electron-runtime-contract.test.mjs', 'config/scripts/desktop-distribution/runtime-verification/electron-builder-runtime-resources.test.mjs', 'src/main/browser/client-pages/renderer/browser-client-page-renderer-lifecycle.electron.test.ts', @@ -172,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', diff --git a/config/tsconfig.tc.web.json b/config/tsconfig.tc.web.json index cf041be983c..d7542c5e628 100644 --- a/config/tsconfig.tc.web.json +++ b/config/tsconfig.tc.web.json @@ -4,7 +4,6 @@ "../src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-in-new-tab-main-surface.test.ts", "../src/renderer/src/components/task-page/linear/task-page-linear-detail-query.test.tsx", "../tests/e2e/terminal-agent-pane-launch.unit.test.ts", - "../src/renderer/src/components/status-bar/ClaudeSwitcherMenu.owner-lifetime.test.tsx", "../src/renderer/src/runtime/provider-accounts/observations/provider-account-observation.test-fixture.ts", "../src/shared/**/*.test.ts", "../src/shared/**/*.test.tsx", diff --git a/config/tsconfig.test.pane-launch.json b/config/tsconfig.test.pane-launch.json index f476bd1de39..63896e6d839 100644 --- a/config/tsconfig.test.pane-launch.json +++ b/config/tsconfig.test.pane-launch.json @@ -8,7 +8,6 @@ "../tests/e2e/terminal-agent-pane-launch.unit.test.ts", "../src/renderer/src/runtime/observed-provider-accounts.test.tsx", "../src/renderer/src/components/status-bar/ClaudeSwitcherMenu.observation.test.tsx", - "../src/renderer/src/components/status-bar/ClaudeSwitcherMenu.owner-lifetime.test.tsx", "../src/renderer/src/runtime/provider-accounts/observations/provider-account-observation.test-fixture.ts", "../src/renderer/src/env.d.ts", "../src/types/build-constants.d.ts", diff --git a/config/tsconfig.web.json b/config/tsconfig.web.json index ddb38d005ec..02a420684d3 100644 --- a/config/tsconfig.web.json +++ b/config/tsconfig.web.json @@ -14,7 +14,6 @@ "../src/renderer/src/lib/agent-session/launch/new-tab/launch-agent-in-new-tab-main-surface.test.ts", "../src/renderer/src/components/task-page/linear/task-page-linear-detail-query.test.tsx", "../tests/e2e/terminal-agent-pane-launch.unit.test.ts", - "../src/renderer/src/components/status-bar/ClaudeSwitcherMenu.owner-lifetime.test.tsx", "../src/renderer/src/runtime/provider-accounts/observations/provider-account-observation.test-fixture.ts" ], "compilerOptions": { diff --git a/config/vitest.agent-status-benchmark.config.ts b/config/vitest.agent-status-benchmark.config.ts deleted file mode 100644 index 32b047405bb..00000000000 --- a/config/vitest.agent-status-benchmark.config.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { defineConfig } from 'vitest/config' -import baseConfig from './vitest.config' - -export default defineConfig({ - ...baseConfig, - test: { - ...baseConfig.test, - // Project-level includes otherwise override this benchmark-only selection. - projects: undefined, - include: ['config/scripts/performance/agent-lineage/agent-status-hot-path-benchmark.ts'], - fileParallelism: false, - retry: 0 - } -}) diff --git a/config/workspace-record-read-baseline.txt b/config/workspace-record-read-baseline.txt index 46a6fdd2dbd..ca14f9bf2ad 100644 --- a/config/workspace-record-read-baseline.txt +++ b/config/workspace-record-read-baseline.txt @@ -29,24 +29,24 @@ 2 src/renderer/src/hooks/composer-state/composer-target-state.ts # P5b-2 must clear: composer store snapshot 3 src/renderer/src/lib/agent-session/resume/sleeping-record-execution-host-scope.ts # P5b-2 must clear: loosely typed state param 1 src/renderer/src/lib/browser/navigation/http-link-localhost-route.ts # P5b-2 must clear: optional state field defaults to empty; extracted from http-link-routing.ts -1 src/renderer/src/lib/connection-owner-resolution.ts # P5b-2 must clear: optional-chain compare of a previous slice -2 src/renderer/src/lib/direct-ssh-target-scope.ts # P5b-2 must clear: optional input fields default to empty +1 src/renderer/src/lib/workspace/ownership/connection-owner-resolution.ts # P5b-2 must clear: optional-chain compare of a previous slice +2 src/renderer/src/lib/workspace/ownership/direct-ssh-target-scope.ts # P5b-2 must clear: optional input fields default to empty 3 src/renderer/src/lib/duplicate-paired-servers.ts # P5b-2 must clear: optional state fields default to empty -1 src/renderer/src/lib/folder-workspace-runtime-owner.ts # P5b-2 must clear: loosely typed state param -1 src/renderer/src/lib/local-project-runtime-workspace.ts # P5b-2 must clear: optional state field defaults to empty +1 src/renderer/src/lib/workspace/ownership/folder-workspace-runtime-owner.ts # P5b-2 must clear: loosely typed state param +1 src/renderer/src/runtime/hosts/wsl/local-project-runtime-workspace.ts # P5b-2 must clear: optional state field defaults to empty 1 src/renderer/src/lib/resolved-worktree-execution-host.ts # P5b-2 must clear: loosely typed state param -2 src/renderer/src/lib/runtime-session-mirror-owners.ts # P5b-2 must clear: optional state fields default to empty +2 src/renderer/src/lib/workspace/ownership/runtime-session-mirror-owners.ts # P5b-2 must clear: optional state fields default to empty 2 src/renderer/src/lib/terminal-worktree-route.ts # P5b-2 must clear: the unattributed-twin check reads both catalogs directly 3 src/renderer/src/lib/typing-latency/diagnostic-summary.ts # P5b-2 must clear: optional state field 2 src/renderer/src/lib/unread-badge-count.ts # reads a passed-in copy 1 src/renderer/src/lib/workspace-directory.ts # P5b-2 must clear: optional state field defaults to empty -2 src/renderer/src/lib/workspace-terminal-host-authority.ts # P5b-2 must clear: optional state fields +2 src/renderer/src/lib/workspace/ownership/workspace-terminal-host-authority.ts # P5b-2 must clear: optional state fields 1 src/renderer/src/lib/workspace/activation/initial-surface/worktree-initial-terminal-seeding.ts # P5b-2 must clear: treats an undefined field as a narrow adapter 1 src/renderer/src/lib/workspace/activation/worktree-activation-pty-inventory.ts # P5b-2 must clear: loosely typed state param 2 src/renderer/src/lib/workspace/ownership/worktree-runtime-owner.ts # P5b-2 must clear: loosely typed state param 3 src/renderer/src/lib/workspace/persistence/workspace-session-host-persistence.ts # P5b-2 must clear: loosely typed state param 1 src/renderer/src/lib/workspace/persistence/workspace-session.ts # P5b-2 must clear: store snapshot read; file at the max-lines limit -6 src/renderer/src/lib/worktree-operation-route.ts # P5b-2 must clear: optional state fields default to empty +6 src/renderer/src/lib/workspace/ownership/worktree-operation-route.ts # P5b-2 must clear: optional state fields default to empty 3 src/renderer/src/runtime/native-chat/local-sessions/local-structured-session-tab-retirement.ts # P5b-2 must clear: optional state fields default to empty 2 src/renderer/src/runtime/sync-runtime-graph/sync-key.ts # reads a passed-in copy 3 src/renderer/src/store/folder-workspaces/folder-workspace-catalog-actions.ts # store writer diff --git a/config/worktree-id-composer-baseline.txt b/config/worktree-id-composer-baseline.txt index cb539c08ba8..ac27b7b8975 100644 --- a/config/worktree-id-composer-baseline.txt +++ b/config/worktree-id-composer-baseline.txt @@ -1,19 +1,18 @@ # Hand-built worktree ids (`${repoId}::${path}`) per file, outside src/shared/worktree/id.ts. # This is a RATCHET: counts may only go DOWN. Compose ids with composeWorktreeId or # getRepoMainWorktreeId instead. Prune after a fix: pnpm check:worktree-id-composer-ratchet --prune +1 src/main/git/remotes/worktree-push-target-reconciliation.ts 1 src/main/ipc/workspace-cleanup/workspace-cleanup-scan.ts 1 src/main/ipc/worktree-folder-rename-target.ts 1 src/main/ipc/worktree-metadata-merge.ts -1 src/main/git/remotes/worktree-push-target-reconciliation.ts 2 src/main/ipc/worktree-remote.ts 1 src/main/ipc/worktrees/listing/detected-provider-listing.ts 1 src/main/ipc/worktrees/listing/ssh-worktree-fallback.ts -2 src/main/ipc/worktrees/removal/nested-worktree-removal.ts 1 src/main/memory/hydrate-local-pty-registry.ts 1 src/main/runtime/workspaces/catalog/repo-worktree-row-resolution.ts -1 src/main/runtime/workspaces/creation/runtime-local-worktree-materialization.ts 1 src/main/runtime/workspaces/catalog/runtime-managed-worktree-queries.ts +1 src/main/runtime/workspaces/creation/runtime-local-worktree-materialization.ts 1 src/main/runtime/workspaces/creation/runtime-provisioned-root-adoption.ts -1 src/main/workspaces/space-analysis/workspace-space-repo-scan.ts 1 src/main/workspaces/catalog/worktree-lineage-pruning.ts +1 src/main/workspaces/space-analysis/workspace-space-repo-scan.ts 1 src/renderer/src/components/sidebar/workspace-actions/deletion/DeleteNestedWorktreesDialog.tsx diff --git a/docs/assets/readme-downloads.svg b/docs/assets/readme-downloads.svg index 844b8971f54..968f6560164 100644 --- a/docs/assets/readme-downloads.svg +++ b/docs/assets/readme-downloads.svg @@ -1,5 +1,5 @@ - - downloads: 160m + + downloads: 162m @@ -15,7 +15,7 @@ downloads downloads - 160m - 160m + 162m + 162m diff --git a/docs/reference/plugin-host-api.md b/docs/reference/plugin-host-api.md index f5e2c6e36bb..87dee966b62 100644 --- a/docs/reference/plugin-host-api.md +++ b/docs/reference/plugin-host-api.md @@ -2,7 +2,7 @@ -Host API 1.4 (`"pluginApi": 1`). Workers call a method with `await orca.host.call(name, params)`; panels and custom editors call the same methods through `window.orca.host.call(name, params)`. Each method lists the surfaces allowed to call it; any other surface gets `not_permitted`. `orca.host.has(name)` answers synchronously whether this Orca offers a method on the current surface, and `orca.api` is `{ major, minor }`. See [Plugin authoring](./plugin-authoring.md) for the frame API. +Host API 1.5 (`"pluginApi": 1`). Workers call a method with `await orca.host.call(name, params)`; panels and custom editors call the same methods through `window.orca.host.call(name, params)`. Each method lists the surfaces allowed to call it; any other surface gets `not_permitted`. `orca.host.has(name)` answers synchronously whether this Orca offers a method on the current surface, and `orca.api` is `{ major, minor }`. See [Plugin authoring](./plugin-authoring.md) for the frame API. Every call is checked against the capabilities the user approved, and params are validated before Orca runs anything: params are strict, so a field this Orca does not know is refused with `invalid_params` instead of being dropped. Mutations are recorded in the audit log as `plugin:.`. @@ -35,6 +35,7 @@ Methods whose capability is `none` need no capability but still need the plugin | [`appearance.apply`](#appearanceapply) | `appearance:write` | worker | yes | 1.4 | Publishes owned app/editor and terminal colors and selects them in the desktop. Returns publication, not renderer acknowledgement. | | [`workspace.list`](#workspacelist) | `workspace:read` | worker | no | 1.3 | Lists every workspace, Git worktrees and folders, on every host Orca reaches. | | [`workspace.open`](#workspaceopen) | `workspace:write` | worker | yes | 1.3 | Shows a workspace in Orca, as clicking it in the sidebar does; a folder workspace needs the desktop app. | +| [`workspace.rename`](#workspacerename) | `workspace:write` | worker | yes | 1.5 | Renames a workspace in Orca's sidebar, as renaming it by hand does; the name stays until it is renamed again. | | [`terminal.create`](#terminalcreate) | `terminal:send` | worker | yes | 1.3 | Opens a terminal in a workspace, optionally running a command, in the background. | | [`terminal.read`](#terminalread) | `terminal:read` | worker | no | 1.3 | Reads a terminal's newest output as plain text, at most 2000 lines. | | [`agent.launch`](#agentlaunch) | `agent:launch` | worker | yes | 1.3 | Starts an agent's CLI in a new terminal of a workspace, in the background, and returns as soon as it starts; a `prompt` is sent once the agent is ready. | @@ -214,7 +215,7 @@ Publishes owned app/editor and terminal colors and selects them in the desktop. Lists every workspace, Git worktrees and folders, on every host Orca reaches. ```ts -(params?: {}) => { workspaces: { id: string; kind: "worktree" | "folder"; name: string; path: string; branch: string | null; hostId: string | null }[]; truncated: boolean } +(params?: {}) => { workspaces: { id: string; kind: "worktree" | "folder"; name: string; project?: string | null; path: string; branch: string | null; hostId: string | null }[]; truncated: boolean } ``` ### `workspace.open` @@ -225,6 +226,14 @@ Shows a workspace in Orca, as clicking it in the sidebar does; a folder workspac (params: { workspaceId: string }) => { opened: true } ``` +### `workspace.rename` + +Renames a workspace in Orca's sidebar, as renaming it by hand does; the name stays until it is renamed again. + +```ts +(params: { workspaceId: string; name: string }) => { name: string } +``` + ### `terminal.create` Opens a terminal in a workspace, optionally running a command, in the background. diff --git a/docs/site/content/docs/remote-servers.mdx b/docs/site/content/docs/remote-servers.mdx index 866722a7fc5..0b85c58e10a 100644 --- a/docs/site/content/docs/remote-servers.mdx +++ b/docs/site/content/docs/remote-servers.mdx @@ -189,6 +189,24 @@ Use only one host mode at a time. If the Orca desktop app is already sharing tha `orca serve` runs on Orca's own Node server (orcad) by default. If orcad can't serve on this computer, it uses the desktop app's server instead and prints one line saying why. On a packaged macOS app it uses the desktop app's server, so paired clients can still update it, unless you set `ORCA_SERVE_RUNTIME=orcad` (see [A Mac reached only over SSH](#a-mac-reached-only-over-ssh)). To always use the desktop app's server, set `ORCA_SERVE_RUNTIME=electron`. +### Install only the server on Linux + +Each release also publishes the server alone for Linux x64 and arm64: orcad, the Node runtime it runs on, and the `orca-ide` CLI. It needs no desktop packages (GTK, X11, Xvfb), so it suits your own headless Linux servers, VMs and containers. It is about 60 MB to download, against 190 MB for the `.deb`. Download it, check it, and unpack it: + +```bash +arch=$(uname -m | sed 's/x86_64/x64/; s/aarch64/arm64/') +base=https://github.com/stablyai/orca/releases/latest/download +curl -fsSLO "$base/orca-server-linux-$arch.tar.gz" -O "$base/orca-server-sha256sums.txt" +sha256sum --check --ignore-missing orca-server-sha256sums.txt +sudo mkdir -p /opt/orca-server +sudo tar -xzf "orca-server-linux-$arch.tar.gz" -C /opt/orca-server --strip-components=1 +/opt/orca-server/bin/orca-ide serve --pairing-address +``` + +To pin a release, replace `latest/download` with `download/v`, and keep that release's checksum in your script rather than downloading it next to the archive. The server needs glibc 2.28 or newer (Ubuntu 20.04, Debian 10, RHEL 8 and later). + +`orca-ide serve` takes the same flags as above, including `--supervise` under a service manager and `--recipe-json`. To update, stop the server, replace `/opt/orca-server` with a newer release, and start it again; paired clients cannot update it for you. For `orca-ide serve service install`, pass `--command /opt/orca-server/bin/orca-ide` or put `/opt/orca-server/bin` on `PATH`. A server-only install has no browser panes, dictation or paired web client, because those come with the desktop app. + ### Limit terminal memory on a Linux server By default, nothing caps how much memory a terminal's processes use, so one runaway job can push the whole server into the kernel's out-of-memory killer. On Linux you can cap each terminal by setting these variables in the environment that starts `orca serve` (or in its service unit): diff --git a/docs/site/tests/docs-package.test.mjs b/docs/site/tests/docs-package.test.mjs index 06b35a04207..4b353a717c6 100644 --- a/docs/site/tests/docs-package.test.mjs +++ b/docs/site/tests/docs-package.test.mjs @@ -3,16 +3,11 @@ import { readFile, readdir } from 'node:fs/promises' import { existsSync } from 'node:fs' import path from 'node:path' import test from 'node:test' -import { pathToFileURL } from 'node:url' const siteRoot = path.resolve(import.meta.dirname, '..') const contentRoot = path.join(siteRoot, 'content', 'docs') const publicRoot = path.join(siteRoot, 'public') -async function read(relativePath) { - return readFile(path.join(siteRoot, relativePath), 'utf8') -} - async function walkFiles(directory, extension) { const entries = await readDirectory(directory) const files = [] @@ -40,19 +35,6 @@ function isMediaPath(urlPath) { return /\.(?:gif|jpe?g|png|webp|mp4|svg|ico)$/i.test(urlPath.split(/[?#]/, 1)[0]) } -test('docs content and navigation metadata are discoverable', async () => { - const pages = await walkFiles(contentRoot, '.mdx') - assert.ok(pages.length > 0, 'expected docs content pages') - - const navigationFiles = await walkFiles(contentRoot, 'meta.json') - assert.ok(navigationFiles.length > 0, 'expected navigation metadata') - for (const file of navigationFiles) { - const metadata = JSON.parse(await readFile(file, 'utf8')) - assert.ok(metadata.title, `navigation title missing in ${file}`) - assert.ok(Array.isArray(metadata.pages), `navigation pages missing in ${file}`) - } -}) - test('every local media URL referenced by docs resolves in public assets', async () => { const files = await walkFiles(contentRoot, '.mdx') const localUrls = new Set() @@ -84,29 +66,3 @@ test('docs content does not link to routes that only exist on the marketing site } } }) - -test('GIF media helpers use the shared poster and video variants', async () => { - const media = await import(pathToFileURL(path.join(siteRoot, 'src', 'lib', 'demoMedia.mjs')).href) - assert.equal(media.posterFor('/docs/orca-design-mode.gif'), '/docs/posters/orca-design-mode.jpg') - assert.equal(media.videoFor('/docs/orca-design-mode.gif'), '/docs/videos/orca-design-mode.mp4') - assert.equal(media.posterFor('/docs/tab-split.gif'), '/docs/posters/tab-split.jpg') - assert.equal(media.videoFor('/docs/tab-split.gif'), '/docs/videos/tab-split.mp4') - - for (const name of ['orca-design-mode', 'tab-split']) { - assert.ok(existsSync(path.join(publicRoot, 'docs', 'posters', `${name}.jpg`))) - assert.ok(existsSync(path.join(publicRoot, 'docs', 'videos', `${name}.mp4`))) - } -}) - -test('OG image fonts ship with their required third-party notice', async () => { - for (const filename of ['Geist-Regular.ttf', 'Geist-Bold.ttf', 'Geist-Variable.woff2']) { - assert.ok( - existsSync(path.join(siteRoot, 'src', 'assets', 'fonts', filename)), - `missing font: ${filename}` - ) - } - - const notice = await read('THIRD_PARTY_NOTICES.md') - assert.match(notice, /SIL OPEN FONT LICENSE Version 1\.1/) - assert.match(notice, /Copyright \(c\) 2023 Vercel/) -}) diff --git a/docs/site/tests/search-excerpt.test.mjs b/docs/site/tests/search-excerpt.test.mjs index 9ce21d1c874..68b2c87869d 100644 --- a/docs/site/tests/search-excerpt.test.mjs +++ b/docs/site/tests/search-excerpt.test.mjs @@ -1,22 +1,7 @@ import assert from 'node:assert/strict' import test from 'node:test' -import { runInNewContext } from 'node:vm' import { stripSearchExcerptMarkdown } from '../src/components/docs/search-excerpt.mjs' -test('unterminated escaped link destinations do not backtrack exponentially', () => { - for (const prefix of ['![](', '[label](']) { - const input = prefix + '\\('.repeat(32_768) - const result = runInNewContext( - 'strip(input)', - { strip: stripSearchExcerptMarkdown, input }, - { - timeout: 250 - } - ) - assert.equal(result, input.replace(/\\\(/g, '(')) - } -}) - test('link destinations retain escaped closing parentheses and literal escapes', () => { for (const prefix of ['![label](', '[label](']) { assert.equal(stripSearchExcerptMarkdown(prefix + 'https://example.com/a\\)b)'), 'label') @@ -60,16 +45,6 @@ test('search excerpts preserve highlighted matches inside Markdown', () => { ) }) -test('unclosed angles finish within the excerpt budget without changing text', () => { - const input = '<'.repeat(131_072) - const result = runInNewContext( - 'strip(input)', - { strip: stripSearchExcerptMarkdown, input }, - { timeout: 250 } - ) - assert.equal(result, input) -}) - test('tag guards preserve malformed markup, protected code and highlighted matches', () => { const cases = [ ['**bold**', 'bold'], @@ -99,13 +74,3 @@ test('tag guards preserve malformed markup, protected code and highlighted match assert.equal(stripSearchExcerptMarkdown(input), expected, input) } }) - -test('unclosed brackets finish within the excerpt budget without changing text', () => { - const input = '['.repeat(131_072) - const result = runInNewContext( - 'strip(input)', - { strip: stripSearchExcerptMarkdown, input }, - { timeout: 250 } - ) - assert.equal(result, input) -}) diff --git a/docs/site/tests/zod-security.test.mjs b/docs/site/tests/zod-security.test.mjs deleted file mode 100644 index 8308ff558a4..00000000000 --- a/docs/site/tests/zod-security.test.mjs +++ /dev/null @@ -1,52 +0,0 @@ -import assert from 'node:assert/strict' -import { createRequire } from 'node:module' -import { dirname, join } from 'node:path' -import test from 'node:test' -import { pathToFileURL } from 'node:url' - -const require = createRequire(import.meta.url) -const vercelRequire = createRequire(require.resolve('vercel/package.json')) -const backendsRequire = createRequire(vercelRequire.resolve('@vercel/backends/package.json')) -const zodRoot = dirname(backendsRequire.resolve('zod/package.json')) - -for (const extension of ['cjs', 'js']) { - for (const entry of ['index', 'v3/index', 'v4/index']) { - test(`Vercel Zod rejects oversized collections before parsing elements (${entry}.${extension})`, async () => { - const path = join(zodRoot, `${entry}.${extension}`) - const z = extension === 'cjs' ? require(path) : await import(pathToFileURL(path).href) - let parsed = 0 - const element = z.preprocess((value) => { - parsed += 1 - return value - }, z.string()) - for (const [schema, value, valid] of [ - [z.array(element).max(2), Array(1_000).fill(0), ['a']], - [z.array(element).length(2), Array(1_000).fill(0), ['a', 'b']], - [z.set(element).max(2), new Set([1, 2, 3]), new Set(['a'])], - [z.set(element).size(2), new Set([1, 2, 3]), new Set(['a', 'b'])] - ]) { - parsed = 0 - for (const result of [schema.safeParse(value), await schema.safeParseAsync(value)]) { - assert.equal(result.success, false) - assert.deepEqual( - result.error.issues.map((issue) => issue.code), - ['too_big'] - ) - } - assert.equal(parsed, 0) - assert.deepEqual(schema.parse(valid), valid) - assert.deepEqual(await schema.parseAsync(valid), valid) - } - }) - } -} - -test('docs Zod 4 keeps valid schemas working after the security upgrade', async () => { - const { z } = await import('zod') - const schema = z.array(z.string()).max(2) - assert.deepEqual(schema.parse(['a']), ['a']) - assert.deepEqual( - schema.safeParse([1, 2, 3]).error.issues.map((issue) => issue.code), - ['too_big'] - ) -}) diff --git a/electron.vite.config.ts b/electron.vite.config.ts index 0a2e110aca1..6f3700a4962 100644 --- a/electron.vite.config.ts +++ b/electron.vite.config.ts @@ -6,7 +6,10 @@ import type { Plugin, Rollup } from 'vite' import react from '@vitejs/plugin-react' import tailwindcss from '@tailwindcss/vite' import { createBootstrapFatalExitBanner } from './config/build-plugins/bootstrap-fatal-exit-banner' -import { createSandboxedScriptBundlesPlugin } from './config/build-plugins/sandboxed-script-bundles' +import { + createSandboxedScriptBundlesPlugin, + ONE_BYTE_UNMINIFIED_OUTPUT +} from './config/build-plugins/sandboxed-script-bundles' import { createMainLocaleSubsetPlugin } from './config/build-plugins/main-locale-subset' import { createSucraseUnusedTransformersPlugin } from './config/build-plugins/sucrase-unused-transformers' import { createPdfjsViewerAssetsPlugin } from './config/build-plugins/pdfjs-viewer-assets' @@ -264,10 +267,7 @@ export const electronViteConfig: UserConfig = { preload: { build: { externalizeDeps: false, - rollupOptions: { - // Unminified preload keeps dependency JSDoc whose em dashes would force two-byte storage in every renderer. - output: { charset: 'ascii', comments: { legal: true, annotation: true, jsdoc: false } } - } + rollupOptions: { output: ONE_BYTE_UNMINIFIED_OUTPUT } } }, renderer: { diff --git a/mobile/app/h/[hostId]/edit.tsx b/mobile/app/h/[hostId]/edit.tsx index a8b15a72f52..38dc364e575 100644 --- a/mobile/app/h/[hostId]/edit.tsx +++ b/mobile/app/h/[hostId]/edit.tsx @@ -1,4 +1,5 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { useQueryClient } from '@tanstack/react-query' import { Alert, View, @@ -45,6 +46,7 @@ export default function EditHostScreen() { const primeHosts = usePrimeHosts() const refreshHostClient = useRefreshHostClient() const forgetHostClient = useForgetHostClient() + const queryClient = useQueryClient() const [host, setHost] = useState(null) const [loadError, setLoadError] = useState(null) @@ -189,7 +191,7 @@ export default function EditHostScreen() { return } try { - await removeHostAndCloseClient(host.id, forgetHostClient) + await removeHostAndCloseClient(host.id, forgetHostClient, queryClient) } catch { setConfirmRemove(true) Alert.alert( diff --git a/mobile/app/h/_layout.tsx b/mobile/app/h/_layout.tsx index 85791eb3eb3..5b70ff90b8e 100644 --- a/mobile/app/h/_layout.tsx +++ b/mobile/app/h/_layout.tsx @@ -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 ( - - {showSidebar && (sidebarOpen || foldSidebarWidth !== null) ? ( - - - {/* Edge drag handle captures Android gestures above the list. */} - {foldSidebarWidth === null ? ( - - ) : null} + {/* One dictation per host document, outliving the session screen that started it. */} + + + {showSidebar && (sidebarOpen || foldSidebarWidth !== null) ? ( + + + {/* Edge drag handle captures Android gestures above the list. */} + {foldSidebarWidth === null ? ( + + ) : null} + + ) : null} + {foldGap > 0 ? : null} + + + + + + - ) : null} - {foldGap > 0 ? : null} - - - - - - - + + ) } diff --git a/mobile/modules/orca-gzip-utf8-codec/android/src/test/java/expo/modules/orcagziputf8codec/StrictUtf8Test.kt b/mobile/modules/orca-gzip-utf8-codec/android/src/test/java/expo/modules/orcagziputf8codec/StrictUtf8Test.kt index f6c1162898d..b9a381729e5 100644 --- a/mobile/modules/orca-gzip-utf8-codec/android/src/test/java/expo/modules/orcagziputf8codec/StrictUtf8Test.kt +++ b/mobile/modules/orca-gzip-utf8-codec/android/src/test/java/expo/modules/orcagziputf8codec/StrictUtf8Test.kt @@ -1,17 +1,9 @@ package expo.modules.orcagziputf8codec -import org.junit.Assert.assertEquals import org.junit.Assert.assertNull import org.junit.Test class StrictUtf8Test { - @Test - fun `decodes well-formed UTF-8 of every sequence length`() { - val text = "{\"a\":\"xé✓🙂\"}" - assertEquals(text, decodeStrictUtf8(text.toByteArray(Charsets.UTF_8))) - assertEquals("", decodeStrictUtf8(ByteArray(0))) - } - @Test fun `hands back to JS what TextDecoder would repair or strip`() { val refused = listOf( diff --git a/mobile/modules/orca-gzip-utf8-codec/tests/GzipUtf8CodecChecks.swift b/mobile/modules/orca-gzip-utf8-codec/tests/GzipUtf8CodecChecks.swift index 53263b7f34c..0d827b818c8 100644 --- a/mobile/modules/orca-gzip-utf8-codec/tests/GzipUtf8CodecChecks.swift +++ b/mobile/modules/orca-gzip-utf8-codec/tests/GzipUtf8CodecChecks.swift @@ -37,9 +37,6 @@ import Foundation check(actual == expected, "gunzip: \(name)") } - let text = "{\"a\":\"x\u{e9}\u{2713}\u{1F642}\"}" - check(decodeStrictUtf8(Data(text.utf8)) == text, "utf8: every sequence length") - check(decodeStrictUtf8(Data()) == "", "utf8: empty") let refused: [[UInt8]] = [ [0xef, 0xbb, 0xbf, 0x41], [0xc0, 0x80], [0xed, 0xa0, 0x80], [0x41, 0xe2, 0x82], [0x80], [0xf5, 0x80, 0x80, 0x80], diff --git a/mobile/modules/orca-mobile-web-shell/android/src/test/java/expo/modules/orcamobilewebshell/MobileWebShellBridgeTest.kt b/mobile/modules/orca-mobile-web-shell/android/src/test/java/expo/modules/orcamobilewebshell/MobileWebShellBridgeTest.kt index 3e7d0937dcb..c841d7d6276 100644 --- a/mobile/modules/orca-mobile-web-shell/android/src/test/java/expo/modules/orcamobilewebshell/MobileWebShellBridgeTest.kt +++ b/mobile/modules/orca-mobile-web-shell/android/src/test/java/expo/modules/orcamobilewebshell/MobileWebShellBridgeTest.kt @@ -1,21 +1,10 @@ package expo.modules.orcamobilewebshell -import org.junit.Assert.assertEquals import org.junit.Assert.assertFalse import org.junit.Assert.assertTrue import org.junit.Test class MobileWebShellBridgeTest { - @Test - fun `caps a message at 640 KiB of raw bytes`() { - val cap = MOBILE_WEB_SHELL_BRIDGE_MAX_MESSAGE_BYTES - assertEquals(640 * 1024, cap) - assertTrue(acceptsMobileWebShellBridgeByteCount(0)) - assertTrue(acceptsMobileWebShellBridgeByteCount(cap - 1)) - assertTrue(acceptsMobileWebShellBridgeByteCount(cap)) - assertFalse(acceptsMobileWebShellBridgeByteCount(cap + 1)) - } - @Test fun `hears only a string message from the main frame of a committed document`() { assertTrue(frame()) diff --git a/mobile/modules/orca-mobile-web-shell/android/src/test/java/expo/modules/orcamobilewebshell/MobileWebShellOriginTest.kt b/mobile/modules/orca-mobile-web-shell/android/src/test/java/expo/modules/orcamobilewebshell/MobileWebShellOriginTest.kt index 080d36b7415..2f4371b7d15 100644 --- a/mobile/modules/orca-mobile-web-shell/android/src/test/java/expo/modules/orcamobilewebshell/MobileWebShellOriginTest.kt +++ b/mobile/modules/orca-mobile-web-shell/android/src/test/java/expo/modules/orcamobilewebshell/MobileWebShellOriginTest.kt @@ -62,14 +62,6 @@ class MobileWebShellOriginTest { assertNull(mobileWebShellOrigin("bad host")) } - @Test - fun `derives a different label for every session and the same one for a repeat`() { - assertEquals(mobileWebShellOriginHost(SESSION), mobileWebShellOriginHost(SESSION)) - assertTrue(mobileWebShellOriginHost(SESSION) != mobileWebShellOriginHost("${SESSION}a")) - // Case matters to the derivation even though the host comparison ignores it. - assertTrue(mobileWebShellOriginHost(SESSION) != mobileWebShellOriginHost(SESSION.uppercase())) - } - @Test fun `serves the document and a declared asset path`() { assertEquals("/", resolve(parts("/"))) diff --git a/mobile/modules/orca-mobile-web-shell/ios/MobileWebShellSparePool.swift b/mobile/modules/orca-mobile-web-shell/ios/MobileWebShellSparePool.swift index 92e9ff89ffc..79fbb8c9b10 100644 --- a/mobile/modules/orca-mobile-web-shell/ios/MobileWebShellSparePool.swift +++ b/mobile/modules/orca-mobile-web-shell/ios/MobileWebShellSparePool.swift @@ -7,6 +7,9 @@ private let minimumPhysicalMemory: UInt64 = 3 << 30 /// A claim is adopted on the claiming screen's first commit; this only bounds a screen that never mounts. private let claimExpirySeconds: TimeInterval = 10 +/// iOS has no "memory is low" to ask before booting (Android's `lowMemory`), and pressure outlasts its warning. +private let memoryWarningBackoffSeconds: TimeInterval = 180 + /// A booted document waiting for a screen. It keeps what the page reported, and the page's ready, for /// the view that adopts it: a parked page stops asking for init, so its ready is answered from here. final class MobileWebShellSpare: MobileWebShellDocumentSink { @@ -56,11 +59,14 @@ final class MobileWebShellSparePool { private var parked: MobileWebShellSpare? private var claimed: MobileWebShellSpare? private let shown = NSHashTable.weakObjects() + private var memoryWarningUptime: TimeInterval? - /// Whether a spare for `directory` is parked after the call; never on a small phone, inactive app or shown page. + /// Whether a spare for `directory` is parked after the call; never on a small phone, inactive app or shown + /// page, nor soon after a memory warning. func prepare(directory: String, sessionId: String) -> Bool { guard ProcessInfo.processInfo.physicalMemory > minimumPhysicalMemory, + !recentlyWarnedAboutMemory(), UIApplication.shared.applicationState == .active, shown.allObjects.isEmpty, let window = keyWindow() @@ -121,7 +127,13 @@ final class MobileWebShellSparePool { return document } - /// Memory pressure, the app leaving the foreground, files going away, or Home without a claim. + /// A spare is the first thing to give back: nothing is shown by it. + func didReceiveMemoryWarning() { + memoryWarningUptime = ProcessInfo.processInfo.systemUptime + discardAll() + } + + /// The app leaving the foreground, files going away, Home without a claim, or memory pressure. func discardAll() { for spare in [parked, claimed].compactMap({ $0 }) { spare.document.destroy() @@ -141,6 +153,11 @@ final class MobileWebShellSparePool { spare.document.destroy() } + private func recentlyWarnedAboutMemory() -> Bool { + guard let memoryWarningUptime else { return false } + return ProcessInfo.processInfo.systemUptime - memoryWarningUptime < memoryWarningBackoffSeconds + } + private func keyWindow() -> UIWindow? { UIApplication.shared.connectedScenes .compactMap { $0 as? UIWindowScene } diff --git a/mobile/modules/orca-mobile-web-shell/ios/OrcaMobileWebShellModule.swift b/mobile/modules/orca-mobile-web-shell/ios/OrcaMobileWebShellModule.swift index ed5e81770d1..ba18966b711 100644 --- a/mobile/modules/orca-mobile-web-shell/ios/OrcaMobileWebShellModule.swift +++ b/mobile/modules/orca-mobile-web-shell/ios/OrcaMobileWebShellModule.swift @@ -9,14 +9,13 @@ public class OrcaMobileWebShellModule: Module { public func definition() -> ModuleDefinition { Name("OrcaMobileWebShell") - // A spare is the first thing to give back: nothing is shown by it. OnCreate { memoryWarningObserver = NotificationCenter.default.addObserver( forName: UIApplication.didReceiveMemoryWarningNotification, object: nil, queue: .main ) { _ in - MobileWebShellSparePool.shared.discardAll() + MobileWebShellSparePool.shared.didReceiveMemoryWarning() } } diff --git a/mobile/modules/orca-mobile-web-shell/src/spare-document.ts b/mobile/modules/orca-mobile-web-shell/src/spare-document.ts index ca9ba5c1f85..2106c89423f 100644 --- a/mobile/modules/orca-mobile-web-shell/src/spare-document.ts +++ b/mobile/modules/orca-mobile-web-shell/src/spare-document.ts @@ -11,7 +11,8 @@ const spareModule = (): SpareDocumentModule | null => requireOptionalNativeModule('OrcaMobileWebShell') // Boot a page from `directory` under `sessionId` and park it, invisible, until a screen claims it. -// False when native declined: a phone under 4 GB, the app not active, or a page document shown. +// False when native declined: a phone under 4 GB, the app not active, a page document shown, or an iOS +// memory warning in the last few minutes. export async function prepareSpareDocument(directory: string, sessionId: string): Promise { return (await spareModule()?.prepareSpareDocument?.(directory, sessionId)) ?? false } diff --git a/mobile/modules/orca-mobile-web-shell/tests/MobileWebShellChecks.swift b/mobile/modules/orca-mobile-web-shell/tests/MobileWebShellChecks.swift index 761c1e2a3f0..4b7eba42367 100644 --- a/mobile/modules/orca-mobile-web-shell/tests/MobileWebShellChecks.swift +++ b/mobile/modules/orca-mobile-web-shell/tests/MobileWebShellChecks.swift @@ -151,17 +151,6 @@ import Foundation static func checkLoadStateMachine() { - let failures: [(MobileWebShellFailureReason, String)] = [ - (.generationUnreadable, "generation-unreadable"), - (.isolationUnavailable, "isolation-unavailable"), - (.documentLoadFailed, "document-load-failed"), - (.renderProcessGone, "render-process-gone") - ] - for (reason, expected) in failures { - let machine = MobileWebShellLoadStateMachine() - precondition(machine.failed(reason) == MobileWebShellLoadEmission(state: "failed", reason: expected)) - } - // Only the view’s own load raises the flag; commit, failure, renderer death and failed prop application clear it. let ownLoad = MobileWebShellLoadStateMachine() precondition(!ownLoad.isShellLoad) @@ -320,23 +309,6 @@ import Foundation } - static func checkBridgeByteCap() { - let cap = MobileWebShellBridge.maxMessageByteCount - precondition(cap == 640 * 1024) - precondition(MobileWebShellBridge.acceptsByteCount(0)) - precondition(MobileWebShellBridge.acceptsByteCount(cap - 1)) - precondition(MobileWebShellBridge.acceptsByteCount(cap)) - precondition(!MobileWebShellBridge.acceptsByteCount(cap + 1)) - - let gate = MobileWebShellBridgeGate() - precondition(gate.refusedCount == 0) - precondition(gate.accepts(byteCount: cap)) - precondition(gate.refusedCount == 0) - precondition(!gate.accepts(byteCount: cap + 1)) - precondition(!gate.accepts(byteCount: cap * 2)) - precondition(gate.refusedCount == 2) - } - // One allow/opener decision; TypeScript’s readBridgeExternalLinkUrl owns scheme filtering. static func checkNavigationVerdict() { let foreign = "https://example.com/artifact-link" @@ -400,41 +372,13 @@ import Foundation precondition(verdict("javascript:alert(1)") == .cancelAndOffer("javascript:alert(1)")) } - // Check flag/policy together: only one main-frame action may spend the shell’s own-load allowance. - static func checkOwnLoadIsSpentOnce() { - let document = "orca-mobile-web://\(session)/" - func decide(_ machine: MobileWebShellLoadStateMachine) -> MobileWebShellNavigationVerdict { - MobileWebShellNavigationPolicy.verdict( - url: document, - isMainFrame: true, - isDocumentUrl: true, - isShellLoad: machine.isShellLoad, - hasGesture: false, - isDownload: false - ) - } - let machine = MobileWebShellLoadStateMachine() - machine.shellLoadStarted() - let first = decide(machine) - precondition(first == .allow) - // Spend at decision, before commit: WebKit may decide a second action first. - machine.shellLoadConsumed() - precondition(decide(machine) == .cancel) - // And the endings still drop it, for a load that is allowed and then never commits. - machine.shellLoadStarted() - machine.documentEnded() - precondition(decide(machine) == .cancel) - } - static func main() { checkRequestResolution() checkGenerationMap() checkLoadStateMachine() checkNavigationVerdict() - checkOwnLoadIsSpentOnce() checkBridgeAcceptance() checkBridgePostTarget() - checkBridgeByteCap() print("mobile web shell checks OK") } } diff --git a/mobile/rpc-foundation/goldens/event-router-failed-read-floor.json b/mobile/rpc-foundation/goldens/event-router-failed-read-floor.json new file mode 100644 index 00000000000..9dd33a238a3 --- /dev/null +++ b/mobile/rpc-foundation/goldens/event-router-failed-read-floor.json @@ -0,0 +1,215 @@ +{ + "goldenFormatVersion": 6, + "operation": "query.event-router-catalog", + "family": "query.event-router-catalog", + "namedDeltas": [], + "values": { + "5bd4621f47d0": { + "name": "runtime.clientEvents.unsubscribe#1", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.unsubscribe\",\"params\":{\"subscriptionId\":\"sub-1\"}}" + }, + "704ca5c34f99": { + "name": "worktree.ps#1", + "ordinal": 3, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "78a0dbbe27a8": { + "name": "worktree.ps#2", + "ordinal": 5, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "a839711b15b8": { + "status": "pending" + }, + "ac14275e5e23": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "runtime_error", + "message": "worktree list unavailable" + }, + "id": "frame-2", + "ok": false + } + } + }, + "ae9f66f12cc9": { + "status": "fulfilled", + "startedAt": 3750, + "settledAt": 3750, + "value": { + "$rpc": "undefined" + } + }, + "b91023634f14": { + "name": "worktree.ps#2", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "c448f53917f7": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 0 + } + }, + "c7fbd9501e80": { + "status": "error" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eef1ee3c2773": { + "name": "runtime.clientEvents.subscribe#1", + "ordinal": 1, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + } + }, + "recording": { + "scenario": "event-router-failed-read-floor", + "checkpoints": [ + { + "id": "listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-1.json b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-1.json new file mode 100644 index 00000000000..f26f1fbaa5c --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-1.json @@ -0,0 +1,815 @@ +{ + "goldenFormatVersion": 6, + "operation": "query.event-router-catalog", + "family": "query.event-router-catalog", + "namedDeltas": [], + "values": { + "1eef7ff9a9b9": { + "name": "worktree.ps#2", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 3000, + "settledAt": 3750, + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true + } + } + }, + "5bd4621f47d0": { + "name": "runtime.clientEvents.unsubscribe#1", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.unsubscribe\",\"params\":{\"subscriptionId\":\"sub-1\"}}" + }, + "704ca5c34f99": { + "name": "worktree.ps#1", + "ordinal": 3, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "78a0dbbe27a8": { + "name": "worktree.ps#2", + "ordinal": 5, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "a839711b15b8": { + "status": "pending" + }, + "ac14275e5e23": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "runtime_error", + "message": "worktree list unavailable" + }, + "id": "frame-2", + "ok": false + } + } + }, + "ae9f66f12cc9": { + "status": "fulfilled", + "startedAt": 3750, + "settledAt": 3750, + "value": { + "$rpc": "undefined" + } + }, + "b91023634f14": { + "name": "worktree.ps#2", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "c448f53917f7": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 0 + } + }, + "c7fbd9501e80": { + "status": "error" + }, + "e1883df1f8f5": { + "name": "streams-registered-at-teardown", + "ordinal": 6, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#1" + } + ] + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eef1ee3c2773": { + "name": "runtime.clientEvents.subscribe#1", + "ordinal": 1, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + } + }, + "recording": { + "scenario": "matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-1", + "checkpoints": [ + { + "id": "event-router-failed-read-floor.normal:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:cleanup", + "observation": { + "sender": ["ac14275e5e23", "1eef7ff9a9b9"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["e1883df1f8f5"] + } + }, + { + "id": "event-router-failed-read-floor.result-null:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:cleanup", + "observation": { + "sender": ["ac14275e5e23", "1eef7ff9a9b9"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["e1883df1f8f5"] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:cleanup", + "observation": { + "sender": ["ac14275e5e23", "1eef7ff9a9b9"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["e1883df1f8f5"] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:cleanup", + "observation": { + "sender": ["ac14275e5e23", "1eef7ff9a9b9"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["e1883df1f8f5"] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:cleanup", + "observation": { + "sender": ["ac14275e5e23", "1eef7ff9a9b9"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["e1883df1f8f5"] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:floor-passed", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:unmounted", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:floor-passed", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:unmounted", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:floor-passed", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:unmounted", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "c7fbd9501e80", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-2.json b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-2.json new file mode 100644 index 00000000000..acdc360fc11 --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-2.json @@ -0,0 +1,566 @@ +{ + "goldenFormatVersion": 6, + "operation": "query.event-router-catalog", + "family": "query.event-router-catalog", + "namedDeltas": [], + "values": { + "5bd4621f47d0": { + "name": "runtime.clientEvents.unsubscribe#1", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.unsubscribe\",\"params\":{\"subscriptionId\":\"sub-1\"}}" + }, + "704ca5c34f99": { + "name": "worktree.ps#1", + "ordinal": 3, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "78a0dbbe27a8": { + "name": "worktree.ps#2", + "ordinal": 5, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "a328c933a31f": { + "name": "streams-registered-at-teardown", + "ordinal": 5, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#2" + } + ] + }, + "a839711b15b8": { + "status": "pending" + }, + "ac14275e5e23": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "runtime_error", + "message": "worktree list unavailable" + }, + "id": "frame-2", + "ok": false + } + } + }, + "ae9f66f12cc9": { + "status": "fulfilled", + "startedAt": 3750, + "settledAt": 3750, + "value": { + "$rpc": "undefined" + } + }, + "b91023634f14": { + "name": "worktree.ps#2", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "c448f53917f7": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 0 + } + }, + "c686e7f77d44": { + "name": "runtime.clientEvents.subscribe#2", + "ordinal": 4, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + }, + "c7fbd9501e80": { + "status": "error" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eef1ee3c2773": { + "name": "runtime.clientEvents.subscribe#1", + "ordinal": 1, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + } + }, + "recording": { + "scenario": "matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-2", + "checkpoints": [ + { + "id": "event-router-failed-read-floor.prelude:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.prelude:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:floor-passed", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:unmounted", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:cleanup", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "c7fbd9501e80", + "effects": ["a328c933a31f"] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:floor-passed", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:unmounted", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:cleanup", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "c7fbd9501e80", + "effects": ["a328c933a31f"] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:floor-passed", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:unmounted", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:cleanup", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "c7fbd9501e80", + "effects": ["a328c933a31f"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-3.json b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-3.json new file mode 100644 index 00000000000..a9e315b074f --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-3.json @@ -0,0 +1,637 @@ +{ + "goldenFormatVersion": 6, + "operation": "query.event-router-catalog", + "family": "query.event-router-catalog", + "namedDeltas": [], + "values": { + "0769c2565e2f": { + "name": "worktree.ps#2", + "ordinal": 5, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "1fcd3f3dee98": { + "name": "streams-registered-at-teardown", + "ordinal": 7, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#2" + } + ] + }, + "4e87a83926ae": { + "name": "worktree.ps#2", + "ordinal": 5, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 3000, + "settledAt": 3750, + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true + } + } + }, + "5bd4621f47d0": { + "name": "runtime.clientEvents.unsubscribe#1", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.unsubscribe\",\"params\":{\"subscriptionId\":\"sub-1\"}}" + }, + "704ca5c34f99": { + "name": "worktree.ps#1", + "ordinal": 3, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "78a0dbbe27a8": { + "name": "worktree.ps#2", + "ordinal": 5, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "8b854beb872a": { + "name": "worktree.ps#2", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "a839711b15b8": { + "status": "pending" + }, + "ac14275e5e23": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "runtime_error", + "message": "worktree list unavailable" + }, + "id": "frame-2", + "ok": false + } + } + }, + "ae9f66f12cc9": { + "status": "fulfilled", + "startedAt": 3750, + "settledAt": 3750, + "value": { + "$rpc": "undefined" + } + }, + "b91023634f14": { + "name": "worktree.ps#2", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "c448f53917f7": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 0 + } + }, + "c686e7f77d44": { + "name": "runtime.clientEvents.subscribe#2", + "ordinal": 4, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + }, + "c7fbd9501e80": { + "status": "error" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eef1ee3c2773": { + "name": "runtime.clientEvents.subscribe#1", + "ordinal": 1, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + } + }, + "recording": { + "scenario": "matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-3", + "checkpoints": [ + { + "id": "event-router-failed-read-floor.prelude:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.prelude:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-4.json b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-4.json new file mode 100644 index 00000000000..dd61b787a40 --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-4.json @@ -0,0 +1,637 @@ +{ + "goldenFormatVersion": 6, + "operation": "query.event-router-catalog", + "family": "query.event-router-catalog", + "namedDeltas": [], + "values": { + "0769c2565e2f": { + "name": "worktree.ps#2", + "ordinal": 5, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "1fcd3f3dee98": { + "name": "streams-registered-at-teardown", + "ordinal": 7, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#2" + } + ] + }, + "4e87a83926ae": { + "name": "worktree.ps#2", + "ordinal": 5, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 3000, + "settledAt": 3750, + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true + } + } + }, + "5bd4621f47d0": { + "name": "runtime.clientEvents.unsubscribe#1", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.unsubscribe\",\"params\":{\"subscriptionId\":\"sub-1\"}}" + }, + "704ca5c34f99": { + "name": "worktree.ps#1", + "ordinal": 3, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "78a0dbbe27a8": { + "name": "worktree.ps#2", + "ordinal": 5, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "8b854beb872a": { + "name": "worktree.ps#2", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "a839711b15b8": { + "status": "pending" + }, + "ac14275e5e23": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "runtime_error", + "message": "worktree list unavailable" + }, + "id": "frame-2", + "ok": false + } + } + }, + "ae9f66f12cc9": { + "status": "fulfilled", + "startedAt": 3750, + "settledAt": 3750, + "value": { + "$rpc": "undefined" + } + }, + "b91023634f14": { + "name": "worktree.ps#2", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "c448f53917f7": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 0 + } + }, + "c686e7f77d44": { + "name": "runtime.clientEvents.subscribe#2", + "ordinal": 4, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + }, + "c7fbd9501e80": { + "status": "error" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eef1ee3c2773": { + "name": "runtime.clientEvents.subscribe#1", + "ordinal": 1, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + } + }, + "recording": { + "scenario": "matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-4", + "checkpoints": [ + { + "id": "event-router-failed-read-floor.prelude:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.prelude:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-5.json b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-5.json new file mode 100644 index 00000000000..7edecb5933b --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-5.json @@ -0,0 +1,637 @@ +{ + "goldenFormatVersion": 6, + "operation": "query.event-router-catalog", + "family": "query.event-router-catalog", + "namedDeltas": [], + "values": { + "0769c2565e2f": { + "name": "worktree.ps#2", + "ordinal": 5, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "1fcd3f3dee98": { + "name": "streams-registered-at-teardown", + "ordinal": 7, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#2" + } + ] + }, + "4e87a83926ae": { + "name": "worktree.ps#2", + "ordinal": 5, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 3000, + "settledAt": 3750, + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true + } + } + }, + "5bd4621f47d0": { + "name": "runtime.clientEvents.unsubscribe#1", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.unsubscribe\",\"params\":{\"subscriptionId\":\"sub-1\"}}" + }, + "704ca5c34f99": { + "name": "worktree.ps#1", + "ordinal": 3, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "78a0dbbe27a8": { + "name": "worktree.ps#2", + "ordinal": 5, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "8b854beb872a": { + "name": "worktree.ps#2", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "a839711b15b8": { + "status": "pending" + }, + "ac14275e5e23": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "runtime_error", + "message": "worktree list unavailable" + }, + "id": "frame-2", + "ok": false + } + } + }, + "ae9f66f12cc9": { + "status": "fulfilled", + "startedAt": 3750, + "settledAt": 3750, + "value": { + "$rpc": "undefined" + } + }, + "b91023634f14": { + "name": "worktree.ps#2", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "c448f53917f7": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 0 + } + }, + "c686e7f77d44": { + "name": "runtime.clientEvents.subscribe#2", + "ordinal": 4, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + }, + "c7fbd9501e80": { + "status": "error" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eef1ee3c2773": { + "name": "runtime.clientEvents.subscribe#1", + "ordinal": 1, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + } + }, + "recording": { + "scenario": "matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-5", + "checkpoints": [ + { + "id": "event-router-failed-read-floor.prelude:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.prelude:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-6.json b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-6.json new file mode 100644 index 00000000000..fcad6692de2 --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-6.json @@ -0,0 +1,637 @@ +{ + "goldenFormatVersion": 6, + "operation": "query.event-router-catalog", + "family": "query.event-router-catalog", + "namedDeltas": [], + "values": { + "0769c2565e2f": { + "name": "worktree.ps#2", + "ordinal": 5, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "1fcd3f3dee98": { + "name": "streams-registered-at-teardown", + "ordinal": 7, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#2" + } + ] + }, + "4e87a83926ae": { + "name": "worktree.ps#2", + "ordinal": 5, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 3000, + "settledAt": 3750, + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true + } + } + }, + "5bd4621f47d0": { + "name": "runtime.clientEvents.unsubscribe#1", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.unsubscribe\",\"params\":{\"subscriptionId\":\"sub-1\"}}" + }, + "704ca5c34f99": { + "name": "worktree.ps#1", + "ordinal": 3, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "78a0dbbe27a8": { + "name": "worktree.ps#2", + "ordinal": 5, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "8b854beb872a": { + "name": "worktree.ps#2", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "a839711b15b8": { + "status": "pending" + }, + "ac14275e5e23": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "runtime_error", + "message": "worktree list unavailable" + }, + "id": "frame-2", + "ok": false + } + } + }, + "ae9f66f12cc9": { + "status": "fulfilled", + "startedAt": 3750, + "settledAt": 3750, + "value": { + "$rpc": "undefined" + } + }, + "b91023634f14": { + "name": "worktree.ps#2", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "c448f53917f7": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 0 + } + }, + "c686e7f77d44": { + "name": "runtime.clientEvents.subscribe#2", + "ordinal": 4, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + }, + "c7fbd9501e80": { + "status": "error" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eef1ee3c2773": { + "name": "runtime.clientEvents.subscribe#1", + "ordinal": 1, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + } + }, + "recording": { + "scenario": "matrix-query.event-router-catalog-runtime.clientevents.subscribe-1-6", + "checkpoints": [ + { + "id": "event-router-failed-read-floor.prelude:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.prelude:read-refused", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:unmounted", + "observation": { + "sender": ["ac14275e5e23", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:five-notices-inside-the-floor", + "observation": { + "sender": ["ac14275e5e23"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:floor-passed", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:unmounted", + "observation": { + "sender": ["ac14275e5e23", "0769c2565e2f"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:cleanup", + "observation": { + "sender": ["ac14275e5e23", "4e87a83926ae"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "c686e7f77d44", "8b854beb872a"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": ["1fcd3f3dee98"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-worktree.ps-1.json b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-worktree.ps-1.json new file mode 100644 index 00000000000..2eda7c6805a --- /dev/null +++ b/mobile/rpc-foundation/goldens/matrix-query.event-router-catalog-worktree.ps-1.json @@ -0,0 +1,1117 @@ +{ + "goldenFormatVersion": 6, + "operation": "query.event-router-catalog", + "family": "query.event-router-catalog", + "namedDeltas": [], + "values": { + "2159667cf633": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true + } + } + }, + "5bd4621f47d0": { + "name": "runtime.clientEvents.unsubscribe#1", + "ordinal": 6, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.unsubscribe\",\"params\":{\"subscriptionId\":\"sub-1\"}}" + }, + "5ece68a8cbc5": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-2", + "ok": false + } + } + }, + "6030c04ddbcd": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "704ca5c34f99": { + "name": "worktree.ps#1", + "ordinal": 3, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "70f531389976": { + "name": "worktree.ps#2", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 0 + } + }, + "73083f54975f": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } + }, + "78a0dbbe27a8": { + "name": "worktree.ps#2", + "ordinal": 5, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" + }, + "89b9ba8d8cd7": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-2", + "ok": false + } + } + }, + "8db531aac9cb": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "912d0c07da7b": { + "status": "success" + }, + "a839711b15b8": { + "status": "pending" + }, + "ae35b72a6d04": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "worktrees": [] + } + } + } + }, + "ae9f66f12cc9": { + "status": "fulfilled", + "startedAt": 3750, + "settledAt": 3750, + "value": { + "$rpc": "undefined" + } + }, + "b91023634f14": { + "name": "worktree.ps#2", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 3000 + } + }, + "baf8a4d812f1": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "$rpc": "null" + } + } + } + }, + "c448f53917f7": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 0 + } + }, + "c7fbd9501e80": { + "status": "error" + }, + "e6d56f2fda86": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-2", + "ok": false + } + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eef1ee3c2773": { + "name": "runtime.clientEvents.subscribe#1", + "ordinal": 1, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + }, + "efab2a313e0c": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } + } + }, + "f7c49a54fd25": { + "name": "worktree.ps#1", + "ordinal": 2, + "args": [ + { + "name": "method", + "value": "worktree.ps" + }, + { + "name": "params", + "value": { + "acceptRowDelta": true, + "afterSnapshotId": { + "$rpc": "null" + }, + "limit": 10000 + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": { + "message": "inner refused" + }, + "ok": false + } + } + } + } + }, + "recording": { + "scenario": "matrix-query.event-router-catalog-worktree.ps-1", + "checkpoints": [ + { + "id": "event-router-failed-read-floor.prelude:listening", + "observation": { + "sender": ["c448f53917f7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:read-refused", + "observation": { + "sender": ["ae35b72a6d04"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "912d0c07da7b", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:five-notices-inside-the-floor", + "observation": { + "sender": ["ae35b72a6d04"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "912d0c07da7b", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:floor-passed", + "observation": { + "sender": ["ae35b72a6d04", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "912d0c07da7b", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.normal:unmounted", + "observation": { + "sender": ["ae35b72a6d04", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "912d0c07da7b", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:read-refused", + "observation": { + "sender": ["2159667cf633"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:five-notices-inside-the-floor", + "observation": { + "sender": ["2159667cf633"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:floor-passed", + "observation": { + "sender": ["2159667cf633", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-absent:unmounted", + "observation": { + "sender": ["2159667cf633", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:read-refused", + "observation": { + "sender": ["baf8a4d812f1"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:five-notices-inside-the-floor", + "observation": { + "sender": ["baf8a4d812f1"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:floor-passed", + "observation": { + "sender": ["baf8a4d812f1", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.result-null:unmounted", + "observation": { + "sender": ["baf8a4d812f1", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:read-refused", + "observation": { + "sender": ["8db531aac9cb"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:five-notices-inside-the-floor", + "observation": { + "sender": ["8db531aac9cb"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:floor-passed", + "observation": { + "sender": ["8db531aac9cb", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-ok-missing:unmounted", + "observation": { + "sender": ["8db531aac9cb", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:read-refused", + "observation": { + "sender": ["efab2a313e0c"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:five-notices-inside-the-floor", + "observation": { + "sender": ["efab2a313e0c"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:floor-passed", + "observation": { + "sender": ["efab2a313e0c", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-string-error:unmounted", + "observation": { + "sender": ["efab2a313e0c", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:read-refused", + "observation": { + "sender": ["f7c49a54fd25"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:five-notices-inside-the-floor", + "observation": { + "sender": ["f7c49a54fd25"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:floor-passed", + "observation": { + "sender": ["f7c49a54fd25", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.inner-false-object-error:unmounted", + "observation": { + "sender": ["f7c49a54fd25", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:read-refused", + "observation": { + "sender": ["89b9ba8d8cd7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:five-notices-inside-the-floor", + "observation": { + "sender": ["89b9ba8d8cd7"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:floor-passed", + "observation": { + "sender": ["89b9ba8d8cd7", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused:unmounted", + "observation": { + "sender": ["89b9ba8d8cd7", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:read-refused", + "observation": { + "sender": ["e6d56f2fda86"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:five-notices-inside-the-floor", + "observation": { + "sender": ["e6d56f2fda86"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:floor-passed", + "observation": { + "sender": ["e6d56f2fda86", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.outer-refused-no-message:unmounted", + "observation": { + "sender": ["e6d56f2fda86", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:read-refused", + "observation": { + "sender": ["5ece68a8cbc5"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:five-notices-inside-the-floor", + "observation": { + "sender": ["5ece68a8cbc5"], + "payloads": ["eef1ee3c2773", "704ca5c34f99"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "c7fbd9501e80", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:floor-passed", + "observation": { + "sender": ["5ece68a8cbc5", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.method-not-found:unmounted", + "observation": { + "sender": ["5ece68a8cbc5", "b91023634f14"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.transport-rejection:read-refused", + "observation": { + "sender": ["73083f54975f", "70f531389976"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.transport-rejection:five-notices-inside-the-floor", + "observation": { + "sender": ["73083f54975f", "70f531389976"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.transport-rejection:floor-passed", + "observation": { + "sender": ["73083f54975f", "70f531389976"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.transport-rejection:unmounted", + "observation": { + "sender": ["73083f54975f", "70f531389976"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.transport-rejection-no-message:read-refused", + "observation": { + "sender": ["6030c04ddbcd", "70f531389976"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.transport-rejection-no-message:five-notices-inside-the-floor", + "observation": { + "sender": ["6030c04ddbcd", "70f531389976"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.transport-rejection-no-message:floor-passed", + "observation": { + "sender": ["6030c04ddbcd", "70f531389976"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8"], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "a839711b15b8", + "effects": [] + } + }, + { + "id": "event-router-failed-read-floor.transport-rejection-no-message:unmounted", + "observation": { + "sender": ["6030c04ddbcd", "70f531389976"], + "payloads": ["eef1ee3c2773", "704ca5c34f99", "78a0dbbe27a8", "5bd4621f47d0"], + "settlements": { + "mount": "eb79a9b3682a", + "unmount": "ae9f66f12cc9" + }, + "state": "a839711b15b8", + "effects": [] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prchecks-1.json b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prchecks-1.json index 8f71aad930b..7693f29ada4 100644 --- a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prchecks-1.json +++ b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prchecks-1.json @@ -4,44 +4,15 @@ "family": "session.pr-sidebar", "namedDeltas": [], "values": { - "07f2f3aaaa06": { + "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": 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": { - "error": { - "message": "inner refused" - }, - "ok": false - } - } - } + "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", @@ -78,55 +49,59 @@ } } }, - "138623e4e324": { - "name": "github.prChecks#1", - "ordinal": 10, + "1287efa543e2": { + "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 } } ], "settlement": { - "status": "fulfilled", + "status": "rejected", "startedAt": 0, "settledAt": 0, - "value": { - "id": "frame-5", - "ok": true, - "result": { - "error": "refused" - } + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true } } }, - "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\"}}" }, - "2309f345fb72": { + "21069b5e026b": { + "name": "streams-registered-at-teardown", + "ordinal": 15, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#1" + } + ] + }, + "2dc2ca47b4e7": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -135,6 +110,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -159,98 +135,6 @@ "startedAt": 0 } }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "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" - } - } - } - }, - "2aa7c40de795": { - "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": { - "error": { - "code": "refused", - "message": "" - }, - "id": "frame-5", - "ok": false - } - } - }, - "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\"}}" - }, "341c71d5f61d": { "commentError": { "$rpc": "null" @@ -310,6 +194,53 @@ "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}" + }, + "4c6c7242d783": { + "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": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-6", + "ok": false + } + } + }, "4da7ea39401b": { "name": "worktree.show#1", "ordinal": 4, @@ -348,9 +279,14 @@ } } }, - "5dcef756f74d": { + "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\"}}" + }, + "7568e9226f82": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -376,17 +312,292 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-5", + "id": "frame-6", + "ok": true + } + } + }, + "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": { - "$rpc": "null" + "mergeable": "MERGEABLE", + "number": 12, + "provider": "github", + "state": "open", + "title": "Recorded", + "updatedAt": "2026-01-01T00:00:00Z", + "url": "https://github.com/owner/repo/pull/12" } } } }, - "655a4ec47a79": { + "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" + } + ] + } + } + }, + "86e0e245ccff": { + "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": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-6", + "ok": false + } + } + }, + "86fa720b0be0": { + "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": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true + } + } + }, + "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 + } + }, + "88a93ee200e3": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "checks": [], + "checksError": "Request failed: github.prChecks", + "comments": [ + { + "body": "please fix", + "id": 55, + "resolved": false + } + ], + "kind": "ready", + "pr": { + "headSha": "head-sha-1", + "number": 12, + "title": "Recorded" + }, + "refreshFailed": false + } + }, + "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" + } + } + } + }, + "8e587952852c": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "checks": [], + "checksError": "", + "comments": [ + { + "body": "please fix", + "id": 55, + "resolved": false + } + ], + "kind": "ready", + "pr": { + "headSha": "head-sha-1", + "number": 12, + "title": "Recorded" + }, + "refreshFailed": false + } + }, + "9091d133c3b0": { + "name": "reply-salvage", + "ordinal": 8, + "value": { + "droppedCount": 1, + "droppedPaths": ["linkedPR"], + "method": "worktree.show", + "operation": "worktree.summary-or-skip", + "variant": "worktree-summary" + } + }, + "97a4d630a57b": { + "name": "github.prChecks#1", + "ordinal": 11, "args": [ { "name": "method", @@ -418,32 +629,25 @@ } } }, - "707f5273fbe1": { - "name": "github.prForBranch#1", - "ordinal": 8, + "99d7140d3603": { + "name": "github.prChecks#1", + "ordinal": 11, "args": [ { "name": "method", - "value": "github.prForBranch" + "value": "github.prChecks" }, { "name": "params", "value": { - "branch": "feature", - "currentHeadOid": { - "$rpc": "null" - }, - "fallbackPRNumber": 12, - "linkedPRNumber": { - "$rpc": "null" - }, + "headSha": "head-sha-1", + "prNumber": 12, "repo": "id:repo-9" } }, { "name": "options", "value": { - "beforeSend": "[local beforeSend]", "failWhenDisconnected": true } } @@ -453,27 +657,41 @@ "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" - } - } + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-6", + "ok": false } } }, - "7cab7429568b": { + "9a1e69260642": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "checks": [], + "checksError": "Unknown method", + "comments": [ + { + "body": "please fix", + "id": 55, + "resolved": false + } + ], + "kind": "ready", + "pr": { + "headSha": "head-sha-1", + "number": 12, + "title": "Recorded" + }, + "refreshFailed": false + } + }, + "9c18ac090c8c": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -505,9 +723,63 @@ } } }, - "8300ca3ac5c2": { + "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" + } + } + } + } + }, + "a74156a14b4c": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -528,39 +800,6 @@ } } ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-5", - "ok": 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, @@ -569,14 +808,15 @@ "id": "frame-6", "ok": true, "result": { - "runtimeId": "recorded" + "error": "inner refused", + "ok": false } } } }, - "87ba39148f02": { + "a7e609fcb031": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -597,124 +837,14 @@ } } ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-5", - "ok": true, - "result": [ - { - "checkRunId": 7, - "conclusion": "success", - "name": "build", - "status": "completed" - } - ] - } - } - }, - "88a93ee200e3": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "checks": [], - "checksError": "Request failed: github.prChecks", - "comments": [ - { - "body": "please fix", - "id": 55, - "resolved": false - } - ], - "kind": "ready", - "pr": { - "headSha": "head-sha-1", - "number": 12, - "title": "Recorded" - }, - "refreshFailed": false - } - }, - "8e587952852c": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "checks": [], - "checksError": "", - "comments": [ - { - "body": "please fix", - "id": 55, - "resolved": false - } - ], - "kind": "ready", - "pr": { - "headSha": "head-sha-1", - "number": 12, - "title": "Recorded" - }, - "refreshFailed": false - } - }, - "9a1e69260642": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "checks": [], - "checksError": "Unknown method", - "comments": [ - { - "body": "please fix", - "id": 55, - "resolved": false - } - ], - "kind": "ready", - "pr": { - "headSha": "head-sha-1", - "number": 12, - "title": "Recorded" - }, - "refreshFailed": false - } - }, - "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 } }, - "9e247bf3143d": { + "aec2edd8fc3a": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -740,20 +870,14 @@ "startedAt": 0, "settledAt": 0, "value": { - "error": { - "code": "method_not_found", - "message": "Unknown method" - }, - "id": "frame-5", - "ok": false + "id": "frame-6", + "ok": true, + "result": { + "error": "refused" + } } } }, - "abcf3bdc5cde": { - "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, "bd448e85868e": { "commentError": { "$rpc": "null" @@ -777,9 +901,9 @@ "refreshFailed": false } }, - "cac8d5a10134": { + "bfd4f750fc70": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -805,51 +929,20 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-5", + "id": "frame-6", "ok": true, "result": { - "error": "inner refused", + "error": { + "message": "inner refused" + }, "ok": false } } } }, - "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 - } - }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" - }, - "d3426861162d": { + "bfedf583a747": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -877,7 +970,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-7", + "id": "frame-8", "ok": true, "result": { "body": "body", @@ -910,15 +1003,51 @@ } } }, - "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" + } + ] + }, + "de33f50efdbf": { + "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": { + "$rpc": "null" + } + } } }, "e0a11d8a1005": { @@ -946,6 +1075,11 @@ "refreshFailed": false } }, + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, "eb79a9b3682a": { "status": "fulfilled", "startedAt": 0, @@ -953,43 +1087,6 @@ "value": { "$rpc": "undefined" } - }, - "fb0e9f0edb67": { - "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": { - "error": { - "code": "refused", - "message": "outer refused" - }, - "id": "frame-5", - "ok": false - } - } } }, "recording": { @@ -998,13 +1095,19 @@ { "id": "pr-sidebar-load.prelude:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1012,25 +1115,53 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.prelude:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "86fa720b0be0", + "1287efa543e2" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "35045fa5a752", + "effects": ["9091d133c3b0", "21069b5e026b"] } }, { @@ -1038,27 +1169,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "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"] } }, { @@ -1066,27 +1227,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "8300ca3ac5c2", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "7568e9226f82", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "341c71d5f61d", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.result-absent:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "7568e9226f82", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "341c71d5f61d", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1094,27 +1285,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "5dcef756f74d", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "de33f50efdbf", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "341c71d5f61d", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.result-null:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "de33f50efdbf", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "341c71d5f61d", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1122,27 +1343,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "138623e4e324", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "aec2edd8fc3a", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "341c71d5f61d", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-ok-missing:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "aec2edd8fc3a", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "341c71d5f61d", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1150,27 +1401,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cac8d5a10134", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "a74156a14b4c", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "341c71d5f61d", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-false-string-error:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "a74156a14b4c", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "341c71d5f61d", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1178,27 +1459,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "07f2f3aaaa06", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "bfd4f750fc70", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "341c71d5f61d", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-false-object-error:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "bfd4f750fc70", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "341c71d5f61d", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1206,27 +1517,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "fb0e9f0edb67", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "4c6c7242d783", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "bd448e85868e", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.outer-refused:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "4c6c7242d783", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "bd448e85868e", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1234,27 +1575,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "2aa7c40de795", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "99d7140d3603", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "88a93ee200e3", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.outer-refused-no-message:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "99d7140d3603", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "88a93ee200e3", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1262,27 +1633,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "9e247bf3143d", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "86e0e245ccff", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "9a1e69260642", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.method-not-found:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "86e0e245ccff", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "9a1e69260642", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1290,27 +1691,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "655a4ec47a79", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "97a4d630a57b", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "34fe99d9471b", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.transport-rejection:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "97a4d630a57b", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "34fe99d9471b", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1318,27 +1749,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "7cab7429568b", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "9c18ac090c8c", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "8e587952852c", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.transport-rejection-no-message:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "9c18ac090c8c", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "8e587952852c", + "effects": ["9091d133c3b0", "c70e6fd19823"] } } ] diff --git a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prforbranch-1.json b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prforbranch-1.json index 1f5a63c1443..6367cc642fe 100644 --- a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prforbranch-1.json +++ b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.prforbranch-1.json @@ -4,6 +4,58 @@ "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}}" + }, + "088f322e6eb7": { + "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": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": 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,14 +91,14 @@ } } }, - "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\"}}" }, - "1dc3b425aa47": { + "20f106bf7e22": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -55,6 +107,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -79,19 +132,18 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-4", - "ok": true + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-5", + "ok": false } } }, - "1f5765918736": { - "name": "github.repoSlug#1", - "ordinal": 2, - "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}" - }, - "2309f345fb72": { + "2512dcf505e6": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -100,6 +152,60 @@ { "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": { + "$rpc": "null" + } + } + } + }, + "29120132bf36": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "kind": "error", + "message": "" + } + }, + "2dc2ca47b4e7": { + "name": "github.prForBranch#1", + "ordinal": 9, + "args": [ + { + "name": "method", + "value": "github.prForBranch" + }, + { + "name": "params", + "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -124,70 +230,6 @@ "startedAt": 0 } }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "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" - } - } - } - }, - "29120132bf36": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "kind": "error", - "message": "" - } - }, - "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" @@ -201,48 +243,26 @@ "ordinal": 6, "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}" }, - "37798555c066": { + "3a8e6b13f380": { "name": "github.prForBranch#1", - "ordinal": 8, - "args": [ + "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}}" + }, + "3a96bb9c2176": { + "name": "streams-registered-at-teardown", + "ordinal": 11, + "value": [ { - "name": "method", - "value": "github.prForBranch" - }, - { - "name": "params", - "value": { - "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": { - "$rpc": "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", @@ -282,26 +302,14 @@ } } }, - "6b1694d3660f": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "kind": "none" - } + "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\"}}" }, - "6ed2d1d6c61b": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "kind": "error", - "message": "Unknown method" - } - }, - "707f5273fbe1": { + "60a05a6771b8": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -310,6 +318,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -334,27 +343,20 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-4", + "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" - } + "error": { + "message": "inner refused" + }, + "ok": false } } } }, - "77ff745b56fa": { + "615ca8b7764b": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -363,6 +365,48 @@ { "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 + } + } + }, + "62fcc5c3eaf3": { + "name": "github.prForBranch#1", + "ordinal": 9, + "args": [ + { + "name": "method", + "value": "github.prForBranch" + }, + { + "name": "params", + "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -393,9 +437,26 @@ } } }, - "807f60a1f770": { + "6b1694d3660f": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "kind": "none" + } + }, + "6ed2d1d6c61b": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "kind": "error", + "message": "Unknown method" + } + }, + "70a12ff07dad": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -404,6 +465,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -428,35 +490,37 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-4", + "id": "frame-5", "ok": true, "result": { - "error": "inner refused", - "ok": false + "error": "refused" } } } }, - "8352e3c99668": { - "name": "status.get#1", - "ordinal": 11, + "75885386f005": { + "name": "hostedReview.forBranch#1", + "ordinal": 5, "args": [ { "name": "method", - "value": "status.get" + "value": "hostedReview.forBranch" }, { "name": "params", "value": { - "$rpc": "undefined" + "active": true, + "branch": "feature", + "linkedGitHubPR": { + "$rpc": "null" + }, + "repo": "id:repo-9" } }, { "name": "options", "value": { - "beforeSend": "[local beforeSend]", - "failWhenDisconnected": true, - "timeoutMs": 30000 + "failWhenDisconnected": true } } ], @@ -465,17 +529,23 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-6", + "id": "frame-4", "ok": true, "result": { - "runtimeId": "recorded" + "mergeable": "MERGEABLE", + "number": 12, + "provider": "github", + "state": "open", + "title": "Recorded", + "updatedAt": "2026-01-01T00:00:00Z", + "url": "https://github.com/owner/repo/pull/12" } } } }, - "87ba39148f02": { + "861c8796ae1f": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -501,7 +571,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-5", + "id": "frame-6", "ok": true, "result": [ { @@ -514,18 +584,73 @@ } } }, - "9165ce8cf517": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "kind": "error", - "message": "transport failure" + "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 } }, - "938c799557e3": { + "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" + } + } + } + }, + "8c6393c116e0": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -534,6 +659,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -560,13 +686,33 @@ "value": { "error": { "code": "refused", - "message": "" + "message": "outer refused" }, - "id": "frame-4", + "id": "frame-5", "ok": false } } }, + "9091d133c3b0": { + "name": "reply-salvage", + "ordinal": 8, + "value": { + "droppedCount": 1, + "droppedPaths": ["linkedPR"], + "method": "worktree.show", + "operation": "worktree.summary-or-skip", + "variant": "worktree-summary" + } + }, + "9165ce8cf517": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "kind": "error", + "message": "transport failure" + } + }, "98aa27f6bdff": { "commentError": { "$rpc": "null" @@ -576,42 +722,9 @@ "message": "The host sent a reply this app could not read (github.prForBranch)" } }, - "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 - } - }, - "abcf3bdc5cde": { - "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, - "b36e6dd5be3d": { + "a55c83eeaeea": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -620,6 +733,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -644,81 +758,27 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-4", + "id": "frame-5", "ok": true, "result": { - "error": { - "message": "inner refused" - }, - "ok": false + "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" + } } } } }, - "b772fc418001": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "kind": "error", - "message": "Request failed: github.prForBranch" - } - }, - "bb7ae1ebe69f": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "kind": "error", - "message": "outer refused" - } - }, - "c9329ced0970": { - "name": "github.prForBranch#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "github.prForBranch" - }, - { - "name": "params", - "value": { - "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": { - "error": "refused" - } - } - } - }, - "cb071b912510": { + "a7e609fcb031": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -744,14 +804,27 @@ "startedAt": 0 } }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" + "b772fc418001": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "kind": "error", + "message": "Request failed: github.prForBranch" + } }, - "d3426861162d": { + "bb7ae1ebe69f": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "kind": "error", + "message": "outer refused" + } + }, + "bfedf583a747": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -779,7 +852,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-7", + "id": "frame-8", "ok": true, "result": { "body": "body", @@ -812,57 +885,16 @@ } } }, - "d3d85b61b684": { - "name": "reply-salvage", - "ordinal": 7, - "value": { - "droppedCount": 1, - "droppedPaths": ["linkedPR"], - "method": "worktree.show", - "operation": "worktree.summary-or-skip", - "variant": "worktree-summary" - } - }, - "d751b4c53cb0": { - "name": "github.prForBranch#1", - "ordinal": 8, - "args": [ + "c70e6fd19823": { + "name": "streams-registered-at-teardown", + "ordinal": 17, + "value": [ { - "name": "method", - "value": "github.prForBranch" - }, - { - "name": "params", - "value": { - "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": "rejected", - "startedAt": 0, - "settledAt": 0, - "error": { - "category": "Error", - "message": "", - "isRpcDeliveryUnknown": true - } - } + ] }, "e0a11d8a1005": { "commentError": { @@ -889,9 +921,14 @@ "refreshFailed": false } }, - "e6ce999d34a3": { + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, + "e2f2c0961b68": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -900,6 +937,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -926,24 +964,16 @@ "value": { "error": { "code": "refused", - "message": "outer refused" + "message": "" }, - "id": "frame-4", + "id": "frame-5", "ok": false } } }, - "eb79a9b3682a": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "$rpc": "undefined" - } - }, - "ed93c0450d76": { + "e43b72b94bc2": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -952,6 +982,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -976,12 +1007,62 @@ "startedAt": 0, "settledAt": 0, "value": { - "error": { - "code": "method_not_found", - "message": "Unknown method" - }, - "id": "frame-4", - "ok": false + "id": "frame-5", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "f8e83ca4970c": { + "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": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true } } } @@ -992,13 +1073,37 @@ { "id": "pr-sidebar-load.prelude:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.prelude:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "f8e83ca4970c"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "35045fa5a752", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } }, { @@ -1006,25 +1111,26 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1032,267 +1138,597 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "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"] } }, { "id": "pr-sidebar-load.result-absent:pr", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "1dc3b425aa47"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "615ca8b7764b"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "98aa27f6bdff", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { "id": "pr-sidebar-load.result-absent:loaded", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "1dc3b425aa47"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "615ca8b7764b"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "98aa27f6bdff", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.result-absent:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "615ca8b7764b"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "98aa27f6bdff", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } }, { "id": "pr-sidebar-load.result-null:pr", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "37798555c066"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2512dcf505e6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "6b1694d3660f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { "id": "pr-sidebar-load.result-null:loaded", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "37798555c066"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2512dcf505e6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "6b1694d3660f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.result-null:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2512dcf505e6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "6b1694d3660f", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } }, { "id": "pr-sidebar-load.inner-ok-missing:pr", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "c9329ced0970"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "70a12ff07dad"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "98aa27f6bdff", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { "id": "pr-sidebar-load.inner-ok-missing:loaded", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "c9329ced0970"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "70a12ff07dad"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "98aa27f6bdff", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-ok-missing:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "70a12ff07dad"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "98aa27f6bdff", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } }, { "id": "pr-sidebar-load.inner-false-string-error:pr", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "807f60a1f770"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "e43b72b94bc2"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "98aa27f6bdff", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { "id": "pr-sidebar-load.inner-false-string-error:loaded", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "807f60a1f770"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "e43b72b94bc2"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "98aa27f6bdff", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-false-string-error:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "e43b72b94bc2"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "98aa27f6bdff", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } }, { "id": "pr-sidebar-load.inner-false-object-error:pr", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "b36e6dd5be3d"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "60a05a6771b8"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "98aa27f6bdff", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { "id": "pr-sidebar-load.inner-false-object-error:loaded", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "b36e6dd5be3d"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "60a05a6771b8"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "98aa27f6bdff", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-false-object-error:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "60a05a6771b8"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "98aa27f6bdff", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } }, { "id": "pr-sidebar-load.outer-refused:pr", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "e6ce999d34a3"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "8c6393c116e0"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "bb7ae1ebe69f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { "id": "pr-sidebar-load.outer-refused:loaded", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "e6ce999d34a3"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "8c6393c116e0"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "bb7ae1ebe69f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.outer-refused:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "8c6393c116e0"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "bb7ae1ebe69f", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } }, { "id": "pr-sidebar-load.outer-refused-no-message:pr", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "938c799557e3"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "e2f2c0961b68"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "b772fc418001", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { "id": "pr-sidebar-load.outer-refused-no-message:loaded", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "938c799557e3"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "e2f2c0961b68"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "b772fc418001", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.outer-refused-no-message:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "e2f2c0961b68"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "b772fc418001", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } }, { "id": "pr-sidebar-load.method-not-found:pr", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "ed93c0450d76"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "20f106bf7e22"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "6ed2d1d6c61b", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { "id": "pr-sidebar-load.method-not-found:loaded", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "ed93c0450d76"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "20f106bf7e22"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "6ed2d1d6c61b", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.method-not-found:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "20f106bf7e22"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "6ed2d1d6c61b", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } }, { "id": "pr-sidebar-load.transport-rejection:pr", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "77ff745b56fa"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "62fcc5c3eaf3"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "9165ce8cf517", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { "id": "pr-sidebar-load.transport-rejection:loaded", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "77ff745b56fa"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "62fcc5c3eaf3"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "9165ce8cf517", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.transport-rejection:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "62fcc5c3eaf3"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "9165ce8cf517", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } }, { "id": "pr-sidebar-load.transport-rejection-no-message:pr", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "d751b4c53cb0"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "088f322e6eb7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "29120132bf36", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { "id": "pr-sidebar-load.transport-rejection-no-message:loaded", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "d751b4c53cb0"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "088f322e6eb7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "29120132bf36", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.transport-rejection-no-message:cleanup", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "088f322e6eb7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "29120132bf36", + "effects": ["9091d133c3b0", "3a96bb9c2176"] } } ] diff --git a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.reposlug-1.json b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.reposlug-1.json index 9c82dfbc8d3..7f0fa06771b 100644 --- a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.reposlug-1.json +++ b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.reposlug-1.json @@ -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,106 +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\"}}" }, - "2309f345fb72": { - "name": "github.prForBranch#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "github.prForBranch" - }, - { - "name": "params", - "value": { - "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 - } - }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "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" - } - } - } - }, - "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, @@ -173,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, @@ -217,6 +168,16 @@ "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, @@ -255,23 +216,25 @@ } } }, - "707f5273fbe1": { - "name": "github.prForBranch#1", - "ordinal": 8, + "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": "github.prForBranch" + "value": "hostedReview.forBranch" }, { "name": "params", "value": { + "active": true, "branch": "feature", - "currentHeadOid": { - "$rpc": "null" - }, - "fallbackPRNumber": 12, - "linkedPRNumber": { + "linkedGitHubPR": { "$rpc": "null" }, "repo": "id:repo-9" @@ -280,7 +243,6 @@ { "name": "options", "value": { - "beforeSend": "[local beforeSend]", "failWhenDisconnected": true } } @@ -293,53 +255,13 @@ "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" - } - } - } - } - }, - "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" + "mergeable": "MERGEABLE", + "number": 12, + "provider": "github", + "state": "open", + "title": "Recorded", + "updatedAt": "2026-01-01T00:00:00Z", + "url": "https://github.com/owner/repo/pull/12" } } } @@ -381,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, @@ -416,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 } } ], @@ -444,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" + } } } }, @@ -524,26 +510,91 @@ } } }, - "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": "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", + "value": "github.prChecks" + }, + { + "name": "params", + "value": { + "headSha": "head-sha-1", + "prNumber": 12, + "repo": "id:repo-9" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true } } ], @@ -584,11 +635,6 @@ } } }, - "abcf3bdc5cde": { - "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, "b77761a8ce16": { "name": "github.repoSlug#1", "ordinal": 1, @@ -659,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, @@ -693,112 +802,16 @@ } } }, - "cb071b912510": { - "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": "pending", - "startedAt": 0 - } - }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" - }, - "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": { @@ -825,6 +838,11 @@ "refreshFailed": false } }, + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, "ead3ad184e51": { "commentError": { "$rpc": "null" @@ -848,13 +866,19 @@ { "id": "pr-sidebar-load.normal:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -862,25 +886,26 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -888,27 +913,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "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"] } }, { diff --git a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.workitemdetails-1.json b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.workitemdetails-1.json index 1de7e703184..548a7b86972 100644 --- a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.workitemdetails-1.json +++ b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-github.workitemdetails-1.json @@ -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,19 +49,52 @@ } } }, - "1723d8a5d8be": { + "1a5855cadb2d": { "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\"}}" + "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": { + "error": "refused" + } + } + } }, "1f5765918736": { "name": "github.repoSlug#1", "ordinal": 2, "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}" }, - "2309f345fb72": { + "2dc2ca47b4e7": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -60,6 +103,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -84,77 +128,9 @@ "startedAt": 0 } }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "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" - } - } - } - }, - "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" - } - }, - "357f9b7862e3": { - "name": "worktree.show#1", - "ordinal": 6, - "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}" - }, - "3c501939dd10": { + "313cd9c49244": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -184,13 +160,77 @@ "value": { "error": { "code": "refused", - "message": "" + "message": "outer refused" }, - "id": "frame-7", + "id": "frame-8", "ok": false } } }, + "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}}" + }, + "3ecc2d44a209": { + "name": "runtime.clientEvents.subscribe#1", + "ordinal": 3, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + }, + "476aa8b45a85": { + "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": { + "error": { + "message": "inner refused" + }, + "ok": false + } + } + } + }, "4da7ea39401b": { "name": "worktree.show#1", "ordinal": 4, @@ -229,9 +269,593 @@ } } }, - "4dd3c3919d72": { + "5a5e8aeb9c0f": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "checks": ["build:success"], + "checksError": { + "$rpc": "null" + }, + "comments": [], + "kind": "ready", + "pr": { + "headSha": "head-sha-1", + "number": 12, + "title": "Recorded" + }, + "refreshFailed": false + } + }, + "5d309fcf43a7": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 16, + "json": "{\"id\":\"frame-8\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}" + }, + "5f7634e4c4d1": { + "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": { + "error": "inner refused", + "ok": false + } + } + } + }, + "74b5741dc1b5": { + "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": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-8", + "ok": false + } + } + }, + "7512c5d8922e": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "checks": ["build:success"], + "checksError": { + "$rpc": "null" + }, + "comments": "loading", + "kind": "ready", + "pr": { + "headSha": "head-sha-1", + "number": 12, + "title": "Recorded" + }, + "refreshFailed": false + } + }, + "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" + } + } + } + }, + "7a97965fe49a": { + "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": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "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 + } + }, + "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" + } + } + } + } + }, + "a73b8a815948": { + "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": { + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-8", + "ok": false + } + } + }, + "a7e609fcb031": { + "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": "pending", + "startedAt": 0 + } + }, + "b242c87f7cf1": { + "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 + } + } + }, + "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" + } + } + } + } + }, + "c70e6fd19823": { + "name": "streams-registered-at-teardown", + "ordinal": 17, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#1" + } + ] + }, + "caea72638868": { + "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": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true + } + } + }, + "d006e932f1bf": { + "name": "github.workItemDetails#1", + "ordinal": 15, "args": [ { "name": "method", @@ -265,9 +889,9 @@ } } }, - "553539d5f778": { + "dda65ec60f03": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -295,296 +919,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-7", - "ok": true - } - } - }, - "5a5e8aeb9c0f": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "checks": ["build:success"], - "checksError": { - "$rpc": "null" - }, - "comments": [], - "kind": "ready", - "pr": { - "headSha": "head-sha-1", - "number": 12, - "title": "Recorded" - }, - "refreshFailed": false - } - }, - "707f5273fbe1": { - "name": "github.prForBranch#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "github.prForBranch" - }, - { - "name": "params", - "value": { - "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" - } - } - } - } - }, - "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" - } - ] - } - } - }, - "94aa3113193b": { - "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": { - "error": { - "code": "refused", - "message": "outer refused" - }, - "id": "frame-7", - "ok": false - } - } - }, - "96e55cac0dab": { - "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": { - "error": "refused" - } - } - } - }, - "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 - } - }, - "9d6b176701fc": { - "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", + "id": "frame-8", "ok": true, "result": { "$rpc": "null" @@ -592,237 +927,6 @@ } } }, - "9eeed6bde74f": { - "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": { - "error": "inner refused", - "ok": false - } - } - } - }, - "abcf3bdc5cde": { - "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, - "befec9e6a3a2": { - "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": { - "error": { - "code": "method_not_found", - "message": "Unknown method" - }, - "id": "frame-7", - "ok": false - } - } - }, - "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 - } - }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" - }, - "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" - } - }, - "dded64e82310": { - "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": { - "error": { - "message": "inner refused" - }, - "ok": false - } - } - } - }, "e0a11d8a1005": { "commentError": { "$rpc": "null" @@ -848,6 +952,11 @@ "refreshFailed": false } }, + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, "eb79a9b3682a": { "status": "fulfilled", "startedAt": 0, @@ -855,42 +964,6 @@ "value": { "$rpc": "undefined" } - }, - "fb8d97e83d5b": { - "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": "rejected", - "startedAt": 0, - "settledAt": 0, - "error": { - "category": "Error", - "message": "", - "isRpcDeliveryUnknown": true - } - } } }, "recording": { @@ -899,13 +972,19 @@ { "id": "pr-sidebar-load.prelude:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -913,25 +992,55 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.prelude:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "caea72638868" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "7512c5d8922e", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -939,27 +1048,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "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"] } }, { @@ -967,27 +1106,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "553539d5f778" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "b242c87f7cf1" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.result-absent:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "b242c87f7cf1" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -995,27 +1164,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "9d6b176701fc" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "dda65ec60f03" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.result-null:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "dda65ec60f03" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1023,27 +1222,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "96e55cac0dab" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "1a5855cadb2d" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-ok-missing:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "1a5855cadb2d" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1051,27 +1280,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "9eeed6bde74f" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "5f7634e4c4d1" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-false-string-error:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "5f7634e4c4d1" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1079,27 +1338,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "dded64e82310" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "476aa8b45a85" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-false-object-error:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "476aa8b45a85" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1107,27 +1396,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "94aa3113193b" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "313cd9c49244" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.outer-refused:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "313cd9c49244" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1135,27 +1454,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "3c501939dd10" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "a73b8a815948" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.outer-refused-no-message:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "a73b8a815948" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1163,27 +1512,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "befec9e6a3a2" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "74b5741dc1b5" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.method-not-found:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "74b5741dc1b5" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1191,27 +1570,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "4dd3c3919d72" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "d006e932f1bf" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.transport-rejection:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "d006e932f1bf" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1219,27 +1628,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "fb8d97e83d5b" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "7a97965fe49a" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.transport-rejection-no-message:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "7a97965fe49a" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "c70e6fd19823"] } } ] diff --git a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-hostedreview.forbranch-1.json b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-hostedreview.forbranch-1.json index 4aa0fb791ce..939cf15753f 100644 --- a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-hostedreview.forbranch-1.json +++ b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-hostedreview.forbranch-1.json @@ -4,9 +4,14 @@ "family": "session.pr-sidebar", "namedDeltas": [], "values": { - "01e44c5eb3a8": { + "0730389db3e9": { "name": "hostedReview.forBranch#1", - "ordinal": 3, + "ordinal": 7, + "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" + }, + "079bcff40c58": { + "name": "hostedReview.forBranch#1", + "ordinal": 5, "args": [ { "name": "method", @@ -35,15 +40,20 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-2", - "ok": true, - "result": { - "error": "inner refused", - "ok": false - } + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-4", + "ok": 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, @@ -79,19 +89,55 @@ } } }, - "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\"}}" + "16c650db3f9c": { + "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 + } + } }, "1f5765918736": { "name": "github.repoSlug#1", "ordinal": 2, "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}" }, - "2309f345fb72": { + "2076083f6899": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 10, + "json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":null,\"currentHeadOid\":null}}" + }, + "2dc2ca47b4e7": { + "name": "github.prForBranch#1", + "ordinal": 9, "args": [ { "name": "method", @@ -100,6 +146,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -124,61 +171,6 @@ "startedAt": 0 } }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "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" - } - } - } - }, - "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" @@ -192,89 +184,19 @@ "ordinal": 6, "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}" }, - "36fa584ff08a": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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": { - "error": { - "code": "refused", - "message": "outer refused" - }, - "id": "frame-2", - "ok": false - } - } - }, - "3cfe7aea50b5": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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": { - "error": { - "code": "refused", - "message": "" - }, - "id": "frame-2", - "ok": false - } - } - }, - "3f2be140c6f4": { + "3a8e6b13f380": { "name": "github.prForBranch#1", - "ordinal": 8, + "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}" + }, + "46d12ddbac74": { + "name": "github.prForBranch#1", + "ordinal": 9, "args": [ { "name": "method", @@ -309,7 +231,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-4", + "id": "frame-5", "ok": true, "result": { "fetchedAt": 0, @@ -327,6 +249,43 @@ } } }, + "4c53775d76f6": { + "name": "github.prForBranch#1", + "ordinal": 9, + "args": [ + { + "name": "method", + "value": "github.prForBranch" + }, + { + "name": "params", + "value": { + "branch": "feature", + "currentHeadOid": { + "$rpc": "null" + }, + "fallbackPRNumber": { + "$rpc": "null" + }, + "linkedPRNumber": { + "$rpc": "null" + }, + "repo": "id:repo-9" + } + }, + { + "name": "options", + "value": { + "beforeSend": "[local beforeSend]", + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "pending", + "startedAt": 0 + } + }, "4da7ea39401b": { "name": "worktree.show#1", "ordinal": 4, @@ -365,48 +324,9 @@ } } }, - "64aab527c6dd": { + "518f25fa616b": { "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "ok": true, - "result": { - "error": "refused" - } - } - } - }, - "7057d3371d62": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, + "ordinal": 5, "args": [ { "name": "method", @@ -436,31 +356,33 @@ "settledAt": 0, "value": { "error": { - "code": "method_not_found", - "message": "Unknown method" + "code": "refused", + "message": "" }, - "id": "frame-2", + "id": "frame-4", "ok": false } } }, - "707f5273fbe1": { - "name": "github.prForBranch#1", - "ordinal": 8, + "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": "github.prForBranch" + "value": "hostedReview.forBranch" }, { "name": "params", "value": { + "active": true, "branch": "feature", - "currentHeadOid": { - "$rpc": "null" - }, - "fallbackPRNumber": 12, - "linkedPRNumber": { + "linkedGitHubPR": { "$rpc": "null" }, "repo": "id:repo-9" @@ -469,7 +391,6 @@ { "name": "options", "value": { - "beforeSend": "[local beforeSend]", "failWhenDisconnected": true } } @@ -482,60 +403,20 @@ "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" - } + "mergeable": "MERGEABLE", + "number": 12, + "provider": "github", + "state": "open", + "title": "Recorded", + "updatedAt": "2026-01-01T00:00:00Z", + "url": "https://github.com/owner/repo/pull/12" } } } }, - "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": { + "861c8796ae1f": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -561,7 +442,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-5", + "id": "frame-6", "ok": true, "result": [ { @@ -574,9 +455,166 @@ } } }, - "8a392c6391f4": { + "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", + "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 + } + }, + "ab3fbaf57733": { "name": "hostedReview.forBranch#1", - "ordinal": 3, + "ordinal": 5, "args": [ { "name": "method", @@ -605,7 +643,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-2", + "id": "frame-4", "ok": true, "result": { "error": { @@ -616,83 +654,9 @@ } } }, - "8fee46bf95e3": { + "ac0c5c576c24": { "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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": "rejected", - "startedAt": 0, - "settledAt": 0, - "error": { - "category": "Error", - "message": "transport failure", - "isRpcDeliveryUnknown": true - } - } - }, - "955df7128577": { - "name": "github.prForBranch#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "github.prForBranch" - }, - { - "name": "params", - "value": { - "branch": "feature", - "currentHeadOid": { - "$rpc": "null" - }, - "fallbackPRNumber": { - "$rpc": "null" - }, - "linkedPRNumber": { - "$rpc": "null" - }, - "repo": "id:repo-9" - } - }, - { - "name": "options", - "value": { - "beforeSend": "[local beforeSend]", - "failWhenDisconnected": true - } - } - ], - "settlement": { - "status": "pending", - "startedAt": 0 - } - }, - "9787a82ed96e": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, + "ordinal": 5, "args": [ { "name": "method", @@ -727,52 +691,22 @@ } } }, - "9c952632b0c0": { - "name": "status.get#1", - "ordinal": 11, + "bb380bbd63c8": { + "name": "hostedReview.forBranch#1", + "ordinal": 5, "args": [ { "name": "method", - "value": "status.get" + "value": "hostedReview.forBranch" }, { "name": "params", "value": { - "$rpc": "undefined" - } - }, - { - "name": "options", - "value": { - "beforeSend": "[local beforeSend]", - "failWhenDisconnected": true, - "timeoutMs": 30000 - } - } - ], - "settlement": { - "status": "pending", - "startedAt": 0 - } - }, - "abcf3bdc5cde": { - "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, - "cb071b912510": { - "name": "github.prChecks#1", - "ordinal": 10, - "args": [ - { - "name": "method", - "value": "github.prChecks" - }, - { - "name": "params", - "value": { - "headSha": "head-sha-1", - "prNumber": 12, + "active": true, + "branch": "feature", + "linkedGitHubPR": { + "$rpc": "null" + }, "repo": "id:repo-9" } }, @@ -784,18 +718,22 @@ } ], "settlement": { - "status": "pending", - "startedAt": 0 + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-4", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } } }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" - }, - "d3426861162d": { + "bfedf583a747": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -823,7 +761,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-7", + "id": "frame-8", "ok": true, "result": { "body": "body", @@ -856,15 +794,52 @@ } } }, - "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" + } + ] + }, + "ccd83e3fbb1c": { + "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": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } } }, "e0a11d8a1005": { @@ -892,10 +867,49 @@ "refreshFailed": false } }, - "e6d7037c4df4": { - "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\":null,\"currentHeadOid\":null}}" + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, + "ea43d65aa61c": { + "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": { + "error": "refused" + } + } + } }, "eb79a9b3682a": { "status": "fulfilled", @@ -905,9 +919,9 @@ "$rpc": "undefined" } }, - "edf124c35a74": { + "f6329ebf9a21": { "name": "hostedReview.forBranch#1", - "ordinal": 3, + "ordinal": 5, "args": [ { "name": "method", @@ -936,49 +950,53 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-2", + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-4", + "ok": false + } + } + }, + "f8ff4d00b6b5": { + "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": { "$rpc": "null" } } } - }, - "fabc9971bcc9": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "ok": true - } - } } }, "recording": { @@ -987,13 +1005,19 @@ { "id": "pr-sidebar-load.normal:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1001,25 +1025,26 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1027,39 +1052,75 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "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"] } }, { "id": "pr-sidebar-load.result-absent:branch-hint", "observation": { - "sender": ["1287167eaf56", "fabc9971bcc9", "4da7ea39401b", "955df7128577"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "e6d7037c4df4"], + "sender": ["1287167eaf56", "4da7ea39401b", "16c650db3f9c", "4c53775d76f6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1067,25 +1128,26 @@ "observation": { "sender": [ "1287167eaf56", - "fabc9971bcc9", "4da7ea39401b", - "3f2be140c6f4", - "cb071b912510", - "9c952632b0c0" + "16c650db3f9c", + "46d12ddbac74", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1093,39 +1155,75 @@ "observation": { "sender": [ "1287167eaf56", - "fabc9971bcc9", "4da7ea39401b", - "3f2be140c6f4", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "16c650db3f9c", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.result-absent:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "16c650db3f9c", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { "id": "pr-sidebar-load.result-null:branch-hint", "observation": { - "sender": ["1287167eaf56", "edf124c35a74", "4da7ea39401b", "955df7128577"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "e6d7037c4df4"], + "sender": ["1287167eaf56", "4da7ea39401b", "f8ff4d00b6b5", "4c53775d76f6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1133,25 +1231,26 @@ "observation": { "sender": [ "1287167eaf56", - "edf124c35a74", "4da7ea39401b", - "3f2be140c6f4", - "cb071b912510", - "9c952632b0c0" + "f8ff4d00b6b5", + "46d12ddbac74", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1159,39 +1258,75 @@ "observation": { "sender": [ "1287167eaf56", - "edf124c35a74", "4da7ea39401b", - "3f2be140c6f4", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "f8ff4d00b6b5", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.result-null:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "f8ff4d00b6b5", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { "id": "pr-sidebar-load.inner-ok-missing:branch-hint", "observation": { - "sender": ["1287167eaf56", "64aab527c6dd", "4da7ea39401b", "955df7128577"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "e6d7037c4df4"], + "sender": ["1287167eaf56", "4da7ea39401b", "ea43d65aa61c", "4c53775d76f6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1199,25 +1334,26 @@ "observation": { "sender": [ "1287167eaf56", - "64aab527c6dd", "4da7ea39401b", - "3f2be140c6f4", - "cb071b912510", - "9c952632b0c0" + "ea43d65aa61c", + "46d12ddbac74", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1225,39 +1361,75 @@ "observation": { "sender": [ "1287167eaf56", - "64aab527c6dd", "4da7ea39401b", - "3f2be140c6f4", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "ea43d65aa61c", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-ok-missing:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "ea43d65aa61c", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { "id": "pr-sidebar-load.inner-false-string-error:branch-hint", "observation": { - "sender": ["1287167eaf56", "01e44c5eb3a8", "4da7ea39401b", "955df7128577"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "e6d7037c4df4"], + "sender": ["1287167eaf56", "4da7ea39401b", "bb380bbd63c8", "4c53775d76f6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1265,25 +1437,26 @@ "observation": { "sender": [ "1287167eaf56", - "01e44c5eb3a8", "4da7ea39401b", - "3f2be140c6f4", - "cb071b912510", - "9c952632b0c0" + "bb380bbd63c8", + "46d12ddbac74", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1291,39 +1464,75 @@ "observation": { "sender": [ "1287167eaf56", - "01e44c5eb3a8", "4da7ea39401b", - "3f2be140c6f4", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "bb380bbd63c8", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-false-string-error:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "bb380bbd63c8", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { "id": "pr-sidebar-load.inner-false-object-error:branch-hint", "observation": { - "sender": ["1287167eaf56", "8a392c6391f4", "4da7ea39401b", "955df7128577"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "e6d7037c4df4"], + "sender": ["1287167eaf56", "4da7ea39401b", "ab3fbaf57733", "4c53775d76f6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1331,25 +1540,26 @@ "observation": { "sender": [ "1287167eaf56", - "8a392c6391f4", "4da7ea39401b", - "3f2be140c6f4", - "cb071b912510", - "9c952632b0c0" + "ab3fbaf57733", + "46d12ddbac74", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1357,39 +1567,75 @@ "observation": { "sender": [ "1287167eaf56", - "8a392c6391f4", "4da7ea39401b", - "3f2be140c6f4", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "ab3fbaf57733", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-false-object-error:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "ab3fbaf57733", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { "id": "pr-sidebar-load.outer-refused:branch-hint", "observation": { - "sender": ["1287167eaf56", "36fa584ff08a", "4da7ea39401b", "955df7128577"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "e6d7037c4df4"], + "sender": ["1287167eaf56", "4da7ea39401b", "f6329ebf9a21", "4c53775d76f6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1397,25 +1643,26 @@ "observation": { "sender": [ "1287167eaf56", - "36fa584ff08a", "4da7ea39401b", - "3f2be140c6f4", - "cb071b912510", - "9c952632b0c0" + "f6329ebf9a21", + "46d12ddbac74", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1423,39 +1670,75 @@ "observation": { "sender": [ "1287167eaf56", - "36fa584ff08a", "4da7ea39401b", - "3f2be140c6f4", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "f6329ebf9a21", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.outer-refused:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "f6329ebf9a21", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { "id": "pr-sidebar-load.outer-refused-no-message:branch-hint", "observation": { - "sender": ["1287167eaf56", "3cfe7aea50b5", "4da7ea39401b", "955df7128577"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "e6d7037c4df4"], + "sender": ["1287167eaf56", "4da7ea39401b", "518f25fa616b", "4c53775d76f6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1463,25 +1746,26 @@ "observation": { "sender": [ "1287167eaf56", - "3cfe7aea50b5", "4da7ea39401b", - "3f2be140c6f4", - "cb071b912510", - "9c952632b0c0" + "518f25fa616b", + "46d12ddbac74", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1489,39 +1773,75 @@ "observation": { "sender": [ "1287167eaf56", - "3cfe7aea50b5", "4da7ea39401b", - "3f2be140c6f4", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "518f25fa616b", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.outer-refused-no-message:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "518f25fa616b", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { "id": "pr-sidebar-load.method-not-found:branch-hint", "observation": { - "sender": ["1287167eaf56", "7057d3371d62", "4da7ea39401b", "955df7128577"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "e6d7037c4df4"], + "sender": ["1287167eaf56", "4da7ea39401b", "079bcff40c58", "4c53775d76f6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1529,25 +1849,26 @@ "observation": { "sender": [ "1287167eaf56", - "7057d3371d62", "4da7ea39401b", - "3f2be140c6f4", - "cb071b912510", - "9c952632b0c0" + "079bcff40c58", + "46d12ddbac74", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1555,39 +1876,75 @@ "observation": { "sender": [ "1287167eaf56", - "7057d3371d62", "4da7ea39401b", - "3f2be140c6f4", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "079bcff40c58", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.method-not-found:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "079bcff40c58", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { "id": "pr-sidebar-load.transport-rejection:branch-hint", "observation": { - "sender": ["1287167eaf56", "8fee46bf95e3", "4da7ea39401b", "955df7128577"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "e6d7037c4df4"], + "sender": ["1287167eaf56", "4da7ea39401b", "ccd83e3fbb1c", "4c53775d76f6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1595,25 +1952,26 @@ "observation": { "sender": [ "1287167eaf56", - "8fee46bf95e3", "4da7ea39401b", - "3f2be140c6f4", - "cb071b912510", - "9c952632b0c0" + "ccd83e3fbb1c", + "46d12ddbac74", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1621,39 +1979,75 @@ "observation": { "sender": [ "1287167eaf56", - "8fee46bf95e3", "4da7ea39401b", - "3f2be140c6f4", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "ccd83e3fbb1c", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.transport-rejection:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "ccd83e3fbb1c", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { "id": "pr-sidebar-load.transport-rejection-no-message:branch-hint", "observation": { - "sender": ["1287167eaf56", "9787a82ed96e", "4da7ea39401b", "955df7128577"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "e6d7037c4df4"], + "sender": ["1287167eaf56", "4da7ea39401b", "ac0c5c576c24", "4c53775d76f6"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1661,25 +2055,26 @@ "observation": { "sender": [ "1287167eaf56", - "9787a82ed96e", "4da7ea39401b", - "3f2be140c6f4", - "cb071b912510", - "9c952632b0c0" + "ac0c5c576c24", + "46d12ddbac74", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1687,27 +2082,57 @@ "observation": { "sender": [ "1287167eaf56", - "9787a82ed96e", "4da7ea39401b", - "3f2be140c6f4", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "ac0c5c576c24", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "e6d7037c4df4", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.transport-rejection-no-message:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "ac0c5c576c24", + "46d12ddbac74", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "2076083f6899", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } } ] diff --git a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-status.get-1.json b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-status.get-1.json index 8bdc4867580..00a29cb5ece 100644 --- a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-status.get-1.json +++ b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-status.get-1.json @@ -4,9 +4,9 @@ "family": "session.pr-sidebar", "namedDeltas": [], "values": { - "070b061bf3fa": { + "0579dde9370e": { "name": "status.get#1", - "ordinal": 11, + "ordinal": 12, "args": [ { "name": "method", @@ -32,15 +32,24 @@ "startedAt": 0, "settledAt": 0, "value": { - "error": { - "code": "refused", - "message": "" - }, - "id": "frame-6", - "ok": false + "id": "frame-7", + "ok": true, + "result": { + "$rpc": "null" + } } } }, + "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, @@ -76,14 +85,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\"}}" - }, - "18e63ddf28fe": { + "1287efa543e2": { "name": "status.get#1", - "ordinal": 11, + "ordinal": 12, "args": [ { "name": "method", @@ -105,22 +109,19 @@ } ], "settlement": { - "status": "fulfilled", + "status": "rejected", "startedAt": 0, "settledAt": 0, - "value": { - "error": { - "code": "method_not_found", - "message": "Unknown method" - }, - "id": "frame-6", - "ok": false + "error": { + "category": "Error", + "message": "Connection closed", + "isRpcDeliveryUnknown": true } } }, - "1b45b070f3e6": { + "1a73e54fca55": { "name": "status.get#2", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -151,9 +152,20 @@ "ordinal": 2, "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}" }, - "2309f345fb72": { + "21069b5e026b": { + "name": "streams-registered-at-teardown", + "ordinal": 15, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#1" + } + ] + }, + "2dc2ca47b4e7": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -162,6 +174,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -186,34 +199,26 @@ "startedAt": 0 } }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, + "30603c5b4d53": { + "name": "status.get#1", + "ordinal": 12, "args": [ { "name": "method", - "value": "hostedReview.forBranch" + "value": "status.get" }, { "name": "params", "value": { - "active": true, - "branch": "feature", - "linkedGitHubPR": { - "$rpc": "null" - }, - "repo": "id:repo-9" + "$rpc": "undefined" } }, { "name": "options", "value": { - "failWhenDisconnected": true + "beforeSend": "[local beforeSend]", + "failWhenDisconnected": true, + "timeoutMs": 30000 } } ], @@ -222,25 +227,15 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-2", - "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" - } + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-7", + "ok": false } } }, - "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" @@ -254,6 +249,16 @@ "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, @@ -311,9 +316,119 @@ "refreshFailed": false } }, - "639ee016d5fa": { - "name": "status.get#1", + "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\"}}" + }, + "7512c5d8922e": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "checks": ["build:success"], + "checksError": { + "$rpc": "null" + }, + "comments": "loading", + "kind": "ready", + "pr": { + "headSha": "head-sha-1", + "number": 12, + "title": "Recorded" + }, + "refreshFailed": false + } + }, + "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" + } + } + } + }, + "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", @@ -335,19 +450,102 @@ } ], "settlement": { - "status": "rejected", + "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, - "error": { - "category": "Error", - "message": "transport failure", - "isRpcDeliveryUnknown": true + "value": { + "id": "frame-7", + "ok": true, + "result": { + "runtimeId": "recorded" + } } } }, - "707f5273fbe1": { - "name": "github.prForBranch#1", + "9091d133c3b0": { + "name": "reply-salvage", "ordinal": 8, + "value": { + "droppedCount": 1, + "droppedPaths": ["linkedPR"], + "method": "worktree.show", + "operation": "worktree.summary-or-skip", + "variant": "worktree-summary" + } + }, + "96ad436bfa1d": { + "name": "status.get#2", + "ordinal": 16, + "json": "{\"id\":\"frame-8\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, + "9b384c87ef98": { + "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": { + "error": "inner refused", + "ok": false + } + } + } + }, + "a55c83eeaeea": { + "name": "github.prForBranch#1", + "ordinal": 9, "args": [ { "name": "method", @@ -356,6 +554,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -380,7 +579,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-4", + "id": "frame-5", "ok": true, "result": { "fetchedAt": 0, @@ -398,9 +597,9 @@ } } }, - "725177241005": { + "a6e599be5005": { "name": "status.get#1", - "ordinal": 11, + "ordinal": 12, "args": [ { "name": "method", @@ -426,7 +625,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-6", + "id": "frame-7", "ok": true, "result": { "error": "refused" @@ -434,69 +633,9 @@ } } }, - "7512c5d8922e": { - "commentError": { - "$rpc": "null" - }, - "pr": { - "checks": ["build:success"], - "checksError": { - "$rpc": "null" - }, - "comments": "loading", - "kind": "ready", - "pr": { - "headSha": "head-sha-1", - "number": 12, - "title": "Recorded" - }, - "refreshFailed": false - } - }, - "827779de86bf": { - "name": "status.get#2", - "ordinal": 15, - "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, - "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": { + "a7e609fcb031": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -517,168 +656,14 @@ } } ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-5", - "ok": true, - "result": [ - { - "checkRunId": 7, - "conclusion": "success", - "name": "build", - "status": "completed" - } - ] - } - } - }, - "8acaf63197a5": { - "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": { - "$rpc": "null" - } - } - } - }, - "96f70a0f4340": { - "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 - } - } - }, - "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 } }, - "abcf3bdc5cde": { - "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, - "af7f3973dbfb": { - "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": { - "error": { - "message": "inner refused" - }, - "ok": false - } - } - } - }, - "b7fd114dbf3d": { - "name": "status.get#1", - "ordinal": 11, + "b3d8199239f7": { + "name": "status.get#2", + "ordinal": 15, "args": [ { "name": "method", @@ -705,84 +690,14 @@ "settledAt": 0, "error": { "category": "Error", - "message": "", + "message": "Connection closed", "isRpcDeliveryUnknown": true } } }, - "c8f187d4ae2c": { - "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": { - "error": { - "code": "refused", - "message": "outer refused" - }, - "id": "frame-6", - "ok": false - } - } - }, - "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 - } - }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" - }, - "d3426861162d": { + "bfedf583a747": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -810,7 +725,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-7", + "id": "frame-8", "ok": true, "result": { "body": "body", @@ -843,15 +758,85 @@ } } }, - "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" + } + ] + }, + "ccabffd679ab": { + "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": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-7", + "ok": false + } + } + }, + "d98b8776ee3f": { + "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 + } } }, "e0a11d8a1005": { @@ -879,6 +864,45 @@ "refreshFailed": false } }, + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, + "e177169d7bc8": { + "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": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, "eb79a9b3682a": { "status": "fulfilled", "startedAt": 0, @@ -887,9 +911,9 @@ "$rpc": "undefined" } }, - "ee35f6d45b0b": { + "ed8f9a8b7596": { "name": "status.get#1", - "ordinal": 11, + "ordinal": 12, "args": [ { "name": "method", @@ -915,14 +939,87 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-6", + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-7", + "ok": false + } + } + }, + "f276888d56f7": { + "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": { - "error": "inner refused", + "error": { + "message": "inner refused" + }, "ok": false } } } + }, + "ff6c5e987ede": { + "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": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } } }, "recording": { @@ -931,13 +1028,19 @@ { "id": "pr-sidebar-load.prelude:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -945,25 +1048,53 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.prelude:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "1287efa543e2" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "7512c5d8922e", + "effects": ["9091d133c3b0", "21069b5e026b"] } }, { @@ -971,27 +1102,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "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"] } }, { @@ -999,25 +1160,53 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "96f70a0f4340" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "d98b8776ee3f" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.result-absent:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "d98b8776ee3f" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "21069b5e026b"] } }, { @@ -1025,25 +1214,53 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8acaf63197a5" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "0579dde9370e" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.result-null:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "0579dde9370e" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "21069b5e026b"] } }, { @@ -1051,27 +1268,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "725177241005", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "a6e599be5005", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-ok-missing:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "a6e599be5005", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1079,27 +1326,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "ee35f6d45b0b", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "9b384c87ef98", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-false-string-error:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "9b384c87ef98", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1107,27 +1384,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "af7f3973dbfb", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "f276888d56f7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.inner-false-object-error:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "f276888d56f7", + "bfedf583a747" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1135,25 +1442,53 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "c8f187d4ae2c" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "ccabffd679ab" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.outer-refused:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "ccabffd679ab" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "21069b5e026b"] } }, { @@ -1161,25 +1496,53 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "070b061bf3fa" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "ed8f9a8b7596" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.outer-refused-no-message:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "ed8f9a8b7596" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "21069b5e026b"] } }, { @@ -1187,25 +1550,53 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "18e63ddf28fe" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "30603c5b4d53" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "5a5e8aeb9c0f", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.method-not-found:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "30603c5b4d53" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "5a5e8aeb9c0f", + "effects": ["9091d133c3b0", "21069b5e026b"] } }, { @@ -1213,27 +1604,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "639ee016d5fa", - "1b45b070f3e6" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "ff6c5e987ede", + "1a73e54fca55" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "827779de86bf" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "96ad436bfa1d" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "7512c5d8922e", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.transport-rejection:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "ff6c5e987ede", + "b3d8199239f7" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "96ad436bfa1d" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "7512c5d8922e", + "effects": ["9091d133c3b0", "c70e6fd19823"] } }, { @@ -1241,27 +1662,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "b7fd114dbf3d", - "1b45b070f3e6" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "e177169d7bc8", + "1a73e54fca55" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "827779de86bf" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "96ad436bfa1d" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "7512c5d8922e", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr-sidebar-load.transport-rejection-no-message:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "e177169d7bc8", + "b3d8199239f7" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "96ad436bfa1d" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "7512c5d8922e", + "effects": ["9091d133c3b0", "c70e6fd19823"] } } ] diff --git a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-worktree.show-1.json b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-worktree.show-1.json index 1fc659680c1..d80bfe65746 100644 --- a/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-worktree.show-1.json +++ b/mobile/rpc-foundation/goldens/matrix-session.pr-sidebar-worktree.show-1.json @@ -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,39 +49,6 @@ } } }, - "132359f59155": { - "name": "status.get#1", - "ordinal": 10, - "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 - } - }, - "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\"}}" - }, "1a8422eae0e3": { "name": "worktree.show#1", "ordinal": 4, @@ -112,91 +89,6 @@ "ordinal": 2, "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}" }, - "2309f345fb72": { - "name": "github.prForBranch#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "github.prForBranch" - }, - { - "name": "params", - "value": { - "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 - } - }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "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" - } - } - } - }, "2a98ce3bea80": { "name": "worktree.show#1", "ordinal": 4, @@ -231,10 +123,16 @@ } } }, - "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\"}}" + "2b9f6f1218e4": { + "name": "streams-registered-at-teardown", + "ordinal": 16, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#1" + } + ] }, "2c7b67501f26": { "name": "worktree.show#1", @@ -270,25 +168,33 @@ } } }, - "328a2eb7b1e2": { - "name": "github.prChecks#1", + "2dc2ca47b4e7": { + "name": "github.prForBranch#1", "ordinal": 9, "args": [ { "name": "method", - "value": "github.prChecks" + "value": "github.prForBranch" }, { "name": "params", "value": { - "headSha": "head-sha-1", - "prNumber": 12, + "acceptMergedFallbackPR": true, + "branch": "feature", + "currentHeadOid": { + "$rpc": "null" + }, + "fallbackPRNumber": 12, + "linkedPRNumber": { + "$rpc": "null" + }, "repo": "id:repo-9" } }, { "name": "options", "value": { + "beforeSend": "[local beforeSend]", "failWhenDisconnected": true } } @@ -311,6 +217,21 @@ "ordinal": 6, "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}" }, + "3744812c5fcd": { + "name": "status.get#1", + "ordinal": 13, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, + "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}" + }, "40b75de17700": { "name": "worktree.show#1", "ordinal": 4, @@ -346,6 +267,83 @@ } } }, + "4776354b25fa": { + "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-7", + "ok": true, + "result": { + "runtimeId": "recorded" + } + } + } + }, + "4a2114bd1b7d": { + "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-6", + "ok": true, + "result": [ + { + "checkRunId": 7, + "conclusion": "success", + "name": "build", + "status": "completed" + } + ] + } + } + }, "4da7ea39401b": { "name": "worktree.show#1", "ordinal": 4, @@ -384,6 +382,16 @@ } } }, + "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\"}}" + }, + "6a20150792b1": { + "name": "github.prForBranch#1", + "ordinal": 9, + "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}}" + }, "704943f0f395": { "name": "worktree.show#1", "ordinal": 4, @@ -415,59 +423,6 @@ } } }, - "707f5273fbe1": { - "name": "github.prForBranch#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "github.prForBranch" - }, - { - "name": "params", - "value": { - "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" - } - } - } - } - }, "7167083ab4d9": { "name": "worktree.show#1", "ordinal": 4, @@ -503,36 +458,29 @@ } } }, - "76263332f0a0": { - "name": "github.prChecks#1", - "ordinal": 11, - "json": "{\"id\":\"frame-5\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}" - }, - "7a16946f2448": { - "name": "status.get#1", - "ordinal": 12, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, - "8352e3c99668": { - "name": "status.get#1", - "ordinal": 11, + "75885386f005": { + "name": "hostedReview.forBranch#1", + "ordinal": 5, "args": [ { "name": "method", - "value": "status.get" + "value": "hostedReview.forBranch" }, { "name": "params", "value": { - "$rpc": "undefined" + "active": true, + "branch": "feature", + "linkedGitHubPR": { + "$rpc": "null" + }, + "repo": "id:repo-9" } }, { "name": "options", "value": { - "beforeSend": "[local beforeSend]", - "failWhenDisconnected": true, - "timeoutMs": 30000 + "failWhenDisconnected": true } } ], @@ -541,17 +489,77 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-6", + "id": "frame-4", "ok": true, "result": { - "runtimeId": "recorded" + "mergeable": "MERGEABLE", + "number": 12, + "provider": "github", + "state": "open", + "title": "Recorded", + "updatedAt": "2026-01-01T00:00:00Z", + "url": "https://github.com/owner/repo/pull/12" } } } }, - "87ba39148f02": { + "804a8709b78c": { + "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-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" + } + } + } + } + }, + "861c8796ae1f": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -577,7 +585,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-5", + "id": "frame-6", "ok": true, "result": [ { @@ -590,6 +598,34 @@ } } }, + "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 + } + }, "8b7816464095": { "name": "worktree.show#1", "ordinal": 4, @@ -622,6 +658,42 @@ } } }, + "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" + } + } + } + }, "8f20397f6101": { "name": "worktree.show#1", "ordinal": 4, @@ -659,73 +731,21 @@ } } }, - "92c7d3e81fc6": { - "name": "github.workItemDetails#1", - "ordinal": 13, - "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" - } - } - } + "9091d133c3b0": { + "name": "reply-salvage", + "ordinal": 8, + "value": { + "droppedCount": 1, + "droppedPaths": ["linkedPR"], + "method": "worktree.show", + "operation": "worktree.summary-or-skip", + "variant": "worktree-summary" } }, - "956724a74728": { - "name": "github.prForBranch#1", - "ordinal": 8, - "json": "{\"id\":\"frame-4\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"currentHeadOid\":null}}" + "9300396ee3f6": { + "name": "github.workItemDetails#1", + "ordinal": 15, + "json": "{\"id\":\"frame-8\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}" }, "9c952632b0c0": { "name": "status.get#1", @@ -755,47 +775,6 @@ "startedAt": 0 } }, - "9e3f98425211": { - "name": "github.prChecks#1", - "ordinal": 9, - "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" - } - ] - } - } - }, "a038c89eda45": { "name": "worktree.show#1", "ordinal": 4, @@ -831,14 +810,9 @@ } } }, - "abcf3bdc5cde": { - "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, - "ca31a249027a": { + "a55c83eeaeea": { "name": "github.prForBranch#1", - "ordinal": 7, + "ordinal": 9, "args": [ { "name": "method", @@ -847,6 +821,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -867,13 +842,31 @@ } ], "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" + } + } + } } }, - "cb071b912510": { + "a7e609fcb031": { "name": "github.prChecks#1", - "ordinal": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -899,50 +892,50 @@ "startedAt": 0 } }, - "d1ee08e03daa": { - "name": "status.get#1", - "ordinal": 10, + "ad0c6d91ae2c": { + "name": "github.prChecks#1", + "ordinal": 12, + "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"headSha\":\"head-sha-1\"}}" + }, + "b3a7ec3ab1c7": { + "name": "github.prForBranch#1", + "ordinal": 8, "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 } }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" - }, - "d3426861162d": { + "bfedf583a747": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -970,7 +963,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-7", + "id": "frame-8", "ok": true, "result": { "body": "body", @@ -1003,15 +996,43 @@ } } }, - "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" + } + ] + }, + "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 } }, "e0a11d8a1005": { @@ -1039,6 +1060,11 @@ "refreshFailed": false } }, + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, "eadd2f60a3d9": { "name": "worktree.show#1", "ordinal": 4, @@ -1079,38 +1105,28 @@ "$rpc": "undefined" } }, - "edb9efe1b656": { + "f8cc8c00c5dd": { "name": "github.workItemDetails#1", "ordinal": 14, - "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}" - }, - "fdd3e0b4c48b": { - "name": "github.prForBranch#1", - "ordinal": 7, "args": [ { "name": "method", - "value": "github.prForBranch" + "value": "github.workItemDetails" }, { "name": "params", "value": { - "branch": "feature", - "currentHeadOid": { - "$rpc": "null" - }, - "fallbackPRNumber": 12, - "linkedPRNumber": { - "$rpc": "null" - }, - "repo": "id:repo-9" + "number": 12, + "repo": "id:repo-9", + "type": "pr" } }, { "name": "options", "value": { "beforeSend": "[local beforeSend]", - "failWhenDisconnected": true + "failWhenDisconnected": true, + "timeoutMs": 30000 } } ], @@ -1119,17 +1135,32 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-4", + "id": "frame-8", "ok": true, "result": { - "fetchedAt": 0, - "kind": "found", - "pr": { - "headSha": "head-sha-1", - "mergeable": "MERGEABLE", + "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" } @@ -1144,13 +1175,19 @@ { "id": "pr-sidebar-load.normal:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1158,25 +1195,26 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -1184,34 +1222,70 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "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"] } }, { "id": "pr-sidebar-load.result-absent:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "704943f0f395", "ca31a249027a"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "956724a74728"], + "sender": ["1287167eaf56", "704943f0f395", "75885386f005", "b3a7ec3ab1c7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1" + ], "settlements": { "mount": "eb79a9b3682a" }, @@ -1224,19 +1298,20 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "704943f0f395", - "fdd3e0b4c48b", - "328a2eb7b1e2", - "132359f59155" + "75885386f005", + "804a8709b78c", + "cb071b912510", + "9c952632b0c0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd" ], "settlements": { "mount": "eb79a9b3682a" @@ -1250,21 +1325,22 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "704943f0f395", - "fdd3e0b4c48b", - "9e3f98425211", - "d1ee08e03daa", - "92c7d3e81fc6" + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448", - "edb9efe1b656" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" ], "settlements": { "mount": "eb79a9b3682a" @@ -1273,11 +1349,46 @@ "effects": [] } }, + { + "id": "pr-sidebar-load.result-absent:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "704943f0f395", + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["2b9f6f1218e4"] + } + }, { "id": "pr-sidebar-load.result-null:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "2a98ce3bea80", "ca31a249027a"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "956724a74728"], + "sender": ["1287167eaf56", "2a98ce3bea80", "75885386f005", "b3a7ec3ab1c7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1" + ], "settlements": { "mount": "eb79a9b3682a" }, @@ -1290,19 +1401,20 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "2a98ce3bea80", - "fdd3e0b4c48b", - "328a2eb7b1e2", - "132359f59155" + "75885386f005", + "804a8709b78c", + "cb071b912510", + "9c952632b0c0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd" ], "settlements": { "mount": "eb79a9b3682a" @@ -1316,21 +1428,22 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "2a98ce3bea80", - "fdd3e0b4c48b", - "9e3f98425211", - "d1ee08e03daa", - "92c7d3e81fc6" + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448", - "edb9efe1b656" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" ], "settlements": { "mount": "eb79a9b3682a" @@ -1339,11 +1452,46 @@ "effects": [] } }, + { + "id": "pr-sidebar-load.result-null:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "2a98ce3bea80", + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["2b9f6f1218e4"] + } + }, { "id": "pr-sidebar-load.inner-ok-missing:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "2c7b67501f26", "ca31a249027a"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "956724a74728"], + "sender": ["1287167eaf56", "2c7b67501f26", "75885386f005", "b3a7ec3ab1c7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1" + ], "settlements": { "mount": "eb79a9b3682a" }, @@ -1356,19 +1504,20 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "2c7b67501f26", - "fdd3e0b4c48b", - "328a2eb7b1e2", - "132359f59155" + "75885386f005", + "804a8709b78c", + "cb071b912510", + "9c952632b0c0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd" ], "settlements": { "mount": "eb79a9b3682a" @@ -1382,21 +1531,22 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "2c7b67501f26", - "fdd3e0b4c48b", - "9e3f98425211", - "d1ee08e03daa", - "92c7d3e81fc6" + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448", - "edb9efe1b656" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" ], "settlements": { "mount": "eb79a9b3682a" @@ -1405,11 +1555,46 @@ "effects": [] } }, + { + "id": "pr-sidebar-load.inner-ok-missing:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "2c7b67501f26", + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["2b9f6f1218e4"] + } + }, { "id": "pr-sidebar-load.inner-false-string-error:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "a038c89eda45", "ca31a249027a"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "956724a74728"], + "sender": ["1287167eaf56", "a038c89eda45", "75885386f005", "b3a7ec3ab1c7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1" + ], "settlements": { "mount": "eb79a9b3682a" }, @@ -1422,19 +1607,20 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "a038c89eda45", - "fdd3e0b4c48b", - "328a2eb7b1e2", - "132359f59155" + "75885386f005", + "804a8709b78c", + "cb071b912510", + "9c952632b0c0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd" ], "settlements": { "mount": "eb79a9b3682a" @@ -1448,21 +1634,22 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "a038c89eda45", - "fdd3e0b4c48b", - "9e3f98425211", - "d1ee08e03daa", - "92c7d3e81fc6" + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448", - "edb9efe1b656" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" ], "settlements": { "mount": "eb79a9b3682a" @@ -1471,11 +1658,46 @@ "effects": [] } }, + { + "id": "pr-sidebar-load.inner-false-string-error:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "a038c89eda45", + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["2b9f6f1218e4"] + } + }, { "id": "pr-sidebar-load.inner-false-object-error:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "8f20397f6101", "ca31a249027a"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "956724a74728"], + "sender": ["1287167eaf56", "8f20397f6101", "75885386f005", "b3a7ec3ab1c7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1" + ], "settlements": { "mount": "eb79a9b3682a" }, @@ -1488,19 +1710,20 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "8f20397f6101", - "fdd3e0b4c48b", - "328a2eb7b1e2", - "132359f59155" + "75885386f005", + "804a8709b78c", + "cb071b912510", + "9c952632b0c0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd" ], "settlements": { "mount": "eb79a9b3682a" @@ -1514,21 +1737,22 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "8f20397f6101", - "fdd3e0b4c48b", - "9e3f98425211", - "d1ee08e03daa", - "92c7d3e81fc6" + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448", - "edb9efe1b656" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" ], "settlements": { "mount": "eb79a9b3682a" @@ -1537,11 +1761,46 @@ "effects": [] } }, + { + "id": "pr-sidebar-load.inner-false-object-error:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "8f20397f6101", + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["2b9f6f1218e4"] + } + }, { "id": "pr-sidebar-load.outer-refused:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "7167083ab4d9", "ca31a249027a"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "956724a74728"], + "sender": ["1287167eaf56", "7167083ab4d9", "75885386f005", "b3a7ec3ab1c7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1" + ], "settlements": { "mount": "eb79a9b3682a" }, @@ -1554,19 +1813,20 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "7167083ab4d9", - "fdd3e0b4c48b", - "328a2eb7b1e2", - "132359f59155" + "75885386f005", + "804a8709b78c", + "cb071b912510", + "9c952632b0c0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd" ], "settlements": { "mount": "eb79a9b3682a" @@ -1580,21 +1840,22 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "7167083ab4d9", - "fdd3e0b4c48b", - "9e3f98425211", - "d1ee08e03daa", - "92c7d3e81fc6" + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448", - "edb9efe1b656" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" ], "settlements": { "mount": "eb79a9b3682a" @@ -1603,11 +1864,46 @@ "effects": [] } }, + { + "id": "pr-sidebar-load.outer-refused:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "7167083ab4d9", + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["2b9f6f1218e4"] + } + }, { "id": "pr-sidebar-load.outer-refused-no-message:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "40b75de17700", "ca31a249027a"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "956724a74728"], + "sender": ["1287167eaf56", "40b75de17700", "75885386f005", "b3a7ec3ab1c7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1" + ], "settlements": { "mount": "eb79a9b3682a" }, @@ -1620,19 +1916,20 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "40b75de17700", - "fdd3e0b4c48b", - "328a2eb7b1e2", - "132359f59155" + "75885386f005", + "804a8709b78c", + "cb071b912510", + "9c952632b0c0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd" ], "settlements": { "mount": "eb79a9b3682a" @@ -1646,21 +1943,22 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "40b75de17700", - "fdd3e0b4c48b", - "9e3f98425211", - "d1ee08e03daa", - "92c7d3e81fc6" + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448", - "edb9efe1b656" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" ], "settlements": { "mount": "eb79a9b3682a" @@ -1669,11 +1967,46 @@ "effects": [] } }, + { + "id": "pr-sidebar-load.outer-refused-no-message:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "40b75de17700", + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["2b9f6f1218e4"] + } + }, { "id": "pr-sidebar-load.method-not-found:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "1a8422eae0e3", "ca31a249027a"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "956724a74728"], + "sender": ["1287167eaf56", "1a8422eae0e3", "75885386f005", "b3a7ec3ab1c7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1" + ], "settlements": { "mount": "eb79a9b3682a" }, @@ -1686,19 +2019,20 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "1a8422eae0e3", - "fdd3e0b4c48b", - "328a2eb7b1e2", - "132359f59155" + "75885386f005", + "804a8709b78c", + "cb071b912510", + "9c952632b0c0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd" ], "settlements": { "mount": "eb79a9b3682a" @@ -1712,21 +2046,22 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "1a8422eae0e3", - "fdd3e0b4c48b", - "9e3f98425211", - "d1ee08e03daa", - "92c7d3e81fc6" + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448", - "edb9efe1b656" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" ], "settlements": { "mount": "eb79a9b3682a" @@ -1735,11 +2070,46 @@ "effects": [] } }, + { + "id": "pr-sidebar-load.method-not-found:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "1a8422eae0e3", + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["2b9f6f1218e4"] + } + }, { "id": "pr-sidebar-load.transport-rejection:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "eadd2f60a3d9", "ca31a249027a"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "956724a74728"], + "sender": ["1287167eaf56", "eadd2f60a3d9", "75885386f005", "b3a7ec3ab1c7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1" + ], "settlements": { "mount": "eb79a9b3682a" }, @@ -1752,19 +2122,20 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "eadd2f60a3d9", - "fdd3e0b4c48b", - "328a2eb7b1e2", - "132359f59155" + "75885386f005", + "804a8709b78c", + "cb071b912510", + "9c952632b0c0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd" ], "settlements": { "mount": "eb79a9b3682a" @@ -1778,21 +2149,22 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "eadd2f60a3d9", - "fdd3e0b4c48b", - "9e3f98425211", - "d1ee08e03daa", - "92c7d3e81fc6" + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448", - "edb9efe1b656" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" ], "settlements": { "mount": "eb79a9b3682a" @@ -1801,11 +2173,46 @@ "effects": [] } }, + { + "id": "pr-sidebar-load.transport-rejection:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "eadd2f60a3d9", + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["2b9f6f1218e4"] + } + }, { "id": "pr-sidebar-load.transport-rejection-no-message:branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "8b7816464095", "ca31a249027a"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "956724a74728"], + "sender": ["1287167eaf56", "8b7816464095", "75885386f005", "b3a7ec3ab1c7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1" + ], "settlements": { "mount": "eb79a9b3682a" }, @@ -1818,19 +2225,20 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "8b7816464095", - "fdd3e0b4c48b", - "328a2eb7b1e2", - "132359f59155" + "75885386f005", + "804a8709b78c", + "cb071b912510", + "9c952632b0c0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd" ], "settlements": { "mount": "eb79a9b3682a" @@ -1844,21 +2252,22 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "8b7816464095", - "fdd3e0b4c48b", - "9e3f98425211", - "d1ee08e03daa", - "92c7d3e81fc6" + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "956724a74728", - "76263332f0a0", - "7a16946f2448", - "edb9efe1b656" + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" ], "settlements": { "mount": "eb79a9b3682a" @@ -1866,6 +2275,35 @@ "state": "e0a11d8a1005", "effects": [] } + }, + { + "id": "pr-sidebar-load.transport-rejection-no-message:cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "8b7816464095", + "75885386f005", + "804a8709b78c", + "4a2114bd1b7d", + "4776354b25fa", + "f8cc8c00c5dd" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "6a20150792b1", + "ad0c6d91ae2c", + "3744812c5fcd", + "9300396ee3f6" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["2b9f6f1218e4"] + } } ] } diff --git a/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-github-github.addissuecomment-1.json b/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-github-github.addissuecomment-1.json index 222221a0b91..d2c96c4112f 100644 --- a/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-github-github.addissuecomment-1.json +++ b/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-github-github.addissuecomment-1.json @@ -97,11 +97,6 @@ "targetKey": "repo-1\u0000owner/repo\u0000issue\u00009" } }, - "1fc52836dac4": { - "name": "itemReviewersDraft", - "ordinal": 9, - "value": "octocat" - }, "21d560a20bed": { "name": "error", "ordinal": 14, @@ -300,11 +295,6 @@ "ordinal": 3, "value": "" }, - "56a29701de21": { - "name": "itemCommentDraft", - "ordinal": 8, - "value": "a comment" - }, "5737a7806a0c": { "name": "mutatingStatus", "ordinal": 15, @@ -562,6 +552,11 @@ "targetKey": "repo-1\u0000owner/repo\u0000issue\u00009" } }, + "9331fbfa07e4": { + "name": "itemCommentDraft", + "ordinal": 9, + "value": "a comment" + }, "948fc1352362": { "name": "github.addIssueComment#1", "ordinal": 11, @@ -741,6 +736,11 @@ "targetKey": "repo-1\u0000owner/repo\u0000issue\u00009" } }, + "ac15f5699a77": { + "name": "itemReviewersDraft", + "ordinal": 8, + "value": "octocat" + }, "ae745d4c2372": { "name": "detailPayload", "ordinal": 14, @@ -1394,8 +1394,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ae745d4c2372", @@ -1422,8 +1422,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ffd879a2e2be", @@ -1449,8 +1449,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ffd879a2e2be", @@ -1476,8 +1476,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "fa158073af7f", @@ -1504,8 +1504,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "21d560a20bed", @@ -1531,8 +1531,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "cc399e1bb52f", @@ -1559,8 +1559,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "cb543ce964ae", @@ -1586,8 +1586,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ef8932b03a8c", @@ -1613,8 +1613,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "36782b753721", @@ -1640,8 +1640,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "f65e0af02b52", @@ -1667,8 +1667,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ef8932b03a8c", diff --git a/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-gitlab-gitlab.addissuecomment-1.json b/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-gitlab-gitlab.addissuecomment-1.json index b81073c14b1..c5046f71ae8 100644 --- a/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-gitlab-gitlab.addissuecomment-1.json +++ b/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-gitlab-gitlab.addissuecomment-1.json @@ -107,11 +107,6 @@ "provider": "gitlab" } }, - "1fc52836dac4": { - "name": "itemReviewersDraft", - "ordinal": 9, - "value": "octocat" - }, "21d560a20bed": { "name": "error", "ordinal": 14, @@ -313,11 +308,6 @@ "ordinal": 3, "value": "" }, - "56a29701de21": { - "name": "itemCommentDraft", - "ordinal": 8, - "value": "a comment" - }, "5737a7806a0c": { "name": "mutatingStatus", "ordinal": 15, @@ -414,6 +404,11 @@ "provider": "gitlab" } }, + "9331fbfa07e4": { + "name": "itemCommentDraft", + "ordinal": 9, + "value": "a comment" + }, "9932bdaf3500": { "draft": "a comment", "error": "The host sent a reply this app could not read (gitlab.addIssueComment)", @@ -529,6 +524,11 @@ } } }, + "ac15f5699a77": { + "name": "itemReviewersDraft", + "ordinal": 8, + "value": "octocat" + }, "ad33e328b827": { "name": "gitlab.addIssueComment#1", "ordinal": 13, @@ -1020,8 +1020,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "02b5df9521e8", @@ -1048,8 +1048,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "d0afe3374825", @@ -1075,8 +1075,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "d0afe3374825", @@ -1102,8 +1102,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "8a21f81d9fc4", @@ -1130,8 +1130,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "21d560a20bed", @@ -1157,8 +1157,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "d986773c38a9", @@ -1185,8 +1185,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "cb543ce964ae", @@ -1212,8 +1212,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ef8932b03a8c", @@ -1239,8 +1239,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "36782b753721", @@ -1266,8 +1266,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "f65e0af02b52", @@ -1293,8 +1293,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ef8932b03a8c", diff --git a/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-gitlab-mr-gitlab.addmrcomment-1.json b/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-gitlab-mr-gitlab.addmrcomment-1.json index 1e526bae61f..d7ecfd19a58 100644 --- a/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-gitlab-mr-gitlab.addmrcomment-1.json +++ b/mobile/rpc-foundation/goldens/matrix-tasks.item-comment-gitlab-mr-gitlab.addmrcomment-1.json @@ -51,11 +51,6 @@ "provider": "gitlab" } }, - "1fc52836dac4": { - "name": "itemReviewersDraft", - "ordinal": 9, - "value": "octocat" - }, "21d560a20bed": { "name": "error", "ordinal": 14, @@ -146,11 +141,6 @@ "ordinal": 3, "value": "" }, - "56a29701de21": { - "name": "itemCommentDraft", - "ordinal": 8, - "value": "a comment" - }, "5737a7806a0c": { "name": "mutatingStatus", "ordinal": 15, @@ -406,6 +396,11 @@ } } }, + "9331fbfa07e4": { + "name": "itemCommentDraft", + "ordinal": 9, + "value": "a comment" + }, "965bf7fe4cd8": { "draft": "a comment", "error": "Unknown method", @@ -523,6 +518,11 @@ } } }, + "ac15f5699a77": { + "name": "itemReviewersDraft", + "ordinal": 8, + "value": "octocat" + }, "b6c88ff35429": { "draft": "a comment", "error": "inner refused", @@ -1020,8 +1020,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "f3cb1a7df6dc", @@ -1048,8 +1048,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "1e866e52fed3", @@ -1075,8 +1075,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "1e866e52fed3", @@ -1102,8 +1102,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "8a21f81d9fc4", @@ -1130,8 +1130,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "21d560a20bed", @@ -1157,8 +1157,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "de7b906df67a", @@ -1185,8 +1185,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "cb543ce964ae", @@ -1212,8 +1212,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ef8932b03a8c", @@ -1239,8 +1239,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "36782b753721", @@ -1266,8 +1266,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "f65e0af02b52", @@ -1293,8 +1293,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ef8932b03a8c", diff --git a/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-github.prchecks-1.json b/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-github.prchecks-1.json index 4eed3994ef1..5528b3ed142 100644 --- a/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-github.prchecks-1.json +++ b/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-github.prchecks-1.json @@ -276,11 +276,6 @@ "title": "A pull request" } }, - "1fc52836dac4": { - "name": "itemReviewersDraft", - "ordinal": 9, - "value": "octocat" - }, "22b1e4293201": { "name": "mutatingStatus", "ordinal": 28, @@ -628,11 +623,6 @@ "ordinal": 3, "value": "" }, - "56a29701de21": { - "name": "itemCommentDraft", - "ordinal": 8, - "value": "a comment" - }, "593c53b594c5": { "draft": "a comment", "error": "", @@ -1138,6 +1128,11 @@ "ordinal": 12, "value": true }, + "9331fbfa07e4": { + "name": "itemCommentDraft", + "ordinal": 9, + "value": "a comment" + }, "94caa29bceef": { "name": "error", "ordinal": 19, @@ -1153,6 +1148,11 @@ "ordinal": 25, "value": "The host sent a reply this app could not read (github.prChecks)" }, + "ac15f5699a77": { + "name": "itemReviewersDraft", + "ordinal": 8, + "value": "octocat" + }, "acff45feb249": { "name": "mutatingStatus", "ordinal": 26, @@ -1663,8 +1663,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1694,8 +1694,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1731,8 +1731,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1766,8 +1766,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1801,8 +1801,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1836,8 +1836,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1871,8 +1871,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1906,8 +1906,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1941,8 +1941,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1976,8 +1976,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -2011,8 +2011,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -2046,8 +2046,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", diff --git a/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-github.requestprreviewers-1.json b/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-github.requestprreviewers-1.json index 7e5912c4c24..a1e16784ad0 100644 --- a/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-github.requestprreviewers-1.json +++ b/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-github.requestprreviewers-1.json @@ -268,11 +268,6 @@ "title": "A pull request" } }, - "1fc52836dac4": { - "name": "itemReviewersDraft", - "ordinal": 9, - "value": "octocat" - }, "21d560a20bed": { "name": "error", "ordinal": 14, @@ -580,11 +575,6 @@ "ordinal": 3, "value": "" }, - "56a29701de21": { - "name": "itemCommentDraft", - "ordinal": 8, - "value": "a comment" - }, "5737a7806a0c": { "name": "mutatingStatus", "ordinal": 15, @@ -1288,6 +1278,11 @@ } } }, + "9331fbfa07e4": { + "name": "itemCommentDraft", + "ordinal": 9, + "value": "a comment" + }, "949da9fa9fb2": { "name": "github.requestPRReviewers#1", "ordinal": 11, @@ -1632,6 +1627,11 @@ "targetKey": "repo-1\u0000owner/repo\u0000pr\u000012" } }, + "ac15f5699a77": { + "name": "itemReviewersDraft", + "ordinal": 8, + "value": "octocat" + }, "acff45feb249": { "name": "mutatingStatus", "ordinal": 26, @@ -2384,8 +2384,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -2415,8 +2415,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -2451,8 +2451,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "407af7575a68", @@ -2479,8 +2479,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "407af7575a68", @@ -2512,8 +2512,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "407af7575a68", @@ -2540,8 +2540,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "407af7575a68", @@ -2573,8 +2573,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -2604,8 +2604,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -2640,8 +2640,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "21d560a20bed", @@ -2668,8 +2668,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "21d560a20bed", @@ -2701,8 +2701,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "124bef35e9e5", @@ -2730,8 +2730,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "124bef35e9e5", @@ -2764,8 +2764,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "cb543ce964ae", @@ -2792,8 +2792,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "cb543ce964ae", @@ -2825,8 +2825,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ef8932b03a8c", @@ -2853,8 +2853,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ef8932b03a8c", @@ -2886,8 +2886,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "36782b753721", @@ -2914,8 +2914,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "36782b753721", @@ -2947,8 +2947,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "f65e0af02b52", @@ -2975,8 +2975,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "f65e0af02b52", @@ -3008,8 +3008,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ef8932b03a8c", @@ -3036,8 +3036,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ef8932b03a8c", diff --git a/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-pr-check-discovery.json b/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-pr-check-discovery.json index bc5453d504b..c4b1edf7823 100644 --- a/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-pr-check-discovery.json +++ b/mobile/rpc-foundation/goldens/matrix-tasks.item-review-github-pr-check-discovery.json @@ -244,11 +244,6 @@ } } }, - "1fc52836dac4": { - "name": "itemReviewersDraft", - "ordinal": 9, - "value": "octocat" - }, "22b1e4293201": { "name": "mutatingStatus", "ordinal": 28, @@ -454,11 +449,6 @@ "ordinal": 3, "value": "" }, - "56a29701de21": { - "name": "itemCommentDraft", - "ordinal": 8, - "value": "a comment" - }, "593c53b594c5": { "draft": "a comment", "error": "", @@ -798,6 +788,11 @@ "ordinal": 12, "value": true }, + "9331fbfa07e4": { + "name": "itemCommentDraft", + "ordinal": 9, + "value": "a comment" + }, "94caa29bceef": { "name": "error", "ordinal": 19, @@ -841,6 +836,11 @@ "ordinal": 18, "value": false }, + "ac15f5699a77": { + "name": "itemReviewersDraft", + "ordinal": 8, + "value": "octocat" + }, "ace73bafef56": { "name": "status.get#1", "ordinal": 20, @@ -1187,8 +1187,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1218,8 +1218,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1255,8 +1255,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1292,8 +1292,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1329,8 +1329,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1366,8 +1366,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1403,8 +1403,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1440,8 +1440,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1477,8 +1477,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1514,8 +1514,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1551,8 +1551,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -1588,8 +1588,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", diff --git a/mobile/rpc-foundation/goldens/matrix-tasks.linear-item-linear.addissuecomment-1.json b/mobile/rpc-foundation/goldens/matrix-tasks.linear-item-linear.addissuecomment-1.json index efebc9b7b8a..86cc6641a63 100644 --- a/mobile/rpc-foundation/goldens/matrix-tasks.linear-item-linear.addissuecomment-1.json +++ b/mobile/rpc-foundation/goldens/matrix-tasks.linear-item-linear.addissuecomment-1.json @@ -383,39 +383,20 @@ "provider": "linear" } }, + "22b1e4293201": { + "name": "mutatingStatus", + "ordinal": 28, + "value": false + }, "29cadc65bcbb": { "name": "error", "ordinal": 15, "value": "" }, - "2ea9c99d4796": { - "name": "detailPayload", - "ordinal": 25, - "value": { - "assignee": { - "$rpc": "undefined" - }, - "children": [ - { - "id": "issue-3", - "identifier": "ENG-3", - "title": "A sub-issue", - "url": "" - } - ], - "comments": [], - "description": "description", - "labels": [], - "project": { - "$rpc": "null" - }, - "provider": "linear" - } - }, - "31dce0186d15": { - "name": "mutatingStatus", + "29ed7524dd3c": { + "name": "error", "ordinal": 22, - "value": true + "value": "" }, "335cdd96334f": { "error": "", @@ -588,11 +569,6 @@ "provider": "linear" } }, - "3f80db506009": { - "name": "linearSubIssueTitle", - "ordinal": 24, - "value": "" - }, "3fcdcfa261ee": { "name": "mutatingStatus", "ordinal": 23, @@ -645,11 +621,6 @@ "provider": "linear" } }, - "427b7993fe85": { - "name": "error", - "ordinal": 20, - "value": "" - }, "44efd00fa69f": { "name": "linearCommentDraft", "ordinal": 7, @@ -798,6 +769,11 @@ } } }, + "5348c8d60b38": { + "name": "linearCommentDraft", + "ordinal": 20, + "value": "" + }, "57207b51913e": { "name": "error", "ordinal": 12, @@ -876,49 +852,10 @@ "provider": "linear" } }, - "65b434738c91": { - "name": "linear.createIssue#1", - "ordinal": 21, - "args": [ - { - "name": "method", - "value": "linear.createIssue" - }, - { - "name": "params", - "value": { - "parentIssueId": "issue-1", - "projectId": { - "$rpc": "null" - }, - "teamId": "team-1", - "title": "A sub-issue", - "workspaceId": "linear-workspace" - } - }, - { - "name": "options", - "value": { - "timeoutMs": 30000 - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-3", - "ok": true, - "result": { - "id": "issue-3", - "identifier": "ENG-3", - "ok": true, - "title": "A sub-issue", - "url": "" - } - } - } + "68003f9dae22": { + "name": "mutatingStatus", + "ordinal": 24, + "value": true }, "760659bea59b": { "name": "linear.addIssueComment#1", @@ -1074,11 +1011,6 @@ "ordinal": 12, "value": "outer refused" }, - "8167ff6bda4e": { - "name": "linear.createIssue#1", - "ordinal": 23, - "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"linear.createIssue\",\"params\":{\"teamId\":\"team-1\",\"title\":\"A sub-issue\",\"workspaceId\":\"linear-workspace\",\"parentIssueId\":\"issue-1\",\"projectId\":null}}" - }, "8427fd4151f1": { "name": "mutatingStatus", "ordinal": 14, @@ -1227,6 +1159,11 @@ "ordinal": 12, "value": "inner refused" }, + "9911a44bcc07": { + "name": "linearCommentDraft", + "ordinal": 21, + "value": "" + }, "99b079cb804c": { "name": "linear.addIssueComment#1", "ordinal": 9, @@ -1317,16 +1254,35 @@ } } }, + "9c6909125d76": { + "name": "detailPayload", + "ordinal": 27, + "value": { + "assignee": { + "$rpc": "undefined" + }, + "children": [ + { + "id": "issue-3", + "identifier": "ENG-3", + "title": "A sub-issue", + "url": "" + } + ], + "comments": [], + "description": "description", + "labels": [], + "project": { + "$rpc": "null" + }, + "provider": "linear" + } + }, "9dc1f136772e": { "name": "linearCommentDraft", "ordinal": 4, "value": "" }, - "acff45feb249": { - "name": "mutatingStatus", - "ordinal": 26, - "value": false - }, "b1f0308d3795": { "name": "actionItem", "ordinal": 5, @@ -1366,6 +1322,11 @@ "ordinal": 13, "value": "Failed to add comment" }, + "b2da94d284a1": { + "name": "linearSubIssueTitle", + "ordinal": 26, + "value": "" + }, "b71922b936d3": { "name": "linear.addIssueComment#1", "ordinal": 9, @@ -1516,6 +1477,50 @@ "updatedAt": "2020-01-01T00:00:00.000Z" } }, + "c4bd3e068c64": { + "name": "linear.createIssue#1", + "ordinal": 23, + "args": [ + { + "name": "method", + "value": "linear.createIssue" + }, + { + "name": "params", + "value": { + "parentIssueId": "issue-1", + "projectId": { + "$rpc": "null" + }, + "teamId": "team-1", + "title": "A sub-issue", + "workspaceId": "linear-workspace" + } + }, + { + "name": "options", + "value": { + "timeoutMs": 30000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true, + "result": { + "id": "issue-3", + "identifier": "ENG-3", + "ok": true, + "title": "A sub-issue", + "url": "" + } + } + } + }, "c99df17a93d5": { "name": "linear.addIssueComment#1", "ordinal": 9, @@ -1728,6 +1733,11 @@ "ordinal": 13, "value": false }, + "e72b7c40f270": { + "name": "linear.createIssue#1", + "ordinal": 25, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"linear.createIssue\",\"params\":{\"teamId\":\"team-1\",\"title\":\"A sub-issue\",\"workspaceId\":\"linear-workspace\",\"parentIssueId\":\"issue-1\",\"projectId\":null}}" + }, "eb79a9b3682a": { "status": "fulfilled", "startedAt": 0, @@ -2014,15 +2024,16 @@ "ef8932b03a8c", "8ebaf0949b6d", "c39516152855", - "bbf2458754b4" + "bbf2458754b4", + "5348c8d60b38" ] } }, { "id": "tk-linear-item.result-absent:sub-issue-create-settled", "observation": { - "sender": ["b71922b936d3", "1fa11661cd73", "65b434738c91"], - "payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"], + "sender": ["b71922b936d3", "1fa11661cd73", "039c2b59e061"], + "payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"], "settlements": { "mount": "eb79a9b3682a", "comment-0": "eb79a9b3682a", @@ -2046,11 +2057,12 @@ "8ebaf0949b6d", "c39516152855", "bbf2458754b4", - "427b7993fe85", - "31dce0186d15", - "3f80db506009", - "2ea9c99d4796", - "acff45feb249" + "5348c8d60b38", + "029bb83f402f", + "3fcdcfa261ee", + "7b614cf87045", + "1b7a093f724f", + "fa2f2de4dfe7" ] } }, @@ -2105,15 +2117,16 @@ "ef8932b03a8c", "8ebaf0949b6d", "c39516152855", - "bbf2458754b4" + "bbf2458754b4", + "5348c8d60b38" ] } }, { "id": "tk-linear-item.result-null:sub-issue-create-settled", "observation": { - "sender": ["99b079cb804c", "1fa11661cd73", "65b434738c91"], - "payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"], + "sender": ["99b079cb804c", "1fa11661cd73", "039c2b59e061"], + "payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"], "settlements": { "mount": "eb79a9b3682a", "comment-0": "eb79a9b3682a", @@ -2137,11 +2150,12 @@ "8ebaf0949b6d", "c39516152855", "bbf2458754b4", - "427b7993fe85", - "31dce0186d15", - "3f80db506009", - "2ea9c99d4796", - "acff45feb249" + "5348c8d60b38", + "029bb83f402f", + "3fcdcfa261ee", + "7b614cf87045", + "1b7a093f724f", + "fa2f2de4dfe7" ] } }, @@ -2290,15 +2304,16 @@ "ef8932b03a8c", "8ebaf0949b6d", "c39516152855", - "bbf2458754b4" + "bbf2458754b4", + "5348c8d60b38" ] } }, { "id": "tk-linear-item.inner-false-string-error:sub-issue-create-settled", "observation": { - "sender": ["8f6bc911a494", "1fa11661cd73", "65b434738c91"], - "payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"], + "sender": ["8f6bc911a494", "1fa11661cd73", "039c2b59e061"], + "payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"], "settlements": { "mount": "eb79a9b3682a", "comment-0": "eb79a9b3682a", @@ -2322,11 +2337,12 @@ "8ebaf0949b6d", "c39516152855", "bbf2458754b4", - "427b7993fe85", - "31dce0186d15", - "3f80db506009", - "2ea9c99d4796", - "acff45feb249" + "5348c8d60b38", + "029bb83f402f", + "3fcdcfa261ee", + "7b614cf87045", + "1b7a093f724f", + "fa2f2de4dfe7" ] } }, @@ -2383,15 +2399,16 @@ "29cadc65bcbb", "4dd9211bea32", "3b3ee1b48010", - "3accbb2a4fcb" + "3accbb2a4fcb", + "9911a44bcc07" ] } }, { "id": "tk-linear-item.inner-false-object-error:sub-issue-create-settled", "observation": { - "sender": ["8786f555ebcb", "9c2ca99506b2", "039c2b59e061"], - "payloads": ["760659bea59b", "8e34e506a7f8", "88dbfd66d809"], + "sender": ["8786f555ebcb", "9c2ca99506b2", "c4bd3e068c64"], + "payloads": ["760659bea59b", "8e34e506a7f8", "e72b7c40f270"], "settlements": { "mount": "eb79a9b3682a", "comment-0": "eb79a9b3682a", @@ -2416,11 +2433,12 @@ "4dd9211bea32", "3b3ee1b48010", "3accbb2a4fcb", - "029bb83f402f", - "3fcdcfa261ee", - "7b614cf87045", - "1b7a093f724f", - "fa2f2de4dfe7" + "9911a44bcc07", + "29ed7524dd3c", + "68003f9dae22", + "b2da94d284a1", + "9c6909125d76", + "22b1e4293201" ] } }, @@ -2475,15 +2493,16 @@ "ef8932b03a8c", "8ebaf0949b6d", "c39516152855", - "bbf2458754b4" + "bbf2458754b4", + "5348c8d60b38" ] } }, { "id": "tk-linear-item.outer-refused:sub-issue-create-settled", "observation": { - "sender": ["d970b2195d6d", "1fa11661cd73", "65b434738c91"], - "payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"], + "sender": ["d970b2195d6d", "1fa11661cd73", "039c2b59e061"], + "payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"], "settlements": { "mount": "eb79a9b3682a", "comment-0": "eb79a9b3682a", @@ -2507,11 +2526,12 @@ "8ebaf0949b6d", "c39516152855", "bbf2458754b4", - "427b7993fe85", - "31dce0186d15", - "3f80db506009", - "2ea9c99d4796", - "acff45feb249" + "5348c8d60b38", + "029bb83f402f", + "3fcdcfa261ee", + "7b614cf87045", + "1b7a093f724f", + "fa2f2de4dfe7" ] } }, @@ -2566,15 +2586,16 @@ "ef8932b03a8c", "8ebaf0949b6d", "c39516152855", - "bbf2458754b4" + "bbf2458754b4", + "5348c8d60b38" ] } }, { "id": "tk-linear-item.outer-refused-no-message:sub-issue-create-settled", "observation": { - "sender": ["167c8724b16b", "1fa11661cd73", "65b434738c91"], - "payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"], + "sender": ["167c8724b16b", "1fa11661cd73", "039c2b59e061"], + "payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"], "settlements": { "mount": "eb79a9b3682a", "comment-0": "eb79a9b3682a", @@ -2598,11 +2619,12 @@ "8ebaf0949b6d", "c39516152855", "bbf2458754b4", - "427b7993fe85", - "31dce0186d15", - "3f80db506009", - "2ea9c99d4796", - "acff45feb249" + "5348c8d60b38", + "029bb83f402f", + "3fcdcfa261ee", + "7b614cf87045", + "1b7a093f724f", + "fa2f2de4dfe7" ] } }, @@ -2657,15 +2679,16 @@ "ef8932b03a8c", "8ebaf0949b6d", "c39516152855", - "bbf2458754b4" + "bbf2458754b4", + "5348c8d60b38" ] } }, { "id": "tk-linear-item.method-not-found:sub-issue-create-settled", "observation": { - "sender": ["5037193eac5c", "1fa11661cd73", "65b434738c91"], - "payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"], + "sender": ["5037193eac5c", "1fa11661cd73", "039c2b59e061"], + "payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"], "settlements": { "mount": "eb79a9b3682a", "comment-0": "eb79a9b3682a", @@ -2689,11 +2712,12 @@ "8ebaf0949b6d", "c39516152855", "bbf2458754b4", - "427b7993fe85", - "31dce0186d15", - "3f80db506009", - "2ea9c99d4796", - "acff45feb249" + "5348c8d60b38", + "029bb83f402f", + "3fcdcfa261ee", + "7b614cf87045", + "1b7a093f724f", + "fa2f2de4dfe7" ] } }, @@ -2748,15 +2772,16 @@ "ef8932b03a8c", "8ebaf0949b6d", "c39516152855", - "bbf2458754b4" + "bbf2458754b4", + "5348c8d60b38" ] } }, { "id": "tk-linear-item.transport-rejection:sub-issue-create-settled", "observation": { - "sender": ["cad9f764ce58", "1fa11661cd73", "65b434738c91"], - "payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"], + "sender": ["cad9f764ce58", "1fa11661cd73", "039c2b59e061"], + "payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"], "settlements": { "mount": "eb79a9b3682a", "comment-0": "eb79a9b3682a", @@ -2780,11 +2805,12 @@ "8ebaf0949b6d", "c39516152855", "bbf2458754b4", - "427b7993fe85", - "31dce0186d15", - "3f80db506009", - "2ea9c99d4796", - "acff45feb249" + "5348c8d60b38", + "029bb83f402f", + "3fcdcfa261ee", + "7b614cf87045", + "1b7a093f724f", + "fa2f2de4dfe7" ] } }, @@ -2839,15 +2865,16 @@ "ef8932b03a8c", "8ebaf0949b6d", "c39516152855", - "bbf2458754b4" + "bbf2458754b4", + "5348c8d60b38" ] } }, { "id": "tk-linear-item.transport-rejection-no-message:sub-issue-create-settled", "observation": { - "sender": ["0534215ae768", "1fa11661cd73", "65b434738c91"], - "payloads": ["760659bea59b", "da485104c1ac", "8167ff6bda4e"], + "sender": ["0534215ae768", "1fa11661cd73", "039c2b59e061"], + "payloads": ["760659bea59b", "da485104c1ac", "88dbfd66d809"], "settlements": { "mount": "eb79a9b3682a", "comment-0": "eb79a9b3682a", @@ -2871,11 +2898,12 @@ "8ebaf0949b6d", "c39516152855", "bbf2458754b4", - "427b7993fe85", - "31dce0186d15", - "3f80db506009", - "2ea9c99d4796", - "acff45feb249" + "5348c8d60b38", + "029bb83f402f", + "3fcdcfa261ee", + "7b614cf87045", + "1b7a093f724f", + "fa2f2de4dfe7" ] } } diff --git a/mobile/rpc-foundation/goldens/matrix-tasks.linear-team-context-linear.listteams-1.json b/mobile/rpc-foundation/goldens/matrix-tasks.linear-team-context-linear.listteams-1.json index bfa6195e8f5..2660b5ebccb 100644 --- a/mobile/rpc-foundation/goldens/matrix-tasks.linear-team-context-linear.listteams-1.json +++ b/mobile/rpc-foundation/goldens/matrix-tasks.linear-team-context-linear.listteams-1.json @@ -4,93 +4,14 @@ "family": "tasks.linear-team-context", "namedDeltas": [], "values": { - "0086e1c04b47": { + "031c50459130": { + "name": "createTeamId", + "ordinal": 10, + "value": "team-1" + }, + "0393503430d4": { "name": "linear.listTeams#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "linear.listTeams" - }, - { - "name": "params", - "value": { - "$rpc": "absent" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-1", - "ok": true - } - } - }, - "10b6d9eca9a8": { - "name": "linear.listTeams#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "linear.listTeams" - }, - { - "name": "params", - "value": { - "$rpc": "absent" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "error": { - "code": "method_not_found", - "message": "Unknown method" - }, - "id": "frame-1", - "ok": false - } - } - }, - "1288b8513745": { - "name": "linearStatesError", - "ordinal": 13, - "value": "" - }, - "2afc4b1311c1": { - "createTeamId": "team-1", - "states": [], - "statesLoading": false, - "teams": [ - { - "id": "team-1", - "key": "ENG", - "name": "Engineering", - "workspaceId": "linear-workspace" - } - ] - }, - "2b0fea7d064e": { - "name": "linear.listTeams#1", - "ordinal": 8, + "ordinal": 7, "args": [ { "name": "method", @@ -125,63 +46,50 @@ } } }, - "33218d06f656": { - "name": "linearStates", - "ordinal": 6, - "value": [] - }, - "356f2cb9a0df": { - "name": "linearStatesLoading", - "ordinal": 17, - "value": false - }, - "3abc893d377b": { - "name": "mutatingStatus", - "ordinal": 3, - "value": false - }, - "475ec9a66266": { - "name": "linearTeams", + "17249df8377f": { + "name": "createTeamId", "ordinal": 10, - "value": [ - { - "id": "team-1", - "key": "ENG", - "name": "Engineering", - "workspaceId": "linear-workspace" - } - ] + "value": { + "$rpc": "null" + } }, - "5711e2717b76": { - "name": "linearStates", - "ordinal": 16, - "value": [ - { - "color": "#000000", - "id": "state-1", - "name": "Todo", - "type": "unstarted" - } - ] - }, - "5e7b9a1d95b3": { - "name": "linearTeams", - "ordinal": 10, - "value": [] - }, - "60a0395d07c7": { - "name": "linearStatesLoading", - "ordinal": 12, - "value": true - }, - "610f6c28e7a1": { - "name": "linearSubIssueTitle", - "ordinal": 5, - "value": "" - }, - "6568a8d15463": { + "1ec7cb477142": { "name": "linear.listTeams#1", - "ordinal": 8, + "ordinal": 7, + "args": [ + { + "name": "method", + "value": "linear.listTeams" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "$rpc": "null" + } + } + } + }, + "295be39dd439": { + "name": "linear.listTeams#1", + "ordinal": 7, "args": [ { "name": "method", @@ -207,24 +115,29 @@ "value": { "error": { "code": "refused", - "message": "" + "message": "outer refused" }, "id": "frame-1", "ok": false } } }, - "74ca99e85dba": { - "createTeamId": { - "$rpc": "null" - }, + "2afc4b1311c1": { + "createTeamId": "team-1", "states": [], "statesLoading": false, - "teams": [] + "teams": [ + { + "id": "team-1", + "key": "ENG", + "name": "Engineering", + "workspaceId": "linear-workspace" + } + ] }, - "8ff86f3a6d6e": { + "3008cf7db0e8": { "name": "linear.listTeams#1", - "ordinal": 8, + "ordinal": 7, "args": [ { "name": "method", @@ -257,14 +170,320 @@ } } }, - "9131972798ca": { - "name": "linear.teamStates#1", - "ordinal": 15, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"linear.teamStates\",\"params\":{\"teamId\":\"team-1\",\"workspaceId\":\"linear-workspace\"}}" + "38ed617d559f": { + "name": "linearTeams", + "ordinal": 9, + "value": [ + { + "id": "team-1", + "key": "ENG", + "name": "Engineering", + "workspaceId": "linear-workspace" + } + ] }, - "95b075d66243": { + "3abc893d377b": { + "name": "mutatingStatus", + "ordinal": 3, + "value": false + }, + "4fcc46dfeb77": { + "name": "linear.listTeams#1", + "ordinal": 8, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"linear.listTeams\"}" + }, + "5dcdc7fd7492": { + "name": "linearSubIssueTitle", + "ordinal": 4, + "value": "" + }, + "6e2cda0e22c3": { + "name": "linear.listTeams#1", + "ordinal": 7, + "args": [ + { + "name": "method", + "value": "linear.listTeams" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } + }, + "74335ecb4cd2": { + "name": "linearStatesLoading", + "ordinal": 16, + "value": false + }, + "74505ce2789a": { + "name": "linearStates", + "ordinal": 5, + "value": [] + }, + "74ca99e85dba": { + "createTeamId": { + "$rpc": "null" + }, + "states": [], + "statesLoading": false, + "teams": [] + }, + "77a7eff4a3cc": { + "name": "linearStatesLoading", + "ordinal": 11, + "value": true + }, + "7a1d9604491f": { + "name": "linear.listTeams#1", + "ordinal": 7, + "args": [ + { + "name": "method", + "value": "linear.listTeams" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "82b36eab5101": { + "name": "creatingTask", + "ordinal": 6, + "value": false + }, + "8640fb2add9b": { + "name": "linearTeams", + "ordinal": 9, + "value": [] + }, + "a14f6c361136": { + "name": "linearStates", + "ordinal": 15, + "value": [ + { + "color": "#000000", + "id": "state-1", + "name": "Todo", + "type": "unstarted" + } + ] + }, + "b57d92c5b837": { + "name": "linear.listTeams#1", + "ordinal": 7, + "args": [ + { + "name": "method", + "value": "linear.listTeams" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "" + }, + "id": "frame-1", + "ok": false + } + } + }, + "b5ba6f00c4fb": { "name": "linear.teamStates#1", "ordinal": 14, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"linear.teamStates\",\"params\":{\"teamId\":\"team-1\",\"workspaceId\":\"linear-workspace\"}}" + }, + "b6a3835a95e0": { + "name": "linear.listTeams#1", + "ordinal": 7, + "args": [ + { + "name": "method", + "value": "linear.listTeams" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "b6bf81e9e237": { + "createTeamId": "team-1", + "states": [ + { + "color": "#000000", + "id": "state-1", + "name": "Todo", + "type": "unstarted" + } + ], + "statesLoading": false, + "teams": [ + { + "id": "team-1", + "key": "ENG", + "name": "Engineering", + "workspaceId": "linear-workspace" + } + ] + }, + "bb26ae00041e": { + "createTeamId": { + "$rpc": "null" + }, + "states": [ + { + "color": "#000000", + "id": "state-1", + "name": "Todo", + "type": "unstarted" + } + ], + "statesLoading": false, + "teams": [] + }, + "c3709cdbfa6b": { + "name": "linear.listTeams#1", + "ordinal": 7, + "args": [ + { + "name": "method", + "value": "linear.listTeams" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true + } + } + }, + "c74dd55429c8": { + "name": "linear.listTeams#1", + "ordinal": 7, + "args": [ + { + "name": "method", + "value": "linear.listTeams" + }, + { + "name": "params", + "value": { + "$rpc": "absent" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-1", + "ok": false + } + } + }, + "c88d134e7a42": { + "name": "linear.teamStates#1", + "ordinal": 13, "args": [ { "name": "method", @@ -302,157 +521,6 @@ } } }, - "9dc1f136772e": { - "name": "linearCommentDraft", - "ordinal": 4, - "value": "" - }, - "ab4350eb906f": { - "name": "linear.listTeams#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "linear.listTeams" - }, - { - "name": "params", - "value": { - "$rpc": "absent" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-1", - "ok": true, - "result": { - "error": "refused" - } - } - } - }, - "ab739ce318cf": { - "name": "linear.listTeams#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "linear.listTeams" - }, - { - "name": "params", - "value": { - "$rpc": "absent" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "error": { - "code": "refused", - "message": "outer refused" - }, - "id": "frame-1", - "ok": false - } - } - }, - "b164dfd464b3": { - "name": "linear.listTeams#1", - "ordinal": 9, - "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"linear.listTeams\"}" - }, - "b1adae647a3f": { - "name": "createTeamId", - "ordinal": 11, - "value": "team-1" - }, - "b6bf81e9e237": { - "createTeamId": "team-1", - "states": [ - { - "color": "#000000", - "id": "state-1", - "name": "Todo", - "type": "unstarted" - } - ], - "statesLoading": false, - "teams": [ - { - "id": "team-1", - "key": "ENG", - "name": "Engineering", - "workspaceId": "linear-workspace" - } - ] - }, - "bb26ae00041e": { - "createTeamId": { - "$rpc": "null" - }, - "states": [ - { - "color": "#000000", - "id": "state-1", - "name": "Todo", - "type": "unstarted" - } - ], - "statesLoading": false, - "teams": [] - }, - "c6fcb742b15b": { - "name": "linear.listTeams#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "linear.listTeams" - }, - { - "name": "params", - "value": { - "$rpc": "absent" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "rejected", - "startedAt": 0, - "settledAt": 0, - "error": { - "category": "Error", - "message": "transport failure", - "isRpcDeliveryUnknown": true - } - } - }, "cc2ece9478f0": { "name": "actionItem", "ordinal": 1, @@ -460,9 +528,29 @@ "$rpc": "null" } }, - "ceb71a750e06": { + "db66582f88a9": { + "name": "linearStatesError", + "ordinal": 12, + "value": "" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eda130337c99": { + "name": "detailPayload", + "ordinal": 2, + "value": { + "$rpc": "null" + } + }, + "ee01f277ffc4": { "name": "linear.listTeams#1", - "ordinal": 8, + "ordinal": 7, "args": [ { "name": "method", @@ -498,99 +586,6 @@ ] } } - }, - "d837ce2317b7": { - "name": "linear.listTeams#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "linear.listTeams" - }, - { - "name": "params", - "value": { - "$rpc": "absent" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "rejected", - "startedAt": 0, - "settledAt": 0, - "error": { - "category": "Error", - "message": "", - "isRpcDeliveryUnknown": true - } - } - }, - "db3e553e51e5": { - "name": "linear.listTeams#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "linear.listTeams" - }, - { - "name": "params", - "value": { - "$rpc": "absent" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-1", - "ok": true, - "result": { - "$rpc": "null" - } - } - } - }, - "e7edc26c6e24": { - "name": "createTeamId", - "ordinal": 11, - "value": { - "$rpc": "null" - } - }, - "e9a162defc32": { - "name": "creatingTask", - "ordinal": 7, - "value": false - }, - "eb79a9b3682a": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "$rpc": "undefined" - } - }, - "eda130337c99": { - "name": "detailPayload", - "ordinal": 2, - "value": { - "$rpc": "null" - } } }, "recording": { @@ -599,8 +594,8 @@ { "id": "tk-linear-team-context.normal:open-composer-settled", "observation": { - "sender": ["ceb71a750e06"], - "payloads": ["b164dfd464b3"], + "sender": ["ee01f277ffc4"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -610,20 +605,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130" ] } }, { "id": "tk-linear-team-context.normal:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -634,24 +628,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.result-absent:open-composer-settled", "observation": { - "sender": ["0086e1c04b47"], - "payloads": ["b164dfd464b3"], + "sender": ["c3709cdbfa6b"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -661,20 +654,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f" ] } }, { "id": "tk-linear-team-context.result-absent:select-metadata-item-settled", "observation": { - "sender": ["0086e1c04b47", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["c3709cdbfa6b", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -685,24 +677,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.result-null:open-composer-settled", "observation": { - "sender": ["db3e553e51e5"], - "payloads": ["b164dfd464b3"], + "sender": ["1ec7cb477142"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -712,20 +703,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f" ] } }, { "id": "tk-linear-team-context.result-null:select-metadata-item-settled", "observation": { - "sender": ["db3e553e51e5", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["1ec7cb477142", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -736,24 +726,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.inner-ok-missing:open-composer-settled", "observation": { - "sender": ["ab4350eb906f"], - "payloads": ["b164dfd464b3"], + "sender": ["7a1d9604491f"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -763,20 +752,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f" ] } }, { "id": "tk-linear-team-context.inner-ok-missing:select-metadata-item-settled", "observation": { - "sender": ["ab4350eb906f", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["7a1d9604491f", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -787,24 +775,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.inner-false-string-error:open-composer-settled", "observation": { - "sender": ["8ff86f3a6d6e"], - "payloads": ["b164dfd464b3"], + "sender": ["3008cf7db0e8"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -814,20 +801,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f" ] } }, { "id": "tk-linear-team-context.inner-false-string-error:select-metadata-item-settled", "observation": { - "sender": ["8ff86f3a6d6e", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["3008cf7db0e8", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -838,24 +824,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.inner-false-object-error:open-composer-settled", "observation": { - "sender": ["2b0fea7d064e"], - "payloads": ["b164dfd464b3"], + "sender": ["0393503430d4"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -865,20 +850,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f" ] } }, { "id": "tk-linear-team-context.inner-false-object-error:select-metadata-item-settled", "observation": { - "sender": ["2b0fea7d064e", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["0393503430d4", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -889,24 +873,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.outer-refused:open-composer-settled", "observation": { - "sender": ["ab739ce318cf"], - "payloads": ["b164dfd464b3"], + "sender": ["295be39dd439"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -916,20 +899,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f" ] } }, { "id": "tk-linear-team-context.outer-refused:select-metadata-item-settled", "observation": { - "sender": ["ab739ce318cf", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["295be39dd439", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -940,24 +922,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.outer-refused-no-message:open-composer-settled", "observation": { - "sender": ["6568a8d15463"], - "payloads": ["b164dfd464b3"], + "sender": ["b57d92c5b837"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -967,20 +948,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f" ] } }, { "id": "tk-linear-team-context.outer-refused-no-message:select-metadata-item-settled", "observation": { - "sender": ["6568a8d15463", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["b57d92c5b837", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -991,24 +971,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.method-not-found:open-composer-settled", "observation": { - "sender": ["10b6d9eca9a8"], - "payloads": ["b164dfd464b3"], + "sender": ["c74dd55429c8"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -1018,20 +997,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f" ] } }, { "id": "tk-linear-team-context.method-not-found:select-metadata-item-settled", "observation": { - "sender": ["10b6d9eca9a8", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["c74dd55429c8", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -1042,24 +1020,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.transport-rejection:open-composer-settled", "observation": { - "sender": ["c6fcb742b15b"], - "payloads": ["b164dfd464b3"], + "sender": ["6e2cda0e22c3"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -1069,20 +1046,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f" ] } }, { "id": "tk-linear-team-context.transport-rejection:select-metadata-item-settled", "observation": { - "sender": ["c6fcb742b15b", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["6e2cda0e22c3", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -1093,24 +1069,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.transport-rejection-no-message:open-composer-settled", "observation": { - "sender": ["d837ce2317b7"], - "payloads": ["b164dfd464b3"], + "sender": ["b6a3835a95e0"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -1120,20 +1095,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f" ] } }, { "id": "tk-linear-team-context.transport-rejection-no-message:select-metadata-item-settled", "observation": { - "sender": ["d837ce2317b7", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["b6a3835a95e0", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -1144,16 +1118,15 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "5e7b9a1d95b3", - "e7edc26c6e24", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "8640fb2add9b", + "17249df8377f", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } } diff --git a/mobile/rpc-foundation/goldens/matrix-tasks.linear-team-context-linear.teamstates-1.json b/mobile/rpc-foundation/goldens/matrix-tasks.linear-team-context-linear.teamstates-1.json index 5543dee089c..487e8942865 100644 --- a/mobile/rpc-foundation/goldens/matrix-tasks.linear-team-context-linear.teamstates-1.json +++ b/mobile/rpc-foundation/goldens/matrix-tasks.linear-team-context-linear.teamstates-1.json @@ -4,14 +4,47 @@ "family": "tasks.linear-team-context", "namedDeltas": [], "values": { - "1288b8513745": { - "name": "linearStatesError", - "ordinal": 13, - "value": "" + "031c50459130": { + "name": "createTeamId", + "ordinal": 10, + "value": "team-1" }, - "1a8a5ec5fc23": { + "08ba0389f3cc": { "name": "linear.teamStates#1", - "ordinal": 14, + "ordinal": 13, + "args": [ + { + "name": "method", + "value": "linear.teamStates" + }, + { + "name": "params", + "value": { + "teamId": "team-1", + "workspaceId": "linear-workspace" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true + } + } + }, + "0bbe7048713b": { + "name": "linear.teamStates#1", + "ordinal": 13, "args": [ { "name": "method", @@ -45,9 +78,253 @@ } } }, - "257a7865e607": { + "2afc4b1311c1": { + "createTeamId": "team-1", + "states": [], + "statesLoading": false, + "teams": [ + { + "id": "team-1", + "key": "ENG", + "name": "Engineering", + "workspaceId": "linear-workspace" + } + ] + }, + "3508d5a4f814": { + "name": "linear.teamStates#1", + "ordinal": 13, + "args": [ + { + "name": "method", + "value": "linear.teamStates" + }, + { + "name": "params", + "value": { + "teamId": "team-1", + "workspaceId": "linear-workspace" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "$rpc": "null" + } + } + } + }, + "356f2cb9a0df": { + "name": "linearStatesLoading", + "ordinal": 17, + "value": false + }, + "37b06a0ef857": { + "name": "linear.teamStates#1", + "ordinal": 13, + "args": [ + { + "name": "method", + "value": "linear.teamStates" + }, + { + "name": "params", + "value": { + "teamId": "team-1", + "workspaceId": "linear-workspace" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "38ed617d559f": { + "name": "linearTeams", + "ordinal": 9, + "value": [ + { + "id": "team-1", + "key": "ENG", + "name": "Engineering", + "workspaceId": "linear-workspace" + } + ] + }, + "3abc893d377b": { + "name": "mutatingStatus", + "ordinal": 3, + "value": false + }, + "4fcc46dfeb77": { + "name": "linear.listTeams#1", + "ordinal": 8, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"linear.listTeams\"}" + }, + "5dcdc7fd7492": { + "name": "linearSubIssueTitle", + "ordinal": 4, + "value": "" + }, + "74335ecb4cd2": { + "name": "linearStatesLoading", + "ordinal": 16, + "value": false + }, + "74505ce2789a": { + "name": "linearStates", + "ordinal": 5, + "value": [] + }, + "77a7eff4a3cc": { + "name": "linearStatesLoading", + "ordinal": 11, + "value": true + }, + "82b36eab5101": { + "name": "creatingTask", + "ordinal": 6, + "value": false + }, + "8bfe92d83df7": { + "name": "linear.teamStates#1", + "ordinal": 13, + "args": [ + { + "name": "method", + "value": "linear.teamStates" + }, + { + "name": "params", + "value": { + "teamId": "team-1", + "workspaceId": "linear-workspace" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-2", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } + } + } + }, + "9c2bebd630ca": { + "name": "linear.teamStates#1", + "ordinal": 13, + "args": [ + { + "name": "method", + "value": "linear.teamStates" + }, + { + "name": "params", + "value": { + "teamId": "team-1", + "workspaceId": "linear-workspace" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "method_not_found", + "message": "Unknown method" + }, + "id": "frame-2", + "ok": false + } + } + }, + "a14f6c361136": { + "name": "linearStates", + "ordinal": 15, + "value": [ + { + "color": "#000000", + "id": "state-1", + "name": "Todo", + "type": "unstarted" + } + ] + }, + "b5ba6f00c4fb": { "name": "linear.teamStates#1", "ordinal": 14, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"linear.teamStates\",\"params\":{\"teamId\":\"team-1\",\"workspaceId\":\"linear-workspace\"}}" + }, + "b6bf81e9e237": { + "createTeamId": "team-1", + "states": [ + { + "color": "#000000", + "id": "state-1", + "name": "Todo", + "type": "unstarted" + } + ], + "statesLoading": false, + "teams": [ + { + "id": "team-1", + "key": "ENG", + "name": "Engineering", + "workspaceId": "linear-workspace" + } + ] + }, + "bc9c421bce9d": { + "name": "linear.teamStates#1", + "ordinal": 13, "args": [ { "name": "method", @@ -81,159 +358,9 @@ } } }, - "2afc4b1311c1": { - "createTeamId": "team-1", - "states": [], - "statesLoading": false, - "teams": [ - { - "id": "team-1", - "key": "ENG", - "name": "Engineering", - "workspaceId": "linear-workspace" - } - ] - }, - "33218d06f656": { - "name": "linearStates", - "ordinal": 6, - "value": [] - }, - "356f2cb9a0df": { - "name": "linearStatesLoading", - "ordinal": 17, - "value": false - }, - "38ffd79cd25a": { - "name": "linearStatesLoading", - "ordinal": 18, - "value": false - }, - "3abc893d377b": { - "name": "mutatingStatus", - "ordinal": 3, - "value": false - }, - "3ec904e24cfd": { - "name": "linearStatesError", - "ordinal": 17, - "value": "Couldn't load states. Reopen to try again." - }, - "475ec9a66266": { - "name": "linearTeams", - "ordinal": 10, - "value": [ - { - "id": "team-1", - "key": "ENG", - "name": "Engineering", - "workspaceId": "linear-workspace" - } - ] - }, - "493c7b4199f7": { + "c88d134e7a42": { "name": "linear.teamStates#1", - "ordinal": 14, - "args": [ - { - "name": "method", - "value": "linear.teamStates" - }, - { - "name": "params", - "value": { - "teamId": "team-1", - "workspaceId": "linear-workspace" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-2", - "ok": true, - "result": { - "error": "refused" - } - } - } - }, - "5711e2717b76": { - "name": "linearStates", - "ordinal": 16, - "value": [ - { - "color": "#000000", - "id": "state-1", - "name": "Todo", - "type": "unstarted" - } - ] - }, - "5b6eff1db997": { - "name": "linear.teamStates#1", - "ordinal": 14, - "args": [ - { - "name": "method", - "value": "linear.teamStates" - }, - { - "name": "params", - "value": { - "teamId": "team-1", - "workspaceId": "linear-workspace" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "rejected", - "startedAt": 0, - "settledAt": 0, - "error": { - "category": "Error", - "message": "", - "isRpcDeliveryUnknown": true - } - } - }, - "60a0395d07c7": { - "name": "linearStatesLoading", - "ordinal": 12, - "value": true - }, - "610f6c28e7a1": { - "name": "linearSubIssueTitle", - "ordinal": 5, - "value": "" - }, - "680165cd199f": { - "name": "linearStates", - "ordinal": 16, - "value": [] - }, - "9131972798ca": { - "name": "linear.teamStates#1", - "ordinal": 15, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"linear.teamStates\",\"params\":{\"teamId\":\"team-1\",\"workspaceId\":\"linear-workspace\"}}" - }, - "95b075d66243": { - "name": "linear.teamStates#1", - "ordinal": 14, + "ordinal": 13, "args": [ { "name": "method", @@ -271,14 +398,16 @@ } } }, - "9dc1f136772e": { - "name": "linearCommentDraft", - "ordinal": 4, - "value": "" + "cc2ece9478f0": { + "name": "actionItem", + "ordinal": 1, + "value": { + "$rpc": "null" + } }, - "a29f541d9116": { + "cc5c41192644": { "name": "linear.teamStates#1", - "ordinal": 14, + "ordinal": 13, "args": [ { "name": "method", @@ -304,46 +433,23 @@ "settledAt": 0, "value": { "id": "frame-2", - "ok": true, - "result": { - "$rpc": "null" - } + "ok": true } } }, - "b164dfd464b3": { - "name": "linear.listTeams#1", - "ordinal": 9, - "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"linear.listTeams\"}" + "cd1bce5e6fae": { + "name": "linearStates", + "ordinal": 15, + "value": [] }, - "b1adae647a3f": { - "name": "createTeamId", - "ordinal": 11, - "value": "team-1" + "db66582f88a9": { + "name": "linearStatesError", + "ordinal": 12, + "value": "" }, - "b6bf81e9e237": { - "createTeamId": "team-1", - "states": [ - { - "color": "#000000", - "id": "state-1", - "name": "Todo", - "type": "unstarted" - } - ], - "statesLoading": false, - "teams": [ - { - "id": "team-1", - "key": "ENG", - "name": "Engineering", - "workspaceId": "linear-workspace" - } - ] - }, - "bba047c7732c": { + "e11f0649d40c": { "name": "linear.teamStates#1", - "ordinal": 14, + "ordinal": 13, "args": [ { "name": "method", @@ -379,16 +485,57 @@ } } }, - "cc2ece9478f0": { - "name": "actionItem", - "ordinal": 1, + "ea8fa14b318f": { + "name": "linear.teamStates#1", + "ordinal": 13, + "args": [ + { + "name": "method", + "value": "linear.teamStates" + }, + { + "name": "params", + "value": { + "teamId": "team-1", + "workspaceId": "linear-workspace" + } + }, + { + "name": "options", + "value": { + "$rpc": "absent" + } + } + ], + "settlement": { + "status": "rejected", + "startedAt": 0, + "settledAt": 0, + "error": { + "category": "Error", + "message": "", + "isRpcDeliveryUnknown": true + } + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eda130337c99": { + "name": "detailPayload", + "ordinal": 2, "value": { "$rpc": "null" } }, - "ceb71a750e06": { + "ee01f277ffc4": { "name": "linear.listTeams#1", - "ordinal": 8, + "ordinal": 7, "args": [ { "name": "method", @@ -425,162 +572,10 @@ } } }, - "cf77783ec600": { - "name": "linear.teamStates#1", - "ordinal": 14, - "args": [ - { - "name": "method", - "value": "linear.teamStates" - }, - { - "name": "params", - "value": { - "teamId": "team-1", - "workspaceId": "linear-workspace" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-2", - "ok": true - } - } - }, - "e9a162defc32": { - "name": "creatingTask", - "ordinal": 7, - "value": false - }, - "eb79a9b3682a": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "$rpc": "undefined" - } - }, - "eda130337c99": { - "name": "detailPayload", - "ordinal": 2, - "value": { - "$rpc": "null" - } - }, - "f47f4cf7bd2b": { - "name": "linear.teamStates#1", - "ordinal": 14, - "args": [ - { - "name": "method", - "value": "linear.teamStates" - }, - { - "name": "params", - "value": { - "teamId": "team-1", - "workspaceId": "linear-workspace" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "error": { - "code": "method_not_found", - "message": "Unknown method" - }, - "id": "frame-2", - "ok": false - } - } - }, - "fed235ce8e9c": { - "name": "linear.teamStates#1", - "ordinal": 14, - "args": [ - { - "name": "method", - "value": "linear.teamStates" - }, - { - "name": "params", - "value": { - "teamId": "team-1", - "workspaceId": "linear-workspace" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-2", - "ok": true, - "result": { - "error": "inner refused", - "ok": false - } - } - } - }, - "ff9c7b4bdfb6": { - "name": "linear.teamStates#1", - "ordinal": 14, - "args": [ - { - "name": "method", - "value": "linear.teamStates" - }, - { - "name": "params", - "value": { - "teamId": "team-1", - "workspaceId": "linear-workspace" - } - }, - { - "name": "options", - "value": { - "$rpc": "absent" - } - } - ], - "settlement": { - "status": "rejected", - "startedAt": 0, - "settledAt": 0, - "error": { - "category": "Error", - "message": "transport failure", - "isRpcDeliveryUnknown": true - } - } + "ef290fdf0bf5": { + "name": "linearStatesError", + "ordinal": 16, + "value": "Couldn't load states. Reopen to try again." } }, "recording": { @@ -589,8 +584,8 @@ { "id": "tk-linear-team-context.prelude:open-composer-settled", "observation": { - "sender": ["ceb71a750e06"], - "payloads": ["b164dfd464b3"], + "sender": ["ee01f277ffc4"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -600,20 +595,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130" ] } }, { "id": "tk-linear-team-context.normal:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -624,24 +618,23 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } }, { "id": "tk-linear-team-context.result-absent:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "cf77783ec600"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "cc5c41192644"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -652,25 +645,24 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "680165cd199f", - "3ec904e24cfd", - "38ffd79cd25a" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "cd1bce5e6fae", + "ef290fdf0bf5", + "356f2cb9a0df" ] } }, { "id": "tk-linear-team-context.result-null:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "a29f541d9116"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "3508d5a4f814"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -681,25 +673,24 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "680165cd199f", - "3ec904e24cfd", - "38ffd79cd25a" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "cd1bce5e6fae", + "ef290fdf0bf5", + "356f2cb9a0df" ] } }, { "id": "tk-linear-team-context.inner-ok-missing:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "493c7b4199f7"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "37b06a0ef857"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -710,25 +701,24 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "680165cd199f", - "3ec904e24cfd", - "38ffd79cd25a" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "cd1bce5e6fae", + "ef290fdf0bf5", + "356f2cb9a0df" ] } }, { "id": "tk-linear-team-context.inner-false-string-error:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "fed235ce8e9c"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "8bfe92d83df7"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -739,25 +729,24 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "680165cd199f", - "3ec904e24cfd", - "38ffd79cd25a" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "cd1bce5e6fae", + "ef290fdf0bf5", + "356f2cb9a0df" ] } }, { "id": "tk-linear-team-context.inner-false-object-error:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "bba047c7732c"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "e11f0649d40c"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -768,25 +757,24 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "680165cd199f", - "3ec904e24cfd", - "38ffd79cd25a" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "cd1bce5e6fae", + "ef290fdf0bf5", + "356f2cb9a0df" ] } }, { "id": "tk-linear-team-context.outer-refused:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "1a8a5ec5fc23"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "0bbe7048713b"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -797,25 +785,24 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "680165cd199f", - "3ec904e24cfd", - "38ffd79cd25a" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "cd1bce5e6fae", + "ef290fdf0bf5", + "356f2cb9a0df" ] } }, { "id": "tk-linear-team-context.outer-refused-no-message:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "257a7865e607"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "bc9c421bce9d"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -826,25 +813,24 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "680165cd199f", - "3ec904e24cfd", - "38ffd79cd25a" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "cd1bce5e6fae", + "ef290fdf0bf5", + "356f2cb9a0df" ] } }, { "id": "tk-linear-team-context.method-not-found:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "f47f4cf7bd2b"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "9c2bebd630ca"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -855,25 +841,24 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "680165cd199f", - "3ec904e24cfd", - "38ffd79cd25a" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "cd1bce5e6fae", + "ef290fdf0bf5", + "356f2cb9a0df" ] } }, { "id": "tk-linear-team-context.transport-rejection:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "ff9c7b4bdfb6"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "08ba0389f3cc"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -884,25 +869,24 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "680165cd199f", - "3ec904e24cfd", - "38ffd79cd25a" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "cd1bce5e6fae", + "ef290fdf0bf5", + "356f2cb9a0df" ] } }, { "id": "tk-linear-team-context.transport-rejection-no-message:select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "5b6eff1db997"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "ea8fa14b318f"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -913,17 +897,16 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "680165cd199f", - "3ec904e24cfd", - "38ffd79cd25a" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "cd1bce5e6fae", + "ef290fdf0bf5", + "356f2cb9a0df" ] } } diff --git a/mobile/rpc-foundation/goldens/matrix-tasks.project-row-detail-github.project.workitemdetailsbyslug-1.json b/mobile/rpc-foundation/goldens/matrix-tasks.project-row-detail-github.project.workitemdetailsbyslug-1.json index 28697a03a85..638a36a7192 100644 --- a/mobile/rpc-foundation/goldens/matrix-tasks.project-row-detail-github.project.workitemdetailsbyslug-1.json +++ b/mobile/rpc-foundation/goldens/matrix-tasks.project-row-detail-github.project.workitemdetailsbyslug-1.json @@ -4,99 +4,9 @@ "family": "tasks.project-row-detail", "namedDeltas": [], "values": { - "0679b27a119b": { - "name": "projectFieldDrafts", - "ordinal": 11, - "value": {} - }, - "0fa980ff8396": { - "detail": { - "$rpc": "null" - }, - "error": "outer refused", - "loading": false - }, - "118d9662d37f": { + "0018cf2b103a": { "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 16, - "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.project.workItemDetailsBySlug\",\"params\":{\"owner\":\"owner\",\"repo\":\"repo\",\"host\":\"github.enterprise.test\",\"number\":1,\"type\":\"issue\"}}" - }, - "183c3c26aba7": { - "detail": { - "$rpc": "null" - }, - "error": "The host sent a reply this app could not read (github.project.workItemDetailsBySlug)", - "loading": false - }, - "1e161db29c89": { - "name": "projectRowDetail", - "ordinal": 17, - "value": { - "assignees": [], - "baseSha": "base-sha", - "body": "body", - "checks": [], - "comments": [], - "files": [], - "headSha": "head-sha", - "labels": [], - "latestReviews": [], - "provider": "github", - "pullRequestId": "PR_kwDO", - "reviewDecision": { - "$rpc": "undefined" - }, - "reviewRequests": [] - } - }, - "205699b4093c": { - "detail": { - "$rpc": "null" - }, - "error": "inner refused", - "loading": false - }, - "213a7e810bb6": { - "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, - "args": [ - { - "name": "method", - "value": "github.project.workItemDetailsBySlug" - }, - { - "name": "params", - "value": { - "host": "github.enterprise.test", - "number": 1, - "owner": "owner", - "repo": "repo", - "type": "issue" - } - }, - { - "name": "options", - "value": { - "timeoutMs": 30000 - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-1", - "ok": true, - "result": { - "error": "refused" - } - } - } - }, - "222e474aa914": { - "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, + "ordinal": 14, "args": [ { "name": "method", @@ -133,26 +43,9 @@ } } }, - "2dc6bc594542": { - "name": "projectRowDetailError", - "ordinal": 17, - "value": "outer refused" - }, - "2ee1c7329449": { - "name": "projectRowDetail", - "ordinal": 12, - "value": { - "$rpc": "null" - } - }, - "31fcc93f02da": { - "name": "projectEditingCommentDraft", - "ordinal": 9, - "value": "" - }, - "3236e59b43c5": { + "0283d28b3dfb": { "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, + "ordinal": 14, "args": [ { "name": "method", @@ -176,13 +69,130 @@ } ], "settlement": { - "status": "rejected", + "status": "fulfilled", "startedAt": 0, "settledAt": 0, - "error": { - "category": "Error", - "message": "transport failure", - "isRpcDeliveryUnknown": true + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": "refused" + } + } + } + }, + "044bed918d57": { + "name": "projectRowDetailError", + "ordinal": 16, + "value": "Unknown method" + }, + "0a6c63ec0fc1": { + "name": "github.project.workItemDetailsBySlug#1", + "ordinal": 15, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.project.workItemDetailsBySlug\",\"params\":{\"owner\":\"owner\",\"repo\":\"repo\",\"host\":\"github.enterprise.test\",\"number\":1,\"type\":\"issue\"}}" + }, + "0d5e8bc85abb": { + "name": "projectEditingCommentDraft", + "ordinal": 8, + "value": "" + }, + "0dc3824edb1e": { + "name": "projectRowDetailError", + "ordinal": 16, + "value": "" + }, + "0fa980ff8396": { + "detail": { + "$rpc": "null" + }, + "error": "outer refused", + "loading": false + }, + "183c3c26aba7": { + "detail": { + "$rpc": "null" + }, + "error": "The host sent a reply this app could not read (github.project.workItemDetailsBySlug)", + "loading": false + }, + "1e92a0ffa26a": { + "name": "github.project.workItemDetailsBySlug#1", + "ordinal": 14, + "args": [ + { + "name": "method", + "value": "github.project.workItemDetailsBySlug" + }, + { + "name": "params", + "value": { + "host": "github.enterprise.test", + "number": 1, + "owner": "owner", + "repo": "repo", + "type": "issue" + } + }, + { + "name": "options", + "value": { + "timeoutMs": 30000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true + } + } + }, + "205699b4093c": { + "detail": { + "$rpc": "null" + }, + "error": "inner refused", + "loading": false + }, + "209abb3e5ca9": { + "name": "github.project.workItemDetailsBySlug#1", + "ordinal": 14, + "args": [ + { + "name": "method", + "value": "github.project.workItemDetailsBySlug" + }, + { + "name": "params", + "value": { + "host": "github.enterprise.test", + "number": 1, + "owner": "owner", + "repo": "repo", + "type": "issue" + } + }, + { + "name": "options", + "value": { + "timeoutMs": 30000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "error": "inner refused", + "ok": false + } } } }, @@ -193,10 +203,10 @@ "error": "transport failure", "loading": false }, - "368311fc2981": { - "name": "projectCommentDraft", - "ordinal": 7, - "value": "" + "34aecaef096a": { + "name": "projectRowDetailLoading", + "ordinal": 17, + "value": false }, "3a42a92c5487": { "name": "projectBodyDraft", @@ -224,31 +234,9 @@ "error": "", "loading": false }, - "4f23116da7f6": { - "name": "projectReviewersDraft", - "ordinal": 10, - "value": "" - }, - "561861a537bb": { - "name": "projectRowDetailLoading", - "ordinal": 18, - "value": false - }, - "5cebe6c14680": { - "name": "prFileLoadingPath", - "ordinal": 4, - "value": { - "$rpc": "null" - } - }, - "60012e7abb60": { - "name": "prFileCommentDrafts", - "ordinal": 2, - "value": {} - }, - "6c3d811fffe9": { + "4b5e90f7c640": { "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, + "ordinal": 14, "args": [ { "name": "method", @@ -284,14 +272,9 @@ } } }, - "7ca2bb47ab1c": { - "name": "prFileContents", - "ordinal": 3, - "value": {} - }, - "899221be28d8": { + "55361bf207c6": { "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, + "ordinal": 14, "args": [ { "name": "method", @@ -350,53 +333,38 @@ } } }, - "8bea5c781cb0": { - "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, - "args": [ - { - "name": "method", - "value": "github.project.workItemDetailsBySlug" - }, - { - "name": "params", - "value": { - "host": "github.enterprise.test", - "number": 1, - "owner": "owner", - "repo": "repo", - "type": "issue" - } - }, - { - "name": "options", - "value": { - "timeoutMs": 30000 - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "error": { - "code": "refused", - "message": "outer refused" - }, - "id": "frame-1", - "ok": false - } + "5b08d6631c0c": { + "name": "projectRowDetailError", + "ordinal": 12, + "value": "" + }, + "5cebe6c14680": { + "name": "prFileLoadingPath", + "ordinal": 4, + "value": { + "$rpc": "null" } }, - "9239767275ff": { + "60012e7abb60": { + "name": "prFileCommentDrafts", + "ordinal": 2, + "value": {} + }, + "6a0930bd2fdb": { + "name": "projectEditingCommentId", + "ordinal": 7, + "value": { + "$rpc": "null" + } + }, + "6bc1a66fb171": { "name": "projectRowDetailError", - "ordinal": 17, + "ordinal": 16, "value": "The host sent a reply this app could not read (github.project.workItemDetailsBySlug)" }, - "96d6a5752f05": { + "74c575cf3feb": { "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, + "ordinal": 14, "args": [ { "name": "method", @@ -420,23 +388,24 @@ } ], "settlement": { - "status": "fulfilled", + "status": "rejected", "startedAt": 0, "settledAt": 0, - "value": { - "id": "frame-1", - "ok": true + "error": { + "category": "Error", + "message": "transport failure", + "isRpcDeliveryUnknown": true } } }, - "9911dd53d1d7": { - "name": "projectTitleDraft", - "ordinal": 5, - "value": "Project issue" + "78b8331a5238": { + "name": "projectRowDetailError", + "ordinal": 16, + "value": "transport failure" }, - "9c91ff2e7fe6": { + "7bfaa68178f3": { "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, + "ordinal": 14, "args": [ { "name": "method", @@ -470,96 +439,24 @@ } } }, - "9ef3651bf4ad": { - "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, - "args": [ - { - "name": "method", - "value": "github.project.workItemDetailsBySlug" - }, - { - "name": "params", - "value": { - "host": "github.enterprise.test", - "number": 1, - "owner": "owner", - "repo": "repo", - "type": "issue" - } - }, - { - "name": "options", - "value": { - "timeoutMs": 30000 - } - } - ], - "settlement": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "id": "frame-1", - "ok": true, - "result": { - "error": "inner refused", - "ok": false - } - } - } + "7ca2bb47ab1c": { + "name": "prFileContents", + "ordinal": 3, + "value": {} }, - "a90f501112f8": { - "name": "projectRowDetailError", - "ordinal": 17, - "value": "Unknown method" - }, - "ab52357ddee7": { - "name": "projectRowDetailError", - "ordinal": 17, - "value": "inner refused" - }, - "b2a01ad6d4fe": { - "detail": { - "assignees": [], - "baseSha": "base-sha", - "body": "body", - "checks": [], - "comments": [], - "files": [], - "headSha": "head-sha", - "labels": [], - "latestReviews": [], - "provider": "github", - "pullRequestId": "PR_kwDO", - "reviewDecision": { - "$rpc": "undefined" - }, - "reviewRequests": [] - }, - "error": "", - "loading": false - }, - "b63d5911050c": { - "name": "projectRowDetailError", + "93c5cbde2045": { + "name": "projectRowDetailLoading", "ordinal": 13, - "value": "" + "value": true }, - "bff535848bcf": { - "name": "projectRowDetailError", - "ordinal": 17, - "value": "" + "9911dd53d1d7": { + "name": "projectTitleDraft", + "ordinal": 5, + "value": "Project issue" }, - "c0e2c37d8abf": { - "name": "projectEditingCommentId", - "ordinal": 8, - "value": { - "$rpc": "null" - } - }, - "cd23fb9a85c7": { + "a8ed211a5296": { "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, + "ordinal": 14, "args": [ { "name": "method", @@ -596,10 +493,108 @@ } } }, - "ea064759ca04": { + "b2a01ad6d4fe": { + "detail": { + "assignees": [], + "baseSha": "base-sha", + "body": "body", + "checks": [], + "comments": [], + "files": [], + "headSha": "head-sha", + "labels": [], + "latestReviews": [], + "provider": "github", + "pullRequestId": "PR_kwDO", + "reviewDecision": { + "$rpc": "undefined" + }, + "reviewRequests": [] + }, + "error": "", + "loading": false + }, + "b3022e1b4bce": { + "name": "github.project.workItemDetailsBySlug#1", + "ordinal": 14, + "args": [ + { + "name": "method", + "value": "github.project.workItemDetailsBySlug" + }, + { + "name": "params", + "value": { + "host": "github.enterprise.test", + "number": 1, + "owner": "owner", + "repo": "repo", + "type": "issue" + } + }, + { + "name": "options", + "value": { + "timeoutMs": 30000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "error": { + "code": "refused", + "message": "outer refused" + }, + "id": "frame-1", + "ok": false + } + } + }, + "bf07b693e877": { + "name": "projectRowDetail", + "ordinal": 16, + "value": { + "assignees": [], + "baseSha": "base-sha", + "body": "body", + "checks": [], + "comments": [], + "files": [], + "headSha": "head-sha", + "labels": [], + "latestReviews": [], + "provider": "github", + "pullRequestId": "PR_kwDO", + "reviewDecision": { + "$rpc": "undefined" + }, + "reviewRequests": [] + } + }, + "c82fb4f46067": { + "name": "projectReviewersDraft", + "ordinal": 9, + "value": "" + }, + "de8ce98bdd63": { + "name": "projectRowDetail", + "ordinal": 11, + "value": { + "$rpc": "null" + } + }, + "e07f42e59479": { "name": "projectRowDetailError", - "ordinal": 17, - "value": "transport failure" + "ordinal": 16, + "value": "outer refused" + }, + "e5129a14b6e4": { + "name": "projectFieldDrafts", + "ordinal": 10, + "value": {} }, "eb79a9b3682a": { "status": "fulfilled", @@ -609,14 +604,14 @@ "$rpc": "undefined" } }, - "f6a5085dd8e9": { - "name": "projectRowDetailLoading", - "ordinal": 14, - "value": true + "f8970fcf56b2": { + "name": "projectRowDetailError", + "ordinal": 16, + "value": "inner refused" }, - "fc2def66694f": { + "fb55d5c279f3": { "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, + "ordinal": 14, "args": [ { "name": "method", @@ -662,8 +657,8 @@ { "id": "tk-project-row-detail.normal:mounted", "observation": { - "sender": ["899221be28d8"], - "payloads": ["118d9662d37f"], + "sender": ["55361bf207c6"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -675,24 +670,23 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "1e161db29c89", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "bf07b693e877", + "34aecaef096a" ] } }, { "id": "tk-project-row-detail.result-absent:mounted", "observation": { - "sender": ["96d6a5752f05"], - "payloads": ["118d9662d37f"], + "sender": ["1e92a0ffa26a"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -704,24 +698,23 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "9239767275ff", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "6bc1a66fb171", + "34aecaef096a" ] } }, { "id": "tk-project-row-detail.result-null:mounted", "observation": { - "sender": ["6c3d811fffe9"], - "payloads": ["118d9662d37f"], + "sender": ["4b5e90f7c640"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -733,24 +726,23 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "9239767275ff", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "6bc1a66fb171", + "34aecaef096a" ] } }, { "id": "tk-project-row-detail.inner-ok-missing:mounted", "observation": { - "sender": ["213a7e810bb6"], - "payloads": ["118d9662d37f"], + "sender": ["0283d28b3dfb"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -762,24 +754,23 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "9239767275ff", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "6bc1a66fb171", + "34aecaef096a" ] } }, { "id": "tk-project-row-detail.inner-false-string-error:mounted", "observation": { - "sender": ["9ef3651bf4ad"], - "payloads": ["118d9662d37f"], + "sender": ["209abb3e5ca9"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -791,24 +782,23 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "9239767275ff", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "6bc1a66fb171", + "34aecaef096a" ] } }, { "id": "tk-project-row-detail.inner-false-object-error:mounted", "observation": { - "sender": ["fc2def66694f"], - "payloads": ["118d9662d37f"], + "sender": ["fb55d5c279f3"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -820,24 +810,23 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "ab52357ddee7", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "f8970fcf56b2", + "34aecaef096a" ] } }, { "id": "tk-project-row-detail.outer-refused:mounted", "observation": { - "sender": ["8bea5c781cb0"], - "payloads": ["118d9662d37f"], + "sender": ["b3022e1b4bce"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -849,24 +838,23 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "2dc6bc594542", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "e07f42e59479", + "34aecaef096a" ] } }, { "id": "tk-project-row-detail.outer-refused-no-message:mounted", "observation": { - "sender": ["cd23fb9a85c7"], - "payloads": ["118d9662d37f"], + "sender": ["a8ed211a5296"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -878,24 +866,23 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "bff535848bcf", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "0dc3824edb1e", + "34aecaef096a" ] } }, { "id": "tk-project-row-detail.method-not-found:mounted", "observation": { - "sender": ["222e474aa914"], - "payloads": ["118d9662d37f"], + "sender": ["0018cf2b103a"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -907,24 +894,23 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "a90f501112f8", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "044bed918d57", + "34aecaef096a" ] } }, { "id": "tk-project-row-detail.transport-rejection:mounted", "observation": { - "sender": ["3236e59b43c5"], - "payloads": ["118d9662d37f"], + "sender": ["74c575cf3feb"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -936,24 +922,23 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "ea064759ca04", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "78b8331a5238", + "34aecaef096a" ] } }, { "id": "tk-project-row-detail.transport-rejection-no-message:mounted", "observation": { - "sender": ["9c91ff2e7fe6"], - "payloads": ["118d9662d37f"], + "sender": ["7bfaa68178f3"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -965,16 +950,15 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "bff535848bcf", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "0dc3824edb1e", + "34aecaef096a" ] } } diff --git a/mobile/rpc-foundation/goldens/matrix-worktree.home-catalog-worktree.ps-1.json b/mobile/rpc-foundation/goldens/matrix-worktree.home-catalog-worktree.ps-1.json index ed5e635fd8f..71aabc3e2d2 100644 --- a/mobile/rpc-foundation/goldens/matrix-worktree.home-catalog-worktree.ps-1.json +++ b/mobile/rpc-foundation/goldens/matrix-worktree.home-catalog-worktree.ps-1.json @@ -123,21 +123,6 @@ } } }, - "19a302575563": { - "host-1": { - "activeCount": 2, - "agents": [], - "countsProvenAt": 1767225600000, - "hostId": "host-1", - "lastActiveWorktree": { - "displayName": "One", - "repo": "Repo", - "status": "working", - "worktreeId": "w-1" - }, - "totalWorktrees": 2 - } - }, "298c6fbd5d42": { "name": "worktree.ps#1", "ordinal": 1, @@ -244,17 +229,6 @@ } } }, - "51d64b49c1ab": { - "host-1": { - "activeCount": 0, - "catalogUnavailable": true, - "hostId": "host-1", - "lastActiveWorktree": { - "$rpc": "null" - }, - "totalWorktrees": 0 - } - }, "5e982fcaacf9": { "name": "worktree.ps#1", "ordinal": 1, @@ -293,25 +267,27 @@ } } }, - "7858e4e82b0f": { + "628656d5b8c6": { "name": "info", "ordinal": 3, "value": { "host-1": { - "activeCount": 2, - "agents": [], - "countsProvenAt": 1767225600000, + "activeCount": 0, + "catalogUnavailable": true, "hostId": "host-1", - "lastActiveWorktree": { - "displayName": "One", - "repo": "Repo", - "status": "working", - "worktreeId": "w-1" - }, - "totalWorktrees": 2 + "totalWorktrees": 0 } } }, + "800962c868e7": { + "host-1": { + "activeCount": 2, + "agents": [], + "countsProvenAt": 1767225600000, + "hostId": "host-1", + "totalWorktrees": 2 + } + }, "817623c64ce1": { "name": "worktree.ps#1", "ordinal": 1, @@ -347,11 +323,32 @@ } } }, + "89066e878348": { + "name": "info", + "ordinal": 3, + "value": { + "host-1": { + "activeCount": 2, + "agents": [], + "countsProvenAt": 1767225600000, + "hostId": "host-1", + "totalWorktrees": 2 + } + } + }, "922cb68379ac": { "name": "worktree.ps#1", "ordinal": 2, "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.ps\",\"params\":{\"limit\":10000,\"afterSnapshotId\":null,\"acceptRowDelta\":true,\"supportsWorktreeVisibilitySourceDefaults\":true}}" }, + "92357b2812ef": { + "host-1": { + "activeCount": 0, + "catalogUnavailable": true, + "hostId": "host-1", + "totalWorktrees": 0 + } + }, "9270aeb7d9c6": { "status": "pending", "startedAt": 0 @@ -469,21 +466,6 @@ } } }, - "cf43d74ea93e": { - "name": "info", - "ordinal": 3, - "value": { - "host-1": { - "activeCount": 0, - "catalogUnavailable": true, - "hostId": "host-1", - "lastActiveWorktree": { - "$rpc": "null" - }, - "totalWorktrees": 0 - } - } - }, "e36f43e93321": { "name": "worktree.ps#1", "ordinal": 1, @@ -567,8 +549,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "19a302575563", - "effects": ["7858e4e82b0f"] + "state": "800962c868e7", + "effects": ["89066e878348"] } }, { @@ -579,8 +561,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "51d64b49c1ab", - "effects": ["cf43d74ea93e"] + "state": "92357b2812ef", + "effects": ["628656d5b8c6"] } }, { @@ -591,8 +573,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "51d64b49c1ab", - "effects": ["cf43d74ea93e"] + "state": "92357b2812ef", + "effects": ["628656d5b8c6"] } }, { @@ -603,8 +585,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "51d64b49c1ab", - "effects": ["cf43d74ea93e"] + "state": "92357b2812ef", + "effects": ["628656d5b8c6"] } }, { @@ -615,8 +597,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "51d64b49c1ab", - "effects": ["cf43d74ea93e"] + "state": "92357b2812ef", + "effects": ["628656d5b8c6"] } }, { @@ -627,8 +609,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "51d64b49c1ab", - "effects": ["cf43d74ea93e"] + "state": "92357b2812ef", + "effects": ["628656d5b8c6"] } }, { @@ -639,8 +621,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "51d64b49c1ab", - "effects": ["cf43d74ea93e"] + "state": "92357b2812ef", + "effects": ["628656d5b8c6"] } }, { @@ -651,8 +633,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "51d64b49c1ab", - "effects": ["cf43d74ea93e"] + "state": "92357b2812ef", + "effects": ["628656d5b8c6"] } }, { @@ -663,8 +645,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "51d64b49c1ab", - "effects": ["cf43d74ea93e"] + "state": "92357b2812ef", + "effects": ["628656d5b8c6"] } }, { @@ -675,8 +657,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "51d64b49c1ab", - "effects": ["cf43d74ea93e"] + "state": "92357b2812ef", + "effects": ["628656d5b8c6"] } }, { @@ -687,8 +669,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "51d64b49c1ab", - "effects": ["cf43d74ea93e"] + "state": "92357b2812ef", + "effects": ["628656d5b8c6"] } } ] diff --git a/mobile/rpc-foundation/goldens/pr-comment-posted-in-place.json b/mobile/rpc-foundation/goldens/pr-comment-posted-in-place.json index 50ec55dd90b..ebd3e2354a8 100644 --- a/mobile/rpc-foundation/goldens/pr-comment-posted-in-place.json +++ b/mobile/rpc-foundation/goldens/pr-comment-posted-in-place.json @@ -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,167 +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\"}}" - }, - "2309f345fb72": { - "name": "github.prForBranch#1", - "ordinal": 8, - "args": [ - { - "name": "method", - "value": "github.prForBranch" - }, - { - "name": "params", - "value": { - "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 - } - }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "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" - } - } - } - }, - "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" - } - }, - "357f9b7862e3": { - "name": "worktree.show#1", - "ordinal": 6, - "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}" - }, - "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\"}}" - }, - "3eeb7e426600": { + "1e1163c70eba": { "name": "github.prComments#1", - "ordinal": 18, + "ordinal": 19, "args": [ { "name": "method", @@ -230,6 +82,110 @@ "startedAt": 0 } }, + "1f5765918736": { + "name": "github.repoSlug#1", + "ordinal": 2, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}" + }, + "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": { + "$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}}" + }, + "3b2df6b54829": { + "name": "github.addIssueComment#1", + "ordinal": 17, + "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-9", + "ok": true, + "result": { + "comment": { + "id": 57 + }, + "ok": true + } + } + } + }, + "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, @@ -268,14 +224,206 @@ } } }, - "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\"}}}" + "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\"}}" }, - "707f5273fbe1": { - "name": "github.prForBranch#1", + "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" + } + } + } + }, + "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": 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", @@ -284,6 +432,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -308,7 +457,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-4", + "id": "frame-5", "ok": true, "result": { "fetchedAt": 0, @@ -326,129 +475,9 @@ } } }, - "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" - } - } - } - }, - "84e5ca07cb7a": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": true - }, - "87ba39148f02": { + "a7e609fcb031": { "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" - } - ] - } - } - }, - "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 - } - }, - "abcf3bdc5cde": { - "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, - "cb071b912510": { - "name": "github.prChecks#1", - "ordinal": 10, "args": [ { "name": "method", @@ -474,14 +503,9 @@ "startedAt": 0 } }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" - }, - "d3426861162d": { + "bfedf583a747": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -509,7 +533,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-7", + "id": "frame-8", "ok": true, "result": { "body": "body", @@ -572,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" @@ -608,17 +621,14 @@ "refreshFailed": false } }, - "eb79a9b3682a": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "$rpc": "undefined" - } + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" }, - "f742d75db77c": { + "e40828b3dc78": { "name": "github.prComments#1", - "ordinal": 18, + "ordinal": 19, "args": [ { "name": "method", @@ -649,7 +659,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-9", + "id": "frame-10", "ok": true, "result": [ { @@ -673,6 +683,14 @@ ] } } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } } }, "recording": { @@ -681,13 +699,19 @@ { "id": "branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -695,25 +719,26 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -721,27 +746,28 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -749,32 +775,33 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d", - "19ddadf49030", - "3eeb7e426600" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747", + "3b2df6b54829", + "1e1163c70eba" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be", - "39b9c8ebcce5", - "6f75be8d77df" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7", + "7881ab1fb5d1", + "8f35f3a8538e" ], "settlements": { "mount": "eb79a9b3682a", "post-comment": "9270aeb7d9c6" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -782,32 +809,67 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d", - "19ddadf49030", - "f742d75db77c" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747", + "3b2df6b54829", + "e40828b3dc78" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be", - "39b9c8ebcce5", - "6f75be8d77df" + "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"] } } ] diff --git a/mobile/rpc-foundation/goldens/pr-resolve-refused-rolls-back.json b/mobile/rpc-foundation/goldens/pr-resolve-refused-rolls-back.json index fac1fff77d6..89ca922e009 100644 --- a/mobile/rpc-foundation/goldens/pr-resolve-refused-rolls-back.json +++ b/mobile/rpc-foundation/goldens/pr-resolve-refused-rolls-back.json @@ -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,9 +102,9 @@ "ordinal": 2, "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}" }, - "2309f345fb72": { + "2dc2ca47b4e7": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -108,6 +113,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -132,64 +138,27 @@ "startedAt": 0 } }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "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" - } - } + "35045fa5a752": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "kind": "loading" } }, - "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\"}}" + "357f9b7862e3": { + "name": "worktree.show#1", + "ordinal": 6, + "json": "{\"id\":\"frame-3\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}" }, - "3362c89b344f": { + "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", @@ -219,23 +188,15 @@ "code": "upstream_error", "message": "Resource not accessible by integration" }, - "id": "frame-8", + "id": "frame-9", "ok": false } } }, - "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\"}}" + "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", @@ -275,28 +236,25 @@ } } }, - "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}}" + "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\"}}" }, - "707f5273fbe1": { - "name": "github.prForBranch#1", - "ordinal": 8, + "75885386f005": { + "name": "hostedReview.forBranch#1", + "ordinal": 5, "args": [ { "name": "method", - "value": "github.prForBranch" + "value": "hostedReview.forBranch" }, { "name": "params", "value": { + "active": true, "branch": "feature", - "currentHeadOid": { - "$rpc": "null" - }, - "fallbackPRNumber": 12, - "linkedPRNumber": { + "linkedGitHubPR": { "$rpc": "null" }, "repo": "id:repo-9" @@ -305,7 +263,6 @@ { "name": "options", "value": { - "beforeSend": "[local beforeSend]", "failWhenDisconnected": true } } @@ -318,17 +275,13 @@ "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" - } + "mergeable": "MERGEABLE", + "number": 12, + "provider": "github", + "state": "open", + "title": "Recorded", + "updatedAt": "2026-01-01T00:00:00Z", + "url": "https://github.com/owner/repo/pull/12" } } } @@ -339,86 +292,9 @@ "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": { + "84983e28731b": { "name": "github.resolveReviewThread#1", - "ordinal": 16, + "ordinal": 17, "args": [ { "name": "method", @@ -444,13 +320,50 @@ "startedAt": 0 } }, - "9270aeb7d9c6": { - "status": "pending", - "startedAt": 0 - }, - "9c952632b0c0": { - "name": "status.get#1", + "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", @@ -476,14 +389,114 @@ "startedAt": 0 } }, - "abcf3bdc5cde": { + "8b7e690466d7": { "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + "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" + } + } + } }, - "cb071b912510": { + "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": 10, + "ordinal": 11, "args": [ { "name": "method", @@ -509,14 +522,9 @@ "startedAt": 0 } }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" - }, - "d3426861162d": { + "bfedf583a747": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -544,7 +552,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-7", + "id": "frame-8", "ok": true, "result": { "body": "body", @@ -577,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": { @@ -613,6 +615,11 @@ "refreshFailed": false } }, + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, "eb79a9b3682a": { "status": "fulfilled", "startedAt": 0, @@ -620,6 +627,17 @@ "value": { "$rpc": "undefined" } + }, + "febdecd6dd97": { + "name": "streams-registered-at-teardown", + "ordinal": 19, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#1" + } + ] } }, "recording": { @@ -628,13 +646,19 @@ { "id": "branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -642,25 +666,26 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -668,27 +693,28 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "e0a11d8a1005", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -696,30 +722,31 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d", - "901052a1366a" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747", + "84983e28731b" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be", - "61c7e519a6dc" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7", + "c11667112704" ], "settlements": { "mount": "eb79a9b3682a", "resolve-thread": "9270aeb7d9c6" }, "state": "18a67e1b19d6", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -727,30 +754,63 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d", - "3362c89b344f" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747", + "3d6c69a8143e" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be", - "61c7e519a6dc" + "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"] } } ] diff --git a/mobile/rpc-foundation/goldens/pr-sidebar-checks-refused.json b/mobile/rpc-foundation/goldens/pr-sidebar-checks-refused.json index 34ba75c147c..e1266f43f0b 100644 --- a/mobile/rpc-foundation/goldens/pr-sidebar-checks-refused.json +++ b/mobile/rpc-foundation/goldens/pr-sidebar-checks-refused.json @@ -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,19 +49,14 @@ } } }, - "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\"}}" }, - "2309f345fb72": { + "2dc2ca47b4e7": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -60,6 +65,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -84,61 +90,6 @@ "startedAt": 0 } }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "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" - } - } - } - }, - "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\"}}" - }, "341c71d5f61d": { "commentError": { "$rpc": "null" @@ -175,6 +126,16 @@ "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, @@ -213,23 +174,25 @@ } } }, - "707f5273fbe1": { - "name": "github.prForBranch#1", - "ordinal": 8, + "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": "github.prForBranch" + "value": "hostedReview.forBranch" }, { "name": "params", "value": { + "active": true, "branch": "feature", - "currentHeadOid": { - "$rpc": "null" - }, - "fallbackPRNumber": 12, - "linkedPRNumber": { + "linkedGitHubPR": { "$rpc": "null" }, "repo": "id:repo-9" @@ -238,7 +201,6 @@ { "name": "options", "value": { - "beforeSend": "[local beforeSend]", "failWhenDisconnected": true } } @@ -251,60 +213,20 @@ "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" - } + "mergeable": "MERGEABLE", + "number": 12, + "provider": "github", + "state": "open", + "title": "Recorded", + "updatedAt": "2026-01-01T00:00:00Z", + "url": "https://github.com/owner/repo/pull/12" } } } }, - "8352e3c99668": { + "870c2b9bacd0": { "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, + "ordinal": 12, "args": [ { "name": "method", @@ -330,14 +252,146 @@ "startedAt": 0 } }, - "abcf3bdc5cde": { + "8b7e690466d7": { "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + "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" + } + } + } }, - "cb071b912510": { + "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", @@ -363,14 +417,9 @@ "startedAt": 0 } }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" - }, - "d3426861162d": { + "bfedf583a747": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -398,7 +447,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-7", + "id": "frame-8", "ok": true, "result": { "body": "body", @@ -431,52 +480,21 @@ } } }, - "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" + } + ] }, - "d43ea39cfd0a": { - "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": { - "checks": [] - } - } - } + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" }, "eb79a9b3682a": { "status": "fulfilled", @@ -493,13 +511,19 @@ { "id": "branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -507,25 +531,26 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -533,27 +558,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "d43ea39cfd0a", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "98eb9b836539", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "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"] } } ] diff --git a/mobile/rpc-foundation/goldens/pr-sidebar-load.json b/mobile/rpc-foundation/goldens/pr-sidebar-load.json index 42e186747a6..66f4cd67b65 100644 --- a/mobile/rpc-foundation/goldens/pr-sidebar-load.json +++ b/mobile/rpc-foundation/goldens/pr-sidebar-load.json @@ -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,19 +49,14 @@ } } }, - "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\"}}" }, - "2309f345fb72": { + "2dc2ca47b4e7": { "name": "github.prForBranch#1", - "ordinal": 8, + "ordinal": 9, "args": [ { "name": "method", @@ -60,6 +65,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -84,61 +90,6 @@ "startedAt": 0 } }, - "27531d8cc301": { - "name": "hostedReview.forBranch#1", - "ordinal": 5, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" - }, - "28428f85f800": { - "name": "hostedReview.forBranch#1", - "ordinal": 3, - "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-2", - "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" - } - } - } - }, - "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" @@ -152,6 +103,16 @@ "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, @@ -190,9 +151,175 @@ } } }, - "707f5273fbe1": { - "name": "github.prForBranch#1", + "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" + } + } + } + }, + "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 + } + }, + "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", @@ -201,6 +328,7 @@ { "name": "params", "value": { + "acceptMergedFallbackPR": true, "branch": "feature", "currentHeadOid": { "$rpc": "null" @@ -225,7 +353,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-4", + "id": "frame-5", "ok": true, "result": { "fetchedAt": 0, @@ -243,119 +371,9 @@ } } }, - "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": { + "a7e609fcb031": { "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 - } - }, - "abcf3bdc5cde": { - "name": "status.get#1", - "ordinal": 13, - "json": "{\"id\":\"frame-6\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" - }, - "cb071b912510": { - "name": "github.prChecks#1", - "ordinal": 10, "args": [ { "name": "method", @@ -381,14 +399,9 @@ "startedAt": 0 } }, - "d25b12408fe6": { - "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,\"currentHeadOid\":null}}" - }, - "d3426861162d": { + "bfedf583a747": { "name": "github.workItemDetails#1", - "ordinal": 14, + "ordinal": 15, "args": [ { "name": "method", @@ -416,7 +429,7 @@ "startedAt": 0, "settledAt": 0, "value": { - "id": "frame-7", + "id": "frame-8", "ok": true, "result": { "body": "body", @@ -449,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": { @@ -485,6 +498,11 @@ "refreshFailed": false } }, + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, "eb79a9b3682a": { "status": "fulfilled", "startedAt": 0, @@ -500,13 +518,19 @@ { "id": "branch-hint", "observation": { - "sender": ["1287167eaf56", "28428f85f800", "4da7ea39401b", "2309f345fb72"], - "payloads": ["1f5765918736", "27531d8cc301", "357f9b7862e3", "d25b12408fe6"], + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -514,25 +538,26 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "cb071b912510", - "9c952632b0c0" + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde" + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" ], "settlements": { "mount": "eb79a9b3682a" }, "state": "35045fa5a752", - "effects": ["d3d85b61b684"] + "effects": ["9091d133c3b0"] } }, { @@ -540,27 +565,57 @@ "observation": { "sender": [ "1287167eaf56", - "28428f85f800", "4da7ea39401b", - "707f5273fbe1", - "87ba39148f02", - "8352e3c99668", - "d3426861162d" + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747" ], "payloads": [ "1f5765918736", - "27531d8cc301", + "3ecc2d44a209", "357f9b7862e3", - "d25b12408fe6", - "2bb452e534eb", - "abcf3bdc5cde", - "1723d8a5d8be" + "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"] } } ] diff --git a/mobile/rpc-foundation/goldens/pr-sidebar-revisit-and-refresh.json b/mobile/rpc-foundation/goldens/pr-sidebar-revisit-and-refresh.json new file mode 100644 index 00000000000..c17446d4c80 --- /dev/null +++ b/mobile/rpc-foundation/goldens/pr-sidebar-revisit-and-refresh.json @@ -0,0 +1,1201 @@ +{ + "goldenFormatVersion": 6, + "operation": "session.pr-sidebar", + "family": "session.pr-sidebar", + "namedDeltas": [], + "values": { + "03bcac42a924": { + "name": "worktree.show#3", + "ordinal": 26, + "json": "{\"id\":\"frame-11\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}" + }, + "0726612d4a89": { + "name": "reply-salvage", + "ordinal": 19, + "value": { + "droppedCount": 1, + "droppedPaths": ["linkedPR"], + "method": "worktree.show", + "operation": "worktree.summary-or-skip", + "variant": "worktree-summary" + } + }, + "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, + "args": [ + { + "name": "method", + "value": "github.repoSlug" + }, + { + "name": "params", + "value": { + "repo": "id:repo-9" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-1", + "ok": true, + "result": { + "owner": "owner", + "repo": "repo" + } + } + } + }, + "1c1b5062fc21": { + "name": "github.prForBranch#2", + "ordinal": 21, + "json": "{\"id\":\"frame-10\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null}}" + }, + "1f5765918736": { + "name": "github.repoSlug#1", + "ordinal": 2, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.repoSlug\",\"params\":{\"repo\":\"id:repo-9\"}}" + }, + "2055aa3ead1b": { + "name": "status.get#3", + "ordinal": 31, + "args": [ + { + "name": "method", + "value": "status.get" + }, + { + "name": "params", + "value": { + "$rpc": "undefined" + } + }, + { + "name": "options", + "value": { + "beforeSend": "[local beforeSend]", + "failWhenDisconnected": true, + "timeoutMs": 15000 + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-15", + "ok": true, + "result": { + "runtimeId": "recorded" + } + } + } + }, + "214acb975f72": { + "name": "worktree.show#2", + "ordinal": 17, + "args": [ + { + "name": "method", + "value": "worktree.show" + }, + { + "name": "params", + "value": { + "worktree": "id:repo-9::/w" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-9", + "ok": true, + "result": { + "worktree": { + "linkedPR": { + "$rpc": "null" + } + } + } + } + } + }, + "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 + } + }, + "2e217691ed33": { + "name": "hostedReview.forBranch#2", + "ordinal": 23, + "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-12", + "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" + } + } + } + }, + "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}}" + }, + "3ecc2d44a209": { + "name": "runtime.clientEvents.subscribe#1", + "ordinal": 3, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"runtime.clientEvents.subscribe\",\"params\":null}" + }, + "472f9e734ac0": { + "name": "github.prForBranch#3", + "ordinal": 33, + "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", + "userRefresh": true + } + }, + { + "name": "options", + "value": { + "beforeSend": "[local beforeSend]", + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-16", + "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" + } + } + } + } + }, + "4da7ea39401b": { + "name": "worktree.show#1", + "ordinal": 4, + "args": [ + { + "name": "method", + "value": "worktree.show" + }, + { + "name": "params", + "value": { + "worktree": "id:repo-9::/w" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-3", + "ok": true, + "result": { + "worktree": { + "linkedPR": { + "$rpc": "null" + } + } + } + } + } + }, + "5b1c7d371b2a": { + "name": "worktree.show#2", + "ordinal": 18, + "json": "{\"id\":\"frame-9\",\"deviceToken\":\"recording-device\",\"method\":\"worktree.show\",\"params\":{\"worktree\":\"id:repo-9::/w\"}}" + }, + "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" + } + } + } + }, + "7749a3b2d060": { + "name": "github.prForBranch#3", + "ordinal": 34, + "json": "{\"id\":\"frame-16\",\"deviceToken\":\"recording-device\",\"method\":\"github.prForBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedPRNumber\":null,\"fallbackPRNumber\":12,\"acceptMergedFallbackPR\":true,\"currentHeadOid\":null,\"userRefresh\":true}}" + }, + "7b3f2de1ee65": { + "name": "github.prChecks#2", + "ordinal": 28, + "json": "{\"id\":\"frame-13\",\"deviceToken\":\"recording-device\",\"method\":\"github.prChecks\",\"params\":{\"repo\":\"id:repo-9\",\"prNumber\":12,\"noCache\":true,\"userRefresh\":true,\"headSha\":\"head-sha-1\"}}" + }, + "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 + } + }, + "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" + } + }, + "9cfd3529adf9": { + "name": "streams-registered-at-teardown", + "ordinal": 37, + "value": [ + { + "cancelled": true, + "method": "runtime.clientEvents.subscribe", + "payload": "runtime.clientEvents.subscribe#1" + } + ] + }, + "a2c2965e14f8": { + "name": "github.workItemDetails#2", + "ordinal": 36, + "json": "{\"id\":\"frame-17\",\"deviceToken\":\"recording-device\",\"method\":\"github.workItemDetails\",\"params\":{\"repo\":\"id:repo-9\",\"number\":12,\"type\":\"pr\"}}" + }, + "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" + } + } + } + } + }, + "a5aaa57d24bd": { + "name": "reply-salvage", + "ordinal": 30, + "value": { + "droppedCount": 1, + "droppedPaths": ["linkedPR"], + "method": "worktree.show", + "operation": "worktree.summary-or-skip", + "variant": "worktree-summary" + } + }, + "a7e609fcb031": { + "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": "pending", + "startedAt": 0 + } + }, + "a7feeba7e968": { + "name": "github.prChecks#2", + "ordinal": 24, + "args": [ + { + "name": "method", + "value": "github.prChecks" + }, + { + "name": "params", + "value": { + "headSha": "head-sha-1", + "noCache": true, + "prNumber": 12, + "repo": "id:repo-9", + "userRefresh": true + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-13", + "ok": true, + "result": [ + { + "checkRunId": 7, + "conclusion": "success", + "name": "build", + "status": "completed" + } + ] + } + } + }, + "b8ec75ce4213": { + "name": "status.get#2", + "ordinal": 29, + "json": "{\"id\":\"frame-14\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, + "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" + } + } + } + } + }, + "cdb9ad4feb12": { + "name": "hostedReview.forBranch#2", + "ordinal": 27, + "json": "{\"id\":\"frame-12\",\"deviceToken\":\"recording-device\",\"method\":\"hostedReview.forBranch\",\"params\":{\"repo\":\"id:repo-9\",\"branch\":\"feature\",\"linkedGitHubPR\":null,\"active\":true}}" + }, + "d8daaef1bef7": { + "name": "status.get#2", + "ordinal": 25, + "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-14", + "ok": true, + "result": { + "runtimeId": "recorded" + } + } + } + }, + "e0a11d8a1005": { + "commentError": { + "$rpc": "null" + }, + "pr": { + "checks": ["build:success"], + "checksError": { + "$rpc": "null" + }, + "comments": [ + { + "body": "please fix", + "id": 55, + "resolved": false + } + ], + "kind": "ready", + "pr": { + "headSha": "head-sha-1", + "number": 12, + "title": "Recorded" + }, + "refreshFailed": false + } + }, + "e10925fa98de": { + "name": "status.get#1", + "ordinal": 14, + "json": "{\"id\":\"frame-7\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + }, + "e5e21b070305": { + "name": "github.workItemDetails#2", + "ordinal": 35, + "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-17", + "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" + } + } + } + } + }, + "e97818adb1c8": { + "name": "worktree.show#3", + "ordinal": 22, + "args": [ + { + "name": "method", + "value": "worktree.show" + }, + { + "name": "params", + "value": { + "worktree": "id:repo-9::/w" + } + }, + { + "name": "options", + "value": { + "failWhenDisconnected": true + } + } + ], + "settlement": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "id": "frame-11", + "ok": true, + "result": { + "worktree": { + "linkedPR": { + "$rpc": "null" + } + } + } + } + } + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "fd8df0a75a2b": { + "name": "github.prForBranch#2", + "ordinal": 20, + "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-10", + "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" + } + } + } + } + }, + "ffe160d981d2": { + "name": "status.get#3", + "ordinal": 32, + "json": "{\"id\":\"frame-15\",\"deviceToken\":\"recording-device\",\"method\":\"status.get\"}" + } + }, + "recording": { + "scenario": "pr-sidebar-revisit-and-refresh", + "checkpoints": [ + { + "id": "branch-hint", + "observation": { + "sender": ["1287167eaf56", "4da7ea39401b", "75885386f005", "2dc2ca47b4e7"], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "35045fa5a752", + "effects": ["9091d133c3b0"] + } + }, + { + "id": "pr", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "a7e609fcb031", + "870c2b9bacd0" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de" + ], + "settlements": { + "mount": "eb79a9b3682a" + }, + "state": "35045fa5a752", + "effects": ["9091d133c3b0"] + } + }, + { + "id": "loaded", + "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"] + } + }, + { + "id": "revisited", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747", + "214acb975f72", + "fd8df0a75a2b" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7", + "5b1c7d371b2a", + "1c1b5062fc21" + ], + "settlements": { + "mount": "eb79a9b3682a", + "revisit": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "0726612d4a89"] + } + }, + { + "id": "refreshed", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747", + "214acb975f72", + "fd8df0a75a2b", + "e97818adb1c8", + "2e217691ed33", + "a7feeba7e968", + "d8daaef1bef7", + "2055aa3ead1b", + "472f9e734ac0", + "e5e21b070305" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7", + "5b1c7d371b2a", + "1c1b5062fc21", + "03bcac42a924", + "cdb9ad4feb12", + "7b3f2de1ee65", + "b8ec75ce4213", + "ffe160d981d2", + "7749a3b2d060", + "a2c2965e14f8" + ], + "settlements": { + "mount": "eb79a9b3682a", + "revisit": "eb79a9b3682a", + "refresh": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "0726612d4a89", "a5aaa57d24bd"] + } + }, + { + "id": "cleanup", + "observation": { + "sender": [ + "1287167eaf56", + "4da7ea39401b", + "75885386f005", + "a55c83eeaeea", + "861c8796ae1f", + "8b7e690466d7", + "bfedf583a747", + "214acb975f72", + "fd8df0a75a2b", + "e97818adb1c8", + "2e217691ed33", + "a7feeba7e968", + "d8daaef1bef7", + "2055aa3ead1b", + "472f9e734ac0", + "e5e21b070305" + ], + "payloads": [ + "1f5765918736", + "3ecc2d44a209", + "357f9b7862e3", + "0730389db3e9", + "3a8e6b13f380", + "0d9f7988ff86", + "e10925fa98de", + "5d309fcf43a7", + "5b1c7d371b2a", + "1c1b5062fc21", + "03bcac42a924", + "cdb9ad4feb12", + "7b3f2de1ee65", + "b8ec75ce4213", + "ffe160d981d2", + "7749a3b2d060", + "a2c2965e14f8" + ], + "settlements": { + "mount": "eb79a9b3682a", + "revisit": "eb79a9b3682a", + "refresh": "eb79a9b3682a" + }, + "state": "e0a11d8a1005", + "effects": ["9091d133c3b0", "0726612d4a89", "a5aaa57d24bd", "9cfd3529adf9"] + } + } + ] + } +} diff --git a/mobile/rpc-foundation/goldens/tk-item-comment-github.json b/mobile/rpc-foundation/goldens/tk-item-comment-github.json index 8a5e337b8a3..082e8e1ec47 100644 --- a/mobile/rpc-foundation/goldens/tk-item-comment-github.json +++ b/mobile/rpc-foundation/goldens/tk-item-comment-github.json @@ -54,11 +54,6 @@ "targetKey": "repo-1\u0000owner/repo\u0000issue\u00009" } }, - "1fc52836dac4": { - "name": "itemReviewersDraft", - "ordinal": 9, - "value": "octocat" - }, "3aefb3006914": { "name": "error", "ordinal": 10, @@ -74,11 +69,6 @@ "ordinal": 3, "value": "" }, - "56a29701de21": { - "name": "itemCommentDraft", - "ordinal": 8, - "value": "a comment" - }, "69e396c2097f": { "name": "github.addIssueComment#1", "ordinal": 13, @@ -94,6 +84,16 @@ "ordinal": 12, "value": true }, + "9331fbfa07e4": { + "name": "itemCommentDraft", + "ordinal": 9, + "value": "a comment" + }, + "ac15f5699a77": { + "name": "itemReviewersDraft", + "ordinal": 8, + "value": "octocat" + }, "ae745d4c2372": { "name": "detailPayload", "ordinal": 14, @@ -341,8 +341,8 @@ "4031bf455f49", "c43ab05aed16", "1ca30ac68b76", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "ae745d4c2372", diff --git a/mobile/rpc-foundation/goldens/tk-item-comment-gitlab-mr.json b/mobile/rpc-foundation/goldens/tk-item-comment-gitlab-mr.json index bf05600a7bb..c578aa4f5f8 100644 --- a/mobile/rpc-foundation/goldens/tk-item-comment-gitlab-mr.json +++ b/mobile/rpc-foundation/goldens/tk-item-comment-gitlab-mr.json @@ -4,11 +4,6 @@ "family": "tasks.item-comment-gitlab-mr", "namedDeltas": [], "values": { - "1fc52836dac4": { - "name": "itemReviewersDraft", - "ordinal": 9, - "value": "octocat" - }, "3aefb3006914": { "name": "error", "ordinal": 10, @@ -48,11 +43,6 @@ "ordinal": 3, "value": "" }, - "56a29701de21": { - "name": "itemCommentDraft", - "ordinal": 8, - "value": "a comment" - }, "622bbddf4f05": { "name": "actionItem", "ordinal": 6, @@ -129,6 +119,16 @@ "ordinal": 12, "value": true }, + "9331fbfa07e4": { + "name": "itemCommentDraft", + "ordinal": 9, + "value": "a comment" + }, + "ac15f5699a77": { + "name": "itemReviewersDraft", + "ordinal": 8, + "value": "octocat" + }, "c650cf641414": { "name": "itemReviewersDraft", "ordinal": 4, @@ -250,8 +250,8 @@ "4031bf455f49", "622bbddf4f05", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "f3cb1a7df6dc", diff --git a/mobile/rpc-foundation/goldens/tk-item-comment-gitlab.json b/mobile/rpc-foundation/goldens/tk-item-comment-gitlab.json index 124b984af93..12c817feb30 100644 --- a/mobile/rpc-foundation/goldens/tk-item-comment-gitlab.json +++ b/mobile/rpc-foundation/goldens/tk-item-comment-gitlab.json @@ -71,11 +71,6 @@ "provider": "gitlab" } }, - "1fc52836dac4": { - "name": "itemReviewersDraft", - "ordinal": 9, - "value": "octocat" - }, "3aefb3006914": { "name": "error", "ordinal": 10, @@ -110,11 +105,6 @@ "ordinal": 3, "value": "" }, - "56a29701de21": { - "name": "itemCommentDraft", - "ordinal": 8, - "value": "a comment" - }, "6f50ec77f02f": { "name": "itemCommentDraft", "ordinal": 15, @@ -145,6 +135,16 @@ "ordinal": 12, "value": true }, + "9331fbfa07e4": { + "name": "itemCommentDraft", + "ordinal": 9, + "value": "a comment" + }, + "ac15f5699a77": { + "name": "itemReviewersDraft", + "ordinal": 8, + "value": "octocat" + }, "ad33e328b827": { "name": "gitlab.addIssueComment#1", "ordinal": 13, @@ -250,8 +250,8 @@ "4031bf455f49", "779d1b9a2edb", "474412c229f4", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "02b5df9521e8", diff --git a/mobile/rpc-foundation/goldens/tk-item-review-github.json b/mobile/rpc-foundation/goldens/tk-item-review-github.json index 1505ba32bde..82a001bcefa 100644 --- a/mobile/rpc-foundation/goldens/tk-item-review-github.json +++ b/mobile/rpc-foundation/goldens/tk-item-review-github.json @@ -136,11 +136,6 @@ "title": "A pull request" } }, - "1fc52836dac4": { - "name": "itemReviewersDraft", - "ordinal": 9, - "value": "octocat" - }, "22b1e4293201": { "name": "mutatingStatus", "ordinal": 28, @@ -310,11 +305,6 @@ "ordinal": 3, "value": "" }, - "56a29701de21": { - "name": "itemCommentDraft", - "ordinal": 8, - "value": "a comment" - }, "593c53b594c5": { "draft": "a comment", "error": "", @@ -581,6 +571,11 @@ "ordinal": 12, "value": true }, + "9331fbfa07e4": { + "name": "itemCommentDraft", + "ordinal": 9, + "value": "a comment" + }, "94caa29bceef": { "name": "error", "ordinal": 19, @@ -591,6 +586,11 @@ "ordinal": 18, "value": false }, + "ac15f5699a77": { + "name": "itemReviewersDraft", + "ordinal": 8, + "value": "octocat" + }, "baa2764f836f": { "name": "github.prChecks#1", "ordinal": 24, @@ -827,8 +827,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", @@ -858,8 +858,8 @@ "4031bf455f49", "04f768fb79f6", "26f442c9e2e5", - "56a29701de21", - "1fc52836dac4", + "ac15f5699a77", + "9331fbfa07e4", "3aefb3006914", "886c60a7e62e", "c29314fc4896", diff --git a/mobile/rpc-foundation/goldens/tk-linear-team-context.json b/mobile/rpc-foundation/goldens/tk-linear-team-context.json index 05b6f3cd2e2..81ba10022ae 100644 --- a/mobile/rpc-foundation/goldens/tk-linear-team-context.json +++ b/mobile/rpc-foundation/goldens/tk-linear-team-context.json @@ -4,10 +4,10 @@ "family": "tasks.linear-team-context", "namedDeltas": [], "values": { - "1288b8513745": { - "name": "linearStatesError", - "ordinal": 13, - "value": "" + "031c50459130": { + "name": "createTeamId", + "ordinal": 10, + "value": "team-1" }, "2afc4b1311c1": { "createTeamId": "team-1", @@ -22,24 +22,9 @@ } ] }, - "33218d06f656": { - "name": "linearStates", - "ordinal": 6, - "value": [] - }, - "356f2cb9a0df": { - "name": "linearStatesLoading", - "ordinal": 17, - "value": false - }, - "3abc893d377b": { - "name": "mutatingStatus", - "ordinal": 3, - "value": false - }, - "475ec9a66266": { + "38ed617d559f": { "name": "linearTeams", - "ordinal": 10, + "ordinal": 9, "value": [ { "id": "team-1", @@ -49,9 +34,44 @@ } ] }, - "5711e2717b76": { - "name": "linearStates", + "3abc893d377b": { + "name": "mutatingStatus", + "ordinal": 3, + "value": false + }, + "4fcc46dfeb77": { + "name": "linear.listTeams#1", + "ordinal": 8, + "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"linear.listTeams\"}" + }, + "5dcdc7fd7492": { + "name": "linearSubIssueTitle", + "ordinal": 4, + "value": "" + }, + "74335ecb4cd2": { + "name": "linearStatesLoading", "ordinal": 16, + "value": false + }, + "74505ce2789a": { + "name": "linearStates", + "ordinal": 5, + "value": [] + }, + "77a7eff4a3cc": { + "name": "linearStatesLoading", + "ordinal": 11, + "value": true + }, + "82b36eab5101": { + "name": "creatingTask", + "ordinal": 6, + "value": false + }, + "a14f6c361136": { + "name": "linearStates", + "ordinal": 15, "value": [ { "color": "#000000", @@ -61,24 +81,34 @@ } ] }, - "60a0395d07c7": { - "name": "linearStatesLoading", - "ordinal": 12, - "value": true - }, - "610f6c28e7a1": { - "name": "linearSubIssueTitle", - "ordinal": 5, - "value": "" - }, - "9131972798ca": { - "name": "linear.teamStates#1", - "ordinal": 15, - "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"linear.teamStates\",\"params\":{\"teamId\":\"team-1\",\"workspaceId\":\"linear-workspace\"}}" - }, - "95b075d66243": { + "b5ba6f00c4fb": { "name": "linear.teamStates#1", "ordinal": 14, + "json": "{\"id\":\"frame-2\",\"deviceToken\":\"recording-device\",\"method\":\"linear.teamStates\",\"params\":{\"teamId\":\"team-1\",\"workspaceId\":\"linear-workspace\"}}" + }, + "b6bf81e9e237": { + "createTeamId": "team-1", + "states": [ + { + "color": "#000000", + "id": "state-1", + "name": "Todo", + "type": "unstarted" + } + ], + "statesLoading": false, + "teams": [ + { + "id": "team-1", + "key": "ENG", + "name": "Engineering", + "workspaceId": "linear-workspace" + } + ] + }, + "c88d134e7a42": { + "name": "linear.teamStates#1", + "ordinal": 13, "args": [ { "name": "method", @@ -116,41 +146,6 @@ } } }, - "9dc1f136772e": { - "name": "linearCommentDraft", - "ordinal": 4, - "value": "" - }, - "b164dfd464b3": { - "name": "linear.listTeams#1", - "ordinal": 9, - "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"linear.listTeams\"}" - }, - "b1adae647a3f": { - "name": "createTeamId", - "ordinal": 11, - "value": "team-1" - }, - "b6bf81e9e237": { - "createTeamId": "team-1", - "states": [ - { - "color": "#000000", - "id": "state-1", - "name": "Todo", - "type": "unstarted" - } - ], - "statesLoading": false, - "teams": [ - { - "id": "team-1", - "key": "ENG", - "name": "Engineering", - "workspaceId": "linear-workspace" - } - ] - }, "cc2ece9478f0": { "name": "actionItem", "ordinal": 1, @@ -158,9 +153,29 @@ "$rpc": "null" } }, - "ceb71a750e06": { + "db66582f88a9": { + "name": "linearStatesError", + "ordinal": 12, + "value": "" + }, + "eb79a9b3682a": { + "status": "fulfilled", + "startedAt": 0, + "settledAt": 0, + "value": { + "$rpc": "undefined" + } + }, + "eda130337c99": { + "name": "detailPayload", + "ordinal": 2, + "value": { + "$rpc": "null" + } + }, + "ee01f277ffc4": { "name": "linear.listTeams#1", - "ordinal": 8, + "ordinal": 7, "args": [ { "name": "method", @@ -196,26 +211,6 @@ ] } } - }, - "e9a162defc32": { - "name": "creatingTask", - "ordinal": 7, - "value": false - }, - "eb79a9b3682a": { - "status": "fulfilled", - "startedAt": 0, - "settledAt": 0, - "value": { - "$rpc": "undefined" - } - }, - "eda130337c99": { - "name": "detailPayload", - "ordinal": 2, - "value": { - "$rpc": "null" - } } }, "recording": { @@ -224,8 +219,8 @@ { "id": "open-composer-settled", "observation": { - "sender": ["ceb71a750e06"], - "payloads": ["b164dfd464b3"], + "sender": ["ee01f277ffc4"], + "payloads": ["4fcc46dfeb77"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a" @@ -235,20 +230,19 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130" ] } }, { "id": "select-metadata-item-settled", "observation": { - "sender": ["ceb71a750e06", "95b075d66243"], - "payloads": ["b164dfd464b3", "9131972798ca"], + "sender": ["ee01f277ffc4", "c88d134e7a42"], + "payloads": ["4fcc46dfeb77", "b5ba6f00c4fb"], "settlements": { "mount": "eb79a9b3682a", "open-composer-0": "eb79a9b3682a", @@ -259,16 +253,15 @@ "cc2ece9478f0", "eda130337c99", "3abc893d377b", - "9dc1f136772e", - "610f6c28e7a1", - "33218d06f656", - "e9a162defc32", - "475ec9a66266", - "b1adae647a3f", - "60a0395d07c7", - "1288b8513745", - "5711e2717b76", - "356f2cb9a0df" + "5dcdc7fd7492", + "74505ce2789a", + "82b36eab5101", + "38ed617d559f", + "031c50459130", + "77a7eff4a3cc", + "db66582f88a9", + "a14f6c361136", + "74335ecb4cd2" ] } } diff --git a/mobile/rpc-foundation/goldens/tk-project-row-detail.json b/mobile/rpc-foundation/goldens/tk-project-row-detail.json index b1f0371bb9f..a603880f415 100644 --- a/mobile/rpc-foundation/goldens/tk-project-row-detail.json +++ b/mobile/rpc-foundation/goldens/tk-project-row-detail.json @@ -4,53 +4,20 @@ "family": "tasks.project-row-detail", "namedDeltas": [], "values": { - "0679b27a119b": { - "name": "projectFieldDrafts", - "ordinal": 11, - "value": {} - }, - "118d9662d37f": { + "0a6c63ec0fc1": { "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 16, + "ordinal": 15, "json": "{\"id\":\"frame-1\",\"deviceToken\":\"recording-device\",\"method\":\"github.project.workItemDetailsBySlug\",\"params\":{\"owner\":\"owner\",\"repo\":\"repo\",\"host\":\"github.enterprise.test\",\"number\":1,\"type\":\"issue\"}}" }, - "1e161db29c89": { - "name": "projectRowDetail", - "ordinal": 17, - "value": { - "assignees": [], - "baseSha": "base-sha", - "body": "body", - "checks": [], - "comments": [], - "files": [], - "headSha": "head-sha", - "labels": [], - "latestReviews": [], - "provider": "github", - "pullRequestId": "PR_kwDO", - "reviewDecision": { - "$rpc": "undefined" - }, - "reviewRequests": [] - } - }, - "2ee1c7329449": { - "name": "projectRowDetail", - "ordinal": 12, - "value": { - "$rpc": "null" - } - }, - "31fcc93f02da": { + "0d5e8bc85abb": { "name": "projectEditingCommentDraft", - "ordinal": 9, + "ordinal": 8, "value": "" }, - "368311fc2981": { - "name": "projectCommentDraft", - "ordinal": 7, - "value": "" + "34aecaef096a": { + "name": "projectRowDetailLoading", + "ordinal": 17, + "value": false }, "3a42a92c5487": { "name": "projectBodyDraft", @@ -64,36 +31,9 @@ "$rpc": "null" } }, - "4f23116da7f6": { - "name": "projectReviewersDraft", - "ordinal": 10, - "value": "" - }, - "561861a537bb": { - "name": "projectRowDetailLoading", - "ordinal": 18, - "value": false - }, - "5cebe6c14680": { - "name": "prFileLoadingPath", - "ordinal": 4, - "value": { - "$rpc": "null" - } - }, - "60012e7abb60": { - "name": "prFileCommentDrafts", - "ordinal": 2, - "value": {} - }, - "7ca2bb47ab1c": { - "name": "prFileContents", - "ordinal": 3, - "value": {} - }, - "899221be28d8": { + "55361bf207c6": { "name": "github.project.workItemDetailsBySlug#1", - "ordinal": 15, + "ordinal": 14, "args": [ { "name": "method", @@ -152,6 +92,40 @@ } } }, + "5b08d6631c0c": { + "name": "projectRowDetailError", + "ordinal": 12, + "value": "" + }, + "5cebe6c14680": { + "name": "prFileLoadingPath", + "ordinal": 4, + "value": { + "$rpc": "null" + } + }, + "60012e7abb60": { + "name": "prFileCommentDrafts", + "ordinal": 2, + "value": {} + }, + "6a0930bd2fdb": { + "name": "projectEditingCommentId", + "ordinal": 7, + "value": { + "$rpc": "null" + } + }, + "7ca2bb47ab1c": { + "name": "prFileContents", + "ordinal": 3, + "value": {} + }, + "93c5cbde2045": { + "name": "projectRowDetailLoading", + "ordinal": 13, + "value": true + }, "9911dd53d1d7": { "name": "projectTitleDraft", "ordinal": 5, @@ -178,18 +152,44 @@ "error": "", "loading": false }, - "b63d5911050c": { - "name": "projectRowDetailError", - "ordinal": 13, + "bf07b693e877": { + "name": "projectRowDetail", + "ordinal": 16, + "value": { + "assignees": [], + "baseSha": "base-sha", + "body": "body", + "checks": [], + "comments": [], + "files": [], + "headSha": "head-sha", + "labels": [], + "latestReviews": [], + "provider": "github", + "pullRequestId": "PR_kwDO", + "reviewDecision": { + "$rpc": "undefined" + }, + "reviewRequests": [] + } + }, + "c82fb4f46067": { + "name": "projectReviewersDraft", + "ordinal": 9, "value": "" }, - "c0e2c37d8abf": { - "name": "projectEditingCommentId", - "ordinal": 8, + "de8ce98bdd63": { + "name": "projectRowDetail", + "ordinal": 11, "value": { "$rpc": "null" } }, + "e5129a14b6e4": { + "name": "projectFieldDrafts", + "ordinal": 10, + "value": {} + }, "eb79a9b3682a": { "status": "fulfilled", "startedAt": 0, @@ -197,11 +197,6 @@ "value": { "$rpc": "undefined" } - }, - "f6a5085dd8e9": { - "name": "projectRowDetailLoading", - "ordinal": 14, - "value": true } }, "recording": { @@ -210,8 +205,8 @@ { "id": "mounted", "observation": { - "sender": ["899221be28d8"], - "payloads": ["118d9662d37f"], + "sender": ["55361bf207c6"], + "payloads": ["0a6c63ec0fc1"], "settlements": { "mount": "eb79a9b3682a" }, @@ -223,16 +218,15 @@ "5cebe6c14680", "9911dd53d1d7", "3a42a92c5487", - "368311fc2981", - "c0e2c37d8abf", - "31fcc93f02da", - "4f23116da7f6", - "0679b27a119b", - "2ee1c7329449", - "b63d5911050c", - "f6a5085dd8e9", - "1e161db29c89", - "561861a537bb" + "6a0930bd2fdb", + "0d5e8bc85abb", + "c82fb4f46067", + "e5129a14b6e4", + "de8ce98bdd63", + "5b08d6631c0c", + "93c5cbde2045", + "bf07b693e877", + "34aecaef096a" ] } } diff --git a/mobile/rpc-foundation/goldens/worktree-home-catalog.json b/mobile/rpc-foundation/goldens/worktree-home-catalog.json index a8c20584939..13a7dde432f 100644 --- a/mobile/rpc-foundation/goldens/worktree-home-catalog.json +++ b/mobile/rpc-foundation/goldens/worktree-home-catalog.json @@ -4,21 +4,6 @@ "family": "worktree.home-catalog", "namedDeltas": [], "values": { - "19a302575563": { - "host-1": { - "activeCount": 2, - "agents": [], - "countsProvenAt": 1767225600000, - "hostId": "host-1", - "lastActiveWorktree": { - "displayName": "One", - "repo": "Repo", - "status": "working", - "worktreeId": "w-1" - }, - "totalWorktrees": 2 - } - }, "34fb08d01b03": { "name": "worktree.ps#1", "ordinal": 1, @@ -50,7 +35,16 @@ } }, "44136fa355b3": {}, - "7858e4e82b0f": { + "800962c868e7": { + "host-1": { + "activeCount": 2, + "agents": [], + "countsProvenAt": 1767225600000, + "hostId": "host-1", + "totalWorktrees": 2 + } + }, + "89066e878348": { "name": "info", "ordinal": 3, "value": { @@ -59,12 +53,6 @@ "agents": [], "countsProvenAt": 1767225600000, "hostId": "host-1", - "lastActiveWorktree": { - "displayName": "One", - "repo": "Repo", - "status": "working", - "worktreeId": "w-1" - }, "totalWorktrees": 2 } } @@ -161,8 +149,8 @@ "settlements": { "load": "eb79a9b3682a" }, - "state": "19a302575563", - "effects": ["7858e4e82b0f"] + "state": "800962c868e7", + "effects": ["89066e878348"] } } ] diff --git a/mobile/rpc-foundation/pilot-scenarios.json b/mobile/rpc-foundation/pilot-scenarios.json index 5be06b0d6b0..eeb45a4f5ee 100644 --- a/mobile/rpc-foundation/pilot-scenarios.json +++ b/mobile/rpc-foundation/pilot-scenarios.json @@ -8473,6 +8473,7 @@ "branch": "feature", "linkedPRNumber": null, "fallbackPRNumber": 12, + "acceptMergedFallbackPR": true, "currentHeadOid": null }, "paramsFollowDivergence": true, @@ -8572,6 +8573,398 @@ } ] }, + { + "id": "pr-sidebar-revisit-and-refresh", + "operation": "session.pr-sidebar", + "family": "session.pr-sidebar", + "sites": [ + "mobile/src/source-control/review/use-mobile-pr-sidebar-controller.ts", + "mobile/src/source-control/review/mobile-pr-queries.ts", + "mobile/src/source-control/review/mobile-pr-sidebar-state.ts" + ], + "schedules": [], + "steps": [ + { + "action": "mount", + "id": "mount" + }, + { + "complete": "github.repoSlug#1", + "params": { + "repo": "id:repo-9" + }, + "reply": { + "ok": true, + "result": { + "owner": "owner", + "repo": "repo" + } + } + }, + { + "complete": "hostedReview.forBranch#1", + "params": { + "repo": "id:repo-9", + "branch": "feature", + "linkedGitHubPR": null, + "active": true + }, + "reply": { + "ok": true, + "result": { + "provider": "github", + "number": 12, + "title": "Recorded", + "state": "open", + "url": "https://github.com/owner/repo/pull/12", + "updatedAt": "2026-01-01T00:00:00Z", + "mergeable": "MERGEABLE" + } + } + }, + { + "complete": "worktree.show#1", + "params": { + "worktree": "id:repo-9::/w" + }, + "reply": { + "ok": true, + "result": { + "worktree": { + "linkedPR": null + } + } + } + }, + { + "checkpoint": "branch-hint" + }, + { + "complete": "github.prForBranch#1", + "params": { + "repo": "id:repo-9", + "branch": "feature", + "linkedPRNumber": null, + "fallbackPRNumber": 12, + "acceptMergedFallbackPR": true, + "currentHeadOid": null + }, + "paramsFollowDivergence": true, + "reply": { + "ok": true, + "result": { + "kind": "found", + "pr": { + "number": 12, + "state": "open", + "title": "Recorded", + "url": "https://github.com/owner/repo/pull/12", + "headSha": "head-sha-1", + "updatedAt": "2026-01-01T00:00:00Z", + "mergeable": "MERGEABLE" + }, + "fetchedAt": 0 + } + } + }, + { + "checkpoint": "pr" + }, + { + "complete": "github.prChecks#1", + "params": { + "repo": "id:repo-9", + "prNumber": 12, + "headSha": "head-sha-1" + }, + "reply": { + "ok": true, + "result": [ + { + "name": "build", + "status": "completed", + "conclusion": "success", + "checkRunId": 7 + } + ] + } + }, + { + "complete": "status.get#1", + "params": { + "$undefined": true + }, + "reply": { + "ok": true, + "result": { + "runtimeId": "recorded" + } + } + }, + { + "complete": "github.workItemDetails#1", + "params": { + "repo": "id:repo-9", + "number": 12, + "type": "pr" + }, + "paramsFollowDivergence": true, + "reply": { + "ok": true, + "result": { + "item": { + "id": "PR_1", + "number": 12, + "type": "pr", + "state": "open", + "title": "Recorded", + "url": "https://github.com/owner/repo/pull/12", + "updatedAt": "2026-01-01T00:00:00Z", + "labels": [], + "assignees": [] + }, + "body": "body", + "headSha": "head-sha-1", + "comments": [ + { + "id": 55, + "author": "rev", + "body": "please fix", + "createdAt": "2026-01-01T00:00:00Z", + "url": "https://github.com/owner/repo/pull/12#discussion_r55", + "threadId": "thread-1", + "path": "src/app.ts", + "line": 3, + "isResolved": false + } + ] + } + } + }, + { + "checkpoint": "loaded" + }, + { + "action": "revisit", + "id": "revisit" + }, + { + "complete": "worktree.show#2", + "params": { + "worktree": "id:repo-9::/w" + }, + "reply": { + "ok": true, + "result": { + "worktree": { + "linkedPR": null + } + } + } + }, + { + "complete": "github.prForBranch#2", + "params": { + "repo": "id:repo-9", + "branch": "feature", + "linkedPRNumber": null, + "fallbackPRNumber": 12, + "acceptMergedFallbackPR": true, + "currentHeadOid": null + }, + "paramsFollowDivergence": true, + "reply": { + "ok": true, + "result": { + "kind": "found", + "pr": { + "number": 12, + "state": "open", + "title": "Recorded", + "url": "https://github.com/owner/repo/pull/12", + "headSha": "head-sha-1", + "updatedAt": "2026-01-01T00:00:00Z", + "mergeable": "MERGEABLE" + }, + "fetchedAt": 0 + } + } + }, + { + "checkpoint": "revisited" + }, + { + "action": "refresh", + "id": "refresh" + }, + { + "complete": "hostedReview.forBranch#2", + "params": { + "repo": "id:repo-9", + "branch": "feature", + "linkedGitHubPR": null, + "active": true + }, + "reply": { + "ok": true, + "result": { + "provider": "github", + "number": 12, + "title": "Recorded", + "state": "open", + "url": "https://github.com/owner/repo/pull/12", + "updatedAt": "2026-01-01T00:00:00Z", + "mergeable": "MERGEABLE" + } + } + }, + { + "complete": "worktree.show#3", + "params": { + "worktree": "id:repo-9::/w" + }, + "reply": { + "ok": true, + "result": { + "worktree": { + "linkedPR": null + } + } + } + }, + { + "complete": "github.prForBranch#3", + "params": { + "repo": "id:repo-9", + "branch": "feature", + "linkedPRNumber": null, + "fallbackPRNumber": 12, + "acceptMergedFallbackPR": true, + "currentHeadOid": null, + "userRefresh": true + }, + "paramsFollowDivergence": true, + "reply": { + "ok": true, + "result": { + "kind": "found", + "pr": { + "number": 12, + "state": "open", + "title": "Recorded", + "url": "https://github.com/owner/repo/pull/12", + "headSha": "head-sha-1", + "updatedAt": "2026-01-01T00:00:00Z", + "mergeable": "MERGEABLE" + }, + "fetchedAt": 0 + } + } + }, + { + "complete": "github.prChecks#2", + "params": { + "repo": "id:repo-9", + "prNumber": 12, + "noCache": true, + "userRefresh": true, + "headSha": "head-sha-1" + }, + "reply": { + "ok": true, + "result": [ + { + "name": "build", + "status": "completed", + "conclusion": "success", + "checkRunId": 7 + } + ] + } + }, + { + "bind": "refresh-status-2", + "request": "status.get#2", + "params": { + "$undefined": true + } + }, + { + "complete": "refresh-status-2", + "params": { + "$undefined": true + }, + "reply": { + "ok": true, + "result": { + "runtimeId": "recorded" + } + } + }, + { + "bind": "refresh-status-3", + "request": "status.get#3", + "params": { + "$undefined": true + } + }, + { + "complete": "refresh-status-3", + "params": { + "$undefined": true + }, + "reply": { + "ok": true, + "result": { + "runtimeId": "recorded" + } + } + }, + { + "complete": "github.workItemDetails#2", + "params": { + "repo": "id:repo-9", + "number": 12, + "type": "pr" + }, + "paramsFollowDivergence": true, + "reply": { + "ok": true, + "result": { + "item": { + "id": "PR_1", + "number": 12, + "type": "pr", + "state": "open", + "title": "Recorded", + "url": "https://github.com/owner/repo/pull/12", + "updatedAt": "2026-01-01T00:00:00Z", + "labels": [], + "assignees": [] + }, + "body": "body", + "headSha": "head-sha-1", + "comments": [ + { + "id": 55, + "author": "rev", + "body": "please fix", + "createdAt": "2026-01-01T00:00:00Z", + "url": "https://github.com/owner/repo/pull/12#discussion_r55", + "threadId": "thread-1", + "path": "src/app.ts", + "line": 3, + "isResolved": false + } + ] + } + } + }, + { + "checkpoint": "refreshed" + } + ] + }, { "id": "pr-sidebar-checks-refused", "operation": "session.pr-sidebar", @@ -8645,6 +9038,7 @@ "branch": "feature", "linkedPRNumber": null, "fallbackPRNumber": 12, + "acceptMergedFallbackPR": true, "currentHeadOid": null }, "paramsFollowDivergence": true, @@ -8813,6 +9207,7 @@ "branch": "feature", "linkedPRNumber": null, "fallbackPRNumber": 12, + "acceptMergedFallbackPR": true, "currentHeadOid": null }, "paramsFollowDivergence": true, @@ -9012,6 +9407,7 @@ "branch": "feature", "linkedPRNumber": null, "fallbackPRNumber": 12, + "acceptMergedFallbackPR": true, "currentHeadOid": null }, "paramsFollowDivergence": true, @@ -21684,6 +22080,144 @@ } ] }, + { + "id": "event-router-failed-read-floor", + "operation": "query.event-router-catalog", + "family": "query.event-router-catalog", + "sites": ["mobile/src/query/host-event-router.ts"], + "schedules": [], + "steps": [ + { + "action": "mount", + "id": "mount" + }, + { + "frame": "runtime.clientEvents.subscribe#1", + "params": null, + "reply": { + "ok": true, + "streaming": true, + "result": { + "type": "ready", + "subscriptionId": "sub-1" + } + } + }, + { + "checkpoint": "listening" + }, + { + "complete": "worktree.ps#1", + "params": { + "limit": 10000, + "supportsWorktreeVisibilitySourceDefaults": true, + "afterSnapshotId": null, + "acceptRowDelta": true + }, + "reply": { + "ok": false, + "error": { + "code": "runtime_error", + "message": "worktree list unavailable" + } + } + }, + { + "checkpoint": "read-refused" + }, + { + "frame": "runtime.clientEvents.subscribe#1", + "params": null, + "reply": { + "ok": true, + "streaming": true, + "result": { + "type": "worktreesChanged", + "repoId": "repo-1" + } + } + }, + { + "advance": 150 + }, + { + "frame": "runtime.clientEvents.subscribe#1", + "params": null, + "reply": { + "ok": true, + "streaming": true, + "result": { + "type": "worktreesChanged", + "repoId": "repo-1" + } + } + }, + { + "advance": 150 + }, + { + "frame": "runtime.clientEvents.subscribe#1", + "params": null, + "reply": { + "ok": true, + "streaming": true, + "result": { + "type": "worktreesChanged", + "repoId": "repo-1" + } + } + }, + { + "advance": 150 + }, + { + "frame": "runtime.clientEvents.subscribe#1", + "params": null, + "reply": { + "ok": true, + "streaming": true, + "result": { + "type": "worktreesChanged", + "repoId": "repo-1" + } + } + }, + { + "advance": 150 + }, + { + "frame": "runtime.clientEvents.subscribe#1", + "params": null, + "reply": { + "ok": true, + "streaming": true, + "result": { + "type": "worktreesChanged", + "repoId": "repo-1" + } + } + }, + { + "advance": 150 + }, + { + "checkpoint": "five-notices-inside-the-floor" + }, + { + "advance": 3000 + }, + { + "checkpoint": "floor-passed" + }, + { + "action": "unmount", + "id": "unmount" + }, + { + "checkpoint": "unmounted" + } + ] + }, { "id": "sc-changes-loaded", "operation": "source-control.changes-load", diff --git a/mobile/scripts/mock-server-native-chat-scenario.ts b/mobile/scripts/mock-server-native-chat-scenario.ts index cc72c5d461a..bfb50a29433 100644 --- a/mobile/scripts/mock-server-native-chat-scenario.ts +++ b/mobile/scripts/mock-server-native-chat-scenario.ts @@ -4,10 +4,8 @@ import { join } from 'node:path' import type { WebSocket } from 'ws' import type { AgentStatusEntry } from '../../src/shared/agent-status/contracts/agent-status-types' import type { NativeChatMessage } from '../../src/shared/native-chat/native-chat-types' -import type { - RuntimeMobileSessionTabsResult, - RuntimeMobileSessionTerminalClientTab -} from '../../src/shared/runtime-types' +import type { RuntimeMobileSessionTabsResult } from '../../src/shared/runtime-types' +import type { RuntimeMobileSessionTerminalClientTab } from '../../src/shared/runtime-mobile-session-tab-contracts' import type { RpcRequest, RpcResponse } from './mock-server-rpc-handlers' // Read send behavior from control file per request: restarting mock rekeys E2EE and forces re-pair, preventing mid-session native chat repros. diff --git a/mobile/src/accounts/MobileAccountsScreen.tsx b/mobile/src/accounts/MobileAccountsScreen.tsx index 938fbf6d4bf..2ea1d8b0c18 100644 --- a/mobile/src/accounts/MobileAccountsScreen.tsx +++ b/mobile/src/accounts/MobileAccountsScreen.tsx @@ -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(null) - const [error, setError] = useState(null) - const [refreshing, setRefreshing] = useState(false) + const [hostError, setHostError] = useState(null) const [busyAccountId, setBusyAccountId] = useState(null) const [clockEnabled, setClockEnabled] = useState(false) const [notice, setNotice] = useState(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 = return ( @@ -324,6 +305,7 @@ export function MobileAccountsScreen() { } title={t('accounts.screen.title', 'Accounts')} subtitle={hostName || undefined} + refreshing={showRefreshLine} trailing={ - {!snapshot ? ( + {!showsAccounts ? ( ) : ( <> + {offlineBanner ? ( + + + + ) : null} {renderProviderSection('claude')} {renderProviderSection('codex')} {renderOtherProviders()} diff --git a/mobile/src/accounts/accounts-snapshot-stream.ts b/mobile/src/accounts/accounts-snapshot-stream.ts index 8ec30aa7197..09ca407fead 100644 --- a/mobile/src/accounts/accounts-snapshot-stream.ts +++ b/mobile/src/accounts/accounts-snapshot-stream.ts @@ -1,7 +1,52 @@ -import { decodeAccountsSnapshot } from '../components/accounts-snapshot' +import { queryOptions, skipToken } from '@tanstack/react-query' +import { AccountsSnapshotSchema, decodeAccountsSnapshot } from '../components/accounts-snapshot' import type { AccountsSnapshot } from '../components/AccountUsage' +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. */ +export function withoutAccountUsage(snapshot: AccountsSnapshot | null): AccountsSnapshot | null { + if (!snapshot) { + return null + } + const { claudeTarget, codexTarget } = snapshot.rateLimits + return { + ...snapshot, + rateLimits: { + claude: null, + codex: null, + claudeTarget, + codexTarget, + inactiveClaudeAccounts: [], + inactiveCodexAccounts: [] + } + } +} + +/** A host's last `accounts.subscribe` snapshot; null when the desktop sent one this phone can't read. */ +export const accountsSnapshotFamily: PersistedHostFamily = { + family: 'accounts.snapshot', + persist: { + version: 1, + dataSchema: AccountsSnapshotSchema.nullable(), + strip: withoutAccountUsage + } +} + +// Host-wide, read on the desktop itself; kept free of the host list's module, which the Accounts page doesn't load. +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({ + 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, diff --git a/mobile/src/accounts/mobile-accounts-screen-styles.ts b/mobile/src/accounts/mobile-accounts-screen-styles.ts index f72f5786ecc..bce57b12934 100644 --- a/mobile/src/accounts/mobile-accounts-screen-styles.ts +++ b/mobile/src/accounts/mobile-accounts-screen-styles.ts @@ -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 diff --git a/mobile/src/accounts/use-mobile-accounts-snapshot.test.tsx b/mobile/src/accounts/use-mobile-accounts-snapshot.test.tsx new file mode 100644 index 00000000000..56c8d293793 --- /dev/null +++ b/mobile/src/accounts/use-mobile-accounts-snapshot.test.tsx @@ -0,0 +1,151 @@ +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 type { OrcaQueryStoreBackend } from '../device-store/query-storage' +import { createOrcaQueryClient } from '../query/orca-query-client' +import { createHostQueryPersistence, persistedHostQueryKey } from '../query/host-query-persistence' +import type { RpcClient } from '../transport/rpc/rpc-client-contract' +import { + accountsSnapshotFamily, + accountsSnapshotKey, + accountsSnapshotOptions +} 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 | 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 + } +} + +function memoryStore(): OrcaQueryStoreBackend { + const rows = new Map() + return { + hostId: HOST, + read: async (keys) => ({ status: 'ok', values: keys.map((key) => rows.get(key) ?? null) }), + write: async (ops) => { + for (const op of ops) { + if (op.value === null) { + rows.delete(op.key) + } else { + rows.set(op.key, op.value) + } + } + return { written: true } + } + } +} + +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' + ]) + }) + + it('never counts a stored snapshot as live, even one written after the connect', async () => { + const store = memoryStore() + // Native Home's own stream stores the snapshot after the connect the page then reads. + const home = createOrcaQueryClient() + const homePersistence = createHostQueryPersistence(home, store) + home.getQueryCache().build(home, accountsSnapshotOptions(HOST)) + home.setQueryData(accountsSnapshotKey(HOST), SNAPSHOT, { updatedAt: CONNECTED_AT + 1 }) + await settleQueryNotifications() + await homePersistence.flush() + home.clear() + + const page = createOrcaQueryClient() + await createHostQueryPersistence(page, store).restore([ + persistedHostQueryKey(accountsSnapshotFamily, accountsSnapshotKey(HOST))! + ]) + const read = await mountAccounts(page, accountsClient(SNAPSHOT).client) + expect(read().snapshot?.claude.accounts.map((account) => account.id)).toEqual(['claude-1']) + expect(read().live).toBe(false) + }) +}) diff --git a/mobile/src/accounts/use-mobile-accounts-snapshot.ts b/mobile/src/accounts/use-mobile-accounts-snapshot.ts new file mode 100644 index 00000000000..d4370bb5310 --- /dev/null +++ b/mobile/src/accounts/use-mobile-accounts-snapshot.ts @@ -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 + } +} diff --git a/mobile/src/agents/agent-list-model.test.ts b/mobile/src/agents/agent-list-model.test.ts index 0001a6684d0..1b8ccb3bc2d 100644 --- a/mobile/src/agents/agent-list-model.test.ts +++ b/mobile/src/agents/agent-list-model.test.ts @@ -55,7 +55,7 @@ function input( worktreeInfo: Object.fromEntries( Object.entries(hosts).map(([id, host]) => [ id, - { hostId: id, totalWorktrees: 1, activeCount: 0, lastActiveWorktree: null, ...host.info } + { hostId: id, totalWorktrees: 1, activeCount: 0, ...host.info } ]) ), now: NOW diff --git a/mobile/src/cache/home-snapshot-cache.ts b/mobile/src/cache/home-snapshot-cache.ts deleted file mode 100644 index 01b9e7be1bf..00000000000 --- a/mobile/src/cache/home-snapshot-cache.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Seed cold-start/resume cards from persisted last-good snapshot, then update via RPC; avoids ~1s empty flash while reconnecting. -import AsyncStorage from '@react-native-async-storage/async-storage' -// Persist canonical countsProvenAt so rehydrated counts retain freshness evidence. -import type { HostWorktreeInfo } from '../worktree/home-worktree-info' - -const STORAGE_KEY = 'orca:home-snapshot:v1' - -export type HomeSnapshot = { - worktreeInfo: Record - savedAt: number -} - -let memoryCache: HomeSnapshot | null = null -let writeTimer: ReturnType | null = null - -export async function loadHomeSnapshot(): Promise { - if (memoryCache) { - return memoryCache - } - try { - const raw = await AsyncStorage.getItem(STORAGE_KEY) - if (!raw) { - return null - } - const parsed = JSON.parse(raw) as HomeSnapshot - if ( - typeof parsed !== 'object' || - parsed === null || - typeof parsed.worktreeInfo !== 'object' || - parsed.worktreeInfo === null - ) { - return null - } - memoryCache = parsed - return parsed - } catch { - return null - } -} - -// Throttle AsyncStorage writes during per-provider streamed snapshot bursts. -export function saveHomeSnapshot(snapshot: HomeSnapshot): void { - memoryCache = snapshot - if (writeTimer) { - clearTimeout(writeTimer) - } - writeTimer = setTimeout(() => { - writeTimer = null - void AsyncStorage.setItem(STORAGE_KEY, JSON.stringify(snapshot)).catch(() => {}) - }, 250) -} diff --git a/mobile/src/cache/worktree-cache.test.ts b/mobile/src/cache/worktree-cache.test.ts deleted file mode 100644 index 4c076eb4e08..00000000000 --- a/mobile/src/cache/worktree-cache.test.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { setCachedWorktrees, getCachedWorktrees } from './worktree-cache' - -// A persisted cold-start seed must not truncate the rows a live worktree.ps listed. -describe('worktree-cache provenance', () => { - it('keeps a fresh host-listed catalog when a cold-start seed lands after it', () => { - const hostId = 'host-kept' - const listed = [{ worktreeId: 'a' }, { worktreeId: 'b' }] - setCachedWorktrees(hostId, listed, { proven: true }) - - setCachedWorktrees(hostId, [{ worktreeId: 'a' }]) - - expect(getCachedWorktrees(hostId)).toEqual(listed) - }) -}) diff --git a/mobile/src/cache/worktree-cache.ts b/mobile/src/cache/worktree-cache.ts deleted file mode 100644 index ad05d45c98e..00000000000 --- a/mobile/src/cache/worktree-cache.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Home seeds module cache so host detail renders before reconnect/fetch. - -type CachedWorktrees = { - worktrees: unknown[] - at: number - // Live host-listed rows; a persisted cold-start seed must not replace them. - proven: boolean -} - -const cache = new Map() - -const MAX_AGE_MS = 30_000 -const MAX_ENTRIES = 20 - -export function setCachedWorktrees( - hostId: string, - worktrees: unknown[], - options?: { proven?: boolean } -): void { - // A late cold-start seed must not truncate live host-listed rows. - if (options?.proven !== true && readFreshEntry(hostId)?.proven) { - return - } - // Delete before Map.set to move key to newest position for LRU eviction. - cache.delete(hostId) - cache.set(hostId, { worktrees, at: Date.now(), proven: options?.proven === true }) - if (cache.size > MAX_ENTRIES) { - const oldest = cache.keys().next().value - if (oldest) { - cache.delete(oldest) - } - } -} - -export function getCachedWorktrees(hostId: string): unknown[] | null { - return readFreshEntry(hostId)?.worktrees ?? null -} - -function readFreshEntry(hostId: string): CachedWorktrees | null { - const entry = cache.get(hostId) - if (!entry) { - return null - } - if (Date.now() - entry.at > MAX_AGE_MS) { - cache.delete(hostId) - return null - } - return entry -} diff --git a/mobile/src/components/NewWorktreeModal.test.tsx b/mobile/src/components/NewWorktreeModal.test.tsx index 201ad65e052..b44507b5157 100644 --- a/mobile/src/components/NewWorktreeModal.test.tsx +++ b/mobile/src/components/NewWorktreeModal.test.tsx @@ -68,6 +68,9 @@ import '../../../src/shared/execution-host' import type { ExecutionHostId } from '../../../src/shared/execution-host' import { NewWorktreeModal } from './NewWorktreeModal' +import { publishPageDeviceStore } from '../mobile-web-shell/bridge/page-device-store' +import { resetDurableDraftFieldsForTests } from '../drafts/durable-draft-fields' +import { publishInMemoryDeviceStore } from '../drafts/in-memory-device-store.test-support' import { findAllByHostType } from '../test-support/react-test-renderer-host-nodes' @@ -347,3 +350,73 @@ describe('NewWorktreeModal project targets', () => { expect(sourceInputs(renderer).map((input) => input.props.value)).toEqual(['', '']) }) }) + +describe('NewWorktreeModal note draft', () => { + // The shell's draft table outlives the page; nothing else does. + const table = new Map() + let renderer: ReactTestRenderer | null = null + + async function open(): Promise { + const client = requestsOnly( + vi.fn((method: string) => + method === 'repo.list' ? replied({ repos }) : new Promise(() => {}) + ) + ) + await act(async () => { + renderer = create( + createElement(NewWorktreeModal, { + visible: true, + client, + hostId: 'host-1', + onCreated: () => {}, + onClose: () => {}, + openExternalUrl: () => {} + }) + ) + await vi.advanceTimersByTimeAsync(0) + }) + return renderer! + } + + const noteInput = (opened: ReactTestRenderer) => + findAllByHostType(opened.root, 'TextInput').find( + (node) => node.props.placeholder === 'Write a note' + )! + const optionsExpanded = (opened: ReactTestRenderer) => + opened.root.find((node) => node.props.title === 'Options' && 'expanded' in node.props).props + .expanded + + // A kill: the page and its memory go, the store stays. + function kill(): void { + act(() => renderer?.unmount()) + renderer = null + resetDurableDraftFieldsForTests() + } + + beforeEach(() => { + vi.useFakeTimers() + setCachedRepos('host-1', repos) + resetDurableDraftFieldsForTests() + publishInMemoryDeviceStore(table) + }) + + afterEach(() => { + kill() + table.clear() + publishPageDeviceStore(null) + vi.useRealTimers() + }) + + it('brings the note back after a kill, with Options open so it is not sent unseen', async () => { + const typed = await open() + act(() => noteInput(typed).props.onChangeText('pairing with Ama on the flaky test')) + await act(async () => { + await vi.advanceTimersByTimeAsync(1000) + }) + kill() + + const reopened = await open() + expect(noteInput(reopened).props.value).toBe('pairing with Ama on the flaky test') + expect(optionsExpanded(reopened)).toBe(true) + }) +}) diff --git a/mobile/src/components/NewWorktreeModal.tsx b/mobile/src/components/NewWorktreeModal.tsx index 3b6ba3870c4..11bf01b970f 100644 --- a/mobile/src/components/NewWorktreeModal.tsx +++ b/mobile/src/components/NewWorktreeModal.tsx @@ -16,6 +16,8 @@ import { buildRetiredWorktreeNamesRefreshKey, useRetiredWorktreeNames } from '../worktree/use-retired-worktree-names' +import { durableDraftRowKey } from '../drafts/durable-draft-rows' +import { useDurableDraftField } from '../drafts/durable-draft-fields' import { BottomDrawerModalHost } from './bottom-drawer/bottom-drawer-modal-host' import { getMobileWorkspaceRepoBadgeColor, @@ -82,7 +84,12 @@ function NewWorktreeModalContent(props: NewWorktreeModalProps) { const repoServer = selectedRepo ? serverOf(selectedRepo) : undefined const client = repoServer ? (serverClients?.get(repoServer) ?? null) : desktopClient const navigation = useNewWorktreeDrawerNavigation(visible) - const [note, setNote] = useState('') + // Kept per desktop until a create succeeds, and read only once the form shows. The host is in the key + // because the tablet sidebar's native host list has no shell to bind it. + const [note, setNote] = useDurableDraftField( + visible ? durableDraftRowKey('workspaceCreate', '', hostId ?? '') : null, + 'note' + ) const [error, setError] = useState('') const runtime = useNewWorkspaceRuntimeContext(client, visible, hostId, repoServer) const repoRuntime = useNewWorktreeRuntimeCapabilities(client, visible) @@ -103,6 +110,12 @@ function NewWorktreeModalContent(props: NewWorktreeModalProps) { visible }) const setupScript = useNewWorkspaceSetupScript({ client, selectedRepo }) + // A kept note opens Options until the user folds them, so it isn't sent unseen. + const [noteOptions, setNoteOptions] = useState<'closed' | 'open' | 'folded'>('closed') + if (note && noteOptions === 'closed') { + setNoteOptions('open') + } + const showOptions = setupScript.showAdvanced || noteOptions === 'open' const selectedRepoWorktreeBranches = useMemo( () => getComposerRepoWorktreeBranches(existingWorktrees ?? [], selectedRepo?.id ?? null), [existingWorktrees, selectedRepo] @@ -161,7 +174,11 @@ function NewWorktreeModalContent(props: NewWorktreeModalProps) { getAgentLaunchSupport, transitionDrawer: navigation.transitionDrawer, setError, - onCreated: (worktreeId, name, warning) => onCreated(worktreeId, name, warning, repoServer), + onCreated: (worktreeId, name, warning) => { + // A note typed in a reopened form while this create ran is not the one it sent. + setNote((current) => (current === note ? '' : current)) + onCreated(worktreeId, name, warning, repoServer) + }, onClose }) @@ -254,7 +271,7 @@ function NewWorktreeModalContent(props: NewWorktreeModalProps) { sshGate={executionTarget.sshGate} composer={composer} selectedAgent={agentSelection.selectedAgent} - showAdvanced={setupScript.showAdvanced} + showAdvanced={showOptions} note={note} setupCommand={setupScript.setupCommand} setupSource={setupScript.setupSource} @@ -272,7 +289,12 @@ function NewWorktreeModalContent(props: NewWorktreeModalProps) { onClearError={() => setError('')} onConnect={() => void executionTarget.connect()} onOpenAgent={() => openPicker('agent')} - onShowAdvancedChange={setupScript.setShowAdvanced} + onShowAdvancedChange={(show) => { + if (!show) { + setNoteOptions('folded') + } + setupScript.setShowAdvanced(show) + }} onNoteChange={setNote} onSetupDecisionChange={setupScript.setSetupDecisionChoice} onRunSetupChange={setupScript.setRunSetup} diff --git a/mobile/src/components/nav-bar/BottomSearchBar.tsx b/mobile/src/components/nav-bar/BottomSearchBar.tsx index 038f1bd6a3d..e56e3070e55 100644 --- a/mobile/src/components/nav-bar/BottomSearchBar.tsx +++ b/mobile/src/components/nav-bar/BottomSearchBar.tsx @@ -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() !== '') diff --git a/mobile/src/components/pr-sidebar/MobilePrTabSheets.tsx b/mobile/src/components/pr-sidebar/MobilePrTabSheets.tsx index 5ed5ede7271..57c5d472bc8 100644 --- a/mobile/src/components/pr-sidebar/MobilePrTabSheets.tsx +++ b/mobile/src/components/pr-sidebar/MobilePrTabSheets.tsx @@ -1,4 +1,4 @@ -import { useEffect, useLayoutEffect, useRef, useState } from 'react' +import { useState } from 'react' import { Text, View } from 'react-native' import { GitMerge } from 'lucide-react-native' import { useMobileColorScheme } from '../../theme/use-mobile-color-scheme' @@ -12,7 +12,7 @@ import { SheetPrimaryButton } from '../SheetPrimaryButton' import { ListGroup, ListRow } from '../list/ListGroup' import { ConfirmModal } from '../ConfirmModal' import { presentPrMerge } from './pr-actions-state' -import { PrCreateSheet, type PrCreateKept } from './PrCreateSheet' +import { PrCreateSheet } from './PrCreateSheet' import { PrReviewersSheet } from './PrReviewersSheet' import { livePrDetails, @@ -22,17 +22,14 @@ import { } from './use-mobile-pr-tab' import { prSheetStyles as sheetStyles } from './pr-tab-styles' import { FieldTextInput } from '../composer-input/FieldTextInput' - -type PrEditKept = { key: string; base: string; text: string } +import { draftTextHash, workspaceDraftRowKey } from '../../drafts/durable-draft-rows' +import { useDurableDraftField } from '../../drafts/durable-draft-fields' +import { useWorkspaceExecutionHost } from '../../navigation/workspace-execution-host' // Sheets for the PR tab's decisions; one Modal swaps between them so iOS never stacks presentations. export function MobilePrTabSheets({ tab }: { tab: MobilePrTab }) { useMobileColorScheme() const t = useMobileTranslation() - // Each sheet unmounts on Cancel; typed text waits here for the next open. - const [createKept, setCreateKept] = useState(null) - const [titleKept, setTitleKept] = useState(null) - const [bodyKept, setBodyKept] = useState(null) return ( <> case 'editTitle': - return ( - - ) + return case 'editDescription': - return ( - - ) + return case 'createPr': - return + return } }} @@ -182,55 +163,56 @@ function PrMergeSheet({ tab, request }: { tab: MobilePrTab; request: PrTabSheetR function PrEditTextSheet({ tab, request, - field, - kept, - onKeep + field }: { tab: MobilePrTab request: PrTabSheetRequest field: 'title' | 'body' - kept: PrEditKept | null - onKeep: (kept: PrEditKept | null) => void }) { useMobileColorScheme() const t = useMobileTranslation() + const executionHost = useWorkspaceExecutionHost() const data = readyPrData(tab) const details = livePrDetails(data?.details ?? null) const current = field === 'title' ? (details?.item.title ?? data?.pr.title ?? '') : (details?.body ?? '') - const keepKey = request.scope.resource + const resource = request.scope.resource + // An unsaved edit waits through Cancel and the app being killed, with the PR text it was typed against. + const keptKey = resource + ? workspaceDraftRowKey( + 'prEdit', + { hostId: tab.hostId, executionHost, worktreeId: tab.worktreeId }, + `${resource}:${field}` + ) + : null + const [keptAgainst, setKeptAgainst] = useDurableDraftField(keptKey, 'against') + const [keptText, setKeptText] = useDurableDraftField(keptKey, 'text') // An edit typed against text the PR still has comes back; once the PR text changes it would revert someone's edit. const [base] = useState(current) - const [draft, setDraft] = useState(() => - kept && kept.key === keepKey && kept.base === current ? kept.text : current - ) - // Closing keeps a changed, unsaved draft for the next open, and drops this PR's kept one otherwise. - const savedRef = useRef(false) - const closeRef = useRef({ keepKey, base, draft, kept, onKeep }) - useLayoutEffect(() => { - closeRef.current = { keepKey, base, draft, kept, onKeep } - }) - useEffect( - () => () => { - const close = closeRef.current - if (!close.keepKey) { - return - } - if (!savedRef.current && close.draft !== close.base) { - close.onKeep({ key: close.keepKey, base: close.base, text: close.draft }) - } else if (close.kept?.key === close.keepKey) { - close.onKeep(null) - } - }, - [] - ) + // A fingerprint, never empty, so an emptied PR description still marks an edit (an empty field is no field). + const [against] = useState(() => draftTextHash(base)) + const draft = keptAgainst === against ? keptText : base + const setDraft = (text: string) => { + const edited = text !== base + setKeptText(edited ? text : '') + setKeptAgainst(edited ? against : '') + } const { textAction } = tab const save = async () => { if (!tab.ownsSheet(request)) { return } - if (await textAction.save(field, draft, current)) { - savedRef.current = true + const sent = draft + if (await textAction.save(field, sent, current)) { + // Only the saved edit; one typed since in a reopened sheet stays. + let saved = false + setKeptText((text) => { + saved = text === sent + return saved ? '' : text + }) + if (saved) { + setKeptAgainst('') + } tab.closeSheetIf(request) } } diff --git a/mobile/src/components/pr-sidebar/PRCommentCard.tsx b/mobile/src/components/pr-sidebar/PRCommentCard.tsx index 006c8565720..eea6227f480 100644 --- a/mobile/src/components/pr-sidebar/PRCommentCard.tsx +++ b/mobile/src/components/pr-sidebar/PRCommentCard.tsx @@ -29,6 +29,8 @@ export type PRCommentCardActions = { isResolveBusy: (threadId: string) => boolean isEditBusy: (commentId: number) => boolean isDeleteBusy: (commentId: number) => boolean + // Where a reply to a comment waits until it is posted. + draftKey: (replyTo: number) => string | null // Repo slug for the slug-addressed edit/delete RPCs; gates the affordances when absent. prRepo: PRCommentRepoSlug | null } @@ -296,6 +298,7 @@ export const PRCommentCard = memo(function PRCommentCard({ placeholder={t('pullRequest.commentCard.replyPlaceholder', 'Write a reply…')} submitLabel={t('pullRequest.commentCard.reply', 'Reply')} submitting={replyBusy} + draftKey={actions.draftKey(comment.id)} onSubmit={submitReply} onCancel={() => setReplyOpen(false)} autoFocus diff --git a/mobile/src/components/pr-sidebar/PRCommentComposer.tsx b/mobile/src/components/pr-sidebar/PRCommentComposer.tsx index 152469d7281..18f3ac36c6a 100644 --- a/mobile/src/components/pr-sidebar/PRCommentComposer.tsx +++ b/mobile/src/components/pr-sidebar/PRCommentComposer.tsx @@ -7,6 +7,7 @@ import { useMobileTranslation } from '../../i18n/use-mobile-translation' import { isSubmittableCommentBody } from '../../source-control/review/pr-comment-actions' import { MessageBox } from '../composer-input/MessageBox' import { composerInputStyles } from '../composer-input/composer-input-styles' +import { useDurableDraftField } from '../../drafts/durable-draft-fields' type Props = { // Share plain-text composer across root comment, reply and edit. @@ -15,6 +16,8 @@ type Props = { submitting: boolean // Seeds the field for the edit case; the reply/add cases leave it empty. initialBody?: string + // Where a new comment or reply waits until it is posted, through closing and the app being killed. + draftKey?: string | null // Resolves to true on success; the composer clears + collapses (caller-driven via key remount or onSubmitted). onSubmit: (body: string) => Promise onCancel?: () => void @@ -27,6 +30,7 @@ export function PRCommentComposer({ submitLabel, submitting, initialBody, + draftKey = null, onSubmit, onCancel, autoFocus, @@ -34,7 +38,9 @@ export function PRCommentComposer({ }: Props) { useMobileColorScheme() const t = useMobileTranslation() - const [body, setBody] = useState(initialBody ?? '') + const [edited, setEdited] = useState(initialBody ?? '') + const [kept, setKept] = useDurableDraftField(draftKey, 'body') + const [body, setBody] = draftKey === null ? [edited, setEdited] : [kept, setKept] // Guard synchronously against double-submit before parent’s async submitting state rerenders. const inFlightRef = useRef(false) const canSubmit = isSubmittableCommentBody(body) && !submitting @@ -45,9 +51,11 @@ export function PRCommentComposer({ } inFlightRef.current = true try { - const ok = await onSubmit(body.trim()) + const posted = body.trim() + const ok = await onSubmit(posted) + // A reopened composer shares the draft; text typed there since stays. if (ok) { - setBody('') + setBody((current) => (current.trim() === posted ? '' : current)) } } finally { inFlightRef.current = false diff --git a/mobile/src/components/pr-sidebar/PRCommentsSection.tsx b/mobile/src/components/pr-sidebar/PRCommentsSection.tsx index dffdc4028d1..9c44d335d27 100644 --- a/mobile/src/components/pr-sidebar/PRCommentsSection.tsx +++ b/mobile/src/components/pr-sidebar/PRCommentsSection.tsx @@ -239,6 +239,7 @@ export function PRCommentsSection({ )} submitLabel={t('pullRequest.commentsSection.comment', 'Comment')} submitting={actions.isRootBusy} + draftKey={actions.draftKey(null)} onSubmit={actions.addRootComment} /> @@ -267,6 +268,7 @@ export function usePRCommentCardActions( isResolveBusy: actions.isResolveBusy, isEditBusy: actions.isEditBusy, isDeleteBusy: actions.isDeleteBusy, + draftKey: actions.draftKey, prRepo: prRepo ?? null } : undefined, diff --git a/mobile/src/components/pr-sidebar/PrCommentsScreen.tsx b/mobile/src/components/pr-sidebar/PrCommentsScreen.tsx index 7cec48386f9..329fbb36a17 100644 --- a/mobile/src/components/pr-sidebar/PrCommentsScreen.tsx +++ b/mobile/src/components/pr-sidebar/PrCommentsScreen.tsx @@ -91,6 +91,7 @@ export function PrCommentsScreen({ tab, onBack, bottomInset = 0, onOpenFile }: S isResolveBusy: commentActions.isResolveBusy, isEditBusy: commentActions.isEditBusy, isDeleteBusy: commentActions.isDeleteBusy, + draftKey: commentActions.draftKey, prRepo: data?.pr.prRepo ?? null } : undefined, @@ -195,6 +196,7 @@ export function PrCommentsScreen({ tab, onBack, bottomInset = 0, onOpenFile }: S })} submitLabel={t('pullRequest.commentsSection.comment', 'Comment')} submitting={commentActions.isRootBusy} + draftKey={commentActions.draftKey(null)} onSubmit={commentActions.addRootComment} inline /> diff --git a/mobile/src/components/pr-sidebar/PrCreateSheet.tsx b/mobile/src/components/pr-sidebar/PrCreateSheet.tsx index 8b2107d0ea3..8080e0faf27 100644 --- a/mobile/src/components/pr-sidebar/PrCreateSheet.tsx +++ b/mobile/src/components/pr-sidebar/PrCreateSheet.tsx @@ -1,11 +1,4 @@ -import { - useEffect, - useLayoutEffect, - useRef, - useState, - type Dispatch, - type SetStateAction -} from 'react' +import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react' import { ActivityIndicator, Pressable, Text, View } from 'react-native' import { ChevronsUpDown, Sparkles } from 'lucide-react-native' import { colors, pressedStyle, spacing } from '../../theme/mobile-theme' @@ -30,8 +23,7 @@ import { import { cancelMobilePrFields, generateMobilePrFields, - loadMobilePrCreateDraft, - type MobilePrCreateDraft + loadMobilePrCreateDraft } from '../../source-control/mobile-pr-create-draft' import { getMobileCommitFailureStagedEntries, @@ -43,33 +35,52 @@ import type { MobilePrTab } from './use-mobile-pr-tab' import { prSheetStyles as sheetStyles } from './pr-tab-styles' import { PrBasePicker } from './PrBasePicker' import { FieldTextInput } from '../composer-input/FieldTextInput' +import { workspaceDraftRowKey } from '../../drafts/durable-draft-rows' +import { updateDurableDraftField, useDurableDraftField } from '../../drafts/durable-draft-fields' +import { useWorkspaceExecutionHost } from '../../navigation/workspace-execution-host' -type Fields = { title: string; body: string; base: string; draft: boolean } +// The provider rides along so a kept draft reopens without asking the host again. +type Fields = { title: string; body: string; base: string; draft: boolean; provider: string } -/** What Cancel leaves for the next open on the same workspace branch. */ -export type PrCreateKept = { key: string; draft: MobilePrCreateDraft; fields: Fields } +function keepCreateField(key: string, patch: Partial): void { + for (const [name, value] of Object.entries(patch)) { + updateDurableDraftField(key, name, value === true ? 'yes' : value === false ? '' : value) + } +} + +// The first edit keeps the whole form. The provider is never empty, so it is what marks a kept draft. +function keepCreateFields(key: string, fields: Fields | null): void { + keepCreateField(key, fields ?? { provider: '', title: '', body: '', base: '', draft: false }) +} + +function useKeptCreateFields(key: string | null): Fields | null { + const [provider] = useDurableDraftField(key, 'provider') + const [title] = useDurableDraftField(key, 'title') + const [body] = useDurableDraftField(key, 'body') + const [base] = useDurableDraftField(key, 'base') + const [draft] = useDurableDraftField(key, 'draft') + return useMemo( + () => (provider ? { title, body, base, draft: draft === 'yes', provider } : null), + [base, body, draft, provider, title] + ) +} // One Create flow for every entry point and all five providers: seed from commits, push if needed, land on the PR tab. -export function PrCreateSheet({ - tab, - kept, - onKeep -}: { - tab: MobilePrTab - kept: PrCreateKept | null - onKeep: Dispatch> -}) { +export function PrCreateSheet({ tab }: { tab: MobilePrTab }) { useMobileColorScheme() const t = useMobileTranslation() - const { client, worktreeId, gitBranch } = tab + const { client, hostId, worktreeId, gitBranch } = tab + const executionHost = useWorkspaceExecutionHost() const creating = tab.creatingPr const setCreating = tab.setCreatingPr - const keepKey = gitBranch ? `${worktreeId}\u0000${gitBranch}` : null - // Reopening on the same branch restores what was typed instead of re-seeding from commits. - const [restored] = useState(() => (kept && kept.key === keepKey ? kept : null)) - const [draft, setDraft] = useState(restored?.draft ?? null) - const [fields, setFields] = useState(restored?.fields ?? null) - const editedRef = useRef(restored !== null) + // What was typed waits, per workspace branch, through Cancel and the app being killed. + const keptKey = gitBranch + ? workspaceDraftRowKey('prCreate', { hostId, executionHost, worktreeId }, gitBranch) + : null + const kept = useKeptCreateFields(keptKey) + const [seeded, setSeeded] = useState(null) + const [seedError, setSeedError] = useState(null) + const fields = kept ?? seeded const [pickingBase, setPickingBase] = useState(false) const [generating, setGenerating] = useState(false) const [message, setMessage] = useState<{ text: string; error: boolean } | null>(null) @@ -89,11 +100,11 @@ export function PrCreateSheet({ useLayoutEffect(() => { commitsAheadRef.current = tab.commitsAhead }) - // Seed once per open: a reconnect or a status reload must not overwrite what the user typed. - const seededRef = useRef(restored !== null) + // Seed once per open, and not over a kept draft: a reconnect or a status reload must not overwrite what was typed. + const seedRef = useRef(kept !== null) useEffect(() => { - if (!client || !gitBranch || seededRef.current) { + if (!client || !gitBranch || seedRef.current) { return } let cancelled = false @@ -104,14 +115,19 @@ export function PrCreateSheet({ }) .then((loaded) => { if (!cancelled) { - seededRef.current = true - setDraft(loaded) - setFields({ title: loaded.title, body: loaded.body, base: loaded.base, draft: false }) + seedRef.current = true + setSeeded({ + title: loaded.title, + body: loaded.body, + base: loaded.base, + draft: false, + provider: loaded.prefill.provider + }) } }) .catch((err: unknown) => { if (!cancelled) { - setMessage({ text: err instanceof Error ? err.message : String(err), error: true }) + setSeedError(err instanceof Error ? err.message : String(err)) } }) return () => { @@ -119,13 +135,25 @@ export function PrCreateSheet({ } }, [client, gitBranch, worktreeId]) - const copy = hostedReviewCopy(draft?.prefill.provider) + const copy = hostedReviewCopy(fields?.provider) const title = t('pullRequest.createSheet.title', 'Create {{reviewLabel}}', { reviewLabel: copy.reviewLabel }) + // The first edit turns the seeded fields into a kept draft. Later ones write only what they change, so a + // late Write with AI answer can't undo a toggle made meanwhile. + const keptRef = useRef(kept) + useLayoutEffect(() => { + keptRef.current = kept + }) const update = (patch: Partial) => { - editedRef.current = true - setFields((current) => (current ? { ...current, ...patch } : current)) + if (!keptKey || !fields) { + return + } + if (keptRef.current) { + keepCreateField(keptKey, patch) + } else { + keepCreateFields(keptKey, { ...fields, ...patch }) + } } // Closing the sheet cancels a running generation, drops its late answer and keeps typed fields; a reconnect does none. @@ -134,9 +162,9 @@ export function PrCreateSheet({ useLayoutEffect(() => { generatingRef.current = generating }) - const closeTargetRef = useRef({ client, worktreeId, keepKey, draft, fields, onKeep }) + const closeTargetRef = useRef({ client, worktreeId }) useLayoutEffect(() => { - closeTargetRef.current = { client, worktreeId, keepKey, draft, fields, onKeep } + closeTargetRef.current = { client, worktreeId } }) useEffect( () => () => { @@ -145,25 +173,19 @@ export function PrCreateSheet({ if (generatingRef.current && target.client) { void cancelMobilePrFields(target.client, target.worktreeId).catch(() => {}) } - if (editedRef.current && target.keepKey && target.draft && target.fields) { - target.onKeep({ key: target.keepKey, draft: target.draft, fields: target.fields }) - } }, [] ) const writeWithAi = async () => { - if (!client || !fields || !draft || generating) { + if (!client || !fields || generating) { return } const generation = ++generationRef.current setGenerating(true) setMessage(null) try { - const result = await generateMobilePrFields(client, worktreeId, { - ...fields, - provider: draft.prefill.provider - }) + const result = await generateMobilePrFields(client, worktreeId, fields) if (generation !== generationRef.current) { return } @@ -190,7 +212,7 @@ export function PrCreateSheet({ return } createInFlightRef.current = true - const createdKey = keepKey + const createdKey = keptKey setCreating(true) setMessage(null) setCommitFailure(null) @@ -226,10 +248,12 @@ export function PrCreateSheet({ } triggerSuccess() setCreating(false) - // The PR exists now, so nothing carries over to the next Create on this branch, even text kept - // when a branch or client change closed this sheet mid-run. - editedRef.current = false - onKeep((current) => (current?.key === createdKey ? null : current)) + // The PR exists now, so nothing carries over to the next Create on this branch, even when a branch or + // client change closed this sheet mid-run. + setSeeded(fields) + if (createdKey) { + keepCreateFields(createdKey, null) + } const created = { url: outcome.url, warning: outcome.warning ?? null, @@ -281,8 +305,8 @@ export function PrCreateSheet({ 'Check out a branch before creating a pull request.' )} - ) : message ? ( - {message.text} + ) : seedError ? ( + {seedError} ) : ( )} diff --git a/mobile/src/components/pr-sidebar/PrThreadRow.tsx b/mobile/src/components/pr-sidebar/PrThreadRow.tsx index 2d9527ba450..be89feef5e9 100644 --- a/mobile/src/components/pr-sidebar/PrThreadRow.tsx +++ b/mobile/src/components/pr-sidebar/PrThreadRow.tsx @@ -44,6 +44,8 @@ export type PrThreadActions = { isResolveBusy: (threadId: string) => boolean isEditBusy: (commentId: number) => boolean isDeleteBusy: (commentId: number) => boolean + // Where a reply to a comment waits until it is posted. + draftKey: (replyTo: number) => string | null // Repo slug for the slug-addressed edit/delete RPCs; gates the affordances when absent. prRepo: PRCommentRepoSlug | null } diff --git a/mobile/src/components/pr-sidebar/PrThreadScreen.tsx b/mobile/src/components/pr-sidebar/PrThreadScreen.tsx index 3bef4466dd9..b1db7052d92 100644 --- a/mobile/src/components/pr-sidebar/PrThreadScreen.tsx +++ b/mobile/src/components/pr-sidebar/PrThreadScreen.tsx @@ -114,6 +114,7 @@ export function PrThreadScreen({ placeholder={t('pullRequest.screens.replyPlaceholder', 'Reply…')} submitLabel={t('pullRequest.commentCard.reply', 'Reply')} submitting={actions.isReplyBusy(root.id)} + draftKey={actions.draftKey(root.id)} onSubmit={(body) => actions.reply(root, body)} autoFocus={focusReply} inline diff --git a/mobile/src/components/pr-sidebar/pr-comment-composer-drafts.test.tsx b/mobile/src/components/pr-sidebar/pr-comment-composer-drafts.test.tsx new file mode 100644 index 00000000000..2710d18b844 --- /dev/null +++ b/mobile/src/components/pr-sidebar/pr-comment-composer-drafts.test.tsx @@ -0,0 +1,90 @@ +import { createElement, type ReactNode } from 'react' +import { act, create, type ReactTestRenderer } from 'react-test-renderer' +import { afterEach, beforeEach, expect, it, vi } from 'vitest' + +const hosts = vi.hoisted(() => { + const Box = (props: { children?: ReactNode }): ReactNode => props.children ?? null + Box.displayName = 'MessageBox' + return { Box } +}) +vi.mock('react-native', () => ({ Pressable: () => null })) +vi.mock('lucide-react-native', () => ({ X: () => null })) +vi.mock('../../theme/use-mobile-color-scheme', () => ({ useMobileColorScheme: () => 'light' })) +vi.mock('../composer-input/MessageBox', () => ({ MessageBox: hosts.Box })) +vi.mock('../composer-input/composer-input-styles', () => ({ composerInputStyles: {} })) + +import { publishPageDeviceStore } from '../../mobile-web-shell/bridge/page-device-store' +import { resetDurableDraftFieldsForTests } from '../../drafts/durable-draft-fields' +import { publishInMemoryDeviceStore } from '../../drafts/in-memory-device-store.test-support' +import { PRCommentComposer } from './PRCommentComposer' + +// The shell's draft table outlives the page; nothing else does. +const table = new Map() +let renderer: ReactTestRenderer | null = null +let onSubmit: (body: string) => Promise = async () => true + +const KEY = 'draft:prComment:wt-1:host-1::/acme/app#12#new' + +async function open(): Promise { + await act(async () => { + renderer = create( + createElement(PRCommentComposer, { + placeholder: 'Comment', + submitLabel: 'Comment', + submitting: false, + draftKey: KEY, + onSubmit: (body: string) => onSubmit(body) + }) + ) + await vi.advanceTimersByTimeAsync(0) + }) +} + +function box(): { value: string; onChangeText: (text: string) => void; onSend: () => void } { + const props = renderer?.root.findByType(hosts.Box).props + return { value: props?.value, onChangeText: props?.onChangeText, onSend: props?.onSend } +} + +async function type(text: string): Promise { + act(() => box().onChangeText(text)) + await act(async () => { + await vi.advanceTimersByTimeAsync(1000) + }) +} + +// A kill: the page and its memory go, the store stays. +function kill(): void { + act(() => renderer?.unmount()) + renderer = null + resetDurableDraftFieldsForTests() +} + +beforeEach(() => { + vi.useFakeTimers() + publishInMemoryDeviceStore(table) +}) + +afterEach(() => { + kill() + table.clear() + publishPageDeviceStore(null) + onSubmit = async () => true + vi.useRealTimers() +}) + +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)) + await open() + await type('first thought') + act(() => box().onSend()) + act(() => renderer?.unmount()) + + await open() + await type('a second thought') + await act(async () => { + land(true) + await vi.advanceTimersByTimeAsync(1000) + }) + expect(box().value).toBe('a second thought') +}) diff --git a/mobile/src/components/pr-sidebar/pr-create-sheet-drafts.test.tsx b/mobile/src/components/pr-sidebar/pr-create-sheet-drafts.test.tsx new file mode 100644 index 00000000000..3db7251d9fb --- /dev/null +++ b/mobile/src/components/pr-sidebar/pr-create-sheet-drafts.test.tsx @@ -0,0 +1,144 @@ +import { createElement, type ReactNode } from 'react' +import { act, create, type ReactTestInstance, type ReactTestRenderer } from 'react-test-renderer' +import { afterEach, beforeEach, expect, it, vi } from 'vitest' + +const hosts = vi.hoisted(() => { + const make = (name: string) => { + const Host = (props: { children?: ReactNode }): ReactNode => props.children ?? null + Host.displayName = name + return Host + } + return { + View: make('View'), + Text: make('Text'), + Pressable: make('Pressable'), + Field: make('FieldTextInput'), + Button: make('SheetPrimaryButton') + } +}) +vi.mock('react-native', () => ({ + View: hosts.View, + Text: hosts.Text, + Pressable: hosts.Pressable, + ActivityIndicator: hosts.View, + StyleSheet: { create: (styles: T) => styles, hairlineWidth: 1, absoluteFillObject: {} }, + Platform: { OS: 'ios', select: (options: Record) => options.ios } +})) +vi.mock('lucide-react-native', () => ({ ChevronsUpDown: hosts.View, Sparkles: hosts.View })) +vi.mock('../../theme/use-mobile-color-scheme', () => ({ useMobileColorScheme: () => 'light' })) +vi.mock('../nav-bar/SheetHeader', () => ({ SheetHeader: hosts.View })) +vi.mock('../SheetPrimaryButton', () => ({ SheetPrimaryButton: hosts.Button })) +vi.mock('../list/ListGroup', () => ({ ListGroup: hosts.View, ListRow: hosts.View })) +vi.mock('../MobileSwitch', () => ({ MobileSwitch: hosts.View })) +vi.mock('./PrBasePicker', () => ({ PrBasePicker: hosts.View })) +vi.mock('../composer-input/FieldTextInput', () => ({ FieldTextInput: hosts.Field })) +vi.mock('../../source-control/MobileCommitFailurePanel', () => ({ + MobileCommitFailurePanel: hosts.View +})) +vi.mock('../../source-control/use-mobile-commit-failure-recovery', () => ({ + useMobileCommitFailureRecovery: () => null +})) +const host = vi.hoisted(() => ({ + seed: vi.fn(), + create: vi.fn() +})) +vi.mock('../../source-control/mobile-pr-create-draft', () => ({ + loadMobilePrCreateDraft: host.seed, + generateMobilePrFields: vi.fn(), + cancelMobilePrFields: vi.fn(async () => {}) +})) +vi.mock('../../source-control/mobile-hosted-review-create-intent-runner', () => ({ + runMobileHostedReviewCreateIntent: host.create, + isMobileHostedReviewCommitFailure: () => false +})) + +import { publishPageDeviceStore } from '../../mobile-web-shell/bridge/page-device-store' +import { resetDurableDraftFieldsForTests } from '../../drafts/durable-draft-fields' +import { publishInMemoryDeviceStore } from '../../drafts/in-memory-device-store.test-support' +import { createFakeRpcClient } from '../../mobile-web-shell/bridge-host-test-fakes' +import { PrCreateSheet } from './PrCreateSheet' +import type { MobilePrTab } from './use-mobile-pr-tab' +import { mountFixture } from '../../test-support/rpc-recording/recorder-fixture-shape' + +// The shell's draft table outlives the page; nothing else does. +const table = new Map() +let renderer: ReactTestRenderer | null = null + +// The sheet reads only these fields of the PR tab. +const tab = mountFixture({ + client: createFakeRpcClient(), + hostId: 'host-1', + worktreeId: 'repo::/work/feature', + gitBranch: 'feature/login', + gitStatus: null, + commitsAhead: null, + connState: 'connected', + workspaceLabel: 'feature', + creatingPr: false, + setCreatingPr: () => {}, + closeSheet: () => {}, + closeSheetThen: () => {} +}) + +async function open(): Promise { + await act(async () => { + renderer = create(createElement(PrCreateSheet, { tab })) + await vi.advanceTimersByTimeAsync(0) + }) +} + +function titleField(): ReactTestInstance | undefined { + return renderer?.root.findAllByType(hosts.Field)[0] +} + +async function typeTitle(title: string): Promise { + act(() => titleField()?.props.onChangeText(title)) + await act(async () => { + await vi.advanceTimersByTimeAsync(1000) + }) +} + +// A kill: the page and its memory go, the store stays. +function kill(): void { + act(() => renderer?.unmount()) + renderer = null + resetDurableDraftFieldsForTests() +} + +beforeEach(() => { + vi.useFakeTimers() + host.seed.mockResolvedValue({ + prefill: { provider: 'github', base: 'main', title: '', body: '' }, + title: 'Seed from commits', + body: '', + base: 'main' + }) + publishInMemoryDeviceStore(table) +}) + +afterEach(() => { + kill() + table.clear() + publishPageDeviceStore(null) + host.seed.mockReset() + host.create.mockReset() + vi.useRealTimers() +}) + +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))) + await open() + await typeTitle('Fix the login race') + act(() => renderer?.root.findByType(hosts.Button).props.onPress()) + // A branch or client change closes the sheet while the Create is still running. + act(() => renderer?.unmount()) + await act(async () => { + land({ ok: true, url: 'https://example.test/pr/1', prefill: { provider: 'github' } }) + await vi.advanceTimersByTimeAsync(1000) + }) + kill() + + await open() + expect(titleField()?.props.value).toBe('Seed from commits') +}) diff --git a/mobile/src/components/use-detail-card-scope.web.ts b/mobile/src/components/use-detail-card-scope.web.ts index 173e1bb7f44..f83d48a4e61 100644 --- a/mobile/src/components/use-detail-card-scope.web.ts +++ b/mobile/src/components/use-detail-card-scope.web.ts @@ -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 }) diff --git a/mobile/src/device-store/device-store.ts b/mobile/src/device-store/device-store.ts index ed0637f1d4a..c1ea8d9cf81 100644 --- a/mobile/src/device-store/device-store.ts +++ b/mobile/src/device-store/device-store.ts @@ -275,10 +275,10 @@ export function processDeviceStore(): DeviceStore { return processStore } -// Once per process, after the splash: nothing reads the store before first paint, and its keychain and -// AsyncStorage reads would otherwise compete with the launch work that holds the splash. Loads the key, -// runs the launch sweeps and index seed in idle slices, and on each return to the foreground retries an -// unavailable store and a pass that missed files. +// Once per process, after the splash: the sweeps' AsyncStorage and file reads would otherwise compete with +// the launch work that holds the splash. Native Home's first read may have loaded the key already. Runs the launch sweeps +// and index seed in idle slices, and on each return to the foreground retries an unavailable store and a +// pass that missed files. export function startDeviceStore(): void { if (started) { return diff --git a/mobile/src/dictation/MobileDictationLiveControls.tsx b/mobile/src/dictation/MobileDictationLiveControls.tsx new file mode 100644 index 00000000000..0c5ece35fd9 --- /dev/null +++ b/mobile/src/dictation/MobileDictationLiveControls.tsx @@ -0,0 +1,304 @@ +import { useEffect, useMemo, useState, type Ref } from 'react' +import { ActivityIndicator, Pressable, Text, View } from '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, 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 { dictationControlsCopy, dictationMeterLabel } from './mobile-dictation-controls-copy' + +// Automatic's move from the phone to the computer is named in words this long, then the icon returns. +const MOVED_NOTE_MS = 3000 +// A computer finish that lands within this shows no note, so a fast finish never flashes one. +const FINISHING_NOTE_DELAY_MS = 300 + +// Cancel sits where attach was, far from Stop; a hold released over it cancels too. +export function MobileDictationCancelButton({ + onCancel, + targetRef, + compact = false, + discards = false +}: { + onCancel: () => void + targetRef?: Ref + compact?: boolean + // After a failure, ✕ throws the kept recording away. + discards?: boolean +}): React.JSX.Element { + useMobileColorScheme() + useMobileTranslation() + return ( + [ + composerInputStyles.controlButton, + compact && styles.compactCancel, + pressed && composerInputStyles.pressed + ]} + hitSlop={COMPOSER_CONTROL_HIT_SLOP} + onPress={onCancel} + > + + + ) +} + +// The mic's face: a spinner while finishing, a red Stop while live, else the mic. Icons ignore touches, so a swap mid-hold keeps the press. +export function MobileDictationMicIcon({ + active, + processing, + micSize, + micStroke +}: { + active: boolean + processing: boolean + micSize: number + micStroke: number +}): React.JSX.Element { + useMobileColorScheme() + return processing ? ( + + ) : active ? ( + + ) : ( + + ) +} + +// 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 ( + + + {compact ? ( + + {`${reason} · ${kept}`} + + ) : ( + + + {reason} + + + {kept} + + + )} + + ) +} + +// 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 ( + [ + labelled ? styles.retryPill : composerInputStyles.controlButton, + pressed && composerInputStyles.pressed + ]} + hitSlop={COMPOSER_CONTROL_HIT_SLOP} + onPress={onRetry} + > + + {labelled ? ( + {dictationControlsCopy.retryShort()} + ) : null} + + ) +} + +function EngineIcon({ kind, color }: { kind: MobileDictationEngineShown['kind']; color: string }) { + return kind === 'phone' ? ( + + ) : ( + + ) +} + +// Dots, timer and the engine's icon; words only for the few seconds after Automatic moves to the computer. +export function MobileDictationRecordingMeter({ + meter, + engine, + computerName, + dotSize +}: { + meter: MobileDictationMeter + engine: MobileDictationEngineShown | null + computerName: string | null + dotSize: number +}): React.JSX.Element { + useMobileColorScheme() + useMobileTranslation() + const { now, elapsedSeconds } = useMobileDictationElapsed(meter) + const kind = engine?.kind ?? null + // The clock ticks four times a second; the spoken label changes once. + const label = useMemo( + () => dictationMeterLabel(elapsedSeconds, kind, computerName), + [elapsedSeconds, kind, computerName] + ) + if (engine?.movedAt != null && now - engine.movedAt < MOVED_NOTE_MS) { + return ( + + + + {dictationControlsCopy.movedTo(computerName)} + + + ) + } + return ( + + + + + {engine ? : null} + + + ) +} + +// Says where a slow finish is happening; the phone finishes at once, so it never needs this. Mounted only while finishing. +export function MobileDictationFinishingNote({ + engine, + computerName +}: { + engine: MobileDictationEngineShown | null + computerName: string | null +}): React.JSX.Element | null { + useMobileColorScheme() + useMobileTranslation() + const onComputer = engine?.kind === 'computer' + const [slow, setSlow] = useState(false) + useEffect(() => { + if (!onComputer) { + return + } + const timer = setTimeout(() => setSlow(true), FINISHING_NOTE_DELAY_MS) + return () => clearTimeout(timer) + }, [onComputer]) + if (!onComputer || !slow) { + return null + } + return ( + + + + {dictationControlsCopy.finishingOn(computerName)} + + + ) +} + +const styles = themedStyleSheet(() => ({ + row: { + flexDirection: 'row', + alignItems: 'center', + gap: spacing.sm, + minWidth: 0, + flexShrink: 1 + }, + compactCancel: { + width: 36, + height: 36 + }, + moved: { + flexShrink: 1, + color: colors.textPrimary, + fontSize: typography.metaSize + 1, + fontWeight: '500' + }, + finishing: { + 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' + } +})) diff --git a/mobile/src/dictation/MobileDictationMeter.tsx b/mobile/src/dictation/MobileDictationMeter.tsx index ae3007a05d4..7cf75cb2cc2 100644 --- a/mobile/src/dictation/MobileDictationMeter.tsx +++ b/mobile/src/dictation/MobileDictationMeter.tsx @@ -1,4 +1,4 @@ -import { useSyncExternalStore } from 'react' +import { memo, useSyncExternalStore } from 'react' import { Text, View } from 'react-native' import { DICTATION_GRAPES } from '../../../src/shared/dictation-audio-meter' import { @@ -20,8 +20,11 @@ function useMeterEnergy(meter: MobileDictationMeter): { energy: number; isClippi return { energy: useReducedMotionEnabled() === false ? level : 0, isClipping } } -// Desktop's nine dots, red while the mic clips. -export function MobileDictationGrapes({ meter, dotSize }: MeterProps & { dotSize: number }) { +// Desktop's nine dots, red while the mic clips. Memoized: its parent re-renders on the timer's clock, the dots on the meter. +export const MobileDictationGrapes = memo(function MobileDictationGrapes({ + meter, + dotSize +}: MeterProps & { dotSize: number }) { const { energy, isClipping } = useMeterEnergy(meter) return ( ) -} +}) -export function MobileDictationTimer({ meter }: MeterProps) { - useMobileColorScheme() +export function useMobileDictationElapsed(meter: MobileDictationMeter): { + now: number + elapsedSeconds: number +} { const startedAt = useSyncExternalStore(meter.subscribe, () => meter.getSnapshot().startedAt) const now = useNow(250) // The hook starts the meter in an effect, so the first recording frame may still read 0. const elapsedSeconds = startedAt === 0 ? 0 : Math.max(0, Math.floor((now - startedAt) / 1000)) + return { now, elapsedSeconds } +} + +export function MobileDictationTimer({ elapsedSeconds }: { readonly elapsedSeconds: number }) { + useMobileColorScheme() const minutes = Math.floor(elapsedSeconds / 60) const seconds = String(elapsedSeconds % 60).padStart(2, '0') return {`${minutes}:${seconds}`} diff --git a/mobile/src/dictation/MobileDictationPill.tsx b/mobile/src/dictation/MobileDictationPill.tsx new file mode 100644 index 00000000000..56f33ae8c50 --- /dev/null +++ b/mobile/src/dictation/MobileDictationPill.tsx @@ -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 ( + + {`${dictationFailureReason(dictation.failure)} · ${dictationControlsCopy.recordingKept()}`} + + ) + } + if (!dictation.isRecording) { + return ( + + {dictation.isStarting ? dictationAwayCopy.starting() : dictationAwayCopy.finishing()} + + ) + } + return ( + + + {dictationAwayCopy.listening()} + · + + {dictation.engine ? ( + <> + · + {dictation.engine.kind === 'phone' ? ( + + ) : ( + + )} + + ) : null} + + ) +} + +// 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 ( + + + {failed ? ( + + ) : ( + + )} + + + {failed ? dictationAwayCopy.stopped() : title} + + + + + void dictation.cancel()} discards={failed} /> + {failed ? ( + void dictation.retry()} labelled /> + ) : ( + [ + composerInputStyles.controlButton, + pressed && composerInputStyles.pressed + ]} + onPress={onStop} + > + + + )} + + ) +} + +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 ( + + {toast ? ( + + + {toast.message} + + {toast.open ? ( + { + onDone() + toast.open?.() + }} + > + {dictationAwayCopy.open()} + + ) : null} + + ) : null} + + ) +} + +// 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 ? ( + + + + ) : null} + + + ) +} + +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' + } +})) diff --git a/mobile/src/dictation/dictation-reply-schema.ts b/mobile/src/dictation/dictation-reply-schema.ts index 9298651bd11..23a738977ac 100644 --- a/mobile/src/dictation/dictation-reply-schema.ts +++ b/mobile/src/dictation/dictation-reply-schema.ts @@ -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({ local: true, @@ -32,8 +33,15 @@ export const dictationSetupSchema = z.looseObject({ enabled: salvagedOptional('enabled', z.boolean()), selectedModelId: salvagedOptional('selectedModelId', z.string()), dictationMode: salvagedOptional('dictationMode', z.string()), + // Absent from older hosts, which have no Auto mode; the phone then offers only Toggle and Hold. + 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) }) diff --git a/mobile/src/dictation/mobile-dictation-away-copy.ts b/mobile/src/dictation/mobile-dictation-away-copy.ts new file mode 100644 index 00000000000..a7ab5972b64 --- /dev/null +++ b/mobile/src/dictation/mobile-dictation-away-copy.ts @@ -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') +} diff --git a/mobile/src/dictation/mobile-dictation-away-insert.ts b/mobile/src/dictation/mobile-dictation-away-insert.ts new file mode 100644 index 00000000000..483f08e232e --- /dev/null +++ b/mobile/src/dictation/mobile-dictation-away-insert.ts @@ -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 { + 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 + } +} diff --git a/mobile/src/dictation/mobile-dictation-controls-copy.ts b/mobile/src/dictation/mobile-dictation-controls-copy.ts new file mode 100644 index 00000000000..4de0e3c46c2 --- /dev/null +++ b/mobile/src/dictation/mobile-dictation-controls-copy.ts @@ -0,0 +1,105 @@ +import { translate } from '../i18n/mobile-i18n' +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 } + +// One set of dictation labels for the chat composer, the terminal and the pill. +export const dictationControlsCopy = { + start: () => translate('dictation.controls.start', 'Dictate'), + starting: () => translate('dictation.controls.starting', 'Starting dictation'), + 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() + : active + ? dictationControlsCopy.stop() + : processing + ? dictationControlsCopy.finishing() + : dictationControlsCopy.start(), + finishingOn: (computer: string | null) => + computer + ? translate('dictation.status.finishingOn', 'Finishing on {{computer}}', { computer }) + : translate('dictation.status.finishingOnComputer', 'Finishing on the computer'), + movedTo: (computer: string | null) => + computer + ? translate('dictation.status.movedTo', 'Moved to {{computer}}', { computer }) + : translate('dictation.status.movedToComputer', 'Moved to the computer') +} + +export function dictationSpokenDuration(elapsedSeconds: number): string { + const minutes = Math.floor(elapsedSeconds / 60) + const count = elapsedSeconds % 60 + const seconds = + count === 1 + ? translate('dictation.controls.durationSeconds_one', '{{count}} second', { count }) + : translate('dictation.controls.durationSeconds_other', '{{count}} seconds', { count }) + if (minutes === 0) { + return seconds + } + const minuteText = + minutes === 1 + ? translate('dictation.controls.durationMinutes_one', '{{count}} minute', { count: minutes }) + : translate('dictation.controls.durationMinutes_other', '{{count}} minutes', { + count: minutes + }) + return translate('dictation.controls.durationMinutesSeconds', '{{minutes}} {{seconds}}', { + minutes: minuteText, + seconds + }) +} + +// What a screen reader hears on the meter, which shows only dots, a timer and an icon. +export function dictationMeterLabel( + elapsedSeconds: number, + engine: MobileDictationEngineShown['kind'] | null, + computer: string | null +): string { + const duration = dictationSpokenDuration(elapsedSeconds) + if (engine === 'phone') { + return translate('dictation.controls.meterOnPhone', 'Recording, {{duration}}, on this phone', { + duration + }) + } + if (engine === 'computer') { + return computer + ? translate('dictation.controls.meterOn', 'Recording, {{duration}}, on {{computer}}', { + duration, + computer + }) + : translate( + 'dictation.controls.meterOnComputer', + 'Recording, {{duration}}, on the computer', + { + duration + } + ) + } + 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') +} diff --git a/mobile/src/dictation/mobile-dictation-host-context.ts b/mobile/src/dictation/mobile-dictation-host-context.ts new file mode 100644 index 00000000000..240a31f50b2 --- /dev/null +++ b/mobile/src/dictation/mobile-dictation-host-context.ts @@ -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 + // 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(null) +export const MobileDictationPillContext = createContext(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]) +} diff --git a/mobile/src/dictation/mobile-dictation-host.tsx b/mobile/src/dictation/mobile-dictation-host.tsx new file mode 100644 index 00000000000..c4960704a7a --- /dev/null +++ b/mobile/src/dictation/mobile-dictation-host.tsx @@ -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, + 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(null) + const ownerRef = useRef(owner) + const screensRef = useRef(new Set()) + const [, setRevision] = useState(0) + const refresh = useCallback(() => setRevision((revision) => revision + 1), []) + const [toast, setToast] = useState(null) + const clearToast = useCallback(() => setToast(null), []) + const [clearances, setClearances] = useState>(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( + () => ({ + 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( + () => ({ + owner, + start, + stop, + attach, + refresh, + subscribe, + getDictation, + getIdleDictation, + getUnderway + }), + [attach, getDictation, getIdleDictation, getUnderway, owner, refresh, start, stop, subscribe] + ) + return ( + + + + {children} + + + + ) +} diff --git a/mobile/src/dictation/mobile-dictation-leave-hold.ts b/mobile/src/dictation/mobile-dictation-leave-hold.ts index 790b51c796c..7aaaa16a253 100644 --- a/mobile/src/dictation/mobile-dictation-leave-hold.ts +++ b/mobile/src/dictation/mobile-dictation-leave-hold.ts @@ -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 } } diff --git a/mobile/src/dictation/mobile-dictation-live-context.ts b/mobile/src/dictation/mobile-dictation-live-context.ts new file mode 100644 index 00000000000..9f5d6126b3d --- /dev/null +++ b/mobile/src/dictation/mobile-dictation-live-context.ts @@ -0,0 +1,18 @@ +import { createContext } from 'react' +import type { MobileDictationMeter } from '../hooks/mobile-dictation-meter' +import type { MobileDictationEngineShown } from '../hooks/mobile-dictation-session-state' + +export type MobileDictationLive = { + readonly meter: MobileDictationMeter + 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. +export const MobileDictationLiveContext = createContext(null) diff --git a/mobile/src/dictation/mobile-dictation-meter-context.ts b/mobile/src/dictation/mobile-dictation-meter-context.ts deleted file mode 100644 index f1f1980e8c2..00000000000 --- a/mobile/src/dictation/mobile-dictation-meter-context.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { createContext } from 'react' -import type { MobileDictationMeter } from '../hooks/mobile-dictation-meter' - -// The chat mic sits several composers deep (overlay, queued edits); it reads the live recording's meter from here. -export const MobileDictationMeterContext = createContext(null) diff --git a/mobile/src/dictation/mobile-dictation-setup.ts b/mobile/src/dictation/mobile-dictation-setup.ts index de85a942f67..61e607ca7a4 100644 --- a/mobile/src/dictation/mobile-dictation-setup.ts +++ b/mobile/src/dictation/mobile-dictation-setup.ts @@ -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 { - const reply = await requestDictationSetupReply(client) +/** `worktreeId` asks for that repo's dictionary terms too. */ +export async function fetchDictationSetup( + client: RpcOperationSender, + worktreeId?: string +): Promise { + 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 { +async function requestDictationSetupReply( + client: RpcOperationSender, + params: { worktreeId: string } | null +): Promise { 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) } } @@ -181,7 +188,12 @@ export async function deleteDictationModel( export async function setDictationConfig( client: RpcOperationSender, - params: { enabled?: boolean; modelId?: string; dictationMode?: 'toggle' | 'hold' } + params: { + enabled?: boolean + modelId?: string + dictationMode?: 'toggle' | 'hold' + dictationHoldToRecord?: boolean + } ): Promise { const reply = await dictationConfigWrite.request(client, params) return interpretOrThrowRefusalMessage( diff --git a/mobile/src/dictation/mobile-dictation-shown.ts b/mobile/src/dictation/mobile-dictation-shown.ts new file mode 100644 index 00000000000..cc3b0a27d27 --- /dev/null +++ b/mobile/src/dictation/mobile-dictation-shown.ts @@ -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 +} diff --git a/mobile/src/dictation/mobile-session-native-chat-dictation-copy.ts b/mobile/src/dictation/mobile-session-native-chat-dictation-copy.ts index 162b2d78f59..f7ea2f1ee2e 100644 --- a/mobile/src/dictation/mobile-session-native-chat-dictation-copy.ts +++ b/mobile/src/dictation/mobile-session-native-chat-dictation-copy.ts @@ -9,6 +9,11 @@ export const nativeChatDictationCopy = { insertFailed: () => translate('session.useNativeChatDictation.insertFailed', "Couldn't insert dictation"), inserted: () => translate('session.useNativeChatDictation.inserted', 'Dictation inserted'), + stoppedAtCloudLimit: () => + translate( + 'session.useNativeChatDictation.stoppedAtCloudLimit', + 'Dictation stopped at the 10-minute cloud limit.' + ), stoppedAfterSilence: () => translate( 'session.useNativeChatDictation.stoppedAfterSilence', diff --git a/mobile/src/dictation/use-mobile-dictation-cancel-drop.ts b/mobile/src/dictation/use-mobile-dictation-cancel-drop.ts new file mode 100644 index 00000000000..b42b3ce1e79 --- /dev/null +++ b/mobile/src/dictation/use-mobile-dictation-cancel-drop.ts @@ -0,0 +1,41 @@ +import { useCallback, type RefObject } from 'react' +import type { GestureResponderEvent, View } from 'react-native' +import { measurePageBox, type PageBox } from '../platform/page-box' + +// A dragging finger lands less precisely than a tap, so the drop zone reaches past ✕. +const DROP_SLOP = 12 + +function contains(box: PageBox, x: number, y: number): boolean { + return ( + x >= box.left - DROP_SLOP && + x <= box.left + box.width + DROP_SLOP && + y >= box.top - DROP_SLOP && + y <= box.top + box.height + DROP_SLOP + ) +} + +// Hold mode: letting go of the mic over ✕ cancels instead of inserting, like a voice note. +export function useMobileDictationCancelDrop( + cancelRef: RefObject | undefined, + onCancel: (() => void) | undefined, + onRelease: (() => void) | undefined +): (event: GestureResponderEvent) => void { + return useCallback( + (event: GestureResponderEvent) => { + const target = cancelRef?.current + const { pageX, pageY } = event.nativeEvent + if (!target || !onCancel || typeof pageX !== 'number' || typeof pageY !== 'number') { + onRelease?.() + return + } + measurePageBox(target, (box) => { + if (box && contains(box, pageX, pageY)) { + onCancel() + } else { + onRelease?.() + } + }) + }, + [cancelRef, onCancel, onRelease] + ) +} diff --git a/mobile/src/dictation/use-mobile-dictation-destination.ts b/mobile/src/dictation/use-mobile-dictation-destination.ts index 7af6be82a6a..74f5633c242 100644 --- a/mobile/src/dictation/use-mobile-dictation-destination.ts +++ b/mobile/src/dictation/use-mobile-dictation-destination.ts @@ -39,6 +39,7 @@ export function useMobileDictationDestination({ ? { field: 'live', handle: terminalHandle } : null setTarget(targetRef.current) + return targetRef.current }, [chatComposerScopeKey] ) diff --git a/mobile/src/dictation/use-mobile-dictation-haptics.ts b/mobile/src/dictation/use-mobile-dictation-haptics.ts index a4853c0a04a..ae927fdd6b5 100644 --- a/mobile/src/dictation/use-mobile-dictation-haptics.ts +++ b/mobile/src/dictation/use-mobile-dictation-haptics.ts @@ -11,8 +11,9 @@ export function useMobileDictationHaptics(dictation: UseMobileDictationResult): } }, [dictation.isRecording]) + const { stop } = dictation return useCallback(() => { triggerSelection() - void dictation.stop() - }, [dictation]) + void stop() + }, [stop]) } diff --git a/mobile/src/dictation/use-mobile-dictation-live.ts b/mobile/src/dictation/use-mobile-dictation-live.ts new file mode 100644 index 00000000000..37528abb0cb --- /dev/null +++ b/mobile/src/dictation/use-mobile-dictation-live.ts @@ -0,0 +1,37 @@ +import { useCallback, useLayoutEffect, useMemo, useRef } from 'react' +import type { UseMobileDictationResult } from '../hooks/mobile-dictation-session-state' +import { useWorkspaceExecutionHost } from '../navigation/workspace-execution-host' +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 or waits for Retry: meter, engine, the computer's name, cancel and Retry. +export function useMobileDictationLive( + dictation: Pick, + cancel: () => void, + hostId: string +): MobileDictationLive { + const cancelLatest = useRef(cancel) + useLayoutEffect(() => { + cancelLatest.current = cancel + }, [cancel]) + const stableCancel = useCallback(() => cancelLatest.current(), []) + const hostProfile = useHostProfile(hostId) + 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, failure, retry } = dictation + const failureReason = failure === null ? null : dictationFailureReason(failure) + return useMemo( + () => ({ + meter, + engine, + computerName, + cancel: stableCancel, + failureReason, + retry: () => void retry() + }), + [meter, engine, computerName, stableCancel, failureReason, retry] + ) +} diff --git a/mobile/src/drafts/document-edit-draft-rows.ts b/mobile/src/drafts/document-edit-draft-rows.ts index 53b912634f0..2dd2d91ed5e 100644 --- a/mobile/src/drafts/document-edit-draft-rows.ts +++ b/mobile/src/drafts/document-edit-draft-rows.ts @@ -1,14 +1,12 @@ import * as z from 'zod' -import { - DEVICE_STORE_MAX_VALUE_LENGTH, - encodeDeviceStoreValue -} from '../device-store/device-store-value-codec' import { durableDraftRow, - durableDraftRowKey, + fitsDeviceStore, pageDraftRowBackend, resetDurableDraftRowsForTests, - type DurableDraftRow + workspaceDraftRowKey, + type DurableDraftRow, + type WorkspaceDraftScope } from './durable-draft-rows' /** Unsaved edits to a file or Markdown tab, with the hash of the host's version they were made against. */ @@ -26,29 +24,12 @@ type Slot = { } const slots = new Map() -/** The host and remote runtime a worktree lives on, so two hosts' same-named documents never share edits. */ -export type DocumentEditScope = { hostId: string; executionHost?: string; worktreeId: string } - -function scopedId(scope: DocumentEditScope, id: string): string { - return `${scope.hostId}:${scope.executionHost ?? ''}:${id}` +export function markdownTabDraftKey(scope: WorkspaceDraftScope, tabId: string): string { + return workspaceDraftRowKey('markdownTab', scope, tabId) } -export function markdownTabDraftKey(scope: DocumentEditScope, tabId: string): string { - return durableDraftRowKey('markdownTab', scope.worktreeId, scopedId(scope, tabId)) -} - -export function fileEditDraftKey(scope: DocumentEditScope, path: string): string { - return durableDraftRowKey('fileEdit', scope.worktreeId, scopedId(scope, path)) -} - -// A value past the store's cap would be refused and leave older edits behind, so it is not kept at all. -function fitsDeviceStore(draft: DocumentEditDraft): boolean { - const json = JSON.stringify(draft) - // At most 3 UTF-8 bytes per code unit, gzip barely grows any input, base64 adds a third: most documents skip the encode. - if (json.length * 4 + 1024 <= DEVICE_STORE_MAX_VALUE_LENGTH) { - return true - } - return encodeDeviceStoreValue(draft).length <= DEVICE_STORE_MAX_VALUE_LENGTH +export function fileEditDraftKey(scope: WorkspaceDraftScope, path: string): string { + return workspaceDraftRowKey('fileEdit', scope, path) } function slotFor(key: string): Slot { diff --git a/mobile/src/drafts/durable-draft-fields.test.tsx b/mobile/src/drafts/durable-draft-fields.test.tsx new file mode 100644 index 00000000000..9e3b4882f59 --- /dev/null +++ b/mobile/src/drafts/durable-draft-fields.test.tsx @@ -0,0 +1,155 @@ +import { createElement } from 'react' +import { act, create, type ReactTestRenderer } from 'react-test-renderer' +import { afterEach, expect, it, vi } from 'vitest' +import { + publishPageDeviceStore, + readPageDeviceStore +} from '../mobile-web-shell/bridge/page-device-store' +import { encodeDeviceStoreValue } from '../device-store/device-store-value-codec' +import { resetDurableDraftFieldsForTests, useDurableDraftField } from './durable-draft-fields' +import { publishInMemoryDeviceStore } from './in-memory-device-store.test-support' + +const KEY = 'draft:prEdit:wt:main' +let renderer: ReactTestRenderer | null = null +let field: ReturnType | null = null + +function Field() { + field = useDurableDraftField(KEY, 'body') + return null +} + +afterEach(() => { + act(() => renderer?.unmount()) + renderer = null + resetDurableDraftFieldsForTests() + publishPageDeviceStore(null) +}) + +it('keeps a field the user cleared while the saved copy was still being read', async () => { + // The shell holds an earlier draft, and its read answers only when released. + let release!: () => void + const held = new Promise((resolve) => { + release = resolve + }) + publishPageDeviceStore({ + available: () => true, + read: async () => { + await held + return { status: 'ok', values: [encodeDeviceStoreValue({ body: 'old saved text' })] } + }, + write: async () => ({ written: true }) + }) + await act(async () => { + renderer = create(createElement(Field)) + }) + + act(() => field![1]('')) + await act(async () => { + release() + await held + }) + + expect(field![0]).toBe('') +}) + +it('drops an older draft once the text grows past what the store can hold', async () => { + vi.useFakeTimers() + const table = new Map() + publishInMemoryDeviceStore(table) + const open = async () => { + await act(async () => { + renderer = create(createElement(Field)) + await vi.advanceTimersByTimeAsync(0) + }) + } + const kill = () => { + act(() => renderer?.unmount()) + renderer = null + resetDurableDraftFieldsForTests() + } + await open() + act(() => field![1]('a short description')) + await act(async () => { + await vi.advanceTimersByTimeAsync(1000) + }) + // Text that doesn't compress, well past the store's 512 KiB cap once encoded. + let seed = 7 + const huge = Array.from({ length: 900_000 }, () => { + seed ^= seed << 13 + seed ^= seed >>> 17 + seed ^= seed << 5 + return String.fromCharCode(33 + ((seed >>> 0) % 90)) + }).join('') + act(() => field![1](huge)) + await act(async () => { + await vi.advanceTimersByTimeAsync(1000) + }) + kill() + + await open() + expect(field![0]).toBe('') + vi.useRealTimers() +}) + +it('saves text typed while the store could not be read once the store answers again', async () => { + vi.useFakeTimers() + const table = new Map() + publishInMemoryDeviceStore(table) + const store = readPageDeviceStore()! + let readFails = true + publishPageDeviceStore({ + ...store, + read: async (name, keys) => (readFails ? { status: 'unavailable' } : store.read(name, keys)) + }) + await act(async () => { + renderer = create(createElement(Field)) + await vi.advanceTimersByTimeAsync(0) + }) + act(() => field![1]('typed while the store was down')) + readFails = false + await act(async () => { + await vi.advanceTimersByTimeAsync(15_000) + }) + act(() => renderer?.unmount()) + renderer = null + resetDurableDraftFieldsForTests() + + await act(async () => { + renderer = create(createElement(Field)) + await vi.advanceTimersByTimeAsync(0) + }) + expect(field![0]).toBe('typed while the store was down') + vi.useRealTimers() +}) + +it('does not bring back a saved draft the user cleared while the store could not be read', async () => { + vi.useFakeTimers() + const table = new Map([[KEY, encodeDeviceStoreValue({ body: 'already sent text' })]]) + publishInMemoryDeviceStore(table) + const store = readPageDeviceStore()! + let readFails = true + publishPageDeviceStore({ + ...store, + read: async (name, keys) => (readFails ? { status: 'unavailable' } : store.read(name, keys)) + }) + await act(async () => { + renderer = create(createElement(Field)) + await vi.advanceTimersByTimeAsync(0) + }) + // The send landed: its success handler clears a field that is already empty on this page. + act(() => field![1]('')) + readFails = false + await act(async () => { + await vi.advanceTimersByTimeAsync(15_000) + }) + act(() => renderer?.unmount()) + renderer = null + resetDurableDraftFieldsForTests() + + await act(async () => { + renderer = create(createElement(Field)) + await vi.advanceTimersByTimeAsync(0) + }) + expect(field![0]).toBe('') + vi.useRealTimers() +}) diff --git a/mobile/src/drafts/durable-draft-fields.ts b/mobile/src/drafts/durable-draft-fields.ts new file mode 100644 index 00000000000..70d550ab760 --- /dev/null +++ b/mobile/src/drafts/durable-draft-fields.ts @@ -0,0 +1,148 @@ +import { useCallback, useSyncExternalStore, type SetStateAction } from 'react' +import * as z from 'zod' +import { + durableDraftRow, + fitsDeviceStore, + pageDraftRowBackend, + resetDurableDraftRowsForTests, + type DurableDraftRow +} from './durable-draft-rows' + +// A row's typed text fields; an empty field is left out, and a row with none is removed. +type DraftFields = Readonly> + +const savedFieldsSchema = z.record(z.string(), z.string()) + +type Slot = { + fields: DraftFields + // Fields set on this page, cleared ones included; a read that lands later never overwrites them. + touched: Set + // The shortest JSON length found over the store's cap: longer text is not encoded again on every save. + overCap: number + listeners: Set<() => void> + row: DurableDraftRow +} + +// The page's copy of each row, so a form that closes and reopens shows its text without a read. +const slots = new Map() + +function notify(slot: Slot): void { + for (const listener of slot.listeners) { + listener() + } +} + +function slotFor(key: string): Slot { + const existing = slots.get(key) + if (existing) { + return existing + } + const slot: Slot = { + fields: {}, + touched: new Set(), + overCap: Infinity, + listeners: new Set(), + row: durableDraftRow(key, { + backend: () => pageDraftRowBackend(key), + // Text too big for the store stays in memory and removes the row, so an older, smaller draft can't come back. + snapshot: () => { + if (Object.keys(slot.fields).length === 0) { + return null + } + const length = JSON.stringify(slot.fields).length + if (length >= slot.overCap) { + return null + } + if (fitsDeviceStore(slot.fields)) { + return slot.fields + } + slot.overCap = length + return null + }, + restore: (saved) => { + const parsed = savedFieldsSchema.safeParse(saved) + if (!parsed.success) { + return + } + // Text typed or cleared before the read landed wins over the saved copy. + const restored = Object.entries(parsed.data).filter( + ([field, text]) => text && !slot.touched.has(field) + ) + if (restored.length === 0) { + return + } + slot.fields = { ...Object.fromEntries(restored), ...slot.fields } + notify(slot) + } + }) + } + slots.set(key, slot) + return slot +} + +/** Sets one field of a row, wherever it is shown; a send that settles after its form closed clears its own row. */ +export function updateDurableDraftField( + key: string, + field: string, + update: SetStateAction +): void { + const slot = slotFor(key) + const current = slot.fields[field] ?? '' + const next = typeof update === 'function' ? update(current) : update + // Even an unchanged value is the user's choice: a read still pending must not overwrite it. + slot.touched.add(field) + if (next === current) { + // A clear on a row the page couldn't read yet still removes what the store holds, so sent text can't come back. + if (!next && Object.keys(slot.fields).length === 0) { + slot.row.save('immediate') + } + return + } + const rest = Object.fromEntries(Object.entries(slot.fields).filter(([name]) => name !== field)) + slot.fields = next ? { ...rest, [field]: next } : rest + notify(slot) + // An emptied row is written at once, so sent text can't come back. + slot.row.save(Object.keys(slot.fields).length > 0 ? 'deferred' : 'immediate') +} + +/** + * One typed field kept in a draft row: it survives the form closing and the page being killed, and + * comes back only into a field still empty. A null key (nothing to type into) holds nothing. + */ +export function useDurableDraftField( + key: string | null, + field: string +): readonly [string, (update: SetStateAction) => void] { + const subscribe = useCallback( + (onChange: () => void) => { + if (!key) { + return () => {} + } + const slot = slotFor(key) + slot.listeners.add(onChange) + // Read once per page; a read the store dropped is retried by the next form that opens the row. + void slot.row.load() + return () => { + slot.listeners.delete(onChange) + } + }, + [key] + ) + const read = () => (key ? (slots.get(key)?.fields[field] ?? '') : '') + const value = useSyncExternalStore(subscribe, read, read) + // Bound to this key, so a send that settles after the user moved on clears the row it came from. + const setValue = useCallback( + (update: SetStateAction) => { + if (key) { + updateDurableDraftField(key, field, update) + } + }, + [field, key] + ) + return [value, setValue] as const +} + +export function resetDurableDraftFieldsForTests(): void { + slots.clear() + resetDurableDraftRowsForTests() +} diff --git a/mobile/src/drafts/durable-draft-rows.ts b/mobile/src/drafts/durable-draft-rows.ts index 4d0dbe5c2e6..0fed37a82ef 100644 --- a/mobile/src/drafts/durable-draft-rows.ts +++ b/mobile/src/drafts/durable-draft-rows.ts @@ -3,6 +3,7 @@ import { type PageDeviceStore } from '../mobile-web-shell/bridge/page-device-store' import { + DEVICE_STORE_MAX_VALUE_LENGTH, decodeDeviceStoreValue, encodeDeviceStoreValue } from '../device-store/device-store-value-codec' @@ -39,6 +40,8 @@ type Row = { // Every read and write of the row runs in order, the load first. chain: Promise state: 'pending' | 'loaded' + // After a failed read, no hook or save reads again until then; the text stays in memory meanwhile. + retryReadAt: number // What the backend holds; undefined after a failed write, so the next save cannot match it. written: string | undefined timer: ReturnType | null @@ -47,6 +50,19 @@ type Row = { const rows = new Map() +// One retry per row at most this often, however many hooks open it or saves land. +const READ_RETRY_MS = 10_000 + +/** A value past the store's cap is refused and would leave an older value behind, so owners keep none instead. */ +export function fitsDeviceStore(value: unknown): boolean { + const json = JSON.stringify(value) + // At most 3 UTF-8 bytes per code unit, gzip barely grows any input, base64 adds a third: most values skip the encode. + if (json.length * 4 + 1024 <= DEVICE_STORE_MAX_VALUE_LENGTH) { + return true + } + return encodeDeviceStoreValue(value).length <= DEVICE_STORE_MAX_VALUE_LENGTH +} + // The store refuses keys past 512 characters; a long worktree path or id is hashed instead. const MAX_KEY_LENGTH = 512 @@ -58,6 +74,11 @@ function fnv1a(text: string, seed: number): string { return hash.toString(16).padStart(8, '0') } +/** A 64-bit fingerprint of `text`, for keys and for telling whether text a draft was typed against changed. */ +export function draftTextHash(text: string): string { + return `${fnv1a(text, 0x811c9dc5)}${fnv1a(text, 0x01000193)}` +} + /** `draft:::`; the shell binds the host. */ export function durableDraftRowKey(namespace: string, worktreeId: string, id: string): string { const key = `draft:${namespace}:${worktreeId}:${id}` @@ -65,7 +86,22 @@ export function durableDraftRowKey(namespace: string, worktreeId: string, id: st return key } const rest = `${worktreeId}:${id}` - return `draft:${namespace}:#${fnv1a(rest, 0x811c9dc5)}${fnv1a(rest, 0x01000193)}` + return `draft:${namespace}:#${draftTextHash(rest)}` +} + +/** The host and remote runtime a worktree lives on, so two hosts' same-named worktrees never share a draft. */ +export type WorkspaceDraftScope = { hostId: string; executionHost?: string; worktreeId: string } + +export function workspaceDraftRowKey( + namespace: string, + scope: WorkspaceDraftScope, + id: string +): string { + return durableDraftRowKey( + namespace, + scope.worktreeId, + `${scope.hostId}:${scope.executionHost ?? ''}:${id}` + ) } export function deviceStoreDraftBackend( @@ -115,14 +151,15 @@ function enqueue(row: Row, step: () => Promise): Promise { return row.chain } -async function load(row: Row): Promise { - if (row.state !== 'pending') { +async function load(row: Row, ignoreRetryWait = false): Promise { + if (row.state !== 'pending' || (!ignoreRetryWait && Date.now() < row.retryReadAt)) { return } row.backend ??= row.owner.backend() const read = await row.backend.read() if (!read.ok) { - // A dropped or refused read is retried, backend re-picked, at the next save; until then the text stays in memory. + // A dropped or refused read is retried later, backend re-picked; until then the text stays in memory. + row.retryReadAt = Date.now() + READ_RETRY_MS row.backend = null return } @@ -133,9 +170,11 @@ async function load(row: Row): Promise { } } -async function write(row: Row): Promise { - await load(row) +async function write(row: Row, hiding: boolean): Promise { + await load(row, hiding) if (row.state !== 'loaded' || !row.backend) { + // Still unread: save again once a read may be retried, so the text doesn't stay only in memory. + row.timer ??= setTimeout(() => flush(row), Math.max(0, row.retryReadAt - Date.now())) return } const value = row.owner.snapshot() ?? null @@ -149,12 +188,12 @@ async function write(row: Row): Promise { } } -function flush(row: Row): void { +function flush(row: Row, hiding = false): void { if (row.timer !== null) { clearTimeout(row.timer) row.timer = null } - void enqueue(row, () => write(row)) + void enqueue(row, () => write(row, hiding)) } // The app going to the background may be the last chance before it is killed, so pending typing saves then. @@ -164,7 +203,8 @@ function flushPendingOnHide(): void { } for (const row of rows.values()) { if (row.timer !== null) { - flush(row) + // Possibly the last chance before a kill, so a read waiting to be retried is tried now. + flush(row, true) } } } @@ -186,6 +226,7 @@ export function durableDraftRow(key: string, owner: DurableDraftRowOwner): Durab backend: null, chain: Promise.resolve(), state: 'pending', + retryReadAt: 0, written: undefined, timer: null, handle: { diff --git a/mobile/src/drafts/in-memory-device-store.test-support.ts b/mobile/src/drafts/in-memory-device-store.test-support.ts new file mode 100644 index 00000000000..eab27b59619 --- /dev/null +++ b/mobile/src/drafts/in-memory-device-store.test-support.ts @@ -0,0 +1,27 @@ +import { DEVICE_STORE_MAX_VALUE_LENGTH } from '../device-store/device-store-value-codec' +import { publishPageDeviceStore } from '../mobile-web-shell/bridge/page-device-store' + +/** Grants the page a device store backed by `table`, which outlives the page and keeps the shell's value cap. */ +export function publishInMemoryDeviceStore(table: Map): void { + publishPageDeviceStore({ + available: () => true, + read: async (_table, keys) => ({ + status: 'ok', + values: keys.map((key) => table.get(key) ?? null) + }), + write: async (_table, ops) => { + // Like the shell, a value over the cap refuses the whole call. + if (ops.some((op) => (op.value?.length ?? 0) > DEVICE_STORE_MAX_VALUE_LENGTH)) { + return { written: false, refusal: 'too-large' } + } + for (const op of ops) { + if (op.value === null) { + table.delete(op.key) + } else { + table.set(op.key, op.value) + } + } + return { written: true } + } + }) +} diff --git a/mobile/src/drafts/use-document-edit-draft.test.tsx b/mobile/src/drafts/use-document-edit-draft.test.tsx index 166243c1603..a941c117bd4 100644 --- a/mobile/src/drafts/use-document-edit-draft.test.tsx +++ b/mobile/src/drafts/use-document-edit-draft.test.tsx @@ -2,6 +2,7 @@ import { createElement } from 'react' import { act, create, type ReactTestRenderer } from 'react-test-renderer' import { afterEach, beforeEach, expect, it, vi } from 'vitest' import { publishPageDeviceStore } from '../mobile-web-shell/bridge/page-device-store' +import { publishInMemoryDeviceStore } from './in-memory-device-store.test-support' import { dropDocumentEditDraft, resetDocumentEditDraftsForTests } from './document-edit-draft-rows' import { useDocumentEditDraft } from './use-document-edit-draft' @@ -42,23 +43,7 @@ function kill(): void { beforeEach(() => { vi.useFakeTimers() - publishPageDeviceStore({ - available: () => true, - read: async (_table, keys) => ({ - status: 'ok', - values: keys.map((key) => table.get(key) ?? null) - }), - write: async (_table, ops) => { - for (const op of ops) { - if (op.value === null) { - table.delete(op.key) - } else { - table.set(op.key, op.value) - } - } - return { written: true } - } - }) + publishInMemoryDeviceStore(table) }) afterEach(() => { diff --git a/mobile/src/files/mobile-artifact-kind.test.ts b/mobile/src/files/mobile-artifact-kind.test.ts deleted file mode 100644 index a72bd8f1cba..00000000000 --- a/mobile/src/files/mobile-artifact-kind.test.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { classifyMobileArtifact } from './mobile-artifact-kind' - -describe('classifyMobileArtifact', () => { - it('classifies raster image extensions (case-insensitive)', () => { - for (const p of ['a.png', 'b.JPG', 'c/d.jpeg', 'e.gif', 'f.webp', 'g.bmp', 'h.ico']) { - expect(classifyMobileArtifact(p)).toBe('image') - } - }) - - it('keeps svg off the raster image path', () => { - expect(classifyMobileArtifact('logo.SVG')).toBe('vector') - }) - - it('classifies html extensions', () => { - expect(classifyMobileArtifact('index.html')).toBe('html') - expect(classifyMobileArtifact('a/b/page.HTM')).toBe('html') - }) - - it('treats code/text/unknown as other', () => { - for (const p of ['main.ts', 'README.md', 'data.csv', 'notes', 'a.pdf', 'x.json']) { - expect(classifyMobileArtifact(p)).toBe('other') - } - }) - - it('treats a dotfile or no-extension path as other', () => { - expect(classifyMobileArtifact('.gitignore')).toBe('other') - expect(classifyMobileArtifact('Makefile')).toBe('other') - expect(classifyMobileArtifact('dir/.env')).toBe('other') - }) -}) diff --git a/mobile/src/files/session-documents/MobileSessionFileReader.tsx b/mobile/src/files/session-documents/MobileSessionFileReader.tsx index 850c52c99a4..d87903a4fe1 100644 --- a/mobile/src/files/session-documents/MobileSessionFileReader.tsx +++ b/mobile/src/files/session-documents/MobileSessionFileReader.tsx @@ -35,6 +35,7 @@ import type { FileDocState, FileSyntaxState } from './session-document-state' import { DiffLineRow } from '../../source-control/review/MobileSessionDiffLineRow' import { sendableMobileDiffComments } from '../../source-control/review/mobile-diff-comments' import { MobileLoadErrorState, MobileStateView } from '../../components/MobileStateView' +import { useDurableDraftField } from '../../drafts/durable-draft-fields' type FileReaderProps = { doc: FileDocState | undefined @@ -44,6 +45,8 @@ type FileReaderProps = { documentId?: string language?: string diffCommentActions?: DiffCommentActions + // Where an unsaved note waits through leaving the file and the app being killed. + noteDraftKey?: string } export function FileReader(props: FileReaderProps) { @@ -58,7 +61,8 @@ function FileReaderDocument({ title, relativePath, language, - diffCommentActions + diffCommentActions, + noteDraftKey }: FileReaderProps) { useMobileColorScheme() const t = useMobileTranslation() @@ -69,7 +73,11 @@ function FileReaderDocument({ const [fileSyntax, setFileSyntax] = useState(null) const [diffSyntax, setDiffSyntax] = useState(null) const [activeCommentLine, setActiveCommentLine] = useState(null) - const [commentDraft, setCommentDraft] = useState('') + const [keptNote, setKeptNote] = useDurableDraftField(noteDraftKey ?? null, 'note') + const [localNote, setLocalNote] = useState('') + const [commentDraft, setCommentDraft] = noteDraftKey + ? [keptNote, setKeptNote] + : [localNote, setLocalNote] const plainDiffLines = useMemo( () => doc?.status === 'ready' && doc.kind === 'diff' @@ -105,10 +113,12 @@ function FileReaderDocument({ if (!diffCommentActions) { return } - void diffCommentActions.onAdd(relativePath, lineNumber, commentDraft).then((added) => { + const note = commentDraft + void diffCommentActions.onAdd(relativePath, lineNumber, note).then((added) => { if (added) { setActiveCommentLine(null) - setCommentDraft('') + // Only the saved text; a note typed since in a reopened reader stays. + setCommentDraft((current) => (current === note ? '' : current)) } }) }, diff --git a/mobile/src/home/MobileHomeScreen.tsx b/mobile/src/home/MobileHomeScreen.tsx index 11c0274f3a1..b54010f1322 100644 --- a/mobile/src/home/MobileHomeScreen.tsx +++ b/mobile/src/home/MobileHomeScreen.tsx @@ -1,5 +1,6 @@ import { useFocusEffect } from 'expo-router' import { useCallback, useState } from 'react' +import { useQueryClient } from '@tanstack/react-query' import { Alert, BackHandler, View } from 'react-native' import { GestureHandlerRootView } from 'react-native-gesture-handler' import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context' @@ -54,6 +55,7 @@ export function MobileHomeScreen() { const openMobileAccounts = useOpenMobileAccounts() const disconnectHostClient = useDisconnectHostClient() const forgetHostClient = useForgetHostClient() + const queryClient = useQueryClient() const forceReconnectHost = useForceReconnect() const [actionTarget, setActionTarget] = useState(null) const [confirmRemove, setConfirmRemove] = useState<{ id: string; name: string } | null>(null) @@ -128,7 +130,7 @@ export function MobileHomeScreen() { } const host = confirmRemove try { - await removeHostAndCloseClient(host.id, forgetHostClient) + await removeHostAndCloseClient(host.id, forgetHostClient, queryClient) setConfirmRemove(null) data.setHostCatalog(await loadHostCatalog()) } catch { diff --git a/mobile/src/home/MobileHomeTasksSection.tsx b/mobile/src/home/MobileHomeTasksSection.tsx index 36a0a535339..8df195fc8b7 100644 --- a/mobile/src/home/MobileHomeTasksSection.tsx +++ b/mobile/src/home/MobileHomeTasksSection.tsx @@ -1,3 +1,4 @@ +import { memo } from 'react' import { ChevronRight, ListTodo, type LucideIcon } from 'lucide-react-native' import { Pressable, Text, View } from 'react-native' import { useMobileTranslation } from '../i18n/use-mobile-translation' @@ -13,8 +14,16 @@ type HomeHostSectionProps = { onOpen: (hostId: string) => void } +// Home rebuilds its connected list on every connection tick; the same desktops draw the same section. +const sameSection = (previous: HomeHostSectionProps, next: HomeHostSectionProps): boolean => + previous.onOpen === next.onOpen && + previous.connectedHosts.length === next.connectedHosts.length && + previous.connectedHosts.every((host, at) => host === next.connectedHosts[at]) + /** Home's Tasks section, opening on a connected desktop. */ -export function MobileHomeTasksSection(props: HomeHostSectionProps) { +export const MobileHomeTasksSection = memo(function MobileHomeTasksSection( + props: HomeHostSectionProps +) { const t = useMobileTranslation() return ( ) -} +}, sameSection) function HomeSection( props: HomeHostSectionProps & { diff --git a/mobile/src/home/home-query-restore.ts b/mobile/src/home/home-query-restore.ts new file mode 100644 index 00000000000..67f3cda09b4 --- /dev/null +++ b/mobile/src/home/home-query-restore.ts @@ -0,0 +1,124 @@ +import AsyncStorage from '@react-native-async-storage/async-storage' +import type { QueryClient } from '@tanstack/react-query' +import * as z from 'zod' +import { + HOST_LIST_TARGET, + homeWorktreeCountsKey, + NO_HOST_LIST_INPUT +} from '../host-screen/host-list-queries' +import { hostObserverOptions } from '../query/host-query' +import { accountsSnapshotFamily, accountsSnapshotKey } from '../accounts/accounts-snapshot-stream' +import { persistedHostQueryKey } from '../query/host-query-persistence' +import { keepNativeHostQueries, nativeQueryStoreReady } from '../query/native-query-persistence' +import { homeStatsKey, homeStatsQuery } from '../stats/home-stats-summary-read' +import { + homeWorktreeCountsQuery, + type HomeWorktreeCounts +} from '../worktree/home-host-worktree-fetch' + +// Where Home kept its counts before the device store: read once to seed the store, then removed. +const LEGACY_SNAPSHOT_KEY = 'orca:home-snapshot:v1' + +const legacySnapshotSchema = z.object({ + savedAt: z.number(), + worktreeInfo: z.record( + z.string(), + z.looseObject({ + totalWorktrees: z.number().int().nonnegative(), + activeCount: z.number().int().nonnegative(), + catalogUnavailable: z.boolean().optional(), + staleCounts: z.boolean().optional(), + countsProvenAt: z.number().optional() + }) + ) +}) + +type LegacySnapshot = z.infer + +// Null when there is no old key; an unreadable one seeds nothing and is removed all the same. +async function readLegacySnapshot(): Promise { + const raw = await AsyncStorage.getItem(LEGACY_SNAPSHOT_KEY).catch(() => null) + if (raw === null) { + return null + } + try { + const parsed = legacySnapshotSchema.safeParse(JSON.parse(raw)) + if (parsed.success) { + return parsed.data + } + } catch { + // Falls through to the empty seed. + } + return { savedAt: 0, worktreeInfo: {} } +} + +// Counts nothing stored yet answers; the old key goes once the store holds them. Without a store that can +// write (web, a key that won't load), the key waits for a later launch. +function seedFromLegacySnapshot( + queryClient: QueryClient, + snapshot: LegacySnapshot, + hostIds: readonly string[] +): void { + for (const hostId of hostIds) { + const info = snapshot.worktreeInfo[hostId] + const key = homeWorktreeCountsKey(hostId) + // Counts the old cache never proved are no seed. + if (!info || (info.catalogUnavailable && !info.staleCounts) || queryClient.getQueryData(key)) { + continue + } + const counts: HomeWorktreeCounts = { + totalWorktrees: info.totalWorktrees, + activeCount: info.activeCount, + agents: [] + } + // Built with the family's rules first: setQueryData alone makes a query the store never writes. + queryClient + .getQueryCache() + .build( + queryClient, + hostObserverOptions( + homeWorktreeCountsQuery, + null, + hostId, + HOST_LIST_TARGET, + NO_HOST_LIST_INPUT + ) + ) + queryClient.setQueryData(key, counts, { updatedAt: info.countsProvenAt ?? snapshot.savedAt }) + } + // Off the first paint's path: the seeded counts already show. + void Promise.all( + hostIds.map( + (hostId) => keepNativeHostQueries(queryClient, hostId)?.flush() ?? Promise.resolve() + ) + ).then(() => AsyncStorage.removeItem(LEGACY_SNAPSHOT_KEY).catch(() => undefined)) +} + +/** Restores the paired desktops' stored Home rows; resolves once each is applied or missed. */ +export async function restoreHomeQueries( + queryClient: QueryClient, + hostIds: readonly string[] +): Promise { + // Claimed synchronously, so observers mounting in the same commit join this one batched read. + const restored = Promise.all( + hostIds.map( + (hostId) => + keepNativeHostQueries(queryClient, hostId)?.restore( + [ + persistedHostQueryKey(homeStatsQuery, homeStatsKey(hostId)), + persistedHostQueryKey(homeWorktreeCountsQuery, homeWorktreeCountsKey(hostId)), + // Stored for the Accounts page; read here so Home's own observer doesn't read it alone. + persistedHostQueryKey(accountsSnapshotFamily, accountsSnapshotKey(hostId)) + ].filter((key) => key !== null) + ) ?? Promise.resolve() + ) + ) + const [storeReady, legacy] = await Promise.all([ + nativeQueryStoreReady(), + readLegacySnapshot(), + restored + ]) + if (storeReady && legacy) { + seedFromLegacySnapshot(queryClient, legacy, hostIds) + } +} diff --git a/mobile/src/home/tabs/home-usage-cards.test.ts b/mobile/src/home/tabs/home-usage-cards.test.ts index 085d4bfd6fb..b8757f26084 100644 --- a/mobile/src/home/tabs/home-usage-cards.test.ts +++ b/mobile/src/home/tabs/home-usage-cards.test.ts @@ -3,7 +3,7 @@ import type { AccountProviderRateLimits, AccountsSnapshot } from '../../components/account-usage-state' -import { selectHomeUsageCards, selectHomeUsageSections } from './home-usage-cards' +import { selectHomeUsageCards } from './home-usage-cards' function limits( provider: 'claude' | 'codex', @@ -75,23 +75,6 @@ describe('selectHomeUsageCards', () => { ]) }) - it('shows System default first while no managed account is active, metered only once it has quota', () => { - const withoutQuota = selectHomeUsageCards( - snapshot({ codex: { accounts: [{ id: 'x', email: 'x@example.com', updatedAt: 1 }] } }), - 'codex' - ) - expect(withoutQuota.map((card) => [card.accountId, card.active, card.metered])).toEqual([ - [null, true, false], - ['x', false, true] - ]) - - const withQuota = selectHomeUsageCards( - snapshot({ rateLimits: { codex: limits('codex', 40) } }), - 'codex' - ) - expect(withQuota.map((card) => [card.accountId, card.metered])).toEqual([[null, true]]) - }) - it('reads the Codex active account for the rate-limit runtime target', () => { const cards = selectHomeUsageCards( snapshot({ @@ -113,17 +96,3 @@ describe('selectHomeUsageCards', () => { ]) }) }) - -describe('selectHomeUsageSections', () => { - it('skips providers with nothing to show and drops an unfetched updatedAt', () => { - const sections = selectHomeUsageSections( - snapshot({ - codex: { accounts: [{ id: 'x', email: 'x@example.com', updatedAt: 1 }] }, - rateLimits: { codex: limits('codex', 5, { updatedAt: 0, status: 'idle' }) } - }) - ) - expect(sections.map((section) => [section.provider, section.updatedAt])).toEqual([ - ['codex', null] - ]) - }) -}) diff --git a/mobile/src/home/use-home-spare-page.ts b/mobile/src/home/use-home-spare-page.ts index 58aa55953c6..14a883477e1 100644 --- a/mobile/src/home/use-home-spare-page.ts +++ b/mobile/src/home/use-home-spare-page.ts @@ -4,6 +4,7 @@ import { AppState } from 'react-native' import { setForegroundTimer } from '../mobile-web-shell/foreground-timer' import { enterHomeSparePage, + homeSpareRefillWaitMs, leaveHomeSparePage, prepareHomeSparePage } from '../mobile-web-shell/home-spare-page' @@ -29,7 +30,7 @@ export function useHomeSparePage(hostIds: readonly string[]): void { cancelTimer() cancelTimer = setForegroundTimer( () => void prepareHomeSparePage(processGenerationStore(), hosts.split(HOST_ID_SEPARATOR)), - HOME_SPARE_IDLE_MS + Math.max(HOME_SPARE_IDLE_MS, Math.ceil(homeSpareRefillWaitMs())) ) } arm() diff --git a/mobile/src/home/use-mobile-home-data.ts b/mobile/src/home/use-mobile-home-data.ts index d6e802a28b0..d61d920d04f 100644 --- a/mobile/src/home/use-mobile-home-data.ts +++ b/mobile/src/home/use-mobile-home-data.ts @@ -1,5 +1,12 @@ import { useRouter, useFocusEffect } from 'expo-router' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { + notifyManager, + replaceEqualDeep, + useQueries, + useQueryClient, + type QueryObserverResult +} from '@tanstack/react-query' import { warmUpWebShell } from '../../modules/orca-mobile-web-shell/src' import { countAgentsNeedingYouByHost, @@ -7,9 +14,13 @@ import { type AgentListInput } from '../agents/agent-list-rows' import { useAgentActivityWrites } from '../agents/use-agent-activity-writes' -import { loadHomeSnapshot, saveHomeSnapshot } from '../cache/home-snapshot-cache' +import { accountsSnapshotOptions } from '../accounts/accounts-snapshot-stream' import type { AccountsSnapshot } from '../components/AccountUsage' -import { setCachedWorktrees } from '../cache/worktree-cache' +import { + HOST_LIST_TARGET, + homeWorktreeCountsKey, + NO_HOST_LIST_INPUT +} from '../host-screen/host-list-queries' import { useNow } from '../hooks/use-now' import { loadMobileOnboardingSteps, @@ -21,76 +32,146 @@ import { } from '../transport/hosts/host-catalog-selection' import { loadHostCatalog } from '../transport/hosts/host-store' import type { HostCatalogEntry } from '../transport/hosts/host-profile' -import { fetchHomeHostWorktreeInfo } from '../worktree/home-host-worktree-fetch' -import { withoutHomeAgentStates, type HostWorktreeInfo } from '../worktree/home-worktree-info' -import { fetchHomeHostStats } from '../stats/home-stats-summary-read' +import { hostObserverOptions, type HostQuery } from '../query/host-query' +import { isHostNotConnectedError } from '../query/host-query-errors' +import type { RpcClient } from '../transport/rpc/rpc-client-contract' +import { + homeWorktreeCountsQuery, + type HomeWorktreeCounts +} from '../worktree/home-host-worktree-fetch' +import { homeWorktreeInfo, type HostWorktreeInfo } from '../worktree/home-worktree-info' +import { homeStatsQuery } from '../stats/home-stats-summary-read' import { totalHomeStats, type HomeStatsRow } from '../stats/home-stats-total' import { projectHomeHostConnections } from './home-host-connection-projection' +import { restoreHomeQueries } from './home-query-restore' import { useMobileHomeHostConnections } from './use-mobile-home-host-connections' export type MobileHomeData = ReturnType +// A paired desktop with its client, or none while Home holds no connection to it (disconnected, never opened). +type HomeHost = { hostId: string; client: RpcClient | null } + +// Home reads one of each per paired desktop. Reads stay on while a desktop connects: the connected edge +// re-reads them the moment it lands, with no render in between, and a read tried before it is refused at once. +const homeQueryOptions = ( + query: HostQuery, + host: HomeHost +) => hostObserverOptions(query, host.client, host.hostId, HOST_LIST_TARGET, NO_HOST_LIST_INPUT) + +const readOf = (result: QueryObserverResult) => ({ + data: result.data, + dataUpdatedAt: result.dataUpdatedAt, + // A read refused because the desktop isn't connected yet says nothing about its list. + failed: result.isError && !isHostNotConnectedError(result.error) +}) + export function useMobileHomeData() { const router = useRouter() + const queryClient = useQueryClient() const [hostCatalog, setHostCatalog] = useState([]) // Until the catalog read lands, an empty list says nothing; a paired user must not see first-run. const [hostCatalogLoaded, setHostCatalogLoaded] = useState(false) - const [worktreeInfo, setWorktreeInfo] = useState>({}) - const [statsByHost, setStatsByHost] = useState>({}) - const [accountsByHost, setAccountsByHost] = useState>({}) - const hostSetters = useMemo( - () => ({ setWorktreeInfo, setStats: setStatsByHost, setAccounts: setAccountsByHost }), - [] - ) const onboardingCheckedRef = useRef(false) - const hydratedRef = useRef(false) - const focusedRef = useRef(false) - const isHomeFocused = useCallback(() => focusedRef.current, []) - // Drives the agent clock; Home stays mounted under other screens. + // Drives the agent clock and Home's reads; Home stays mounted under other screens. const [homeFocused, setHomeFocused] = useState(false) const hosts = useMemo(() => selectConnectableHostProfiles(hostCatalog), [hostCatalog]) - const connections = useMobileHomeHostConnections(hosts, hostCatalog, hostSetters, isHomeFocused) - const allClientsRef = useRef(connections.allClients) + const connections = useMobileHomeHostConnections(hosts, hostCatalog) + const { allClients, hostLastConnected, hostStates } = connections + const allClientsRef = useRef(allClients) + // Every paired desktop keeps its last counts and totals on Home, connected or not. + const homeHosts = useMemo((): HomeHost[] => { + const clients = new Map(allClients.map((entry) => [entry.hostId, entry.client])) + return hosts.map((host) => ({ hostId: host.id, client: clients.get(host.id) ?? null })) + }, [hosts, allClients]) + // A read from before the desktop's latest connect, or from an earlier launch, can't vouch for agents or usage. + const isLive = useCallback( + (hostId: string, readAt: number): boolean => { + const connectedAt = hostLastConnected[hostId] + return connectedAt != null && readAt >= connectedAt + }, + [hostLastConnected] + ) + // Once the first desktop list is up: counts show only after a desktop connects, so the rows never wait + // for the store, and its keychain read doesn't compete with the list's. Before the queries below, whose + // observers then join this batched read instead of each reading its own row. + const storeRestoredRef = useRef(false) useEffect(() => { - if (hydratedRef.current) { + if (storeRestoredRef.current || hostCatalog.length === 0) { return } - hydratedRef.current = true - let cancelled = false - void loadHomeSnapshot().then((snapshot) => { - if (cancelled || !snapshot) { - return - } - setWorktreeInfo((previous) => - Object.keys(previous).length > 0 - ? previous - : Object.fromEntries( - Object.entries(snapshot.worktreeInfo).map(([hostId, info]) => [ - hostId, - withoutHomeAgentStates(info) - ]) - ) - ) - for (const [hostId, info] of Object.entries(snapshot.worktreeInfo)) { - if (info.lastActiveWorktree) { - setCachedWorktrees(hostId, [info.lastActiveWorktree]) - } - } - }) - return () => { - cancelled = true - } - }, []) + storeRestoredRef.current = true + void restoreHomeQueries( + queryClient, + hostCatalog.map((host) => host.id) + ) + }, [hostCatalog, queryClient]) - useEffect(() => { - if (Object.keys(worktreeInfo).length > 0) { - const saved = Object.fromEntries( - Object.entries(worktreeInfo).map(([hostId, info]) => [hostId, withoutHomeAgentStates(info)]) - ) - saveHomeSnapshot({ worktreeInfo: saved, savedAt: Date.now() }) - } - }, [worktreeInfo]) + const countsQueries = useMemo( + () => homeHosts.map((host) => homeQueryOptions(homeWorktreeCountsQuery, host)), + [homeHosts] + ) + const combineCounts = useCallback( + (results: QueryObserverResult[]): Record => { + const byHost: Record = {} + homeHosts.forEach(({ hostId }, at) => { + const result = results[at] + const info = result && homeWorktreeInfo(hostId, readOf(result), isLive) + if (info) { + byHost[hostId] = info + } + }) + return byHost + }, + [homeHosts, isLive] + ) + // A hidden Home reads nothing; coming back reads what went stale meanwhile. + const worktreeInfo = useQueries({ + queries: countsQueries, + combine: combineCounts, + subscribed: homeFocused + }) + const statsQueries = useMemo( + () => homeHosts.map((host) => homeQueryOptions(homeStatsQuery, host)), + [homeHosts] + ) + const combineStats = useCallback( + (results: QueryObserverResult[]): Record => + Object.fromEntries(homeHosts.map(({ hostId }, at) => [hostId, results[at]?.data])), + [homeHosts] + ) + const statsByHost = useQueries({ + queries: statsQueries, + combine: combineStats, + subscribed: homeFocused + }) + const accountsQueries = useMemo( + () => homeHosts.map(({ hostId }) => accountsSnapshotOptions(hostId)), + [homeHosts] + ) + // Usage is live: only a snapshot from this connection shows, never a stored or disconnected one. + const combineAccounts = useCallback( + (results: QueryObserverResult[]): Record => { + const byHost: Record = {} + homeHosts.forEach(({ hostId }, at) => { + const result = results[at] + if ( + result?.data && + hostStates[hostId] === 'connected' && + isLive(hostId, result.dataUpdatedAt) + ) { + byHost[hostId] = result.data + } + }) + return byHost + }, + [homeHosts, hostStates, isLive] + ) + const accountsByHost = useQueries({ + queries: accountsQueries, + combine: combineAccounts, + subscribed: homeFocused + }) const hasPairedHost = hosts.length > 0 useEffect(() => { @@ -100,13 +181,12 @@ export function useMobileHomeData() { }, [hasPairedHost]) useEffect(() => { - allClientsRef.current = connections.allClients - }, [connections.allClients]) + allClientsRef.current = allClients + }, [allClients]) useFocusEffect( useCallback(() => { let stale = false - focusedRef.current = true setHomeFocused(true) void loadHostCatalog() // A failed read proves nothing about the desktops; keep the ones already shown. @@ -119,7 +199,8 @@ export function useMobileHomeData() { if (!catalog) { return } - setHostCatalog(catalog) + // An unchanged list keeps its identity, so focusing Home again redraws nothing. + setHostCatalog((previous) => replaceEqualDeep(previous, catalog)) if (catalog.length === 0 || onboardingCheckedRef.current) { return } @@ -129,15 +210,8 @@ export function useMobileHomeData() { router.replace(mobileOnboardingDestination(steps)) } }) - for (const entry of allClientsRef.current) { - if (entry.client.getState() === 'connected') { - void fetchHomeHostWorktreeInfo(entry.client, entry.hostId, setWorktreeInfo, () => stale) - fetchHomeHostStats(entry.client, entry.hostId, setStatsByHost, () => stale) - } - } return () => { stale = true - focusedRef.current = false setHomeFocused(false) } }, [router]) @@ -147,23 +221,36 @@ export function useMobileHomeData() { const sortedHostCatalog = useMemo(() => sortHostsByLastConnected(hostCatalog), [hostCatalog]) // One clock for every agent count, so Feed, the Agents badge and each desktop agree. const now = useNow(30_000, homeFocused) - const refetchHostAgents = useCallback((hostId: string) => { - const entry = allClientsRef.current.find((candidate) => candidate.hostId === hostId) - return entry?.client.getState() === 'connected' - ? fetchHomeHostWorktreeInfo(entry.client, hostId, setWorktreeInfo, () => false) - : Promise.resolve() - }, []) - const agentActivity = useAgentActivityWrites(connections.allClients, refetchHostAgents) + // A fresh read, not one already out: that one may predate the write it must carry. The cached rows stay + // its delta base, so the desktop answers with only what changed. + const refetchHostAgents = useCallback( + async (hostId: string): Promise => { + const entry = allClientsRef.current.find((candidate) => candidate.hostId === hostId) + if (entry?.client.getState() !== 'connected') { + return + } + await queryClient + .refetchQueries( + { queryKey: homeWorktreeCountsKey(hostId), exact: true }, + { cancelRefetch: true, throwOnError: false } + ) + .catch(() => undefined) + // Resolves once observers hold the answer, so the write's guess isn't dropped a frame early. + await new Promise((resolve) => notifyManager.schedule(resolve)) + }, + [queryClient] + ) + const agentActivity = useAgentActivityWrites(allClients, refetchHostAgents) const { pendingActivity } = agentActivity const agentList = useMemo( () => ({ hosts: sortedHosts, - hostStates: connections.hostStates, + hostStates, worktreeInfo, now, pendingActivity }), - [sortedHosts, connections.hostStates, worktreeInfo, now, pendingActivity] + [sortedHosts, hostStates, worktreeInfo, now, pendingActivity] ) const agentsNeedingYou = useMemo(() => selectAgentsNeedingYou(agentList), [agentList]) const needsYouByHost = useMemo( @@ -171,20 +258,17 @@ export function useMobileHomeData() { [agentsNeedingYou] ) const connectedHosts = useMemo( - () => sortedHosts.filter((host) => connections.hostStates[host.id] === 'connected'), - [sortedHosts, connections.hostStates] + () => sortedHosts.filter((host) => hostStates[host.id] === 'connected'), + [sortedHosts, hostStates] ) // Before a desktop's first connect settles, "not connected" is not yet true. const hostsConnecting = hosts.some((host) => { - const state = connections.hostStates[host.id] + const state = hostStates[host.id] return state === undefined || state === 'connecting' || state === 'handshaking' }) const hostIds = useMemo(() => hosts.map((host) => host.id), [hosts]) const stats = useMemo(() => totalHomeStats(statsByHost, hostIds), [statsByHost, hostIds]) - const hostConnections = useMemo( - () => projectHomeHostConnections(connections.allClients), - [connections.allClients] - ) + const hostConnections = useMemo(() => projectHomeHostConnections(allClients), [allClients]) return { ...connections, diff --git a/mobile/src/home/use-mobile-home-host-connections.ts b/mobile/src/home/use-mobile-home-host-connections.ts index e10689a2c98..11b26c25c46 100644 --- a/mobile/src/home/use-mobile-home-host-connections.ts +++ b/mobile/src/home/use-mobile-home-host-connections.ts @@ -1,147 +1,70 @@ import { useEffect, useMemo, useRef, useState } from 'react' -import { subscribeAccountsSnapshots } from '../accounts/accounts-snapshot-stream' -import type { AccountsSnapshot } from '../components/AccountUsage' +import { useQueryClient, type QueryClient } from '@tanstack/react-query' +import { + accountsSnapshotKey, + subscribeAccountsSnapshots +} from '../accounts/accounts-snapshot-stream' import { subscribeToDesktopNotifications } from '../notifications/mobile-notifications' +import { retainHostConnectionInvalidation } from '../query/host-connection-invalidation' +import { retainHostEventRouter } from '../query/host-event-router' +import { keepNativeHostQueries } from '../query/native-query-persistence' import { usePrimeHosts } from '../transport/connection/host-client-hooks' -import { createHostConnectRefetchGate } from '../transport/hosts/host-connect-refetch-gate' import { selectHomeAutoConnectHostIds } from '../transport/hosts/home-host-auto-connect' import type { RpcClient } from '../transport/rpc/rpc-client-contract' -import { subscribeSharedClientEvents } from '../transport/connection/shared-client-events' import type { ConnectionState } from '../transport/connection/connection-state' import type { HostCatalogEntry, HostProfile } from '../transport/hosts/host-profile' import { useAllHostClients } from '../transport/connection/use-all-host-clients' -import { - fetchHomeHostWorktreeInfo, - type HostWorktreeInfoSetter -} from '../worktree/home-host-worktree-fetch' -import { withLastSeenHomeAgents } from '../worktree/home-worktree-info' -import { fetchHomeHostStats, type HomeStatsSetter } from '../stats/home-stats-summary-read' import { readMobileHomeLastConnected, readMobileHomeReconnectAttempts, reconcileMobileHomeHostStates } from './mobile-home-connection-state' -// Same pace as the workspace list's poll; agent status notices can arrive many times a second. -const HOME_WORKTREE_REFRESH_MIN_INTERVAL_MS = 3000 -const WORKTREE_CHANGE_EVENTS: ReadonlySet = new Set([ - 'sidebarInputsChanged', - 'worktreesChanged', - 'reposChanged', - // The desktop Agents list changed; worktree.ps carries its verdicts. - 'agentListChanged', - // Agent status changes on hosts without the sidebar feed (worktree.rows-changed-event.v1). - 'worktreeRowsChanged' -]) - -export type HomeAccountsSetter = ( - updater: (previous: Record) => Record -) => void - -export type MobileHomeHostSetters = { - setWorktreeInfo: HostWorktreeInfoSetter - setStats: HomeStatsSetter - setAccounts: HomeAccountsSetter -} - +// Home's per-desktop reads (counts, stats) are queries; this wires what a connection carries besides them. function wireMobileHomeHostSubscriptions( - entry: { hostId: string; client: RpcClient; state: ConnectionState }, - setters: MobileHomeHostSetters, - isHomeFocused: () => boolean + entry: { hostId: string; client: RpcClient }, + queryClient: QueryClient ): () => void { - const { setWorktreeInfo, setStats, setAccounts } = setters + const { hostId, client } = entry + keepNativeHostQueries(queryClient, hostId) + // Reads Home's queries again on each reconnect, and on the desktop's change notices. + const stopInvalidation = retainHostConnectionInvalidation(queryClient, hostId, client) + const router = retainHostEventRouter(queryClient, hostId, client) let unsubscribeNotifications: (() => void) | null = null - let unsubscribeClientEvents: (() => void) | null = null let unsubscribeAccounts: (() => void) | null = null - let lastRefreshAt = 0 - let trailingRefresh: ReturnType | null = null - const refetchGate = createHostConnectRefetchGate() - const refreshWorktrees = (): void => { - lastRefreshAt = Date.now() - void fetchHomeHostWorktreeInfo(entry.client, entry.hostId, setWorktreeInfo, () => false) - } - // Home stays mounted under other screens; focusing it again re-reads every desktop anyway. - const refreshOnChange = (): void => { - if (!isHomeFocused() || trailingRefresh) { - return - } - const wait = lastRefreshAt + HOME_WORKTREE_REFRESH_MIN_INTERVAL_MS - Date.now() - if (wait <= 0) { - refreshWorktrees() - return - } - trailingRefresh = setTimeout(() => { - trailingRefresh = null - if (isHomeFocused()) { - refreshWorktrees() - } - }, wait) - } const wireState = (state: ConnectionState): void => { - const reconnected = refetchGate.observe(state) if (state === 'connected') { - unsubscribeNotifications ??= subscribeToDesktopNotifications(entry.client, entry.hostId) - unsubscribeClientEvents ??= subscribeSharedClientEvents(entry.client, (event) => { - // A replayed ready follows a reopened stream or path switch, which missed notices. - if (WORKTREE_CHANGE_EVENTS.has(event.type) || 'replayed' in event) { - refreshOnChange() - } - }) + unsubscribeNotifications ??= subscribeToDesktopNotifications(client, hostId) // One stream per connection: each subscribe makes the desktop check usage, so focus must not resubscribe. - unsubscribeAccounts ??= subscribeAccountsSnapshots(entry.client, { - onSnapshot: (snapshot) => - setAccounts((previous) => ({ ...previous, [entry.hostId]: snapshot })), - onInvalidSnapshot: () => setAccounts((previous) => withoutHost(previous, entry.hostId)), + unsubscribeAccounts ??= subscribeAccountsSnapshots(client, { + onSnapshot: (snapshot) => queryClient.setQueryData(accountsSnapshotKey(hostId), snapshot), + onInvalidSnapshot: () => queryClient.setQueryData(accountsSnapshotKey(hostId), null), onStreamError: () => {} }) - if (reconnected) { - refreshWorktrees() - fetchHomeHostStats(entry.client, entry.hostId, setStats, () => false) - } return } unsubscribeNotifications?.() unsubscribeNotifications = null - unsubscribeClientEvents?.() - unsubscribeClientEvents = null unsubscribeAccounts?.() unsubscribeAccounts = null - // Usage is live; a disconnected desktop's last numbers would read as current. - setAccounts((previous) => withoutHost(previous, entry.hostId)) - // Agents keep moving while we're away; only the reconnect read may show their states again. - setWorktreeInfo((previous) => { - const current = previous[entry.hostId] - const next = current && withLastSeenHomeAgents(current) - return next === current ? previous : { ...previous, [entry.hostId]: next } - }) } - wireState(entry.state) - const unsubscribeState = entry.client.onStateChange(wireState) + // The live state: the client may have connected since the render that listed it. + wireState(client.getState()) + const unsubscribeState = client.onStateChange(wireState) return () => { unsubscribeState() unsubscribeNotifications?.() - unsubscribeClientEvents?.() unsubscribeAccounts?.() - if (trailingRefresh) { - clearTimeout(trailingRefresh) - } + router.release() + stopInvalidation() } } -function withoutHost(byHost: Record, hostId: string): Record { - if (!(hostId in byHost)) { - return byHost - } - const { [hostId]: _removed, ...rest } = byHost - return rest -} - export function useMobileHomeHostConnections( hosts: HostProfile[], - hostCatalog: HostCatalogEntry[], - setters: MobileHomeHostSetters, - isHomeFocused: () => boolean + hostCatalog: HostCatalogEntry[] ) { + const queryClient = useQueryClient() const [hostStates, setHostStates] = useState>({}) const [hostAttempts, setHostAttempts] = useState>({}) const [hostLastConnected, setHostLastConnected] = useState>({}) @@ -184,11 +107,11 @@ export function useMobileHomeHostConnections( if (!subscriptionsRef.current.has(entry.hostId)) { subscriptionsRef.current.set(entry.hostId, { client: entry.client, - cleanup: wireMobileHomeHostSubscriptions(entry, setters, isHomeFocused) + cleanup: wireMobileHomeHostSubscriptions(entry, queryClient) }) } } - }, [allClients, isHomeFocused, setters]) + }, [allClients, queryClient]) useEffect(() => { const subscriptions = subscriptionsRef.current diff --git a/mobile/src/hooks/mobile-dictation-audio-chunk.ts b/mobile/src/hooks/mobile-dictation-audio-chunk.ts index e44f287e919..524c11ec299 100644 --- a/mobile/src/hooks/mobile-dictation-audio-chunk.ts +++ b/mobile/src/hooks/mobile-dictation-audio-chunk.ts @@ -1,4 +1,4 @@ -import { useState } from 'react' +import { useEffect, useState } from 'react' import { MOBILE_DICTATION_CONNECTION_SLOW_ERROR_MESSAGE, MOBILE_DICTATION_PCM_SAMPLE_RATE @@ -13,13 +13,16 @@ import { probeLivenessWhileWaiting } from '../transport/rpc/rpc-liveness-probe-w import '../transport/connection/stable-logical-rpc-client' import { isLogicalClientCutoverError } from '../transport/connection/logical-client-cutover-error' import { isLogicalClientSuspendedError } from '../transport/connection/logical-client-suspended-error' +import { dictationSessionErrorMessage } from '../dictation/mobile-dictation-setup' import type { DictationCapture, DictationCaptureChunk } 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' type MobileDictationAudioChunkQueue = { // One promise per busy send slot; each settles once nothing is left to send. @@ -29,9 +32,11 @@ type MobileDictationAudioChunkQueue = { isActive: (dictationId: string) => boolean failActiveDictation: (dictationId: string, err: unknown) => void transcriptSoFar: MobileDictationTranscriptSoFar + // Called for the active dictation when its host has stopped taking audio. + 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. @@ -104,6 +109,34 @@ function waitForReconnect(client: RpcClient): Promise { return wait } +// Streams the microphone to the host for the run's active dictation. +export function useMobileDictationAudioChunks(capture: DictationCapture, run: MobileDictationRun) { + useEffect(() => { + const source = { + getClient: () => run.client.current, + getActiveId: () => run.activeId.current, + audioPhase: () => (run.enabled.current ? run.audioPhase.current : 'closed') + } + const sub = subscribeMobileDictationAudioChunks(capture, source, { + pendingChunks: run.pendingChunks.current, + pendingAudioBudget: run.pendingAudioBudget.current, + 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') { + run.onAudioLimitReached.current?.() + void run.finish.current(dictationSessionErrorMessage('no-speech')) + } + } + }) + run.sendHeldAudio.current = sub.sendHeld + return () => sub.remove() + }, [capture, run]) +} + export function subscribeMobileDictationAudioChunks( capture: Pick, source: { @@ -111,7 +144,7 @@ export function subscribeMobileDictationAudioChunks( getActiveId: () => string | null audioPhase: () => MobileDictationAudioPhase }, - queue: Omit + queue: Omit & { 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 } @@ -128,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 @@ -229,7 +266,7 @@ async function sendAudioChunk( dictationId, audioBase64: bytesToBase64(bytes), sampleRate: MOBILE_DICTATION_PCM_SAMPLE_RATE, - seq: queue.pendingAudioBudget.nextSeq() + seq: queue.pendingAudioBudget.nextSeq(bytes.byteLength) } const hostDedupesResends = queue.pendingAudioBudget.hostDedupesResends try { @@ -256,6 +293,11 @@ async function sendAudioChunk( typeof revision === 'number' ? revision : undefined ) } + // Newer hosts repeat this on every reply once a cloud dictation reaches its length cap. + const limitReached = result != null && rpcPayloadMember(result, 'audioLimitReached') === true + if (limitReached && queue.isActive(dictationId)) { + queue.stopAtAudioLimit() + } } catch (err) { // A host that cannot dedupe loses only the audio in flight at a drop; for one that dedupes, still being offline here means the reconnect grace ran out and later held audio would wait it out again. const graceExpired = hostDedupesResends && client.getState() !== 'connected' diff --git a/mobile/src/hooks/mobile-dictation-desktop-start.ts b/mobile/src/hooks/mobile-dictation-desktop-start.ts index 29eef603b45..1086409ea5c 100644 --- a/mobile/src/hooks/mobile-dictation-desktop-start.ts +++ b/mobile/src/hooks/mobile-dictation-desktop-start.ts @@ -1,7 +1,4 @@ -import { - DICTATION_FINISH_TIMEOUT_MS, - isCurrentMobileDictationStart -} from './mobile-dictation-session-state' +import { isCurrentMobileDictationStart } from './mobile-dictation-session-state' import { sendAcrossConnectionMove } from './mobile-dictation-audio-chunk' import { dictationSessionLostMessage } from '../dictation/mobile-dictation-setup' import { @@ -10,6 +7,7 @@ import { dictationSessionStart } from '../dictation/mobile-dictation-operations' import { MOBILE_DICTATION_RECONNECT_GRACE_MS } from '../../../src/shared/rpc-contract/speech-params' +import { pairedDictationFinishTimeoutMs } from '../../../src/shared/dictation-finish-deadlines' import { rpcPayloadMember } from '../transport/rpc/rpc-reader-payload' import { probeLivenessWhileWaiting } from '../transport/rpc/rpc-liveness-probe-while-waiting' import type { RpcClient } from '../transport/rpc/rpc-client-contract' @@ -17,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 @@ -57,15 +56,13 @@ export function cancelDesktopDictation(client: RpcClient, dictationId: string): // Returns the interpreted reply: the caller reads its text only after its staleness guard. export async function finishDesktopDictation( client: RpcClient, - dictationId: string + dictationId: string, + sentAudioSeconds: number ): Promise { + const timeoutMs = pairedDictationFinishTimeoutMs(sentAudioSeconds) return dictationSessionFinish.interpret( await sendAcrossConnectionMove(client, () => - dictationSessionFinish.request( - client, - { dictationId }, - { timeoutMs: DICTATION_FINISH_TIMEOUT_MS } - ) + dictationSessionFinish.request(client, { dictationId }, { timeoutMs }) ) ) } @@ -106,7 +103,7 @@ export function startMobileDictationDesktopSession( } async function startOnHost(options: StartMobileDictationDesktopSessionOptions): Promise { - const { client, dictationId } = options + const { client, dictationId, worktreeId } = options let hostDedupesResends = false try { @@ -115,7 +112,7 @@ async function startOnHost(options: StartMobileDictationDesktopSessionOptions): client, dictationSessionStart.request( client, - { dictationId }, + { dictationId, ...(worktreeId ? { worktreeId } : {}) }, { timeoutMs: MOBILE_DICTATION_RECONNECT_GRACE_MS } ) ).catch(() => { diff --git a/mobile/src/hooks/mobile-dictation-engine-run.ts b/mobile/src/hooks/mobile-dictation-engine-run.ts index 43eef4ac361..b61d5390e51 100644 --- a/mobile/src/hooks/mobile-dictation-engine-run.ts +++ b/mobile/src/hooks/mobile-dictation-engine-run.ts @@ -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,12 @@ 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. export type MobileDictationRun = { @@ -41,13 +43,19 @@ export type MobileDictationRun = { readonly pendingChunks: RefObject>> readonly pendingAudioBudget: RefObject readonly heldAudio: RefObject + readonly recording: RefObject readonly sendHeldAudio: RefObject<() => void> readonly finish: RefObject<(emptyTranscriptMessage: string) => Promise> readonly onTranscript: RefObject<(text: string) => void> + readonly onAudioLimitReached: RefObject<(() => void) | undefined> + readonly worktreeId: RefObject 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 } @@ -77,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') @@ -87,47 +96,7 @@ export function settleMobileDictation( } } -export async function startMobileDictationOnHost( - run: MobileDictationRun, - client: RpcClient, - dictationId: string, - generation: number -): Promise { - 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.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, @@ -145,24 +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. @@ -224,11 +184,11 @@ 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) { void run.finish.current(dictationSessionErrorMessage('no-speech')) } diff --git a/mobile/src/hooks/mobile-dictation-engine-shown.ts b/mobile/src/hooks/mobile-dictation-engine-shown.ts new file mode 100644 index 00000000000..bc8c835d905 --- /dev/null +++ b/mobile/src/hooks/mobile-dictation-engine-shown.ts @@ -0,0 +1,25 @@ +import { useState } from 'react' +import type { MobileDictationEngineShown } from './mobile-dictation-session-state' + +export type ShowMobileDictationEngine = ( + kind: MobileDictationEngineShown['kind'], + moved?: boolean +) => void + +// The engine the UI shows by the timer: set when an engine starts hearing, cleared when the dictation ends. +export function useMobileDictationEngineShown() { + const [shown, setShown] = useState(null) + const [show] = useState( + (): ShowMobileDictationEngine => + (kind, moved = false) => + setShown((current) => + moved + ? { kind, movedAt: Date.now() } + : current?.kind === kind + ? current + : { kind, movedAt: null } + ) + ) + const [clear] = useState(() => () => setShown(null)) + return { shown, show, clear } +} diff --git a/mobile/src/hooks/mobile-dictation-failure.ts b/mobile/src/hooks/mobile-dictation-failure.ts new file mode 100644 index 00000000000..99ba7a258fa --- /dev/null +++ b/mobile/src/hooks/mobile-dictation-failure.ts @@ -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) +} diff --git a/mobile/src/hooks/mobile-dictation-finish.ts b/mobile/src/hooks/mobile-dictation-finish.ts new file mode 100644 index 00000000000..c676c3de41f --- /dev/null +++ b/mobile/src/hooks/mobile-dictation-finish.ts @@ -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, + emptyTranscriptMessage: string +): Promise { + 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) + } +} diff --git a/mobile/src/hooks/mobile-dictation-held-audio.ts b/mobile/src/hooks/mobile-dictation-held-audio.ts index 3e57dfad7d7..21e142a5683 100644 --- a/mobile/src/hooks/mobile-dictation-held-audio.ts +++ b/mobile/src/hooks/mobile-dictation-held-audio.ts @@ -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 diff --git a/mobile/src/hooks/mobile-dictation-host-start.ts b/mobile/src/hooks/mobile-dictation-host-start.ts new file mode 100644 index 00000000000..fc9898e3fa0 --- /dev/null +++ b/mobile/src/hooks/mobile-dictation-host-start.ts @@ -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 { + 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 { + 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) + } +} diff --git a/mobile/src/hooks/mobile-dictation-pending-audio-budget.test.ts b/mobile/src/hooks/mobile-dictation-pending-audio-budget.test.ts index 77190320f52..07d1dbac9a3 100644 --- a/mobile/src/hooks/mobile-dictation-pending-audio-budget.test.ts +++ b/mobile/src/hooks/mobile-dictation-pending-audio-budget.test.ts @@ -2,15 +2,6 @@ import { describe, expect, it } from 'vitest' import { MobileDictationPendingAudioBudget } from './mobile-dictation-pending-audio-budget' describe('MobileDictationPendingAudioBudget', () => { - it('caps pending raw PCM audio at thirty seconds', () => { - const budget = new MobileDictationPendingAudioBudget() - expect(budget.tryReserve(959_999)).toBe(true) - expect(budget.tryReserve(1)).toBe(true) - expect(budget.pendingAudioBytes).toBe(960_000) - expect(budget.tryReserve(1)).toBe(false) - expect(budget.pendingAudioBytes).toBe(960_000) - }) - it('releases completed chunks and clamps stale releases after reset', () => { const budget = new MobileDictationPendingAudioBudget(10) diff --git a/mobile/src/hooks/mobile-dictation-pending-audio-budget.ts b/mobile/src/hooks/mobile-dictation-pending-audio-budget.ts index 6f59df36b63..d2b83fe9b99 100644 --- a/mobile/src/hooks/mobile-dictation-pending-audio-budget.ts +++ b/mobile/src/hooks/mobile-dictation-pending-audio-budget.ts @@ -1,6 +1,7 @@ import { DICTATION_SAMPLE_RATE, - MOBILE_DICTATION_MAX_PENDING_AUDIO_BYTES + MOBILE_DICTATION_MAX_PENDING_AUDIO_BYTES, + PCM_BYTES_PER_SAMPLE } from '../../../src/shared/rpc-contract/speech-params' export const MOBILE_DICTATION_PCM_SAMPLE_RATE = DICTATION_SAMPLE_RATE @@ -15,6 +16,7 @@ export class MobileDictationPendingAudioBudget { // Backlog not yet taken into a request; it sits at the front of the held audio. private untakenBacklogBytes = 0 private sentChunks = 0 + private sentBytes = 0 // Set at each start: a host that feeds each chunk seq once can take audio a drop left unanswered again. hostDedupesResends = false @@ -24,10 +26,16 @@ export class MobileDictationPendingAudioBudget { return this.pendingBytes } - nextSeq(): number { + // Numbers a request and counts its audio, which sets how long finish waits. + nextSeq(byteLength: number): number { + this.sentBytes += normalizeByteLength(byteLength) return this.sentChunks++ } + get sentAudioSeconds(): number { + return this.sentBytes / (PCM_BYTES_PER_SAMPLE * MOBILE_DICTATION_PCM_SAMPLE_RATE) + } + reserveBacklog(byteLength: number): void { const normalizedByteLength = normalizeByteLength(byteLength) this.pendingBytes += normalizedByteLength @@ -62,6 +70,7 @@ export class MobileDictationPendingAudioBudget { this.backlogBytes = 0 this.untakenBacklogBytes = 0 this.sentChunks = 0 + this.sentBytes = 0 this.hostDedupesResends = hostDedupesResends } } diff --git a/mobile/src/hooks/mobile-dictation-recording.ts b/mobile/src/hooks/mobile-dictation-recording.ts new file mode 100644 index 00000000000..872c6231794 --- /dev/null +++ b/mobile/src/hooks/mobile-dictation-recording.ts @@ -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 + } +} diff --git a/mobile/src/hooks/mobile-dictation-retry.test.tsx b/mobile/src/hooks/mobile-dictation-retry.test.tsx new file mode 100644 index 00000000000..474685d5a83 --- /dev/null +++ b/mobile/src/hooks/mobile-dictation-retry.test.tsx @@ -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 { + 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 { + 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() + }) +}) diff --git a/mobile/src/hooks/mobile-dictation-retry.ts b/mobile/src/hooks/mobile-dictation-retry.ts new file mode 100644 index 00000000000..7581ae378f5 --- /dev/null +++ b/mobile/src/hooks/mobile-dictation-retry.ts @@ -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 { + 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) +} diff --git a/mobile/src/hooks/mobile-dictation-session-state.ts b/mobile/src/hooks/mobile-dictation-session-state.ts index 0caaeadc144..ec122ea47cb 100644 --- a/mobile/src/hooks/mobile-dictation-session-state.ts +++ b/mobile/src/hooks/mobile-dictation-session-state.ts @@ -2,17 +2,31 @@ 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' +// 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 } export type UseMobileDictationResult = { @@ -23,14 +37,18 @@ export type UseMobileDictationResult = { // Empty until a newer host reports words; older hosts never do. transcriptSoFar: string error: string | null - start: () => Promise + // 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 + // client: the starting session's client, when one hook serves several sessions. + start: (client?: RpcClient | null) => Promise stop: () => Promise + retry: () => Promise cancel: () => Promise meter: MobileDictationMeter } -export const DICTATION_FINISH_TIMEOUT_MS = 75_000 - // An interrupted user tap needs a renderable error; only explicit user cancellation may end silently. export const MOBILE_DICTATION_INPUT_CLOSED_ERROR_MESSAGE = 'Voice dictation stopped because this session is no longer accepting input. Try again.' diff --git a/mobile/src/hooks/use-mobile-dictation-interruptions.ts b/mobile/src/hooks/use-mobile-dictation-interruptions.ts new file mode 100644 index 00000000000..a0c5ccf0892 --- /dev/null +++ b/mobile/src/hooks/use-mobile-dictation-interruptions.ts @@ -0,0 +1,54 @@ +import { useEffect, type RefObject } from 'react' +import { AppState } from 'react-native' +import { dictationSessionErrorMessage } from '../dictation/mobile-dictation-setup' +import type { DictationCapture } from '../platform/dictation-capture-contract' +import type { MobileDictationAudioPhase } from './mobile-dictation-audio-chunk' +import type { DictationStatus } from './mobile-dictation-session-state' + +// Calls, Siri, mic dropouts and leaving the app finish what was already heard; only the user's own cancel may discard it. +export function useMobileDictationInterruptions({ + capture, + status, + audioPhase, + stopWhenStarted, + applyStatus, + finish, + abandon +}: { + capture: DictationCapture + status: RefObject + audioPhase: RefObject + stopWhenStarted: RefObject + applyStatus: (next: DictationStatus) => void + finish: (emptyTranscriptMessage: string) => Promise + abandon: (reason: string | null) => Promise +}): void { + useEffect(() => { + const interrupted = () => { + if (status.current === 'recording') { + void finish(dictationSessionErrorMessage('interrupted')) + } else if (audioPhase.current === 'holding') { + // The mic is live while the host start is pending: close it now, and finish with what it heard once the start commits. + stopWhenStarted.current = true + applyStatus('processing') + void capture.end() + } else if (status.current === 'starting') { + void abandon(dictationSessionErrorMessage('interrupted')) + } + } + const sub = capture.onInterruption(interrupted) + // A backgrounded app loses the microphone, so leaving finishes. Not before the mic opens: Android's permission prompt reports background. + const appState = AppState.addEventListener('change', (state) => { + if ( + state === 'background' && + (status.current === 'recording' || audioPhase.current === 'holding') + ) { + interrupted() + } + }) + return () => { + sub.remove() + appState.remove() + } + }, [abandon, applyStatus, audioPhase, capture, finish, status, stopWhenStarted]) +} diff --git a/mobile/src/hooks/use-mobile-dictation.ts b/mobile/src/hooks/use-mobile-dictation.ts index 1d0e1746482..027042548be 100644 --- a/mobile/src/hooks/use-mobile-dictation.ts +++ b/mobile/src/hooks/use-mobile-dictation.ts @@ -1,30 +1,32 @@ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react' -import { AppState } from 'react-native' import { useDictationCapture } from '../platform/dictation-capture' import { useOnDeviceSpeech } from '../platform/on-device-speech' import { dictationSessionErrorMessage } from '../dictation/mobile-dictation-setup' import { useMobileTranslation } from '../i18n/use-mobile-translation' import { useMobileDictationMeter } from './mobile-dictation-meter' +import { useMobileDictationEngineShown } from './mobile-dictation-engine-shown' +import { useMobileDictationInterruptions } from './use-mobile-dictation-interruptions' import { MobileDictationPendingAudioBudget } from './mobile-dictation-pending-audio-budget' import { useMobileDictationTranscriptSoFar, - subscribeMobileDictationAudioChunks, + useMobileDictationAudioChunks, 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' @@ -33,13 +35,22 @@ export type { UseMobileDictationResult } from './mobile-dictation-session-state' export function useMobileDictation(options: UseMobileDictationOptions): UseMobileDictationResult { useMobileTranslation() - const { client, enabled, onTranscript, onError, removeFillerWords } = options + 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('idle') const [error, setError] = useState(null) + // A failure whose recording is kept for Retry; cleared by Retry, discard and the next dictation. + const [failure, setFailure] = useState(null) + const failureRef = useRef(failure) const [transcriptSoFar, setTranscriptSoFar, keptTranscript] = useMobileDictationTranscriptSoFar() + const { + shown: shownEngine, + show: showEngine, + clear: clearEngine + } = useMobileDictationEngineShown() // Read from an abort that may run between a commit and its passive Effects, where state is stale. const statusRef = useRef('idle') const activeIdRef = useRef(null) @@ -50,10 +61,13 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil const enabledRef = useRef(enabled) const onTranscriptRef = useRef(onTranscript) const onErrorRef = useRef(onError) + const onAudioLimitReachedRef = useRef(onAudioLimitReached) + const worktreeIdRef = useRef(worktreeId) const pendingChunksRef = useRef>>(new Set()) const pendingAudioBudgetRef = useRef(new MobileDictationPendingAudioBudget()) const audioPhaseRef = useRef('closed') const heldAudioRef = useRef(new MobileDictationHeldAudio()) + const recordingRef = useRef(new MobileDictationRecording()) const sendHeldAudioRef = useRef(() => {}) const stopWhenStartedRef = useRef(false) const generationRef = useRef(0) @@ -66,23 +80,41 @@ export function useMobileDictation(options: UseMobileDictationOptions): UseMobil enabledRef.current = enabled onTranscriptRef.current = onTranscript onErrorRef.current = onError - }, [client, speech, enabled, onTranscript, onError]) + onAudioLimitReachedRef.current = onAudioLimitReached + worktreeIdRef.current = worktreeId + }, [client, speech, enabled, onTranscript, onError, onAudioLimitReached, worktreeId]) - const applyStatus = useCallback((next: DictationStatus) => { - statusRef.current = next - setStatus(next) + const applyStatus = useCallback( // Kept through processing so the text so far stays in place until the final transcript replaces it in the same render. - setTranscriptSoFar((text) => (next === 'recording' || next === 'processing' ? text : '')) + (next: DictationStatus, keepText = next === 'recording' || next === 'processing') => { + statusRef.current = next + setStatus(next) + 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(() => { @@ -98,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( - () => ({ + const run = useMemo(() => { + const created: MobileDictationRun = { status: statusRef, activeId: activeIdRef, client: clientRef, @@ -133,98 +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] - ) - - useEffect(() => { - const source = { - getClient: () => clientRef.current, - getActiveId: () => activeIdRef.current, - audioPhase: () => (enabledRef.current ? audioPhaseRef.current : 'closed') + failActiveDictation: (dictationId, err) => + failActiveMobileDictation(created, dictationId, err) } - const sub = subscribeMobileDictationAudioChunks(capture, source, { - pendingChunks: pendingChunksRef.current, - pendingAudioBudget: pendingAudioBudgetRef.current, - failActiveDictation, - transcriptSoFar: keptTranscript, - heldAudio: heldAudioRef.current - }) - sendHeldAudioRef.current = sub.sendHeld - return () => sub.remove() - }, [capture, failActiveDictation]) + 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 finished = await finishDesktopDictation(client, dictationId) - 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 @@ -239,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( @@ -253,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') @@ -265,40 +245,20 @@ 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]) - useEffect(() => { - // Finish what was already streamed; only the user's own cancel may discard it. - const interrupted = () => { - if (statusRef.current === 'recording') { - void finishDictation(dictationSessionErrorMessage('interrupted')) - } else if (audioPhaseRef.current === 'holding') { - // The mic is live while the host start is pending: close it now, and finish with what it heard once the start commits. - stopWhenStartedRef.current = true - applyStatus('processing') - void capture.end() - } else if (statusRef.current === 'starting') { - void abandonDictation(dictationSessionErrorMessage('interrupted')) - } - } - const sub = capture.onInterruption(interrupted) - // A backgrounded app loses the microphone, so leaving finishes. Not before the mic opens: Android's permission prompt reports background. - const appState = AppState.addEventListener('change', (state) => { - if ( - state === 'background' && - (statusRef.current === 'recording' || audioPhaseRef.current === 'holding') - ) { - interrupted() - } - }) - return () => { - sub.remove() - appState.remove() - } - }, [abandonDictation, applyStatus, capture, finishDictation]) + useMobileDictationInterruptions({ + capture, + status: statusRef, + audioPhase: audioPhaseRef, + stopWhenStarted: stopWhenStartedRef, + applyStatus, + finish: finishDictation, + abandon: abandonDictation + }) useEffect(() => { if (!enabled) { @@ -312,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) } @@ -324,7 +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') diff --git a/mobile/src/host-screen/host-list-queries.ts b/mobile/src/host-screen/host-list-queries.ts index caa752201fd..08c966625e2 100644 --- a/mobile/src/host-screen/host-list-queries.ts +++ b/mobile/src/host-screen/host-list-queries.ts @@ -22,7 +22,6 @@ import { type WorktreeCatalogSnapshot } from '../worktree/worktree-catalog-snapshot-client' import type { Worktree } from '../worktree/workspace-list-types' -import { getCachedWorktrees } from '../cache/worktree-cache' import { hostRepoCatalogRepos, hostSshTargetSummarySchema, @@ -108,6 +107,11 @@ export const hostWorktreeCatalogQuery = defineHostQuery< } }) +// Native Home's per-desktop counts (home-host-worktree-fetch.ts); keyed here so the page never loads Home's module. +export const HOME_WORKTREE_COUNTS_FAMILY = 'worktree.homeCounts' +export const homeWorktreeCountsKey = (hostId: string) => + hostQueryKey(hostId, HOME_WORKTREE_COUNTS_FAMILY, HOST_LIST_TARGET, NO_HOST_LIST_INPUT) + export const hostWorktreeCatalogKey = (hostId: string) => hostQueryKey(hostId, hostWorktreeCatalogQuery.family, HOST_LIST_TARGET, NO_HOST_LIST_INPUT) @@ -119,9 +123,12 @@ export function cachedHostWorktrees( if (!hostId) { return null } - const cached = queryClient.getQueryData(hostWorktreeCatalogKey(hostId)) - // Native Home's own catalog read until Home moves onto this query; shown only, never a delta base. - return cached ? [...cached.worktrees] : (getCachedWorktrees(hostId) as Worktree[] | null) + const cached = + queryClient.getQueryData(hostWorktreeCatalogKey(hostId)) ?? + // Native Home's last read, for the wide layout's host list beside it; shown only, never a delta base. + queryClient.getQueryData<{ catalog?: WorktreeCatalogSnapshot }>(homeWorktreeCountsKey(hostId)) + ?.catalog + return cached ? [...cached.worktrees] : null } const serverRowSnapshots = { diff --git a/mobile/src/host-screen/host-screen-overlays.tsx b/mobile/src/host-screen/host-screen-overlays.tsx index 6484f579788..9469c56270d 100644 --- a/mobile/src/host-screen/host-screen-overlays.tsx +++ b/mobile/src/host-screen/host-screen-overlays.tsx @@ -74,6 +74,21 @@ export function HostScreenOverlays({ controller }: { controller: HostScreenContr } )} + {state.confirmDelete.recipeEnvironment ? ( + + {state.confirmDelete.recipeEnvironment.destroys === false + ? t( + 'hostScreen.hostScreenOverlays.deleteKeepsEnvironment', + 'The environment "{{environment}}" that Orca created for it keeps running: its recipe has no destroy step.', + { environment: state.confirmDelete.recipeEnvironment.name } + ) + : t( + 'hostScreen.hostScreenOverlays.deleteDestroysEnvironment', + 'This also destroys the environment "{{environment}}" that Orca created for it, with any uncommitted work and running terminals on it.', + { environment: state.confirmDelete.recipeEnvironment.name } + )} + + ) : null} { hideRow(item) try { - const reply = await worktreeRemove.request( - clients.rowClient, - { worktree: `id:${item.worktreeId}`, force: true, ...hooks }, - // The host runs the archive hook before it replies; outlast it as desktop does (#19334). - { timeoutMs: worktreeRemovalReplyTimeoutMs(hooks.runHooks) } - ) + const request = buildWorktreeRemoveRequest(item, hooks) + const reply = await worktreeRemove.request(clients.rowClient, request.params, { + timeoutMs: request.timeoutMs + }) if (worktreeRemove.interpret(reply).accepted) { triggerSuccess() } else { @@ -150,6 +146,9 @@ export function useHostWorktreeDelete(args: { item, message: reply.error.message }) + } else if (!reply.ok && item.recipeEnvironment) { + // Say why: the desktop may have removed the checkout but not destroyed the environment. + setActionError(reply.error.message) } } void fetchWorktrees() @@ -158,7 +157,7 @@ export function useHostWorktreeDelete(args: { restoreRow(item) } }, - [fetchWorktrees, hideRow, restoreRow] + [fetchWorktrees, hideRow, restoreRow, setActionError] ) // Every attempt, Delete Anyway included, re-reads the script: it may have changed since approval. diff --git a/mobile/src/host-screen/worktree-remove-request.test.ts b/mobile/src/host-screen/worktree-remove-request.test.ts new file mode 100644 index 00000000000..a787e7ca421 --- /dev/null +++ b/mobile/src/host-screen/worktree-remove-request.test.ts @@ -0,0 +1,27 @@ +import { describe, expect, it } from 'vitest' +import { worktreeRemovalReplyTimeoutMs } from '../../../src/shared/worktree/archive-hook-removal-gate' +import { RECIPE_REMOVAL_REPLY_TIMEOUT_MS } from '../../../src/shared/recipe-host-removal' +import { buildWorktreeRemoveRequest } from './worktree-remove-request' + +describe('phone worktree delete request', () => { + it('keeps the ordinary delete for workspaces the desktop did not tag', () => { + expect(buildWorktreeRemoveRequest({ worktreeId: 'r::/w' }, { runHooks: false })).toEqual({ + params: { worktree: 'id:r::/w', force: true, runHooks: false }, + timeoutMs: worktreeRemovalReplyTimeoutMs(false) + }) + }) + + it('asks for the named recipe environment to be destroyed, and waits for its destroy step', () => { + const request = buildWorktreeRemoveRequest( + { worktreeId: 'r::/w', recipeEnvironment: { name: 'task' } }, + { runHooks: true } + ) + expect(request.params).toEqual({ + worktree: 'id:r::/w', + force: true, + runHooks: true, + destroyHost: true + }) + expect(request.timeoutMs).toBe(RECIPE_REMOVAL_REPLY_TIMEOUT_MS) + }) +}) diff --git a/mobile/src/host-screen/worktree-remove-request.ts b/mobile/src/host-screen/worktree-remove-request.ts new file mode 100644 index 00000000000..1d8fc8e8a4d --- /dev/null +++ b/mobile/src/host-screen/worktree-remove-request.ts @@ -0,0 +1,32 @@ +import { worktreeRemovalReplyTimeoutMs } from '../../../src/shared/worktree/archive-hook-removal-gate' +import { RECIPE_REMOVAL_REPLY_TIMEOUT_MS } from '../../../src/shared/recipe-host-removal' +import type { Worktree } from '../worktree/workspace-list-sections' + +export type WorktreeRemoveHooks = { + runHooks: boolean + allowFailedArchiveHook?: true +} + +/** The phone's delete: a row the desktop tagged with its recipe environment also asks for that + * environment's destroy, which the delete sheet named. */ +export function buildWorktreeRemoveRequest( + item: Pick, + hooks: WorktreeRemoveHooks +): { + params: WorktreeRemoveHooks & { worktree: string; force: true; destroyHost?: true } + timeoutMs: number +} { + const destroysEnvironment = item.recipeEnvironment !== undefined + return { + params: { + worktree: `id:${item.worktreeId}`, + force: true, + ...hooks, + ...(destroysEnvironment ? { destroyHost: true } : {}) + }, + // The host runs the archive hook, and here the recipe's destroy step, before it replies (#19334). + timeoutMs: destroysEnvironment + ? RECIPE_REMOVAL_REPLY_TIMEOUT_MS + : worktreeRemovalReplyTimeoutMs(hooks.runHooks) + } +} diff --git a/mobile/src/i18n/en-runtime-required.json b/mobile/src/i18n/en-runtime-required.json index 4823302acd9..acba365e2f1 100644 --- a/mobile/src/i18n/en-runtime-required.json +++ b/mobile/src/i18n/en-runtime-required.json @@ -183,6 +183,12 @@ } }, "dictation": { + "controls": { + "durationMinutes_one": "{{count}} minute", + "durationMinutes_other": "{{count}} minutes", + "durationSeconds_one": "{{count}} second", + "durationSeconds_other": "{{count}} seconds" + }, "setup": { "alreadyActive": "Dictation is already in use on the computer or another phone. Update Orca on the computer to dictate from several devices at once.", "modelBusy": "Another device is dictating with a different speech model. Try again when it finishes.", @@ -303,12 +309,12 @@ "uncommittedFiles_other": "{{count}} uncommitted" }, "failure": { - "forkOriginalMissing": "{{agent}} could not find this response in the original chat. Open it and fork from there.", - "forkOriginalUnavailable": "{{agent}} cannot fork this response in the original chat. Open it and fork from there.", - "forkOriginalMissingNamed": "{{agent}} could not find this response in \"{{detail}}\". Open that chat and fork from there.", - "forkOriginalUnavailableNamed": "{{agent}} cannot fork this response in \"{{detail}}\". Open that chat and fork from there.", "forkOriginalLatestOnly": "{{agent}} can only fork the latest response in the original chat. Open that chat and fork its latest response once it has finished.", "forkOriginalLatestOnlyNamed": "{{agent}} can only fork the latest response in \"{{detail}}\". Open that chat and fork its latest response once it has finished.", + "forkOriginalMissing": "{{agent}} could not find this response in the original chat. Open it and fork from there.", + "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." }, "fileReader": { diff --git a/mobile/src/i18n/locales/de.json b/mobile/src/i18n/locales/de.json index 2a9c0de8508..48043e5b8b3 100644 --- a/mobile/src/i18n/locales/de.json +++ b/mobile/src/i18n/locales/de.json @@ -300,6 +300,7 @@ "plan": "Plan", "stoppedManually": "Manuell gestoppt", "permissionDenied": "{{agent}} hat die Berechtigung verweigert. Details anzeigen.", + "safetyReviewApproved": "{{agent}} hat diese Aktion genehmigt. Details anzeigen.", "safetyReview": "{{agent}} hat eine Warnung zur Sicherheitsprüfung gemeldet. Details anzeigen.", "truncatedResponse": "Anbieterantwort gekürzt (ursprüngliche Größe: {{bytes}} Bytes).", "modelFallback": "Claude hat das Modell gewechselt: {{from}} → {{to}}.", @@ -602,6 +603,7 @@ "fullCopySaveUpdate": "„Vollständig kopieren“ und Speichern werden für diesen Anhang mit einem Smartphone-Update verfügbar sein." }, "hostOutage": { + "offlineAsOf": "{{host}} ist offline · Stand {{time}}", "reconnecting": "{{hostName}} verbindet sich erneut…", "stopped": "{{hostName}} ist gestoppt. Starte es auf deinem Computer.", "server": "Der Server", @@ -1302,6 +1304,51 @@ "sessionLimit": "Auf diesem Computer diktieren zu viele Geräte. Erneut versuchen, sobald eines fertig ist.", "sessionLost": "Die Verbindung zum Computer wurde beim Diktat unterbrochen. Erneut versuchen.", "updateFailed": "Diktateinstellungen konnten nicht aktualisiert werden" + }, + "controls": { + "start": "Diktieren", + "starting": "Diktat wird gestartet", + "stop": "Stoppen und einfügen", + "finishing": "Diktat wird abgeschlossen", + "cancel": "Diktat abbrechen", + "meterOnPhone": "Aufnahme, {{duration}}, auf diesem Telefon", + "meterOn": "Aufnahme, {{duration}}, auf {{computer}}", + "meterOnComputer": "Aufnahme, {{duration}}, auf dem Computer", + "meter": "Aufnahme, {{duration}}", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "durationSeconds_one": "{{count}} Sekunde", + "durationSeconds_other": "{{count}} Sekunden", + "durationMinutes_one": "{{count}} Minute", + "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": { @@ -1534,6 +1581,8 @@ }, "hostScreenOverlays": { "deleteConfirmMessage": "„{{name}}“ ({{branch}}) löschen?", + "deleteDestroysEnvironment": "Dadurch wird auch die Umgebung „{{environment}}“ gelöscht, die Orca dafür erstellt hat, samt nicht committeter Änderungen und laufender Terminals.", + "deleteKeepsEnvironment": "Die Umgebung „{{environment}}“, die Orca dafür erstellt hat, läuft weiter: Ihr Rezept hat keinen Löschschritt.", "deleteWorktree": "Worktree löschen", "pin": "Anheften", "primaryWorktreeDeleteHint": "Primärer Worktree — kann nicht gelöscht werden. Stattdessen das Projekt entfernen.", @@ -2402,11 +2451,7 @@ "terminalInputActions": { "attachFileHint": "Lange drücken, um stattdessen eine Datei anzuhängen", "attachPhoto": "Foto anhängen", - "sendingImage": "Bild wird gesendet", - "startDictation": "Diktat starten", - "startingDictation": "Diktat wird gestartet", - "stopDictation": "Diktat beenden", - "transcribingDictation": "Diktat wird transkribiert" + "sendingImage": "Bild wird gesendet" }, "terminalLiveInputStatus": { "listening": "Hört zu", @@ -2415,8 +2460,6 @@ "processing": "Wird verarbeitet", "releaseMicHint": "Zum Stoppen Mikrofon loslassen", "startingMic": "Mikrofon wird gestartet", - "stopHint": "Zum Stoppen Mikrofon antippen", - "transcribing": "Transkription auf dem Desktop", "uploadingImage": "Bild wird auf den Host hochgeladen", "uploadingImageTitle": "Bild wird hochgeladen" }, @@ -2510,7 +2553,8 @@ "insertFailed": "Diktat konnte nicht eingefügt werden", "insertFailedCopied": "Diktat konnte nicht eingefügt werden und wurde daher in die Zwischenablage kopiert", "inserted": "Diktat eingefügt", - "stoppedAfterSilence": "Nach einer Minute Stille beendet" + "stoppedAfterSilence": "Nach einer Minute Stille beendet", + "stoppedAtCloudLimit": "Diktat am 10-Minuten-Limit der Cloud gestoppt." }, "useNativeChatStop": { "stopNotSent": "Stoppbefehl nicht gesendet", @@ -2831,6 +2875,8 @@ "dictationHeading": "DIKTAT", "dictationMode": "Diktatmodus", "dictationModeDescription": "Umschalten: einmal zum Starten und erneut zum Stoppen drücken. Gedrückt halten: währenddessen diktieren.", + "dictationModeWithAutoDescription": "Automatisch: Tippen zum Starten und Stoppen; am Computer nimmt das Gedrückthalten des Kürzels auf, bis Sie loslassen. Gedrückt halten: währenddessen diktieren. Umschalten: einmal zum Starten und erneut zum Stoppen drücken.", + "autoMode": "Automatisch", "downloadFailed": "Download fehlgeschlagen", "enableDictation": "Diktat aktivieren", "holdMode": "Gedrückt halten", diff --git a/mobile/src/i18n/locales/en.json b/mobile/src/i18n/locales/en.json index f6d1543f0c5..46765ee3df1 100644 --- a/mobile/src/i18n/locales/en.json +++ b/mobile/src/i18n/locales/en.json @@ -142,6 +142,8 @@ "dictationDescription": "Dictate text into any focused pane on your desktop.", "dictationMode": "Dictation Mode", "dictationModeDescription": "Toggle: press once to start, again to stop. Hold: dictate while held.", + "dictationModeWithAutoDescription": "Auto: tap to start and stop; on your computer, holding the shortcut records until you let go. Hold: dictate while held. Toggle: press once to start, again to stop.", + "autoMode": "Auto", "speechModelHeading": "SPEECH MODEL", "speechModel": "Speech Model", "loading": "Loading voice settings…" @@ -517,6 +519,51 @@ "deleteFailed": "Failed to delete model", "updateFailed": "Failed to update dictation settings", "cloudModelNeedsKey": "Needs an OpenAI key" + }, + "controls": { + "start": "Dictate", + "starting": "Starting dictation", + "stop": "Stop and insert", + "finishing": "Finishing dictation", + "cancel": "Cancel dictation", + "durationSeconds_one": "{{count}} second", + "durationSeconds_other": "{{count}} seconds", + "durationMinutes_one": "{{count}} minute", + "durationMinutes_other": "{{count}} minutes", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "meterOnPhone": "Recording, {{duration}}, on this phone", + "meterOn": "Recording, {{duration}}, on {{computer}}", + "meterOnComputer": "Recording, {{duration}}, on the computer", + "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": { @@ -647,6 +694,8 @@ "hostScreenOverlays": { "deleteWorktree": "Delete Worktree", "deleteConfirmMessage": "Delete \"{{name}}\" ({{branch}})?", + "deleteDestroysEnvironment": "This also destroys the environment \"{{environment}}\" that Orca created for it, with any uncommitted work and running terminals on it.", + "deleteKeepsEnvironment": "The environment \"{{environment}}\" that Orca created for it keeps running: its recipe has no destroy step.", "sleep": "Sleep", "unpin": "Unpin", "pin": "Pin", @@ -1954,8 +2003,6 @@ "liveInput": "Live input", "uploadingImageTitle": "Uploading image", "releaseMicHint": "Release mic to stop", - "stopHint": "Tap mic to stop", - "transcribing": "Transcribing on desktop", "preparingMic": "Preparing microphone", "uploadingImage": "Uploading image to host" }, @@ -2126,11 +2173,7 @@ "terminalInputActions": { "sendingImage": "Sending image", "attachPhoto": "Attach a photo", - "attachFileHint": "Long press to attach a file instead", - "stopDictation": "Stop voice dictation", - "transcribingDictation": "Transcribing voice dictation", - "startingDictation": "Starting voice dictation", - "startDictation": "Start voice dictation" + "attachFileHint": "Long press to attach a file instead" }, "quickCommandEditorForm": { "terminalCommand": "Terminal Command", @@ -2343,7 +2386,8 @@ "insertFailedCopied": "Couldn't insert dictation, so it was copied to the clipboard", "insertFailed": "Couldn't insert dictation", "inserted": "Dictation inserted", - "stoppedAfterSilence": "Stopped after a minute of silence" + "stoppedAfterSilence": "Stopped after a minute of silence", + "stoppedAtCloudLimit": "Dictation stopped at the 10-minute cloud limit." }, "quickCommandLaunch": { "editBeforeRunning": "Edit this quick command before running it", @@ -3033,6 +3077,7 @@ "contextCleared": "Context cleared", "plan": "Plan", "permissionDenied": "{{agent}} denied permission. View details.", + "safetyReviewApproved": "{{agent}} approved this action. View details.", "safetyReview": "{{agent}} reported a safety review warning. View details.", "truncatedResponse": "Provider response truncated (original size: {{bytes}} bytes).", "modelFallback": "Claude switched models: {{from}} → {{to}}.", @@ -3292,6 +3337,7 @@ "unsupported": "This host runs an older Orca. Update Orca on the host, then try again." }, "hostOutage": { + "offlineAsOf": "{{host}} is offline · as of {{time}}", "reconnecting": "{{hostName}} is reconnecting…", "stopped": "{{hostName}} is stopped. Start it on your computer.", "server": "The server", diff --git a/mobile/src/i18n/locales/es.json b/mobile/src/i18n/locales/es.json index 2afe3233ac1..158cd39f958 100644 --- a/mobile/src/i18n/locales/es.json +++ b/mobile/src/i18n/locales/es.json @@ -304,6 +304,7 @@ "plan": "Plan", "stoppedManually": "Detenido manualmente", "permissionDenied": "{{agent}} denegó el permiso. Ver detalles.", + "safetyReviewApproved": "{{agent}} aprobó esta acción. Ver detalles.", "safetyReview": "{{agent}} notificó una advertencia de revisión de seguridad. Ver detalles.", "truncatedResponse": "Respuesta del proveedor truncada (tamaño original: {{bytes}} bytes).", "modelFallback": "Claude cambió de modelo: {{from}} → {{to}}.", @@ -637,6 +638,7 @@ "fullCopySaveUpdate": "Copiar todo y Guardar para este adjunto estarán disponibles en una actualización del teléfono." }, "hostOutage": { + "offlineAsOf": "{{host}} está sin conexión · a las {{time}}", "reconnecting": "{{hostName}} se está reconectando…", "stopped": "{{hostName}} está detenido. Inícialo en tu ordenador.", "server": "El servidor", @@ -1341,6 +1343,53 @@ "sessionLimit": "Hay demasiados dispositivos dictando en este ordenador. Inténtalo de nuevo cuando termine uno.", "sessionLost": "El dictado perdió la conexión con el ordenador. Inténtalo de nuevo.", "updateFailed": "No se pudieron actualizar los ajustes de dictado" + }, + "controls": { + "start": "Dictar", + "starting": "Iniciando el dictado", + "stop": "Detener e insertar", + "finishing": "Terminando el dictado", + "cancel": "Cancelar dictado", + "meterOnPhone": "Grabando, {{duration}}, en este teléfono", + "meterOn": "Grabando, {{duration}}, en {{computer}}", + "meterOnComputer": "Grabando, {{duration}}, en el ordenador", + "meter": "Grabando, {{duration}}", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "durationSeconds_one": "{{count}} segundo", + "durationSeconds_other": "{{count}} segundos", + "durationSeconds_many": "{{count}} segundos", + "durationMinutes_one": "{{count}} minuto", + "durationMinutes_other": "{{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": { @@ -1573,6 +1622,8 @@ }, "hostScreenOverlays": { "deleteConfirmMessage": "¿Eliminar \"{{name}}\" ({{branch}})?", + "deleteDestroysEnvironment": "También se destruye el entorno «{{environment}}» que Orca creó para él, con los cambios sin confirmar y los terminales en ejecución que haya en él.", + "deleteKeepsEnvironment": "El entorno «{{environment}}» que Orca creó para él sigue en ejecución: su receta no tiene un paso de destrucción.", "deleteWorktree": "Eliminar worktree", "pin": "Fijar", "primaryWorktreeDeleteHint": "El worktree principal no se puede eliminar. Quita el proyecto en su lugar.", @@ -2470,11 +2521,7 @@ "terminalInputActions": { "attachFileHint": "Mantén pulsado para adjuntar un archivo en su lugar.", "attachPhoto": "Adjuntar una foto", - "sendingImage": "Enviando imagen", - "startDictation": "Iniciar dictado de voz", - "startingDictation": "Iniciando dictado de voz", - "stopDictation": "Detener dictado de voz", - "transcribingDictation": "Transcribiendo dictado de voz" + "sendingImage": "Enviando imagen" }, "terminalLiveInputStatus": { "listening": "Escuchando", @@ -2483,8 +2530,6 @@ "processing": "Procesando", "releaseMicHint": "Suelta el micrófono para detener la grabación", "startingMic": "Iniciando micrófono", - "stopHint": "Toca el micrófono para parar", - "transcribing": "Transcribiendo en el escritorio", "uploadingImage": "Subiendo imagen al host", "uploadingImageTitle": "Subiendo imagen" }, @@ -2578,7 +2623,8 @@ "insertFailed": "No se pudo insertar el dictado", "insertFailedCopied": "No se pudo insertar el dictado, así que se copió al portapapeles.", "inserted": "Dictado insertado", - "stoppedAfterSilence": "Se detuvo tras un minuto de silencio" + "stoppedAfterSilence": "Se detuvo tras un minuto de silencio", + "stoppedAtCloudLimit": "Dictado detenido al llegar al límite de 10 minutos en la nube." }, "useNativeChatStop": { "stopNotSent": "No se envió la orden de detener", @@ -2903,6 +2949,8 @@ "dictationHeading": "DICTADO", "dictationMode": "Modo de dictado", "dictationModeDescription": "Alternar: pulsa una vez para iniciar y otra para detener. Mantener pulsado: dicta sin soltar.", + "dictationModeWithAutoDescription": "Automático: toca para iniciar y detener; en tu ordenador, mantener el atajo graba hasta que lo sueltes. Mantener pulsado: dicta sin soltar. Alternar: pulsa una vez para iniciar y otra para detener.", + "autoMode": "Automático", "downloadFailed": "Falló la descarga", "enableDictation": "Habilitar dictado de voz", "holdMode": "Mantener", diff --git a/mobile/src/i18n/locales/fr.json b/mobile/src/i18n/locales/fr.json index fbfb961983b..c7f2225a033 100644 --- a/mobile/src/i18n/locales/fr.json +++ b/mobile/src/i18n/locales/fr.json @@ -304,6 +304,7 @@ "plan": "Plan", "stoppedManually": "Arrêté manuellement", "permissionDenied": "{{agent}} a refusé la permission. Voir les détails.", + "safetyReviewApproved": "{{agent}} a approuvé cette action. Voir les détails.", "safetyReview": "{{agent}} a signalé un avertissement de sécurité. Voir les détails.", "truncatedResponse": "Réponse du fournisseur tronquée (taille d’origine : {{bytes}} octets).", "modelFallback": "Claude a changé de modèle : {{from}} → {{to}}.", @@ -637,6 +638,7 @@ "fullCopySaveUpdate": "La copie intégrale et l’enregistrement de cette pièce jointe seront disponibles dans une mise à jour du téléphone." }, "hostOutage": { + "offlineAsOf": "{{host}} est hors ligne · état à {{time}}", "reconnecting": "{{hostName}} se reconnecte…", "stopped": "{{hostName}} est arrêté. Démarrez-le sur votre ordinateur.", "server": "Le serveur", @@ -1341,6 +1343,53 @@ "sessionLimit": "Trop d'appareils dictent sur cet ordinateur. Réessayez quand l'un d'eux aura terminé.", "sessionLost": "La dictée a perdu sa connexion à l'ordinateur. Réessayez.", "updateFailed": "Impossible de mettre à jour les paramètres de dictée" + }, + "controls": { + "start": "Dicter", + "starting": "Démarrage de la dictée", + "stop": "Arrêter et insérer", + "finishing": "Finalisation de la dictée", + "cancel": "Annuler la dictée", + "meterOnPhone": "Enregistrement, {{duration}}, sur ce téléphone", + "meterOn": "Enregistrement, {{duration}}, sur {{computer}}", + "meterOnComputer": "Enregistrement, {{duration}}, sur l’ordinateur", + "meter": "Enregistrement, {{duration}}", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "durationSeconds_one": "{{count}} seconde", + "durationSeconds_other": "{{count}} secondes", + "durationSeconds_many": "{{count}} secondes", + "durationMinutes_one": "{{count}} minute", + "durationMinutes_other": "{{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": { @@ -1573,6 +1622,8 @@ }, "hostScreenOverlays": { "deleteConfirmMessage": "Supprimer « {{name}} » ({{branch}}) ?", + "deleteDestroysEnvironment": "Cela détruit aussi l’environnement « {{environment}} » qu’Orca a créé pour lui, avec les modifications non validées et les terminaux en cours qui s’y trouvent.", + "deleteKeepsEnvironment": "L’environnement « {{environment}} » qu’Orca a créé pour lui continue de tourner : sa recette n’a pas d’étape de destruction.", "deleteWorktree": "Supprimer le worktree", "pin": "Épingler", "primaryWorktreeDeleteHint": "Worktree principal — impossible à supprimer. Retirez plutôt le projet.", @@ -2470,11 +2521,7 @@ "terminalInputActions": { "attachFileHint": "Appuyez longuement pour joindre un fichier à la place.", "attachPhoto": "Joindre une photo", - "sendingImage": "Envoi de l'image", - "startDictation": "Démarrer la dictée vocale", - "startingDictation": "Démarrage de la dictée vocale", - "stopDictation": "Arrêter la dictée vocale", - "transcribingDictation": "Transcription de la dictée vocale" + "sendingImage": "Envoi de l'image" }, "terminalLiveInputStatus": { "listening": "Écoute en cours", @@ -2483,8 +2530,6 @@ "processing": "Traitement en cours", "releaseMicHint": "Relâchez le micro pour arrêter", "startingMic": "Démarrage du micro", - "stopHint": "Touchez le micro pour arrêter", - "transcribing": "Transcription sur l'ordinateur", "uploadingImage": "Envoi de l'image à l'hôte", "uploadingImageTitle": "Envoi de l'image" }, @@ -2578,7 +2623,8 @@ "insertFailed": "Impossible d'insérer la dictée", "insertFailedCopied": "Impossible d'insérer la dictée ; elle a été copiée dans le presse-papiers", "inserted": "Dictée insérée", - "stoppedAfterSilence": "Arrêt après une minute de silence" + "stoppedAfterSilence": "Arrêt après une minute de silence", + "stoppedAtCloudLimit": "Dictée arrêtée à la limite cloud de 10 minutes." }, "useNativeChatStop": { "stopNotSent": "Commande d'arrêt non envoyée", @@ -2903,6 +2949,8 @@ "dictationHeading": "DICTÉE", "dictationMode": "Mode de dictée", "dictationModeDescription": "Bascule : appuyez une fois pour démarrer, puis à nouveau pour arrêter. Maintien : dictez tant que vous maintenez l'appui.", + "dictationModeWithAutoDescription": "Auto : appuyez pour démarrer et arrêter ; sur votre ordinateur, maintenir le raccourci enregistre jusqu’à ce que vous relâchiez. Maintien : dictez tant que vous maintenez l’appui. Bascule : appuyez une fois pour démarrer, puis à nouveau pour arrêter.", + "autoMode": "Auto", "downloadFailed": "Échec du téléchargement", "enableDictation": "Activer la dictée vocale", "holdMode": "Maintien", diff --git a/mobile/src/i18n/locales/ja.json b/mobile/src/i18n/locales/ja.json index 954f8547baf..ed93625b9f0 100644 --- a/mobile/src/i18n/locales/ja.json +++ b/mobile/src/i18n/locales/ja.json @@ -300,6 +300,7 @@ "plan": "プラン", "stoppedManually": "手動で停止しました", "permissionDenied": "{{agent}} が権限を拒否しました。詳細を表示。", + "safetyReviewApproved": "{{agent}} がこの操作を承認しました。詳細を表示。", "safetyReview": "{{agent}} が安全性レビューの警告を報告しました。詳細を表示。", "truncatedResponse": "プロバイダーの応答は切り詰められています(元のサイズ:{{bytes}} バイト)。", "modelFallback": "Claudeがモデルを切り替えました: {{from}} → {{to}}。", @@ -598,6 +599,7 @@ "fullCopySaveUpdate": "この添付ファイルの全内容のコピーと保存は、スマートフォンのアップデートで利用可能になります。" }, "hostOutage": { + "offlineAsOf": "{{host}} はオフラインです · {{time}} 時点", "reconnecting": "{{hostName}} に再接続しています…", "stopped": "{{hostName}} は停止しています。コンピューターで起動してください。", "server": "サーバー", @@ -1298,6 +1300,51 @@ "sessionLimit": "このコンピュータでディクテーション中のデバイスが多すぎます。いずれかが終わってから、もう一度お試しください。", "sessionLost": "ディクテーション中にコンピュータとの接続が切れました。再試行してください。", "updateFailed": "ディクテーション設定の更新に失敗しました。" + }, + "controls": { + "start": "音声入力", + "starting": "音声入力を開始しています", + "stop": "停止して挿入", + "finishing": "音声入力を仕上げています", + "cancel": "音声入力をキャンセル", + "meterOnPhone": "録音中、{{duration}}、このスマートフォンで処理", + "meterOn": "録音中、{{duration}}、{{computer}} で処理", + "meterOnComputer": "録音中、{{duration}}、コンピュータで処理", + "meter": "録音中、{{duration}}", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "durationSeconds_one": "{{count}} 秒", + "durationSeconds_other": "{{count}} 秒", + "durationMinutes_one": "{{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": { @@ -1530,6 +1577,8 @@ }, "hostScreenOverlays": { "deleteConfirmMessage": "「{{name}}」({{branch}})を削除しますか?", + "deleteDestroysEnvironment": "Orca がこのワークツリー用に作成した環境「{{environment}}」も、コミットされていない変更や実行中のターミナルごと破棄されます。", + "deleteKeepsEnvironment": "Orca がこのワークツリー用に作成した環境「{{environment}}」は動作し続けます。レシピに破棄ステップがありません。", "deleteWorktree": "ワークツリーを削除", "pin": "ピン", "primaryWorktreeDeleteHint": "プライマリワークツリーは削除できません。代わりにプロジェクトを削除してください。", @@ -2398,11 +2447,7 @@ "terminalInputActions": { "attachFileHint": "長押しすると、写真の代わりにファイルを添付できます。", "attachPhoto": "写真を添付", - "sendingImage": "画像を送信中…", - "startDictation": "音声ディクテーションを開始", - "startingDictation": "音声ディクテーションを開始中", - "stopDictation": "音声ディクテーションを停止", - "transcribingDictation": "音声ディクテーションを文字起こし中" + "sendingImage": "画像を送信中…" }, "terminalLiveInputStatus": { "listening": "聞き取り中", @@ -2411,8 +2456,6 @@ "processing": "処理中", "releaseMicHint": "マイクボタンから指を離すと停止", "startingMic": "マイクを起動中", - "stopHint": "マイクをタップして停止", - "transcribing": "デスクトップで文字起こし中", "uploadingImage": "ホストに画像をアップロード中", "uploadingImageTitle": "画像をアップロード中" }, @@ -2506,7 +2549,8 @@ "insertFailed": "ディクテーションの結果を挿入できませんでした。", "insertFailedCopied": "ディクテーションの結果を挿入できず、クリップボードにコピーしました。", "inserted": "ディクテーションの結果を挿入しました。", - "stoppedAfterSilence": "1分間音声がなかったため停止しました。" + "stoppedAfterSilence": "1分間音声がなかったため停止しました。", + "stoppedAtCloudLimit": "クラウドの10分の上限に達したため、ディクテーションが停止しました。" }, "useNativeChatStop": { "stopNotSent": "停止要求を送信できませんでした。", @@ -2827,6 +2871,8 @@ "dictationHeading": "ディクテーション", "dictationMode": "ディクテーションモード", "dictationModeDescription": "トグル:1 回押すと開始し、もう一度押すと停止します。ホールド:押している間だけ音声入力します。", + "dictationModeWithAutoDescription": "自動:タップで開始と停止。コンピュータではショートカットを押し続けると離すまで録音します。ホールド:押している間だけ音声入力します。トグル:1 回押すと開始し、もう一度押すと停止します。", + "autoMode": "自動", "downloadFailed": "ダウンロードに失敗しました", "enableDictation": "音声ディクテーションを有効にする", "holdMode": "ホールド", diff --git a/mobile/src/i18n/locales/ko.json b/mobile/src/i18n/locales/ko.json index 826352f43aa..108a7a20015 100644 --- a/mobile/src/i18n/locales/ko.json +++ b/mobile/src/i18n/locales/ko.json @@ -300,6 +300,7 @@ "plan": "계획", "stoppedManually": "수동으로 중지됨", "permissionDenied": "{{agent}}이(가) 권한을 거부했습니다. 세부 정보 보기.", + "safetyReviewApproved": "{{agent}}이(가) 이 작업을 승인했습니다. 세부 정보 보기.", "safetyReview": "{{agent}}이(가) 안전 검토 경고를 보고했습니다. 세부 정보 보기.", "truncatedResponse": "공급자 응답이 잘렸습니다(원래 크기: {{bytes}}바이트).", "modelFallback": "Claude가 모델을 변경했습니다: {{from}} → {{to}}.", @@ -598,6 +599,7 @@ "fullCopySaveUpdate": "이 첨부 파일의 전체 복사와 저장 기능은 휴대전화 업데이트에서 제공될 예정입니다." }, "hostOutage": { + "offlineAsOf": "{{host}} 오프라인 · {{time}} 기준", "reconnecting": "{{hostName}}에 다시 연결하는 중…", "stopped": "{{hostName}}이(가) 중지되었습니다. 컴퓨터에서 시작하세요.", "server": "서버", @@ -1298,6 +1300,51 @@ "sessionLimit": "이 컴퓨터에서 받아쓰기 중인 기기가 너무 많습니다. 하나가 끝나면 다시 시도하세요.", "sessionLost": "받아쓰기 중 컴퓨터와의 연결이 끊어졌습니다. 다시 시도하세요.", "updateFailed": "받아쓰기 설정을 업데이트하지 못했습니다." + }, + "controls": { + "start": "받아쓰기", + "starting": "받아쓰기 시작 중", + "stop": "중지하고 삽입", + "finishing": "받아쓰기 마무리 중", + "cancel": "받아쓰기 취소", + "meterOnPhone": "녹음 중, {{duration}}, 이 휴대폰에서", + "meterOn": "녹음 중, {{duration}}, {{computer}}에서", + "meterOnComputer": "녹음 중, {{duration}}, 컴퓨터에서", + "meter": "녹음 중, {{duration}}", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "durationSeconds_one": "{{count}}초", + "durationSeconds_other": "{{count}}초", + "durationMinutes_one": "{{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": { @@ -1530,6 +1577,8 @@ }, "hostScreenOverlays": { "deleteConfirmMessage": "\"{{name}}\" ({{branch}})을(를) 삭제하시겠습니까?", + "deleteDestroysEnvironment": "Orca가 이 작업 트리용으로 만든 환경 \"{{environment}}\"도 커밋되지 않은 작업과 실행 중인 터미널과 함께 삭제됩니다.", + "deleteKeepsEnvironment": "Orca가 이 작업 트리용으로 만든 환경 \"{{environment}}\"은(는) 계속 실행됩니다. 레시피에 삭제 단계가 없습니다.", "deleteWorktree": "작업 트리 삭제", "pin": "고정", "primaryWorktreeDeleteHint": "기본 작업 트리는 삭제할 수 없습니다. 대신 프로젝트를 제거하세요.", @@ -2398,11 +2447,7 @@ "terminalInputActions": { "attachFileHint": "사진 대신 파일을 첨부하려면 길게 누르세요.", "attachPhoto": "사진 첨부", - "sendingImage": "이미지 전송 중", - "startDictation": "음성 받아쓰기 시작", - "startingDictation": "음성 받아쓰기 시작 중", - "stopDictation": "음성 받아쓰기 중지", - "transcribingDictation": "음성 받아쓰기를 텍스트로 변환 중" + "sendingImage": "이미지 전송 중" }, "terminalLiveInputStatus": { "listening": "듣는 중", @@ -2411,8 +2456,6 @@ "processing": "처리 중", "releaseMicHint": "중지하려면 마이크에서 손을 떼세요", "startingMic": "마이크 시작 중", - "stopHint": "중지하려면 마이크를 탭하세요", - "transcribing": "데스크톱에서 텍스트로 변환 중", "uploadingImage": "호스트에 이미지 업로드 중", "uploadingImageTitle": "이미지 업로드 중" }, @@ -2506,7 +2549,8 @@ "insertFailed": "받아쓰기 내용을 삽입하지 못했습니다.", "insertFailedCopied": "받아쓰기 내용을 삽입하지 못해 클립보드에 복사했습니다.", "inserted": "받아쓰기 내용 삽입됨", - "stoppedAfterSilence": "1분 동안 말소리가 없어 중지했습니다." + "stoppedAfterSilence": "1분 동안 말소리가 없어 중지했습니다.", + "stoppedAtCloudLimit": "클라우드 10분 제한에 도달해 받아쓰기가 중지되었습니다." }, "useNativeChatStop": { "stopNotSent": "중지 요청 전송 안 됨", @@ -2827,6 +2871,8 @@ "dictationHeading": "받아쓰기", "dictationMode": "받아쓰기 모드", "dictationModeDescription": "토글: 한 번 누르면 받아쓰기를 시작하고, 다시 누르면 중지합니다. 길게 누르기: 누르고 있는 동안 받아쓰기합니다.", + "dictationModeWithAutoDescription": "자동: 탭하여 시작하고 중지합니다. 컴퓨터에서는 단축키를 길게 누르면 손을 뗄 때까지 녹음합니다. 길게 누르기: 누르고 있는 동안 받아쓰기합니다. 토글: 한 번 누르면 시작하고, 다시 누르면 중지합니다.", + "autoMode": "자동", "downloadFailed": "다운로드 실패", "enableDictation": "음성 받아쓰기 활성화", "holdMode": "길게 누르기", diff --git a/mobile/src/i18n/locales/pt.json b/mobile/src/i18n/locales/pt.json index ffa929cb422..675f0e6c313 100644 --- a/mobile/src/i18n/locales/pt.json +++ b/mobile/src/i18n/locales/pt.json @@ -304,6 +304,7 @@ "plan": "Plano", "stoppedManually": "Interrompido manualmente", "permissionDenied": "{{agent}} negou a permissão. Ver detalhes.", + "safetyReviewApproved": "{{agent}} aprovou esta ação. Ver detalhes.", "safetyReview": "{{agent}} relatou um aviso de revisão de segurança. Ver detalhes.", "truncatedResponse": "Resposta do provedor truncada (tamanho original: {{bytes}} bytes).", "modelFallback": "Claude mudou de modelo: {{from}} → {{to}}.", @@ -637,6 +638,7 @@ "fullCopySaveUpdate": "Copiar tudo e Salvar para este anexo estarão disponíveis em uma atualização do celular." }, "hostOutage": { + "offlineAsOf": "{{host}} está off-line · em {{time}}", "reconnecting": "{{hostName}} está reconectando…", "stopped": "{{hostName}} está parado. Inicie-o no seu computador.", "server": "O servidor", @@ -1341,6 +1343,53 @@ "sessionLimit": "Há dispositivos demais ditando neste computador. Tente de novo quando um deles terminar.", "sessionLost": "O ditado perdeu a conexão com o computador. Tente novamente.", "updateFailed": "Falha ao atualizar as configurações de ditado" + }, + "controls": { + "start": "Ditar", + "starting": "Iniciando o ditado", + "stop": "Parar e inserir", + "finishing": "Finalizando o ditado", + "cancel": "Cancelar ditado", + "meterOnPhone": "Gravando, {{duration}}, neste telefone", + "meterOn": "Gravando, {{duration}}, em {{computer}}", + "meterOnComputer": "Gravando, {{duration}}, no computador", + "meter": "Gravando, {{duration}}", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "durationSeconds_one": "{{count}} segundo", + "durationSeconds_other": "{{count}} segundos", + "durationSeconds_many": "{{count}} segundos", + "durationMinutes_one": "{{count}} minuto", + "durationMinutes_other": "{{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": { @@ -1573,6 +1622,8 @@ }, "hostScreenOverlays": { "deleteConfirmMessage": "Excluir \"{{name}}\" ({{branch}})?", + "deleteDestroysEnvironment": "Isto também destrói o ambiente \"{{environment}}\" que o Orca criou para ele, com as alterações não confirmadas e os terminais em execução nele.", + "deleteKeepsEnvironment": "O ambiente \"{{environment}}\" que o Orca criou para ele continua em execução: a receita não tem um passo de destruição.", "deleteWorktree": "Excluir Worktree", "pin": "Fixar", "primaryWorktreeDeleteHint": "Worktree primária — não pode ser excluída. Remova o projeto em vez disso.", @@ -2470,11 +2521,7 @@ "terminalInputActions": { "attachFileHint": "Mantenha pressionado para anexar um arquivo em vez de uma foto", "attachPhoto": "Anexar uma foto", - "sendingImage": "Enviando imagem", - "startDictation": "Iniciar ditado por voz", - "startingDictation": "Iniciando ditado por voz", - "stopDictation": "Parar ditado por voz", - "transcribingDictation": "Transcrevendo ditado por voz" + "sendingImage": "Enviando imagem" }, "terminalLiveInputStatus": { "listening": "Ouvindo", @@ -2483,8 +2530,6 @@ "processing": "Processando", "releaseMicHint": "Solte o microfone para parar", "startingMic": "Ativando microfone", - "stopHint": "Toque no microfone para parar", - "transcribing": "Transcrevendo no desktop", "uploadingImage": "Enviando imagem para o host", "uploadingImageTitle": "Enviando imagem" }, @@ -2578,7 +2623,8 @@ "insertFailed": "Não foi possível inserir o ditado", "insertFailedCopied": "Não foi possível inserir o ditado, então ele foi copiado para a área de transferência", "inserted": "Ditado inserido", - "stoppedAfterSilence": "Parou após um minuto de silêncio" + "stoppedAfterSilence": "Parou após um minuto de silêncio", + "stoppedAtCloudLimit": "O ditado foi interrompido no limite de 10 minutos da nuvem." }, "useNativeChatStop": { "stopNotSent": "Comando de parada não enviado", @@ -2903,6 +2949,8 @@ "dictationHeading": "DITADO", "dictationMode": "Modo de Ditado", "dictationModeDescription": "Alternar: pressione uma vez para iniciar e novamente para parar. Manter pressionado: pressione e segure para ditar.", + "dictationModeWithAutoDescription": "Automático: toque para iniciar e parar; no computador, manter o atalho pressionado grava até você soltar. Manter pressionado: pressione e segure para ditar. Alternar: pressione uma vez para iniciar e novamente para parar.", + "autoMode": "Automático", "downloadFailed": "Falha no download", "enableDictation": "Ativar Ditado por Voz", "holdMode": "Manter Pressionado", diff --git a/mobile/src/i18n/locales/ru.json b/mobile/src/i18n/locales/ru.json index 946c5ce0a27..97b5c0be44f 100644 --- a/mobile/src/i18n/locales/ru.json +++ b/mobile/src/i18n/locales/ru.json @@ -308,6 +308,7 @@ "plan": "План", "stoppedManually": "Остановлено вручную", "permissionDenied": "{{agent}} отказал в разрешении. Подробнее.", + "safetyReviewApproved": "{{agent}} одобрил это действие. Подробнее.", "safetyReview": "{{agent}} сообщил о предупреждении проверки безопасности. Подробнее.", "truncatedResponse": "Ответ поставщика обрезан (исходный размер: {{bytes}} байт).", "modelFallback": "Claude переключил модель: {{from}} → {{to}}.", @@ -672,6 +673,7 @@ "fullCopySaveUpdate": "Полное копирование и сохранение этого вложения станут доступны после обновления приложения на телефоне." }, "hostOutage": { + "offlineAsOf": "{{host}} не в сети · на {{time}}", "reconnecting": "{{hostName}} переподключается…", "stopped": "{{hostName}} остановлен. Запустите его на компьютере.", "server": "Сервер", @@ -1380,6 +1382,55 @@ "sessionLimit": "На этом компьютере диктует слишком много устройств. Повторите попытку, когда одно из них закончит.", "sessionLost": "Во время диктовки потеряно соединение с компьютером. Попробуйте ещё раз.", "updateFailed": "Не удалось обновить настройки диктовки" + }, + "controls": { + "start": "Диктовать", + "starting": "Диктовка запускается", + "stop": "Остановить и вставить", + "finishing": "Диктовка завершается", + "cancel": "Отменить диктовку", + "meterOnPhone": "Запись, {{duration}}, на этом телефоне", + "meterOn": "Запись, {{duration}}, на {{computer}}", + "meterOnComputer": "Запись, {{duration}}, на компьютере", + "meter": "Запись, {{duration}}", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "durationSeconds_one": "{{count}} секунда", + "durationSeconds_other": "{{count}} секунды", + "durationSeconds_few": "{{count}} секунды", + "durationSeconds_many": "{{count}} секунд", + "durationMinutes_one": "{{count}} минута", + "durationMinutes_other": "{{count}} минуты", + "durationMinutes_few": "{{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": { @@ -1612,6 +1663,8 @@ }, "hostScreenOverlays": { "deleteConfirmMessage": "Удалить «{{name}}» ({{branch}})?", + "deleteDestroysEnvironment": "Также будет уничтожено окружение «{{environment}}», созданное для него Orca, вместе с незакоммиченными изменениями и запущенными терминалами.", + "deleteKeepsEnvironment": "Окружение «{{environment}}», созданное для него Orca, продолжит работать: в его рецепте нет шага уничтожения.", "deleteWorktree": "Удалить рабочее дерево", "pin": "Закрепить", "primaryWorktreeDeleteHint": "Основное рабочее дерево нельзя удалить. Вместо этого уберите проект.", @@ -2538,11 +2591,7 @@ "terminalInputActions": { "attachFileHint": "Нажмите и удерживайте, чтобы прикрепить файл вместо фото", "attachPhoto": "Прикрепить фото", - "sendingImage": "Отправка изображения", - "startDictation": "Начать диктовку", - "startingDictation": "Запуск диктовки", - "stopDictation": "Остановить диктовку", - "transcribingDictation": "Распознавание диктовки" + "sendingImage": "Отправка изображения" }, "terminalLiveInputStatus": { "listening": "Прослушивание", @@ -2551,8 +2600,6 @@ "processing": "Обработка", "releaseMicHint": "Отпустите кнопку микрофона, чтобы остановить запись", "startingMic": "Включение микрофона", - "stopHint": "Нажмите на микрофон, чтобы остановить", - "transcribing": "Распознавание на компьютере", "uploadingImage": "Загрузка изображения на сервер", "uploadingImageTitle": "Загрузка изображения" }, @@ -2646,7 +2693,8 @@ "insertFailed": "Не удалось вставить текст диктовки", "insertFailedCopied": "Не удалось вставить текст диктовки — он скопирован в буфер обмена", "inserted": "Текст диктовки вставлен", - "stoppedAfterSilence": "Остановлено после минуты тишины" + "stoppedAfterSilence": "Остановлено после минуты тишины", + "stoppedAtCloudLimit": "Диктовка остановлена: достигнут 10-минутный облачный лимит." }, "useNativeChatStop": { "stopNotSent": "Команда остановки не отправлена", @@ -2975,6 +3023,8 @@ "dictationHeading": "ДИКТОВКА", "dictationMode": "Режим диктовки", "dictationModeDescription": "Переключение: нажмите один раз, чтобы начать, ещё раз — чтобы остановить. Удержание: диктуйте, пока удерживаете кнопку.", + "dictationModeWithAutoDescription": "Авто: нажмите, чтобы начать и остановить; на компьютере удержание сочетания клавиш записывает до отпускания. Удержание: диктуйте, пока удерживаете кнопку. Переключение: нажмите один раз, чтобы начать, ещё раз — чтобы остановить.", + "autoMode": "Авто", "downloadFailed": "Не удалось скачать", "enableDictation": "Включить голосовую диктовку", "holdMode": "Удержание", diff --git a/mobile/src/i18n/locales/tr.json b/mobile/src/i18n/locales/tr.json index 5e3a4d21824..9fd904d49c4 100644 --- a/mobile/src/i18n/locales/tr.json +++ b/mobile/src/i18n/locales/tr.json @@ -300,6 +300,7 @@ "plan": "Plan", "stoppedManually": "Elle durduruldu", "permissionDenied": "{{agent}} izin vermedi. Ayrıntıları görüntüleyin.", + "safetyReviewApproved": "{{agent}} bu işleme onay verdi. Ayrıntıları görüntüleyin.", "safetyReview": "{{agent}} bir güvenlik incelemesi uyarısı bildirdi. Ayrıntıları görüntüleyin.", "truncatedResponse": "Sağlayıcı yanıtı kısaltıldı (özgün boyut: {{bytes}} bayt).", "modelFallback": "Claude model değiştirdi: {{from}} → {{to}}.", @@ -602,6 +603,7 @@ "fullCopySaveUpdate": "Bu ek için Tümünü Kopyala ve Kaydet özellikleri bir telefon güncellemesiyle kullanılabilecek." }, "hostOutage": { + "offlineAsOf": "{{host}} çevrimdışı · {{time}} itibarıyla", "reconnecting": "{{hostName}} yeniden bağlanıyor…", "stopped": "{{hostName}} durduruldu. Bilgisayarınızda başlatın.", "server": "Sunucu", @@ -1302,6 +1304,51 @@ "sessionLimit": "Bu bilgisayarda çok fazla cihaz dikte ediyor. Biri bitince tekrar deneyin.", "sessionLost": "Diktenin bilgisayarla bağlantısı kesildi. Yeniden deneyin.", "updateFailed": "Dikte ayarları güncellenemedi" + }, + "controls": { + "start": "Dikte et", + "starting": "Dikte başlatılıyor", + "stop": "Durdur ve ekle", + "finishing": "Dikte tamamlanıyor", + "cancel": "Dikteyi iptal et", + "meterOnPhone": "Kaydediliyor, {{duration}}, bu telefonda", + "meterOn": "Kaydediliyor, {{duration}}, {{computer}} üzerinde", + "meterOnComputer": "Kaydediliyor, {{duration}}, bilgisayarda", + "meter": "Kaydediliyor, {{duration}}", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "durationSeconds_one": "{{count}} saniye", + "durationSeconds_other": "{{count}} saniye", + "durationMinutes_one": "{{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": { @@ -1534,6 +1581,8 @@ }, "hostScreenOverlays": { "deleteConfirmMessage": "“{{name}}” ({{branch}}) silinsin mi?", + "deleteDestroysEnvironment": "Orca'nın bunun için oluşturduğu \"{{environment}}\" ortamı da, içindeki commit edilmemiş değişiklikler ve çalışan terminallerle birlikte yok edilir.", + "deleteKeepsEnvironment": "Orca'nın bunun için oluşturduğu \"{{environment}}\" ortamı çalışmaya devam eder: tarifinde yok etme adımı yok.", "deleteWorktree": "Worktree'yi Sil", "pin": "Sabitle", "primaryWorktreeDeleteHint": "Birincil worktree, silinemez. Bunun yerine projeyi kaldırın.", @@ -2402,11 +2451,7 @@ "terminalInputActions": { "attachFileHint": "Fotoğraf yerine dosya eklemek için basılı tutun", "attachPhoto": "Fotoğraf ekle", - "sendingImage": "Görsel gönderiliyor", - "startDictation": "Sesli dikteyi başlat", - "startingDictation": "Sesli dikte başlatılıyor", - "stopDictation": "Sesli dikteyi durdur", - "transcribingDictation": "Sesli dikte yazıya dökülüyor" + "sendingImage": "Görsel gönderiliyor" }, "terminalLiveInputStatus": { "listening": "Dinliyor", @@ -2415,8 +2460,6 @@ "processing": "İşleniyor", "releaseMicHint": "Durdurmak için mikrofonu bırakın", "startingMic": "Mikrofon başlatılıyor", - "stopHint": "Durdurmak için mikrofona dokunun", - "transcribing": "Masaüstünde yazıya dökülüyor", "uploadingImage": "Görsel sunucuya yükleniyor", "uploadingImageTitle": "Görsel yükleniyor" }, @@ -2510,7 +2553,8 @@ "insertFailed": "Dikte metni eklenemedi", "insertFailedCopied": "Dikte metni eklenemediği için panoya kopyalandı", "inserted": "Dikte metni eklendi", - "stoppedAfterSilence": "Bir dakika sessizlikten sonra durduruldu" + "stoppedAfterSilence": "Bir dakika sessizlikten sonra durduruldu", + "stoppedAtCloudLimit": "Dikte, 10 dakikalık bulut sınırında durduruldu." }, "useNativeChatStop": { "stopNotSent": "Durdurma isteği gönderilemedi", @@ -2831,6 +2875,8 @@ "dictationHeading": "DİKTE", "dictationMode": "Dikte Modu", "dictationModeDescription": "Aç/kapat: başlatmak için bir kez, durdurmak için tekrar basın. Basılı tut: basılı tuttuğunuz sürece dikte edin.", + "dictationModeWithAutoDescription": "Otomatik: başlatmak ve durdurmak için dokunun; bilgisayarınızda kısayolu basılı tutmak bırakana kadar kaydeder. Basılı tut: basılı tuttuğunuz sürece dikte edin. Aç/kapat: başlatmak için bir kez, durdurmak için tekrar basın.", + "autoMode": "Otomatik", "downloadFailed": "İndirme tamamlanamadı", "enableDictation": "Sesli Dikteyi Etkinleştir", "holdMode": "Basılı Tut", diff --git a/mobile/src/i18n/locales/zh-Hant.json b/mobile/src/i18n/locales/zh-Hant.json index 9c74b7b9ccd..6512122f33a 100644 --- a/mobile/src/i18n/locales/zh-Hant.json +++ b/mobile/src/i18n/locales/zh-Hant.json @@ -300,6 +300,7 @@ "plan": "計畫", "stoppedManually": "已手動停止", "permissionDenied": "{{agent}} 拒絕了權限。查看詳細資訊。", + "safetyReviewApproved": "{{agent}} 已核准此操作。查看詳細資訊。", "safetyReview": "{{agent}} 回報了安全審查警告。查看詳細資訊。", "truncatedResponse": "供應商回應已截斷(原始大小:{{bytes}} 位元組)。", "modelFallback": "Claude 已切換模型:{{from}} → {{to}}。", @@ -598,6 +599,7 @@ "fullCopySaveUpdate": "完整複製和儲存此附件的功能將在手機更新中提供。" }, "hostOutage": { + "offlineAsOf": "{{host}} 已離線 · 截至 {{time}}", "reconnecting": "{{hostName}} 正在重新連線…", "stopped": "{{hostName}} 已停止。請在你的電腦上啟動它。", "server": "伺服器", @@ -1298,6 +1300,51 @@ "sessionLimit": "這台電腦上正在聽寫的裝置過多。請等其中一台結束後再試。", "sessionLost": "聽寫功能與電腦的連線已中斷。請再試一次。", "updateFailed": "無法更新聽寫設定" + }, + "controls": { + "start": "聽寫", + "starting": "正在開始聽寫", + "stop": "停止並插入", + "finishing": "正在完成聽寫", + "cancel": "取消聽寫", + "meterOnPhone": "正在錄音,{{duration}},在此手機上", + "meterOn": "正在錄音,{{duration}},在 {{computer}} 上", + "meterOnComputer": "正在錄音,{{duration}},在電腦上", + "meter": "正在錄音,{{duration}}", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "durationSeconds_one": "{{count}} 秒", + "durationSeconds_other": "{{count}} 秒", + "durationMinutes_one": "{{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": { @@ -1530,6 +1577,8 @@ }, "hostScreenOverlays": { "deleteConfirmMessage": "要刪除「{{name}}」({{branch}})嗎?", + "deleteDestroysEnvironment": "這也會銷毀 Orca 為其建立的環境「{{environment}}」,包括其中未提交的變更和正在執行的終端機。", + "deleteKeepsEnvironment": "Orca 為其建立的環境「{{environment}}」會繼續執行:其配方沒有銷毀步驟。", "deleteWorktree": "刪除工作樹", "pin": "固定", "primaryWorktreeDeleteHint": "主工作樹不能刪除。請改為移除專案。", @@ -2398,11 +2447,7 @@ "terminalInputActions": { "attachFileHint": "長按可改為附加檔案", "attachPhoto": "附加照片", - "sendingImage": "正在傳送圖片", - "startDictation": "開始語音聽寫", - "startingDictation": "正在啟動語音聽寫", - "stopDictation": "停止語音聽寫", - "transcribingDictation": "正在轉錄語音聽寫內容" + "sendingImage": "正在傳送圖片" }, "terminalLiveInputStatus": { "listening": "正在聆聽", @@ -2411,8 +2456,6 @@ "processing": "處理中", "releaseMicHint": "放開按鈕即可停止錄音", "startingMic": "正在啟動麥克風", - "stopHint": "點一下麥克風即可停止", - "transcribing": "正在電腦上轉錄", "uploadingImage": "正在將圖片上傳至主機", "uploadingImageTitle": "正在上傳圖片" }, @@ -2506,7 +2549,8 @@ "insertFailed": "無法插入聽寫內容", "insertFailedCopied": "無法插入聽寫內容,已複製到剪貼簿", "inserted": "已插入聽寫內容", - "stoppedAfterSilence": "靜音一分鐘後已停止" + "stoppedAfterSilence": "靜音一分鐘後已停止", + "stoppedAtCloudLimit": "已達 10 分鐘雲端上限。聽寫已停止。" }, "useNativeChatStop": { "stopNotSent": "未送出停止命令", @@ -2827,6 +2871,8 @@ "dictationHeading": "聽寫", "dictationMode": "聽寫模式", "dictationModeDescription": "切換:按一次開始,再按一次停止。按住:按住期間進行聽寫。", + "dictationModeWithAutoDescription": "自動:輕按開始和停止;在電腦上按住快捷鍵會一直錄音,直到放開。按住:按住期間進行聽寫。切換:按一次開始,再按一次停止。", + "autoMode": "自動", "downloadFailed": "下載失敗", "enableDictation": "啟用語音聽寫", "holdMode": "按住", diff --git a/mobile/src/i18n/locales/zh.json b/mobile/src/i18n/locales/zh.json index 0e08b7072b4..9982692931e 100644 --- a/mobile/src/i18n/locales/zh.json +++ b/mobile/src/i18n/locales/zh.json @@ -300,6 +300,7 @@ "plan": "计划", "stoppedManually": "已手动停止", "permissionDenied": "{{agent}} 拒绝了权限。查看详情。", + "safetyReviewApproved": "{{agent}} 已批准此操作。查看详情。", "safetyReview": "{{agent}} 报告了安全审查警告。查看详情。", "truncatedResponse": "提供方响应已截断(原始大小:{{bytes}} 字节)。", "modelFallback": "Claude 已切换模型:{{from}} → {{to}}。", @@ -598,6 +599,7 @@ "fullCopySaveUpdate": "完整复制和保存此附件的功能将在手机更新中提供。" }, "hostOutage": { + "offlineAsOf": "{{host}} 已离线 · 截至 {{time}}", "reconnecting": "{{hostName}} 正在重新连接…", "stopped": "{{hostName}} 已停止。请在你的电脑上启动它。", "server": "服务器", @@ -1298,6 +1300,51 @@ "sessionLimit": "这台电脑上正在听写的设备过多。请等其中一台结束后再试。", "sessionLost": "听写与电脑的连接已断开。请重试。", "updateFailed": "更新听写设置失败" + }, + "controls": { + "start": "听写", + "starting": "正在开始听写", + "stop": "停止并插入", + "finishing": "正在完成听写", + "cancel": "取消听写", + "meterOnPhone": "正在录音,{{duration}},在此手机上", + "meterOn": "正在录音,{{duration}},在 {{computer}} 上", + "meterOnComputer": "正在录音,{{duration}},在电脑上", + "meter": "正在录音,{{duration}}", + "durationMinutesSeconds": "{{minutes}} {{seconds}}", + "durationSeconds_one": "{{count}} 秒", + "durationSeconds_other": "{{count}} 秒", + "durationMinutes_one": "{{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": { @@ -1530,6 +1577,8 @@ }, "hostScreenOverlays": { "deleteConfirmMessage": "要删除“{{name}}”({{branch}})吗?", + "deleteDestroysEnvironment": "这也会销毁 Orca 为其创建的环境“{{environment}}”,包括其中未提交的更改和正在运行的终端。", + "deleteKeepsEnvironment": "Orca 为其创建的环境“{{environment}}”会继续运行:其配方没有销毁步骤。", "deleteWorktree": "删除工作树", "pin": "固定", "primaryWorktreeDeleteHint": "主工作树不能删除。请改为移除项目。", @@ -2398,11 +2447,7 @@ "terminalInputActions": { "attachFileHint": "长按可改为附加文件", "attachPhoto": "附加照片", - "sendingImage": "正在发送图片", - "startDictation": "开始语音听写", - "startingDictation": "正在启动语音听写", - "stopDictation": "停止语音听写", - "transcribingDictation": "正在转写语音听写内容" + "sendingImage": "正在发送图片" }, "terminalLiveInputStatus": { "listening": "正在聆听", @@ -2411,8 +2456,6 @@ "processing": "处理中", "releaseMicHint": "松开麦克风按钮即可停止", "startingMic": "正在启动麦克风", - "stopHint": "点按麦克风停止", - "transcribing": "正在桌面上转写", "uploadingImage": "正在将图片上传到主机", "uploadingImageTitle": "正在上传图片" }, @@ -2506,7 +2549,8 @@ "insertFailed": "无法插入听写文本", "insertFailedCopied": "无法插入听写文本,已复制到剪贴板", "inserted": "已插入听写文本", - "stoppedAfterSilence": "静音一分钟后已停止" + "stoppedAfterSilence": "静音一分钟后已停止", + "stoppedAtCloudLimit": "已达 10 分钟云端上限。听写已停止。" }, "useNativeChatStop": { "stopNotSent": "停止指令未发送", @@ -2827,6 +2871,8 @@ "dictationHeading": "听写", "dictationMode": "听写模式", "dictationModeDescription": "切换:按一次开始,再按一次停止。按住:按住期间进行听写。", + "dictationModeWithAutoDescription": "自动:轻按开始和停止;在电脑上按住快捷键会一直录音,直到松开。按住:按住期间进行听写。切换:按一次开始,再按一次停止。", + "autoMode": "自动", "downloadFailed": "下载失败", "enableDictation": "启用语音听写", "holdMode": "按住", diff --git a/mobile/src/i18n/mobile-i18n.test.ts b/mobile/src/i18n/mobile-i18n.test.ts index d151b5fb37e..a2906b02959 100644 --- a/mobile/src/i18n/mobile-i18n.test.ts +++ b/mobile/src/i18n/mobile-i18n.test.ts @@ -1,5 +1,3 @@ -import { sayMobileAgentSessionFailure } from '../session/agent-session-failure-copy' -import { agentSessionFailureSentence } from '../../../src/shared/agent-session/failures/agent-session-failure-words' import { beforeEach, describe, expect, it, vi } from 'vitest' const pending = new Map) => void>() @@ -15,8 +13,6 @@ vi.mock('./locale-catalog-imports', () => ({ const { activateMobileUiLocale, getMobileUiLocale, mobileI18n, translate } = await import('./mobile-i18n') -const settle = () => new Promise((resolve) => setTimeout(resolve, 0)) - describe('activateMobileUiLocale', () => { beforeEach(async () => { pending.clear() @@ -36,18 +32,6 @@ describe('activateMobileUiLocale', () => { expect(translate('greeting', 'Hello')).toBe('こんにちは') }) - it('reads the existing saved uncertain fact through the current lazy failure translation table', async () => { - const sentence = () => - agentSessionFailureSentence({ kind: 'unconfirmed' }, 'row', {}, sayMobileAgentSessionFailure) - expect(sentence()).toBe("Couldn't confirm whether this was sent. It hasn't been resent.") - const spanish = activateMobileUiLocale('es') - pending.get('es')?.({ - session: { failure: { unconfirmed: 'El resultado sigue siendo desconocido.' } } - }) - await spanish - expect(sentence()).toBe('El resultado sigue siendo desconocido.') - }) - it('falls back to English when a catalog cannot load', async () => { failing.add('de') vi.spyOn(console, 'warn').mockImplementation(() => {}) @@ -55,19 +39,4 @@ describe('activateMobileUiLocale', () => { expect(getMobileUiLocale()).toBe('en') expect(translate('greeting', 'Hello')).toBe('Hello') }) - - it('picks CLDR plural forms and English fallbacks for missing keys', async () => { - const russian = activateMobileUiLocale('ru') - await settle() - pending.get('ru')?.({ - files_one: '{{count}} файл', - files_few: '{{count}} файла', - files_many: '{{count}} файлов' - }) - await russian - expect( - [1, 3, 5, 21].map((count) => translate('files_one', '{{count}} file', { count })) - ).toEqual(['1 файл', '3 файла', '5 файлов', '21 файл']) - expect(translate('untranslated', 'Still English')).toBe('Still English') - }) }) diff --git a/mobile/src/mobile-web-shell/MobileWebShellScreen.tsx b/mobile/src/mobile-web-shell/MobileWebShellScreen.tsx index 362ef475933..11e05d21660 100644 --- a/mobile/src/mobile-web-shell/MobileWebShellScreen.tsx +++ b/mobile/src/mobile-web-shell/MobileWebShellScreen.tsx @@ -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) diff --git a/mobile/src/mobile-web-shell/bridge-host-back.ts b/mobile/src/mobile-web-shell/bridge-host-back.ts index c7bfdc7c1ee..26a49beb452 100644 --- a/mobile/src/mobile-web-shell/bridge-host-back.ts +++ b/mobile/src/mobile-web-shell/bridge-host-back.ts @@ -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 } } diff --git a/mobile/src/mobile-web-shell/bridge-host-contract.ts b/mobile/src/mobile-web-shell/bridge-host-contract.ts index efa1f1aca21..aa31263a3e6 100644 --- a/mobile/src/mobile-web-shell/bridge-host-contract.ts +++ b/mobile/src/mobile-web-shell/bridge-host-contract.ts @@ -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 diff --git a/mobile/src/mobile-web-shell/bridge-host-init.test.ts b/mobile/src/mobile-web-shell/bridge-host-init.test.ts index 24ac5913f79..0a64fd9585f 100644 --- a/mobile/src/mobile-web-shell/bridge-host-init.test.ts +++ b/mobile/src/mobile-web-shell/bridge-host-init.test.ts @@ -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({ diff --git a/mobile/src/mobile-web-shell/bridge-host.ts b/mobile/src/mobile-web-shell/bridge-host.ts index 5fb65c9c340..914b25c9b70 100644 --- a/mobile/src/mobile-web-shell/bridge-host.ts +++ b/mobile/src/mobile-web-shell/bridge-host.ts @@ -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 diff --git a/mobile/src/mobile-web-shell/bridge/bridge-app-inactive.ts b/mobile/src/mobile-web-shell/bridge/bridge-app-inactive.ts new file mode 100644 index 00000000000..da8d00eecf0 --- /dev/null +++ b/mobile/src/mobile-web-shell/bridge/bridge-app-inactive.ts @@ -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() + } +} diff --git a/mobile/src/mobile-web-shell/bridge/bridge-audio-verbs.test.ts b/mobile/src/mobile-web-shell/bridge/bridge-audio-verbs.test.ts index 5c89a0ddf2e..19da0366f3b 100644 --- a/mobile/src/mobile-web-shell/bridge/bridge-audio-verbs.test.ts +++ b/mobile/src/mobile-web-shell/bridge/bridge-audio-verbs.test.ts @@ -148,17 +148,6 @@ describe('what the audio schemas refuse', () => { }) describe('the shell capture', () => { - it('surfaces a denied microphone as data rather than as a throw', async () => { - const { engine, calls } = createTestEngine({ permission: async () => 'denied' }) - const capture = createCapture(engine) - await expect(capture.serve('native.audio.start', { sampleRate: 16_000 })).resolves.toEqual({ - started: false, - sampleRate: 16_000, - permission: 'denied' - }) - expect(calls).toEqual([]) - }) - it('serves a partial drain from the front and keeps the rest for the next read', async () => { const { engine, emit } = createTestEngine() const capture = createCapture(engine) @@ -211,24 +200,6 @@ describe('the shell capture', () => { expect(next.interruption).toBeNull() }) - it('keeps a capture the OS handed back, and ends the two it took away', async () => { - const { engine, interrupt } = createTestEngine() - const capture = createCapture(engine) - await capture.serve('native.audio.start', { sampleRate: 16_000 }) - interrupt('ended') - const kept = audioReadResultSchema.parse( - await capture.serve('native.audio.read', { maxBytes: BRIDGE_AUDIO_RING_MAX_BYTES }) - ) - // Nonterminal interruption still reaches the page while the live capture keeps filling its ring. - expect(kept.interruption).toBe('ended') - expect(kept.recording).toBe(true) - interrupt('blocked') - const lost = audioReadResultSchema.parse( - await capture.serve('native.audio.read', { maxBytes: BRIDGE_AUDIO_RING_MAX_BYTES }) - ) - expect(lost.recording).toBe(false) - }) - it('refuses a read once the page has stopped', async () => { const { engine } = createTestEngine() const capture = createCapture(engine) @@ -264,24 +235,6 @@ describe('the shell capture', () => { expect(read.base64).toBe('') }) - it('replaces a capture a page left behind rather than refusing the new one', async () => { - // A page can reload or vanish mid-capture; only the shell sees that lifecycle, so a new start replaces the old capture. - const { engine, emit, log } = createTestEngine() - const capture = createCapture(engine) - await capture.serve('native.audio.start', { sampleRate: 16_000 }) - emit(pcm(2_048, 6)) - await expect(capture.serve('native.audio.start', { sampleRate: 16_000 })).resolves.toEqual({ - started: true, - sampleRate: 16_000, - permission: 'granted' - }) - expect(log.filter((entry) => entry === 'end')).toHaveLength(1) - const read = audioReadResultSchema.parse( - await capture.serve('native.audio.read', { maxBytes: BRIDGE_AUDIO_RING_MAX_BYTES }) - ) - expect(read.base64).toBe('') - }) - it('leaves one capture behind when two starts race the permission prompt', async () => { // Concurrent starts can both leave the OS prompt and reach listen; replacement must remove the earlier handlers rather than leak a ring nobody drains. const entered = gate() @@ -371,37 +324,9 @@ describe('the shell capture', () => { await expect(stopped).resolves.toEqual({ stopped: true, base64: '', droppedBytes: 0 }) expect(liveListeners()).toEqual({ microphone: 0, interruptions: 0 }) }) - - it('ends the capture when the page session does', async () => { - const { engine, log } = createTestEngine() - const capture = createCapture(engine) - await capture.serve('native.audio.start', { sampleRate: 16_000 }) - capture.dispose() - expect(log).toContain('end') - await expect(capture.serve('native.audio.read', { maxBytes: 16 })).rejects.toBeInstanceOf( - BridgeNativeVerbRefusedError - ) - }) }) describe('the screen the shell holds awake while it is capturing', () => { - it('takes the screen on a start and gives it back on a stop', async () => { - const { engine, screen } = createTestEngine() - const capture = createCapture(engine) - await capture.serve('native.audio.start', { sampleRate: 16_000 }) - expect(screen).toEqual(['+']) - await capture.serve('native.audio.stop', {}) - expect(screen).toEqual(['+', '-']) - }) - - it('gives it back when the page session ends with a capture still open', async () => { - const { engine, screen } = createTestEngine() - const capture = createCapture(engine) - await capture.serve('native.audio.start', { sampleRate: 16_000 }) - capture.dispose() - expect(screen).toEqual(['+', '-']) - }) - it('gives it back when the engine throws after the capture is open', async () => { const { engine, screen } = createTestEngine({ begin: () => { @@ -443,14 +368,4 @@ describe('the tail the stop reply carries', () => { expect(Array.from(decode(read.base64))).toEqual(Array.from(spoken)) expect(Array.from(decode(stopped.base64))).toEqual(Array.from(after)) }) - - it('leaves nothing behind for a second stop to answer with', async () => { - const { engine, emit } = createTestEngine() - const capture = createCapture(engine) - await capture.serve('native.audio.start', { sampleRate: 16_000 }) - emit(pcm(512, 5)) - await capture.serve('native.audio.stop', {}) - const again = audioStopResultSchema.parse(await capture.serve('native.audio.stop', {})) - expect(again).toEqual({ stopped: false, base64: '', droppedBytes: 0 }) - }) }) diff --git a/mobile/src/mobile-web-shell/bridge/bridge-client-inbound-frames.test.ts b/mobile/src/mobile-web-shell/bridge/bridge-client-inbound-frames.test.ts index cc1176e49fc..ba01674d9b1 100644 --- a/mobile/src/mobile-web-shell/bridge/bridge-client-inbound-frames.test.ts +++ b/mobile/src/mobile-web-shell/bridge/bridge-client-inbound-frames.test.ts @@ -77,31 +77,6 @@ describe('bridge client refusals and send failures', () => { expect(isRpcDeliveryUnknown(error)).toBe(true) }) - it('leaves a refused frame that names no open exchange to the diagnostic alone', async () => { - const page = createPageClient() - page.start() - const answer = page.client.sendRequest('worktree.ps') - page.deliver({ - v: BRIDGE_PROTOCOL_VERSION, - type: 'reply', - id: 'ZZZZZZZZZZZZZZZZZZZZZZ', - payload: { id: 'frame-1', ok: true } - }) - expect(page.diagnostics).toEqual([{ kind: 'refused', refusal: 'unrecognised-message' }]) - page.deliver({ - v: BRIDGE_PROTOCOL_VERSION, - type: 'reply', - id: idOf(page, 0), - payload: { id: 'frame-1', ok: true, result: 7, _meta: { runtimeId: 'runtime-a' } } - }) - await expect(answer).resolves.toEqual({ - id: 'frame-1', - ok: true, - result: 7, - _meta: { runtimeId: 'runtime-a' } - }) - }) - it('fails a request whose frame never left the page, without the delivery mark', async () => { let live = true const page = createPageClient({ diff --git a/mobile/src/mobile-web-shell/bridge/bridge-client-inbound-frames.ts b/mobile/src/mobile-web-shell/bridge/bridge-client-inbound-frames.ts index 57c5300af27..84c5a156be0 100644 --- a/mobile/src/mobile-web-shell/bridge/bridge-client-inbound-frames.ts +++ b/mobile/src/mobile-web-shell/bridge/bridge-client-inbound-frames.ts @@ -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 diff --git a/mobile/src/mobile-web-shell/bridge/bridge-client-init-handshake.ts b/mobile/src/mobile-web-shell/bridge/bridge-client-init-handshake.ts index cf8f09e1382..818fd030288 100644 --- a/mobile/src/mobile-web-shell/bridge/bridge-client-init-handshake.ts +++ b/mobile/src/mobile-web-shell/bridge/bridge-client-init-handshake.ts @@ -46,6 +46,7 @@ export function createPageReadyFrame(): Extract { }) }) -describe('bridge client before a session', () => { - it('drops a state frame that beat init rather than priming from it', () => { - const page = createPageClient() - page.deliver({ - v: BRIDGE_PROTOCOL_VERSION, - type: 'state', - connection: { ...CONNECTION, state: 'reconnecting' } - }) - expect(() => page.client.getState()).toThrow(BridgeClientNotReadyError) - expect(page.diagnostics).toEqual([]) - }) -}) - // Catch page-listener throws locally: iOS callAsyncJavaScript would otherwise reject an already-delivered frame. Retrying cannot fix the same listener failure (ruling 34 addendum). describe('bridge client after close', () => { diff --git a/mobile/src/mobile-web-shell/bridge/bridge-rpc-client.ts b/mobile/src/mobile-web-shell/bridge/bridge-rpc-client.ts index e9a62282aa2..1055c851724 100644 --- a/mobile/src/mobile-web-shell/bridge/bridge-rpc-client.ts +++ b/mobile/src/mobile-web-shell/bridge/bridge-rpc-client.ts @@ -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) }) diff --git a/mobile/src/mobile-web-shell/bridge/use-native-verbs.test.tsx b/mobile/src/mobile-web-shell/bridge/use-native-verbs.test.tsx deleted file mode 100644 index 5939d383360..00000000000 --- a/mobile/src/mobile-web-shell/bridge/use-native-verbs.test.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import { act, create, type ReactTestRenderer } from 'react-test-renderer' -import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' - -// Avoid Expo imports through re-exported screen hooks; this test calls none of them. -vi.mock('../../transport/connection/host-client-hooks', () => ({ - useDisconnectHostClient: () => () => {}, - useForceReconnect: () => null, - useForgetHostClient: () => () => {}, - useHostClient: () => ({ client: null, clientId: null, state: 'disconnected' }), - usePrimeHosts: () => () => {}, - useRefreshHostClient: () => () => {} -})) - -import { RpcClientProvider } from '../../transport/connection/client-context.web' -import { BRIDGE_PROTOCOL_VERSION } from './bridge-envelope' -import { BRIDGE_NATIVE_VERB_NAMES } from './bridge-native-verbs' -import './bridge-port-pair-test-harness' -import { GRANTS, INIT, createPageClient } from './bridge-page-client-test-harness' -import { NativeVerbError, useNativeVerbs, type NativeVerbs } from './use-native-verbs' - -const mounted: ReactTestRenderer[] = [] - -const held: { verbs: NativeVerbs | null } = { verbs: null } - -function Screen(): null { - held.verbs = useNativeVerbs() - return null -} - -beforeEach(() => { - held.verbs = null -}) - -afterEach(() => { - act(() => { - for (const tree of mounted.splice(0)) { - tree.unmount() - } - }) - vi.useRealTimers() -}) - -// The typed member must reject desktop methods too; widened callers could otherwise bypass the raw-port inventory’s call shapes. - -describe('a code this page has never heard of', () => { - it('floors to unreported rather than crossing verbatim', async () => { - // Inject a newer-shell code directly; this host normalizes unknown codes before sending, so the pair cannot produce it itself. - const page = createPageClient() - page.deliver({ ...INIT, grants: { ...GRANTS, native: [...BRIDGE_NATIVE_VERB_NAMES] } }) - act(() => { - create( - - - - ) - }) - const verbs = held.verbs - if (verbs === null) { - throw new Error('nothing mounted') - } - const read = verbs.readClipboardText().catch((error: unknown) => error) - const sent = page.frames().filter((frame) => frame.type === 'request') - const id = sent.at(-1)?.type === 'request' ? sent.at(-1)?.id : undefined - if (id === undefined) { - throw new Error('no request went out') - } - page.deliver({ - v: BRIDGE_PROTOCOL_VERSION, - type: 'error', - id, - error: { - category: 'BridgeNativeVerbRefusedError', - code: 'native_verb_something_new', - message: 'a verb from a later build', - isRpcDeliveryUnknown: false - } - }) - const caught = await read - expect(caught).toBeInstanceOf(NativeVerbError) - expect(caught instanceof NativeVerbError && caught.reason).toBe('unreported') - }) -}) diff --git a/mobile/src/mobile-web-shell/generation-store.test.ts b/mobile/src/mobile-web-shell/generation-store.test.ts index 4d381f688ba..e8bbca2a3f2 100644 --- a/mobile/src/mobile-web-shell/generation-store.test.ts +++ b/mobile/src/mobile-web-shell/generation-store.test.ts @@ -5,8 +5,7 @@ import type { MobileWebBundleFetchResult } from '../transport/web-bundle/mobile- import { computeMobileWebBundleId } from '../../../src/shared/mobile-web-bundle/manifest-contract' import { createFakeGenerationFileSystem as createFakeFileSystem, - FAKE_GENERATION_ROOT, - type FakeGenerationFileSystem as FakeFileSystem + FAKE_GENERATION_ROOT } from './generation-file-system-fake' const ROOT = FAKE_GENERATION_ROOT @@ -106,17 +105,6 @@ describe('generation store', () => { expect(fs.paths().some((path) => path.includes('/tmp'))).toBe(false) }) - it('replaces the previous generation when the build id changes', async () => { - const fs = createFakeFileSystem() - const store = createGenerationStore({ fileSystem: fs }) - - await activate(store, HOST) - await activate(store, HOST, buildResult(SECOND)) - - expect(fs.paths().some((path) => path.includes(BUILD))).toBe(false) - expect((await store.readActiveGeneration(HOST))?.buildId).toBe(SECOND_BUILD) - }) - it('reads two generations as no activation and drops the host tree', async () => { const fs = createFakeFileSystem() const store = createGenerationStore({ fileSystem: fs }) @@ -183,18 +171,6 @@ describe('generation store', () => { expect((await store.readActiveGeneration(oldest))?.buildId).toBe(BUILD) }) - it('returns the generation when an open cannot write the index', async () => { - const fs = createFakeFileSystem() - const store = createGenerationStore({ fileSystem: fs }) - const other = deriveHostCacheKey('other') - await activate(store, HOST) - await activate(store, other) - fs.failWritesAt('hosts.json') - - expect((await store.readActiveGeneration(HOST))?.buildId).toBe(BUILD) - expect(fs.text('hosts.json')).toBe(JSON.stringify([HOST, other])) - }) - it('never counts or evicts a host that is only mid-download', async () => { const fs = createFakeFileSystem() const store = createGenerationStore({ fileSystem: fs }) @@ -246,17 +222,6 @@ describe('generation store', () => { ]) }) - it('drops residue from an earlier attempt instead of staging over it', async () => { - const fs = createFakeFileSystem() - const store = createGenerationStore({ fileSystem: fs }) - const staging = `${HOST}/tmp/${BUILD}` - fs.seed(`${staging}/assets/orphan.js`, { kind: 'file', bytes: new Uint8Array(1) }) - - await store.stageGeneration(HOST, buildResult({})) - - expect(fs.paths().some((path) => path.endsWith('orphan.js'))).toBe(false) - }) - it('refuses a path that escapes the staged tree, and a host key that is not one', async () => { const fs = createFakeFileSystem() const store = createGenerationStore({ fileSystem: fs }) @@ -279,20 +244,6 @@ describe('generation store', () => { expect(fs.paths()).toEqual([]) }) - it('deletes one host tree without touching another', async () => { - const fs = createFakeFileSystem() - const other = deriveHostCacheKey('host-b') - const store = createGenerationStore({ fileSystem: fs }) - await activate(store, HOST) - await activate(store, other) - - await store.deleteHostCache(HOST) - - expect(await store.readActiveGeneration(HOST)).toBeNull() - expect((await store.readActiveGeneration(other))?.buildId).toBe(BUILD) - expect(fs.text('hosts.json')).toBe(JSON.stringify([other])) - }) - it('refuses a rename that did not carry the tree, as Android below API 26 can', async () => { const fs = createFakeFileSystem() const store = createGenerationStore({ fileSystem: fs }) @@ -322,17 +273,6 @@ describe('generation store', () => { expect(fs.paths().some((path) => path.startsWith(HOST))).toBe(false) }) - it('activates normally when the recency index cannot be read', async () => { - const fs = createFakeFileSystem() - const store = createGenerationStore({ fileSystem: fs }) - fs.seed('hosts.json', { kind: 'file', bytes: new TextEncoder().encode('[]') }) - fs.failReadsAt('hosts.json') - - await activate(store, HOST) - - expect((await store.readActiveGeneration(HOST))?.buildId).toBe(BUILD) - }) - it('replaces an entry named for the build id that is not a readable generation', async () => { const build = BUILD // Model a crash between rename and the post-rename manifest check. @@ -351,31 +291,6 @@ describe('generation store', () => { } }) - it('drops an aborted staging without touching the activation', async () => { - const fs = createFakeFileSystem() - const store = createGenerationStore({ fileSystem: fs }) - await activate(store, HOST) - - const staged = await store.stageGeneration(HOST, buildResult(SECOND)) - await store.abortStagedGeneration(staged) - - expect(fs.paths().some((path) => path.includes(SECOND_BUILD))).toBe(false) - expect((await store.readActiveGeneration(HOST))?.buildId).toBe(BUILD) - }) - - it('returns the activation even when the recency index cannot be written', async () => { - const fs = createFakeFileSystem() - const store = createGenerationStore({ fileSystem: fs }) - fs.failWritesAt('hosts.json') - - const staged = await store.stageGeneration(HOST, buildResult({})) - const active = await store.commitGeneration(staged) - - expect(active.buildId).toBe(BUILD) - expect((await store.readActiveGeneration(HOST))?.buildId).toBe(BUILD) - expect(fs.text('hosts.json')).toBeNull() - }) - it('refuses a handle whose staged tree is gone without touching the activation', async () => { const fs = createFakeFileSystem() const store = createGenerationStore({ fileSystem: fs }) @@ -470,41 +385,6 @@ describe('reusable assets for the next download', () => { }) }) -// Older builds could leave manifest-next.json after an interrupted rewrite; this reader must ignore it. -describe('a pending manifest left by an older build', () => { - const MANIFEST_PATH = `${HOST}/generations/${BUILD}/manifest.json` - const NEXT_PATH = `${HOST}/generations/${BUILD}/manifest-next.json` - - function seedPending(fs: FakeFileSystem): void { - const body = JSON.stringify({ ...buildResult({}).manifest, routes: [] }) - fs.seed(NEXT_PATH, { kind: 'file', bytes: new TextEncoder().encode(body) }) - } - - it('reads the manifest beside it and leaves it inert', async () => { - const fs = createFakeFileSystem() - const store = createGenerationStore({ fileSystem: fs }) - await activate(store, HOST) - const stored = fs.text(MANIFEST_PATH) - seedPending(fs) - - expect((await store.readActiveGeneration(HOST))?.buildId).toBe(BUILD) - - expect(fs.text(MANIFEST_PATH)).toBe(stored) - }) - - it('drops the host tree for a redownload when it is the only manifest left', async () => { - const fs = createFakeFileSystem() - const store = createGenerationStore({ fileSystem: fs }) - await activate(store, HOST) - seedPending(fs) - await fs.delete(`${ROOT}/${MANIFEST_PATH}`) - - expect(await store.readActiveGeneration(HOST)).toBeNull() - - expect(fs.paths().some((path) => path.startsWith(`${HOST}/generations`))).toBe(false) - }) -}) - // Commit deletes the old build first, so it must not run under a page still loading that build's chunks. describe('an update staged behind a live page', () => { it('stays staged while a page reads the old build, and the next read after it commits', async () => { diff --git a/mobile/src/mobile-web-shell/home-spare-page.ts b/mobile/src/mobile-web-shell/home-spare-page.ts index 1456e5909b1..bf93ad3d371 100644 --- a/mobile/src/mobile-web-shell/home-spare-page.ts +++ b/mobile/src/mobile-web-shell/home-spare-page.ts @@ -11,12 +11,16 @@ import { mintShellSessionId } from './shell-session-id' // A Home entry claims the spare about 0.2 s after the tap on a simulator; a native screen keeps it no longer. const HOME_SPARE_CLAIM_GRACE_MS = 2000 +// Hopping between Home and native screens would otherwise boot and destroy a whole page on every return. +const HOME_SPARE_REFILL_BACKOFF_MS = 30_000 + // What JS last asked native to park, until a claim or a drop. Native may since have dropped it on // its own (background, memory); this only saves the claim's native round trip when nothing can match. let parkedDirectory: string | null = null let dropTimer: ReturnType | null = null // A prepare still reading the store when Home goes must not park a spare after the drop ran. let homeShown = false +let unclaimedDropAt: number | null = null function cancelDrop(): void { if (dropTimer !== null) { @@ -37,13 +41,13 @@ export async function prepareHomeSparePage( if (active === null) { continue } - if (!homeShown) { + if (!homeShown || homeSpareRefillWaitMs() > 0) { return } const directory = generationDirectoryPath(active.directory) const prepared = await prepareSpareDocument(directory, mintShellSessionId()) if (prepared && !homeShown) { - await dropHomeSparePage() + await dropUnclaimedHomeSparePage() } else if (prepared) { parkedDirectory = directory } @@ -68,6 +72,14 @@ export async function claimHomeSparePage(directory: string): Promise { dropTimer = null - void dropHomeSparePage() + void (parkedDirectory === null ? dropHomeSparePage() : dropUnclaimedHomeSparePage()) }, HOME_SPARE_CLAIM_GRACE_MS) } +function dropUnclaimedHomeSparePage(): Promise { + unclaimedDropAt = performance.now() + return dropHomeSparePage() +} + // Also runs before any host's built files go: that is rare, and a spare must not outlive its files. export function dropHomeSparePage(): Promise { parkedDirectory = null diff --git a/mobile/src/mobile-web-shell/host-area-fold.test.tsx b/mobile/src/mobile-web-shell/host-area-fold.test.tsx index 6439116770d..15ea197dee7 100644 --- a/mobile/src/mobile-web-shell/host-area-fold.test.tsx +++ b/mobile/src/mobile-web-shell/host-area-fold.test.tsx @@ -101,19 +101,9 @@ describe('folding while the host-area page shows a session', () => { expect(dependencies.push.mock.calls).toEqual([[DETAIL]]) }) - it('stays on the list when the page was showing the list', async () => { - await foldAfterPageShows(HOST) - expect(dependencies.push).not.toHaveBeenCalled() - }) - it('leaves the stack alone from a host-route shell covered by a pushed session', async () => { await foldAfterPageShows(HOST, false) expect(dependencies.push).not.toHaveBeenCalled() expect(dependencies.dispatch).not.toHaveBeenCalled() }) - - it('stays on the list for an older page that never reports where it is', async () => { - await foldAfterPageShows(null) - expect(dependencies.push).not.toHaveBeenCalled() - }) }) diff --git a/mobile/src/mobile-web-shell/mobile-web-shell-failed-update-fallback.test.ts b/mobile/src/mobile-web-shell/mobile-web-shell-failed-update-fallback.test.ts deleted file mode 100644 index d4c7b198524..00000000000 --- a/mobile/src/mobile-web-shell/mobile-web-shell-failed-update-fallback.test.ts +++ /dev/null @@ -1,216 +0,0 @@ -import { createElement } from 'react' -import { act, create, type ReactTestRenderer } from 'react-test-renderer' -import { beforeEach, describe, expect, it, vi } from 'vitest' -import type { MobileWebBundleManifestRead } from '../transport/web-bundle/mobile-web-bundle-reply-schemas' -import type { - MobileWebShellSessionState, - MobileWebShellUpdateNotice -} from './mobile-web-shell-session-contract' - -// Exercise the real hook/store over in-memory disk; stub network and native modules. -type Doubles = { - connection: { client: object | null; state: string } - gates: { - statusPending: boolean - statusReadable: boolean - hostCapabilities: string[] - hostProtocolWindow: { protocolVersion: number; minCompatibleMobileVersion: number } - } - manifest: MobileWebBundleManifestRead | null - fetch: () => Promise -} - -const doubles = vi.hoisted((): Doubles => ({ - connection: { client: {}, state: 'connected' }, - gates: { - statusPending: false, - statusReadable: true, - hostCapabilities: [], - hostProtocolWindow: { protocolVersion: 10, minCompatibleMobileVersion: 1 } - }, - manifest: null, - fetch: () => Promise.reject(new Error('no fetch staged')) -})) - -vi.mock('expo-crypto', () => ({ getRandomBytes: (length: number) => new Uint8Array(length) })) -vi.mock('expo-file-system', () => ({ Directory: class {}, File: class {}, Paths: { cache: '' } })) -vi.mock('react-native', () => ({ AppState: {} })) -vi.mock('../transport/encryption/mobile-session-id-encoding', () => ({ - encodeBase64Url: () => 'session-id' -})) -vi.mock('../components/host-protocol-gates-context', () => ({ - useHostProtocolGates: () => doubles.gates -})) -vi.mock('../transport/connection/host-client-hooks', () => ({ - useHostClient: () => doubles.connection -})) -vi.mock('../transport/rpc/rpc-operation', () => ({ - defineRpcOperation: (definition: unknown) => definition, - runRpcOperation: async () => { - if (doubles.manifest === null) { - throw new Error('the test reached the host with no manifest staged') - } - return { manifest: doubles.manifest } - } -})) -vi.mock('../transport/web-bundle/mobile-web-bundle-fetch', () => ({ - fetchMobileWebBundle: () => doubles.fetch() -})) - -import { - computeMobileWebBundleId, - MOBILE_WEB_BUNDLE_SCHEMA_VERSION, - type MobileWebBundleAsset -} from '../../../src/shared/mobile-web-bundle/manifest-contract' -import { MOBILE_WEB_BUNDLE_CAPABILITY } from '../../../src/shared/mobile-web-bundle/mobile-web-bundle-capability' -import type { MobileWebBundleFetchResult } from '../transport/web-bundle/mobile-web-bundle-fetch' -import { MobileWebBundleFetchError } from '../transport/web-bundle/mobile-web-bundle-fetch-refusal' -import { MobileWebBundleManifestReadSchema } from '../transport/web-bundle/mobile-web-bundle-reply-schemas' -import { - createFakeGenerationFileSystem, - FAKE_GENERATION_ROOT, - type FakeGenerationFileSystem -} from './generation-file-system-fake' -import { createGenerationStore } from './generation-store' -import { deriveHostCacheKey } from './host-cache-key' -import { useMobileWebShellSession } from './use-mobile-web-shell-session' - -const HOST_ID = 'host-1' -const HOST_KEY = deriveHostCacheKey(HOST_ID) -const ROUTE_PATHNAME = '/h/host-1' -const ROUTE_PATTERN = '/h/[hostId]' - -function assetsFilled(fill: number) { - return [ - { path: 'index.html', sha256: `${fill}`.repeat(64), byteLength: 4, contentType: 'text/html' }, - { - path: 'assets/app.js', - sha256: `${fill + 1}`.repeat(64), - byteLength: 2, - contentType: 'text/javascript' - } - ] -} - -const GOOD_ASSETS = assetsFilled(1) -const NEWER_ASSETS = assetsFilled(5) -const TOTAL_BYTES = 6 -// Derive ids from assets so cached fixtures pass the manifest digest check. - -function manifestOf( - assets: readonly MobileWebBundleAsset[], - runtimeProtocolVersion = 5 -): MobileWebBundleManifestRead { - return MobileWebBundleManifestReadSchema.parse({ - schemaVersion: MOBILE_WEB_BUNDLE_SCHEMA_VERSION, - buildId: computeMobileWebBundleId(assets), - minCompatibleRuntimeProtocolVersion: 2, - runtimeProtocolVersion, - pageVersion: 1, - entrypoint: 'index.html', - totalBytes: TOTAL_BYTES, - assets, - routes: [{ pathname: ROUTE_PATTERN, grants: ['navigate'] }] - }) -} - -const GOOD_MANIFEST = manifestOf(GOOD_ASSETS) -const NEWER_MANIFEST = manifestOf(NEWER_ASSETS) - -function fetchResultFor(manifest: MobileWebBundleManifestRead): MobileWebBundleFetchResult { - return { - manifest, - assets: new Map( - manifest.assets.map((asset) => [asset.path, new Uint8Array(asset.byteLength).fill(7)]) - ), - reused: [], - totalBytes: TOTAL_BYTES, - elapsedMs: 1 - } -} - -// Stage/commit N through the real store so fallback reads the tree a successful download actually leaves. -async function cacheGeneration( - fileSystem: FakeGenerationFileSystem, - manifest: MobileWebBundleManifestRead = GOOD_MANIFEST -): Promise { - const store = createGenerationStore({ fileSystem }) - await store.commitGeneration(await store.stageGeneration(HOST_KEY, fetchResultFor(manifest))) -} - -function refuseTheAssets(): Promise { - return Promise.reject( - new MobileWebBundleFetchError( - 'asset-short', - 'bundle asset assets/app.js ended at 1 of 2 declared bytes' - ) - ) -} - -type Mounted = { - unmount: () => Promise - state: () => MobileWebShellSessionState - updateNotice: () => MobileWebShellUpdateNotice | null -} - -async function mountRoute(fileSystem: FakeGenerationFileSystem): Promise { - const latest: { - state: MobileWebShellSessionState - updateNotice: MobileWebShellUpdateNotice | null - } = { state: { kind: 'checking' }, updateNotice: null } - function Probe() { - const session = useMobileWebShellSession({ - hostId: HOST_ID, - routePathname: ROUTE_PATHNAME, - runtime: { - createStore: () => createGenerationStore({ fileSystem }), - mintSessionId: () => 'session-id', - claimSpareSessionId: async () => null, - now: () => 0, - setForegroundTimer: () => () => {} - } - }) - latest.state = session.state - latest.updateNotice = session.updateNotice - return null - } - const rendered: { tree: ReactTestRenderer | null } = { tree: null } - await act(async () => { - rendered.tree = create(createElement(Probe)) - }) - const tree = rendered.tree - if (tree === null) { - throw new Error('the hook did not mount') - } - return { - unmount: async () => { - await act(async () => { - tree.unmount() - }) - }, - state: () => latest.state, - updateNotice: () => latest.updateNotice - } -} - -describe('an update the shell refuses while the host is reachable', () => { - beforeEach(() => { - doubles.connection = { client: {}, state: 'connected' } - doubles.gates.hostCapabilities = [MOBILE_WEB_BUNDLE_CAPABILITY] - doubles.manifest = NEWER_MANIFEST - doubles.fetch = refuseTheAssets - }) - - it('records a failure whose error named an endpoint and a token without either', async () => { - doubles.fetch = () => - Promise.reject(new Error('dial wss://relay.example/pair?token=SECRET-123 refused')) - const fileSystem = createFakeGenerationFileSystem() - await cacheGeneration(fileSystem) - - await mountRoute(fileSystem) - - const log = await fileSystem.readText(`${FAKE_GENERATION_ROOT}/update-failures.json`) - expect(log).toContain('unrecognised-error') - expect(log).not.toMatch(/SECRET|token|\?|:\/\/|relay/) - }) -}) diff --git a/mobile/src/mobile-web-shell/mobile-web-shell-session.test.ts b/mobile/src/mobile-web-shell/mobile-web-shell-session.test.ts index dc09c0e9888..4c240a95290 100644 --- a/mobile/src/mobile-web-shell/mobile-web-shell-session.test.ts +++ b/mobile/src/mobile-web-shell/mobile-web-shell-session.test.ts @@ -177,17 +177,6 @@ describe('only the state that mounted the view hears the view', () => { // A finished WebView load can still have failed script evaluation; only page ready proves its code ran. describe('the page has to speak for the document that loaded', () => { - it('does nothing when the wait expires after the page has spoken', () => { - const step = run( - readySession().session, - { type: 'document-loaded' }, - { type: 'page-ready' }, - { type: 'page-ready-deadline' } - ) - expect(step.effects).toEqual([]) - expect(step.session.state.kind).toBe('ready') - }) - it('leaves a remounted document its own wait when the first one expires late', () => { const first = run(readySession().session, { type: 'document-loaded' }, { type: 'page-ready' }) const armed = first.session.flow @@ -245,15 +234,6 @@ describe('a cached page opened before the verdict', () => { ) } - it('checks for a newer build once the verdict opens, and stages it behind the page', () => { - const opened = run(openedWhileDialling().session, { type: 'gates-changed', gates: gates() }) - expect(opened.session.state).toMatchObject({ kind: 'ready', sessionId: 'session-early' }) - expect(opened.effects).toEqual([{ kind: 'read-manifest' }]) - const staged = run(opened.session, { type: 'manifest-read', manifest: NEWER }) - expect(staged.session.state).toMatchObject({ kind: 'ready', sessionId: 'session-early' }) - expect(staged.effects).toEqual([{ kind: 'stage-update' }]) - }) - it('stages the newer build when the manifest answers after the page document starts', () => { const opened = run(openedWhileDialling().session, { type: 'gates-changed', gates: gates() }) const asked = opened.session.flow diff --git a/mobile/src/mobile-web-shell/use-app-leaves-foreground.ts b/mobile/src/mobile-web-shell/use-app-leaves-foreground.ts new file mode 100644 index 00000000000..41306009caa --- /dev/null +++ b/mobile/src/mobile-web-shell/use-app-leaves-foreground.ts @@ -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() + } + }, []) +} diff --git a/mobile/src/mobile-web-shell/use-mobile-web-shell-bridge.ts b/mobile/src/mobile-web-shell/use-mobile-web-shell-bridge.ts index 07a5f2cba67..9c4d2637936 100644 --- a/mobile/src/mobile-web-shell/use-mobile-web-shell-bridge.ts +++ b/mobile/src/mobile-web-shell/use-mobile-web-shell-bridge.ts @@ -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]) } } diff --git a/mobile/src/navigation/route-handoff.web.test.tsx b/mobile/src/navigation/route-handoff.web.test.tsx index 6c78d9dea85..70d0ec474ce 100644 --- a/mobile/src/navigation/route-handoff.web.test.tsx +++ b/mobile/src/navigation/route-handoff.web.test.tsx @@ -2,10 +2,7 @@ import type { ReactElement } from 'react' import { act, create, type ReactTestRenderer } from 'react-test-renderer' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { BRIDGE_MAX_ROUTE_HREF_CHARS } from '../mobile-web-shell/bridge/bridge-caps' -import { - BRIDGE_NAVIGATE_BACK_NOTIFY, - BRIDGE_PROTOCOL_VERSION -} from '../mobile-web-shell/bridge/bridge-envelope' +import { BRIDGE_PROTOCOL_VERSION } from '../mobile-web-shell/bridge/bridge-envelope' import { createShellPageClient } from '../mobile-web-shell/bridge/page-bootstrap' import type { BridgeRpcClient } from '../mobile-web-shell/bridge/bridge-rpc-client' import type { RouteHandoff } from './route-handoff' @@ -125,12 +122,6 @@ function navigations(posted: readonly string[]): unknown[] { .filter((frame: { name?: string }) => frame.name === 'navigate') } -function backs(posted: readonly string[]): unknown[] { - return posted - .map((json) => JSON.parse(json)) - .filter((frame: { name?: string }) => frame.name === BRIDGE_NAVIGATE_BACK_NOTIFY) -} - const warned: unknown[][] = [] let restoreWarn: (() => void) | null = null @@ -211,20 +202,6 @@ describe('a target the shell would refuse', () => { }) }) -// The initial document has one history entry; Back must ask the native stack unless the page has pushed its own screens. -describe('a back this document cannot serve', () => { - it('falls through to this document when the shell granted no navigate', () => { - const { posted, handoff } = mount({ - ...INIT, - grants: { ...INIT.grants, native: [] }, - pageRoutes: [] - }) - handoff.back() - expect(backs(posted)).toEqual([]) - expect(router.back).toHaveBeenCalled() - }) -}) - // Wrap every href-taking router member; spreading navigate/prefetch untouched would bypass page-route policy. // Never hand prefetch to native navigate: a background optimization must not open a screen. @@ -237,57 +214,3 @@ describe('prefetch', () => { expect(router.push).not.toHaveBeenCalled() }) }) - -// Local targets run under the opener’s grants; hand off any target needing more so its own session receives the required capabilities. -describe('an in-page hop the session cannot cover', () => { - const TASKS = '/h/host-a/tasks' - const PAIRS = [ - { pathname: '/h/[hostId]', grants: ['navigate', 'storage', 'haptics'] }, - { - pathname: '/h/[hostId]/tasks', - grants: ['navigate', 'storage', 'externalLink', 'haptics', 'native.clipboard.write'] - } - ] - const withPairs = (native: string[]) => ({ - ...INIT, - grants: { ...INIT.grants, native }, - pageRoutes: ['/h/[hostId]', '/h/[hostId]/tasks'], - pageRouteGrants: PAIRS - }) - - it('stays in this document when the session already covers the target', () => { - const { posted, handoff } = mount( - withPairs(['navigate', 'storage', 'externalLink', 'haptics', 'native.clipboard.write']) - ) - handoff.push(TASKS) - expect(navigations(posted)).toEqual([]) - expect(router.push).toHaveBeenCalledWith(TASKS, undefined) - }) - - it('keeps a hop whose target declares a subset, which is C3.1 without its pairwise pin', () => { - const { posted, handoff } = mount({ - ...INIT, - grants: { ...INIT.grants, native: ['navigate', 'storage', 'externalLink', 'haptics'] }, - pageRoutes: ['/h/[hostId]/files/[worktreeId]', '/h/[hostId]/files/preview/[worktreeId]'], - pageRouteGrants: [ - { pathname: '/h/[hostId]/files/[worktreeId]', grants: ['navigate', 'storage', 'haptics'] }, - { pathname: '/h/[hostId]/files/preview/[worktreeId]', grants: ['navigate', 'haptics'] } - ] - }) - handoff.push('/h/host-a/files/preview/wt-1') - expect(navigations(posted)).toEqual([]) - expect(router.push).toHaveBeenCalledWith('/h/host-a/files/preview/wt-1', undefined) - }) - - it('keeps the old rule when the shell named no grants, so an older shell is unchanged', () => { - // Absent pairs preserve older-shell behavior; absence does not declare an empty grant list. - const { posted, handoff } = mount({ - ...INIT, - grants: { ...INIT.grants, native: ['navigate', 'storage', 'haptics'] }, - pageRoutes: ['/h/[hostId]', '/h/[hostId]/tasks'] - }) - handoff.push(TASKS) - expect(navigations(posted)).toEqual([]) - expect(router.push).toHaveBeenCalledWith(TASKS, undefined) - }) -}) diff --git a/mobile/src/notifications/notification-delivery-preferences.test.ts b/mobile/src/notifications/notification-delivery-preferences.test.ts index 7fe94c89692..c388ddc42c9 100644 --- a/mobile/src/notifications/notification-delivery-preferences.test.ts +++ b/mobile/src/notifications/notification-delivery-preferences.test.ts @@ -1,9 +1,5 @@ import { beforeEach, expect, it, vi } from 'vitest' import { AppState } from 'react-native' -import { - DEFAULT_NOTIFICATION_DELIVERY, - loadNotificationDeliveryPreferences -} from './notification-delivery-preferences' import { notificationViewingOfRoute, sessionOfPageLocation, @@ -52,8 +48,3 @@ it('suppresses the session a host list document shows inside itself, until its p setHostDocumentSession('host-1', sessionOfPageLocation('/h/host-1')) expect(shouldSuppressNotificationWhileViewing(event, 'host-1', true)).toBe(false) }) - -it('recovers defaults from malformed stored preferences', async () => { - storage.set('orca:notificationDeliveryPreferences', '{broken') - expect(await loadNotificationDeliveryPreferences()).toEqual(DEFAULT_NOTIFICATION_DELIVERY) -}) diff --git a/mobile/src/notifications/push-receive.test.ts b/mobile/src/notifications/push-receive.test.ts index fc3bc03b372..9c1b8832c9c 100644 --- a/mobile/src/notifications/push-receive.test.ts +++ b/mobile/src/notifications/push-receive.test.ts @@ -89,13 +89,6 @@ describe('shouldSuppressForegroundPush', () => { ).resolves.toBe(false) }) - it('suppresses pushes for an unpaired host', async () => { - vi.mocked(loadHostCatalog).mockResolvedValue([]) - await expect( - shouldSuppressForegroundPush(apnsData({ hostFingerprint, notificationSeq: 1 })) - ).resolves.toBe(true) - }) - it('suppresses a push after a matching persisted dismissal', async () => { const { rememberPushDismissal } = await import('./push-dismissal-watermarks') const payload = { diff --git a/mobile/src/pairing/mobile-relay-pairing-journal-store.test.ts b/mobile/src/pairing/mobile-relay-pairing-journal-store.test.ts index f95302adfbf..94b3518a72a 100644 --- a/mobile/src/pairing/mobile-relay-pairing-journal-store.test.ts +++ b/mobile/src/pairing/mobile-relay-pairing-journal-store.test.ts @@ -100,29 +100,6 @@ describe('mobile relay pairing journal store', () => { }) }) - it('records a provisional winner only for the active journal identity', async () => { - const journal = createMobileRelayPairingJournal({ - offer: offer as PairingOffer & { relay: NonNullable }, - hostId: 'host-1', - hostName: 'Blue Whale', - randomBytes: (length) => new Uint8Array(length).fill(7) - }) - await saveMobileRelayPairingJournal(journal) - - await updateMobileRelayPairingJournal(journal.metadata.journalId, (metadata) => ({ - ...metadata, - winner: 'direct', - authorizationMode: 'authenticated-direct' - })) - await expect( - updateMobileRelayPairingJournal('stale-journal', (metadata) => metadata) - ).rejects.toThrow(/stale/) - expect(JSON.parse(metadataRaw!)).toMatchObject({ - winner: 'direct', - authorizationMode: 'authenticated-direct' - }) - }) - it('treats metadata without its secret record as an incomplete crash', async () => { const journal = createMobileRelayPairingJournal({ offer: offer as PairingOffer & { relay: NonNullable }, @@ -150,32 +127,6 @@ describe('mobile relay pairing journal store', () => { expect(secretRaw).toBeNull() }) - it('replaces a journal that never selected an authorization path', async () => { - const journal = createMobileRelayPairingJournal({ - offer: offer as PairingOffer & { relay: NonNullable }, - hostId: 'host-1', - hostName: 'Blue Whale', - randomBytes: (length) => new Uint8Array(length).fill(10) - }) - await saveMobileRelayPairingJournal(journal) - const replacement = createMobileRelayPairingJournal({ - offer: offer as PairingOffer & { relay: NonNullable }, - hostId: 'host-2', - hostName: 'Red Panda', - randomBytes: (length) => new Uint8Array(length).fill(12) - }) - - const replacementSave = saveMobileRelayPairingJournal(replacement) - const staleUpdate = updateMobileRelayPairingJournal( - journal.metadata.journalId, - (metadata) => metadata - ) - - await expect(replacementSave).resolves.toBeUndefined() - await expect(staleUpdate).rejects.toThrow(/stale/) - await expect(loadMobileRelayPairingJournal()).resolves.toEqual(replacement) - }) - it('serializes a replacement behind an in-flight journal snapshot', async () => { const journal = createMobileRelayPairingJournal({ offer: offer as PairingOffer & { relay: NonNullable }, @@ -270,37 +221,6 @@ describe('mobile relay pairing journal store', () => { await expect(replacementSave).rejects.toThrow(/pairing in progress/) }) - it.each([ - ['winner', { winner: 'direct' as const }], - ['authorization mode', { authorizationMode: 'authenticated-direct' as const }] - ])( - 'refuses replacement while the attempt with a durable %s runs', - async (_name, authorization) => { - const created = createMobileRelayPairingJournal({ - offer: offer as PairingOffer & { relay: NonNullable }, - hostId: 'host-1', - hostName: 'Blue Whale', - randomBytes: (length) => new Uint8Array(length).fill(10) - }) - const journal = { - ...created, - metadata: { ...created.metadata, ...authorization } - } - - await saveMobileRelayPairingJournal(journal) - const replacement = createMobileRelayPairingJournal({ - offer: offer as PairingOffer & { relay: NonNullable }, - hostId: 'host-2', - hostName: 'Red Panda', - randomBytes: (length) => new Uint8Array(length).fill(12) - }) - await expect(saveMobileRelayPairingJournal(replacement)).rejects.toThrow( - /pairing in progress/ - ) - await expect(loadMobileRelayPairingJournal()).resolves.toEqual(journal) - } - ) - // New scans must supersede stranded authorized journals instead of blocking until expiry (#12518). it('makes a superseding scan wait for a publication in progress, and refuses a stale claim', async () => { diff --git a/mobile/src/pairing/pair-confirm-state.test.ts b/mobile/src/pairing/pair-confirm-state.test.ts deleted file mode 100644 index f3b5a2c2ade..00000000000 --- a/mobile/src/pairing/pair-confirm-state.test.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Buffer } from 'node:buffer' -import { describe, expect, it } from 'vitest' - -import { resolvePairConfirmRouteState } from './pair-confirm-state' -import type { PairingOffer } from '../../../src/shared/remote-runtime/pairing/mobile-relay-pairing-offer' - -function encodeOffer(offer: PairingOffer): string { - return Buffer.from(JSON.stringify(offer)) - .toString('base64') - .replace(/\+/g, '-') - .replace(/\//g, '_') - .replace(/=+$/g, '') -} - -describe('resolvePairConfirmRouteState', () => { - const offer: PairingOffer = { - v: 2, - endpoint: 'ws://192.168.1.10:6768', - deviceToken: 'token-abc', - publicKeyB64: 'pubkey-xyz' - } - - it('accepts a valid pairing code', () => { - expect(resolvePairConfirmRouteState(encodeOffer(offer))).toEqual({ - kind: 'ready', - offer, - errorMessage: '' - }) - }) - - it('accepts a full pairing URL', () => { - expect(resolvePairConfirmRouteState(`orca://pair#${encodeOffer(offer)}`)).toEqual({ - kind: 'ready', - offer, - errorMessage: '' - }) - expect(resolvePairConfirmRouteState(`orca://pair?code=${encodeOffer(offer)}`)).toEqual({ - kind: 'ready', - offer, - errorMessage: '' - }) - }) -}) diff --git a/mobile/src/platform/keyboard-persisting-taps.test.ts b/mobile/src/platform/keyboard-persisting-taps.test.ts deleted file mode 100644 index 22f08c0dfbd..00000000000 --- a/mobile/src/platform/keyboard-persisting-taps.test.ts +++ /dev/null @@ -1,87 +0,0 @@ -// @vitest-environment happy-dom -// RN Web ignores keyboardShouldPersistTaps; focusable Pressables take mousedown focus and close the IME. -// @vitest-environment happy-dom -// RN Web ignores keyboardShouldPersistTaps; focusable Pressables take mousedown focus and close the IME. - -import { afterEach, describe, expect, it, vi } from 'vitest' -import { keepTextFocusThroughTaps } from './keyboard-persisting-taps' - -import type * as ReactNative from 'react-native' - -vi.mock('react-native', () => vi.importActual('react-native-web')) - -function plant() { - const container = document.createElement('div') - const button = document.createElement('div') - button.tabIndex = 0 - const label = document.createElement('span') - button.appendChild(label) - const gap = document.createElement('span') - const field = document.createElement('input') - container.append(button, gap, field) - const liveInput = document.createElement('input') - document.body.append(container, liveInput) - return { container, label, gap, field, liveInput } -} - -function pressKeepsFocus(target: Element): boolean { - const event = new MouseEvent('mousedown', { bubbles: true, cancelable: true }) - target.dispatchEvent(event) - return event.defaultPrevented -} - -afterEach(() => { - document.body.innerHTML = '' -}) - -describe('keepTextFocusThroughTaps', () => { - it("keeps a text field's focus through a tap on a pressable, in both modes", () => { - for (const mode of ['always', 'handled'] as const) { - const { container, label, liveInput } = plant() - const release = keepTextFocusThroughTaps(container, mode) - liveInput.focus() - expect(pressKeepsFocus(label), mode).toBe(true) - release() - document.body.innerHTML = '' - } - }) - - it('lets a tap on nothing pressable dismiss only when taps are handled', () => { - const always = plant() - keepTextFocusThroughTaps(always.container, 'always') - always.liveInput.focus() - expect(pressKeepsFocus(always.gap)).toBe(true) - document.body.innerHTML = '' - - const handled = plant() - keepTextFocusThroughTaps(handled.container, 'handled') - handled.liveInput.focus() - expect(pressKeepsFocus(handled.gap)).toBe(false) - }) - - it('leaves focus alone when no text field holds it, or when the tap is on a text field', () => { - const { container, label, field, liveInput } = plant() - keepTextFocusThroughTaps(container, 'always') - expect(pressKeepsFocus(label)).toBe(false) - liveInput.focus() - expect(pressKeepsFocus(field)).toBe(false) - }) - - it('does not count a focusable ancestor above the container as a pressable in the bar', () => { - const outer = document.createElement('div') - outer.tabIndex = 0 - const { container, gap, liveInput } = plant() - outer.append(container) - document.body.prepend(outer) - keepTextFocusThroughTaps(container, 'handled') - liveInput.focus() - expect(pressKeepsFocus(gap)).toBe(false) - }) - - it('stops when released', () => { - const { container, label, liveInput } = plant() - keepTextFocusThroughTaps(container, 'always')() - liveInput.focus() - expect(pressKeepsFocus(label)).toBe(false) - }) -}) diff --git a/mobile/src/platform/native-speech.test.ts b/mobile/src/platform/native-speech.test.ts index 8e8bae4b5b7..62a5be12d16 100644 --- a/mobile/src/platform/native-speech.test.ts +++ b/mobile/src/platform/native-speech.test.ts @@ -94,18 +94,3 @@ describe('a recognizer that fails while its start is still resolving', () => { expect(await server.serve({ action: 'read' })).toMatchObject({ failure: 'failed' }) }) }) - -describe('a phone speech service too slow to answer', () => { - it('reports busy, not unsupported, so the next dictation asks again', async () => { - const engine: NativeSpeechEngine = { - ...engineWith('phone'), - availability: () => Promise.reject(Object.assign(new Error('slow'), { code: 'busy' })) - } - const server = createNativeSpeechServer(engine) - expect(await server.serve({ action: 'status', locale: 'en-US' })).toEqual({ - status: 'busy', - locale: null, - preference: 'phone' - }) - }) -}) diff --git a/mobile/src/platform/on-device-speech.ts b/mobile/src/platform/on-device-speech.ts index 143c56c3317..b592de40404 100644 --- a/mobile/src/platform/on-device-speech.ts +++ b/mobile/src/platform/on-device-speech.ts @@ -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 } diff --git a/mobile/src/platform/on-device-speech.web.test.tsx b/mobile/src/platform/on-device-speech.web.test.tsx index 03da733f3f7..2bcf77019fa 100644 --- a/mobile/src/platform/on-device-speech.web.test.tsx +++ b/mobile/src/platform/on-device-speech.web.test.tsx @@ -54,14 +54,4 @@ describe('on-device dictation text', () => { failure: null }) }) - - it('keeps every word when the computer turned filler removal off', async () => { - const speech = mountSpeech(false) - await speech.start() - - expect(await speech.finish()).toEqual({ - text: 'Äh, das ist, ähm, um fünf Uhr fertig.', - failure: null - }) - }) }) diff --git a/mobile/src/platform/on-device-speech.web.ts b/mobile/src/platform/on-device-speech.web.ts index 00a8c777803..fbaee133ffe 100644 --- a/mobile/src/platform/on-device-speech.web.ts +++ b/mobile/src/platform/on-device-speech.web.ts @@ -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] ) diff --git a/mobile/src/platform/page-box.ts b/mobile/src/platform/page-box.ts new file mode 100644 index 00000000000..fde93380a87 --- /dev/null +++ b/mobile/src/platform/page-box.ts @@ -0,0 +1,8 @@ +import type { View } from 'react-native' + +export type PageBox = { left: number; top: number; width: number; height: number } + +// A view's box in page coordinates, the space touch events report pageX/pageY in; null when it has none. +export function measurePageBox(target: View, onBox: (box: PageBox | null) => void): void { + target.measure((_x, _y, width, height, left, top) => onBox({ left, top, width, height })) +} diff --git a/mobile/src/platform/page-box.web.ts b/mobile/src/platform/page-box.web.ts new file mode 100644 index 00000000000..604e33f09fa --- /dev/null +++ b/mobile/src/platform/page-box.web.ts @@ -0,0 +1,28 @@ +import type { View } from 'react-native' +import type { PageBox } from './page-box' + +export type { PageBox } from './page-box' + +function hasClientRect(node: unknown): node is { getBoundingClientRect: () => DOMRect } { + return ( + typeof node === 'object' && + node !== null && + 'getBoundingClientRect' in node && + typeof node.getBoundingClientRect === 'function' + ) +} + +// Read the DOM node now: RNW's measure is async and skips its callback for a detached node, which would lose a release. +export function measurePageBox(target: View, onBox: (box: PageBox | null) => void): void { + if (!hasClientRect(target)) { + onBox(null) + return + } + const rect = target.getBoundingClientRect() + onBox({ + left: rect.left + window.scrollX, + top: rect.top + window.scrollY, + width: rect.width, + height: rect.height + }) +} diff --git a/mobile/src/query/first-paint-query-keys.ts b/mobile/src/query/first-paint-query-keys.ts index b916cae5a07..47654004af7 100644 --- a/mobile/src/query/first-paint-query-keys.ts +++ b/mobile/src/query/first-paint-query-keys.ts @@ -1,4 +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, @@ -12,6 +14,9 @@ import { import { hostViewFamily, hostViewKey } from '../host-screen/host-view-memory' import { hostProjectSectionsQuery } from '../host-screen/use-host-project-sections' import { sessionTabsFamily, sessionTabsKey } from '../session/tabs/mobile-session-last-tabs' +import type { MobileSessionTab } from '../session/tabs/mobile-session-tabs' +import { activeSessionTabOf } from '../session/tabs/active-session-tab' +import { storedTabChatTranscriptIdentity } from '../session/native-chat/mobile-native-chat-transcript-store' import { gitStatusQuery } from '../source-control/mobile-git-status-query' import { firstPaintTaskKeys } from '../tasks/task-query-storage' import { hostQueryKey } from './host-query-key' @@ -40,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 [ @@ -110,3 +120,25 @@ function workspaceScreenKeys( } return [] } + +/** + * The chat a session route opens on, named by its stored strip once the first read restored it: the boot's + * second, dependent read. Null on other routes and for a strip whose active tab is no chat. + */ +export function firstPaintChatTranscriptIdentity( + queryClient: QueryClient, + hostId: string, + route: URL +): string | null { + const [root, routeHost, screen, worktreeSegment] = route.pathname.split('/').filter(Boolean) + const worktreeId = routeSegment(worktreeSegment) + if (root !== 'h' || routeSegment(routeHost) !== hostId || screen !== 'session' || !worktreeId) { + return null + } + const exec = normalizeExecutionHostId(route.searchParams.get('executionHost')) ?? 'local' + const tabs = queryClient.getQueryData( + sessionTabsKey(hostId, exec, worktreeId) + ) + const active = tabs ? activeSessionTabOf(tabs) : null + return active ? storedTabChatTranscriptIdentity(hostId, worktreeId, active) : null +} diff --git a/mobile/src/query/host-connection-invalidation.ts b/mobile/src/query/host-connection-invalidation.ts index 7c1c3399ca0..4805bfd7a8e 100644 --- a/mobile/src/query/host-connection-invalidation.ts +++ b/mobile/src/query/host-connection-invalidation.ts @@ -14,7 +14,7 @@ function refetchesOnConnect(query: Query): boolean { } // One connected-edge listener per world per host client, however many screens read that host. -function retainHostConnectionInvalidation( +export function retainHostConnectionInvalidation( queryClient: QueryClient, hostId: string, client: RpcClient diff --git a/mobile/src/query/host-event-router.test.ts b/mobile/src/query/host-event-router.test.ts new file mode 100644 index 00000000000..096f908ee9e --- /dev/null +++ b/mobile/src/query/host-event-router.test.ts @@ -0,0 +1,52 @@ +import { QueryObserver } from '@tanstack/react-query' +import { expect, it, vi } from 'vitest' +import { stubRpcClient } from '../transport/rpc/rpc-client-test-stub' +import { retainHostEventRouter } from './host-event-router' +import { createOrcaQueryClient } from './orca-query-client' + +vi.mock('react-native', () => ({ AppState: {}, Platform: { OS: 'ios' } })) + +const KEY = ['orca', 'host-1', 'test.rows', { exec: 'local' }, {}] as const + +it('reads again after a read that was already out when the event stream reopened', async () => { + // One client-events wire at a time; each subscribe hands the test its frames. + const wires: ((payload: unknown) => void)[] = [] + const client = stubRpcClient({ + getLastConnectedAt: () => 1, + subscribe: (_method, _params, onData) => { + wires.push(onData) + return () => {} + } + }) + let desktopRows = 1 + const replies: ((rows: number) => void)[] = [] + const queryClient = createOrcaQueryClient() + const router = retainHostEventRouter(queryClient, 'host-1', client) + wires[0]?.({ type: 'ready', subscriptionId: 'events-1' }) + + const observer = new QueryObserver(queryClient, { + queryKey: KEY, + queryFn: () => new Promise((resolve) => replies.push(resolve)), + meta: { signal: { events: ['worktreesChanged'] } } + }) + const stop = observer.subscribe(() => {}) + await vi.waitFor(() => expect(replies).toHaveLength(1)) + replies[0]?.(desktopRows) + await vi.waitFor(() => expect(observer.getCurrentResult().data).toBe(1)) + + // A read goes out; the stream drops and reopens on the same connection while it is out. + void observer.refetch() + await vi.waitFor(() => expect(replies).toHaveLength(2)) + wires[0]?.({ type: 'end' }) + desktopRows = 2 + await vi.waitFor(() => expect(wires).toHaveLength(2)) + wires[1]?.({ type: 'ready', subscriptionId: 'events-2' }) + // The read sent before the gap answers with what the desktop had then. + replies[1]?.(1) + + await vi.waitFor(() => expect(replies).toHaveLength(3)) + replies[2]?.(desktopRows) + await vi.waitFor(() => expect(observer.getCurrentResult().data).toBe(2)) + stop() + router.release() +}) diff --git a/mobile/src/query/host-event-router.ts b/mobile/src/query/host-event-router.ts index f26fb5f360a..7269e2f8fcc 100644 --- a/mobile/src/query/host-event-router.ts +++ b/mobile/src/query/host-event-router.ts @@ -117,9 +117,11 @@ function startHostEventRouter( if (!readsNow(query) || floorTimers.has(query.queryHash)) { return } - // Change events can come per agent step; keep reads `floorMs` apart, polls and reads in flight included. + // Change events can come per agent step; keep reads `floorMs` apart, polls, failed reads and reads in flight included. const lastReadAt = - query.state.fetchStatus === 'fetching' ? Date.now() : query.state.dataUpdatedAt + query.state.fetchStatus === 'fetching' + ? Date.now() + : Math.max(query.state.dataUpdatedAt, query.state.errorUpdatedAt) const wait = lastReadAt + (signalOf(query)?.floorMs ?? 0) - Date.now() if (wait <= 0) { refetchHostQueryAfterInFlight(queryClient, query) @@ -137,9 +139,16 @@ function startHostEventRouter( } // Reads again (or marks stale, when no one watches) every answer older than `readSince`. + // `readSince` Infinity is a stream reopened on the same connection: a read already out may predate the gap. const catchUp = (readSince: number): void => { for (const query of signalledQueries(() => true)) { - if (query.state.fetchStatus === 'fetching' || query.state.dataUpdatedAt >= readSince) { + if (query.state.fetchStatus === 'fetching') { + if (readSince === Infinity) { + onChange(query) + } + continue + } + if (query.state.dataUpdatedAt >= readSince) { continue } if (readsNow(query)) { @@ -206,7 +215,7 @@ type Router = { holders: number; handle: RouterHandle } const routers = new WeakMap>() // One router per world per host client, however many screens read that host. -function retainHostEventRouter( +export function retainHostEventRouter( queryClient: QueryClient, hostId: string, client: RpcClient diff --git a/mobile/src/query/host-query-persistence.ts b/mobile/src/query/host-query-persistence.ts index ccca23f3207..c505c963235 100644 --- a/mobile/src/query/host-query-persistence.ts +++ b/mobile/src/query/host-query-persistence.ts @@ -48,8 +48,17 @@ function hostQueryPersistOf(query: Query): HostQueryPersist | undefined // Per world, the keys whose data came from the store and no read has replaced yet. const restoredKeys = new WeakMap>() -// Per world, its store; absent in a document that keeps queries in memory only. -const persistences = new WeakMap() +// Per world, a store per host: one in a page document, one per paired host in native Home. Absent keeps memory only. +const persistences = new WeakMap>() + +function restoredKeysOf(queryClient: QueryClient): Set { + let keys = restoredKeys.get(queryClient) + if (!keys) { + keys = new Set() + restoredKeys.set(queryClient, keys) + } + return keys +} /** * Whether a key still holds what an earlier launch stored: shown, but possibly days old and unconfirmed by @@ -75,7 +84,23 @@ export function restoreStoredHostQueries( queryClient: QueryClient, keys: readonly PersistedHostQueryKey[] ): Promise { - return persistences.get(queryClient)?.restore(keys) ?? Promise.resolve() + const byHost = persistences.get(queryClient) + const hostIds = new Set(keys.map((key) => key.queryKey[1])) + return Promise.all( + [...hostIds].map( + (hostId) => + byHost?.get(hostId)?.restore(keys.filter((key) => key.queryKey[1] === hostId)) ?? + Promise.resolve() + ) + ).then(() => undefined) +} + +/** This world's store for one host, if it keeps one. */ +export function hostQueryPersistenceOf( + queryClient: QueryClient, + hostId: string +): HostQueryPersistence | undefined { + return persistences.get(queryClient)?.get(hostId) } export type HostQueryPersistence = { @@ -83,6 +108,8 @@ export type HostQueryPersistence = { restore(keys: readonly PersistedHostQueryKey[]): Promise // Writes what is pending now; for hidden and page close. flush(): Promise + // Stops writing this host's queries, as when the host is removed; writes already pending still flush. + stop(): void } // The boot read fetches every first-paint key in one store call; each key's later getItem takes its value once. @@ -123,6 +150,8 @@ export function createHostQueryPersistence( queryClient: QueryClient, store: OrcaQueryStoreBackend ): HostQueryPersistence { + const byHost = persistences.get(queryClient) ?? new Map() + persistences.set(queryClient, byHost) const primer = primedBackend(store) const storage = createOrcaQueryStorage(primer.backend) const persisters = new Map>() @@ -135,10 +164,9 @@ export function createHostQueryPersistence( // Keys a restore found empty: neither the screen's first observer nor a later restore reads them again. const missedAtBoot = new Set() const triedOnMiss = new WeakSet() - const restored = new Set() + const restored = restoredKeysOf(queryClient) // The key a restore is writing, so its own success leaves the mark. let applyingRestore: string | null = null - restoredKeys.set(queryClient, restored) function storedData(queryHash: string, data: unknown, persist: HostQueryPersist) { const last = lastStored.get(queryHash) @@ -189,8 +217,13 @@ export function createHostQueryPersistence( return scope === 'orca' && hostId === store.hostId && typeof family === 'string' ? family : null } - // Applied only to a key still empty: a live answer that landed first always wins. - function restoreOne(queryKey: readonly unknown[], persist: HostQueryPersist) { + // Applied only to a key still empty: a live answer that landed first always wins. `after` is the boot + // batch read: the key is claimed now, so an observer arriving meanwhile joins instead of reading again. + function restoreOne( + queryKey: readonly unknown[], + persist: HostQueryPersist, + after: Promise = Promise.resolve() + ) { const family = familyOf(queryKey) const queryHash = hashKey(queryKey) if (family === null) { @@ -201,22 +234,24 @@ export function createHostQueryPersistence( return pending } const restore = new Promise((settle) => { - void persisterFor(family, persist) - .retrieveQuery(queryHash, (record) => { - if (queryClient.getQueryData(queryKey) === undefined) { - const { data, dataUpdatedAt } = record.state - settledAt.set(queryHash, dataUpdatedAt) - // Marked first: listeners told of this write must already see it as an earlier launch's. - restored.add(queryHash) - applyingRestore = queryHash - try { - queryClient.setQueryData(queryKey, data, { updatedAt: dataUpdatedAt }) - } finally { - applyingRestore = null + void after + .then(() => + persisterFor(family, persist).retrieveQuery(queryHash, (record) => { + if (queryClient.getQueryData(queryKey) === undefined) { + const { data, dataUpdatedAt } = record.state + settledAt.set(queryHash, dataUpdatedAt) + // Marked first: listeners told of this write must already see it as an earlier launch's. + restored.add(queryHash) + applyingRestore = queryHash + try { + queryClient.setQueryData(queryKey, data, { updatedAt: dataUpdatedAt }) + } finally { + applyingRestore = null + } } - } - settle() - }) + settle() + }) + ) .then( (data) => { // A restored record settles in the scheduled callback above. @@ -231,10 +266,10 @@ export function createHostQueryPersistence( return restore } - queryClient.getQueryCache().subscribe((event) => { + const unsubscribe = queryClient.getQueryCache().subscribe((event) => { const { query } = event const persist = hostQueryPersistOf(query) - if (!persist) { + if (!persist || familyOf(query.queryKey) === null) { return } // An observed key with no data, such as one past its gcTime, reads its record once beside the fetch. @@ -286,24 +321,32 @@ export function createHostQueryPersistence( : [] }) // A key already being read joins that read below instead of reading again. - await primer.prime( + const primed = primer.prime( empty.flatMap(({ queryKey, persist, family }) => restoring.has(hashKey(queryKey)) ? [] : [orcaQueryStoreKey(`${familyPrefix(family, persist)}-${hashKey(queryKey)}`)] ) ) + const batchRead = primed.catch(() => undefined) await Promise.all( empty.map(async ({ queryKey, persist }) => { - await restoreOne(queryKey, persist) + await restoreOne(queryKey, persist, batchRead) if (queryClient.getQueryData(queryKey) === undefined) { missedAtBoot.add(hashKey(queryKey)) } }) ) }, - flush: () => storage.flush() + flush: () => storage.flush(), + stop() { + unsubscribe() + if (byHost.get(store.hostId) === persistence) { + byHost.delete(store.hostId) + } + } } - persistences.set(queryClient, persistence) + byHost.get(store.hostId)?.stop() + byHost.set(store.hostId, persistence) return persistence } diff --git a/mobile/src/query/host-query.ts b/mobile/src/query/host-query.ts index 209ad828d2e..e7b0a36706c 100644 --- a/mobile/src/query/host-query.ts +++ b/mobile/src/query/host-query.ts @@ -142,25 +142,46 @@ export async function readHostQueryLive( } // 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( queryClient: QueryClient, query: HostQuery, host: { hostId: string; client: RpcClient }, target: HostQueryTarget, input: TInput, - read: () => Promise + reader: { read: () => Promise; isCurrent: () => boolean; onStale: (data: TData) => void } ): Promise { + 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. @@ -178,7 +199,8 @@ export function prefetchHostQuery( } // Without a client the observer still reads the cached entry, but never fetches. -function observerOptions( +// Exported for a screen that reads one query per host through useQueries (native Home); it holds each host's router itself. +export function hostObserverOptions( query: HostQuery, client: RpcClient | null, hostId: string, @@ -190,6 +212,8 @@ function observerOptions( : { queryKey: hostQueryKey(hostId, query.family, target, input), queryFn: skipToken, + // A family that keeps its answer longer keeps it while no client reads it, too. + ...(query.gcTime === undefined ? {} : { gcTime: query.gcTime }), meta: { streamBacked: query.streamBacked, signal: query.signal, persist: query.persist } } } @@ -215,7 +239,7 @@ export function useHostQuery( // Same options object while nothing changed (target and input count by value), so TanStack's per-render setOptions is a no-op. const keyHash = hashKey([target, input]) const queryOptions = useMemo((): UseQueryOptions => { - const observer = observerOptions(query, client, hostId, target, input) + const observer = hostObserverOptions(query, client, hostId, target, input) // Disable through the observer, not skipToken: observers share the query's options, so a disabled // screen's skipToken would leave an enabled one's key with no fetch for invalidation or intervals. return enabled ? observer : { ...observer, enabled: false } @@ -241,7 +265,7 @@ export function useHostQueries useHostEventRouter(hostId, query.signal ? client : null) const keyHash = hashKey([target, inputs]) const queries = useMemo( - () => inputs.map((input) => observerOptions(query, client, hostId, target, input)), + () => inputs.map((input) => hostObserverOptions(query, client, hostId, target, input)), [query, client, hostId, keyHash] ) return useQueries({ queries, combine }) diff --git a/mobile/src/query/native-query-persistence.ts b/mobile/src/query/native-query-persistence.ts new file mode 100644 index 00000000000..bc45a9da57b --- /dev/null +++ b/mobile/src/query/native-query-persistence.ts @@ -0,0 +1,70 @@ +import { AppState, Platform } from 'react-native' +import type { QueryClient } from '@tanstack/react-query' +import { processDeviceStore } from '../device-store/device-store' +import { + createHostQueryPersistence, + hostQueryPersistenceOf, + type HostQueryPersistence +} from './host-query-persistence' +import { hostScopeKey } from './host-query-key' + +// Per native world, the paired hosts whose data it keeps in the device store. +const keptHosts = new WeakMap>() + +function keptHostsOf(queryClient: QueryClient): Set { + const existing = keptHosts.get(queryClient) + if (existing) { + return existing + } + const hosts = new Set() + keptHosts.set(queryClient, hosts) + // Pending writes go to disk when the app leaves the foreground, as a page's do on hide. + AppState.addEventListener('change', (state) => { + if (state !== 'active') { + for (const hostId of hosts) { + void hostQueryPersistenceOf(queryClient, hostId)?.flush() + } + } + }) + return hosts +} + +/** Keeps the native world's data for one paired host in the device store, read and written directly. */ +export function keepNativeHostQueries( + queryClient: QueryClient, + hostId: string +): HostQueryPersistence | null { + // The web build of the native app has no device store. + if (Platform.OS === 'web') { + return null + } + const existing = hostQueryPersistenceOf(queryClient, hostId) + if (existing) { + return existing + } + const hosts = keptHostsOf(queryClient) + hosts.add(hostId) + const store = processDeviceStore() + return createHostQueryPersistence(queryClient, { + hostId, + read: (keys) => store.read(hostId, 'cache', keys), + // A write still pending when the host is removed must not land after the wipe. + write: async (ops) => + hosts.has(hostId) + ? { written: (await store.write(hostId, 'cache', ops)).written } + : { written: false } + }) +} + +/** Whether this world's writes can reach disk now: false on web, or while the store's key can't load. */ +export async function nativeQueryStoreReady(): Promise { + return Platform.OS !== 'web' && (await processDeviceStore().open()) === 'ready' +} + +/** Drops a removed host's queries from this world and stops storing them; the store wipe follows. */ +export function forgetNativeHostQueries(queryClient: QueryClient, hostId: string): void { + keptHosts.get(queryClient)?.delete(hostId) + // Removed while the persistence still listens, so it forgets what it restored for this host. + queryClient.removeQueries({ queryKey: hostScopeKey(hostId) }) + hostQueryPersistenceOf(queryClient, hostId)?.stop() +} diff --git a/mobile/src/query/page-query-persistence.ts b/mobile/src/query/page-query-persistence.ts index 92a28bce36e..d0dad07998c 100644 --- a/mobile/src/query/page-query-persistence.ts +++ b/mobile/src/query/page-query-persistence.ts @@ -1,6 +1,7 @@ import type { QueryClient } from '@tanstack/react-query' import type { PageDeviceStore } from '../mobile-web-shell/bridge/page-device-store' -import { firstPaintQueryKeys } from './first-paint-query-keys' +import { primeStoredChatTranscripts } from '../session/native-chat/mobile-native-chat-transcript-store' +import { firstPaintChatTranscriptIdentity, firstPaintQueryKeys } from './first-paint-query-keys' import { createHostQueryPersistence } from './host-query-persistence' // How long a page holds its first render for stored data once everything else it waits on is ready. @@ -32,7 +33,11 @@ export function startPageQueryPersistence( } }) window.addEventListener('pagehide', flush) - return persistence.restore(firstPaintQueryKeys(hostId, route)) + return persistence.restore(firstPaintQueryKeys(hostId, route)).then(() => { + // Read inside the same capped wait, so a relaunched chat paints its stored rows in the first frame. + const chat = firstPaintChatTranscriptIdentity(queryClient, hostId, route) + return chat ? primeStoredChatTranscripts([chat]) : undefined + }) } /** Waits for the stored first screen, but never more than a short cap; a later answer still fills empty keys. */ diff --git a/mobile/src/session/MobileSessionActiveContent.tsx b/mobile/src/session/MobileSessionActiveContent.tsx index 33865e3ed3f..06861569071 100644 --- a/mobile/src/session/MobileSessionActiveContent.tsx +++ b/mobile/src/session/MobileSessionActiveContent.tsx @@ -8,13 +8,13 @@ import { Animated, View, Text, Pressable, ActivityIndicator } from 'react-native import { saveTerminalTextScale } from '../storage/preferences' import { MobileBrowserPane } from '../browser/MobileBrowserPane' import { TerminalPaneView } from '../terminal/session/TerminalPaneView' +import { MountedTerminalPanes } from '../terminal/session/mounted-terminal-lru' import { MobileNativeChatOverlay } from './native-chat/MobileNativeChatOverlay' import { mobileSessionNativeChatHostOutage } from './native-chat/mobile-native-chat-host-outage' import { MobileAgentMessageProvider } from './native-chat/transcript/MobileAgentMessageProvider' import { MobileNativeChatForkProvider } from './MobileNativeChatForkProvider' import { useMobileAgentMessageNavigation } from './use-mobile-agent-message-navigation' import { MobileNativeChatDictationPreviewContext } from './native-chat/composer/mobile-native-chat-dictation-preview-context' -import { MobileDictationMeterContext } from '../dictation/mobile-dictation-meter-context' import { resolveMobileNativeChatSessionId } from './native-chat/mobile-native-chat-eligibility' import { colors } from '../theme/mobile-theme' import { useMobileColorScheme } from '../theme/use-mobile-color-scheme' @@ -31,6 +31,7 @@ import { FileReader } from '../files/session-documents/MobileSessionFileReader' import { MobileSessionContentState } from './MobileSessionContentState' import { MarkdownReader } from '../files/session-documents/MobileSessionMarkdownReader' import { markdownTabDraftKey } from '../drafts/document-edit-draft-rows' +import { workspaceDraftRowKey } from '../drafts/durable-draft-rows' import { loadMarkdownPreviewImage } from '../files/mobile-markdown-image-source' export function MobileSessionActiveContent({ @@ -87,6 +88,7 @@ export function MobileSessionActiveContent({ discardMarkdownLocalContent, saveMarkdownTab, setTerminalWebViewRef, + releaseTerminalDocument, handleTerminalWebReady, notifyTerminalFrame, notifyTerminalCellBoxChange, @@ -142,6 +144,9 @@ export function MobileSessionActiveContent({ controller ) const { presentedConnState, showOfflineState, forceReconnectHost } = controller + // Review notes are for working-tree diffs only. + const fileTabTakesNotes = + activeFileTab?.diffSource === 'staged' || activeFileTab?.diffSource === 'unstaged' const toast = toastMessage ? ( {toastMessage} @@ -194,8 +199,17 @@ export function MobileSessionActiveContent({ title={activeFileTab.title || t('session.activeContent.fileTitle', 'File')} relativePath={activeFileTab.relativePath} language={activeFileTab.language} + noteDraftKey={ + fileTabTakesNotes + ? workspaceDraftRowKey( + 'fileNote', + { hostId, executionHost, worktreeId }, + activeFileTab.relativePath + ) + : undefined + } diffCommentActions={ - activeFileTab.diffSource === 'staged' || activeFileTab.diffSource === 'unstaged' + fileTabTakesNotes ? { comments: diffComments, sendingCommentIds: sendingDiffCommentIds, @@ -258,119 +272,118 @@ export function MobileSessionActiveContent({ ) : ( - {terminals.map((terminal) => ( - { - // Why: pinch-to-zoom reports a new preset; persist it so the size sticks across panes and launches. - terminalTextScaleRevisionRef.current += 1 - setTerminalTextScale(scale) - void saveTerminalTextScale(scale) - }} - onRef={setTerminalWebViewRef} - onWebReady={handleTerminalWebReady} - onCellBoxChange={notifyTerminalCellBoxChange} - onSelectionMode={handleSelectionMode} - onSelectionCopy={handleSelectionCopy} - onSelectionEvicted={handleSelectionEvicted} - onClipboardWrite={handleClipboardWrite} - onModesChanged={handleModesChanged} - onKeyboardAvoidanceMetrics={handleKeyboardAvoidanceMetrics} - onHaptic={handleHaptic} - onTerminalInput={handleTerminalInput} - onTerminalQueryReply={handleTerminalQueryReply} - onTerminalInteraction={handleTerminalInteraction} - onTerminalTap={handleTerminalTap} - onFileTap={handleFileTap} - onOpenUrl={handleTerminalOpenUrl} - /> - ))} + + {(terminal) => ( + { + // Why: pinch-to-zoom reports a new preset; persist it so the size sticks across panes and launches. + terminalTextScaleRevisionRef.current += 1 + setTerminalTextScale(scale) + void saveTerminalTextScale(scale) + }} + onRef={setTerminalWebViewRef} + onDocumentReleased={releaseTerminalDocument} + onWebReady={handleTerminalWebReady} + onCellBoxChange={notifyTerminalCellBoxChange} + onSelectionMode={handleSelectionMode} + onSelectionCopy={handleSelectionCopy} + onSelectionEvicted={handleSelectionEvicted} + onClipboardWrite={handleClipboardWrite} + onModesChanged={handleModesChanged} + onKeyboardAvoidanceMetrics={handleKeyboardAvoidanceMetrics} + onHaptic={handleHaptic} + onTerminalInput={handleTerminalInput} + onTerminalQueryReply={handleTerminalQueryReply} + onTerminalInteraction={handleTerminalInteraction} + onTerminalTap={handleTerminalTap} + onFileTap={handleFileTap} + onOpenUrl={handleTerminalOpenUrl} + /> + )} + - - - - - void controller.handleCreateTerminal(undefined, { - startupCommand: command, - startupCommandDelivery: 'shell-ready', - terminalView: true - }) - } - // Accounts open on the paired host, so a chat another server runs offers none. - onOpenAccounts={executionHost === undefined ? openNativeChatAccounts : undefined} - /> - - - + + + + void controller.handleCreateTerminal(undefined, { + startupCommand: command, + startupCommandDelivery: 'shell-ready', + terminalView: true + }) + } + // Accounts open on the paired host, so a chat another server runs offers none. + onOpenAccounts={executionHost === undefined ? openNativeChatAccounts : undefined} + /> + + {toast} diff --git a/mobile/src/session/MobileSessionCommandDock.tsx b/mobile/src/session/MobileSessionCommandDock.tsx index 5c760045bd4..81e820cc289 100644 --- a/mobile/src/session/MobileSessionCommandDock.tsx +++ b/mobile/src/session/MobileSessionCommandDock.tsx @@ -1,4 +1,4 @@ -import type { ReactNode } from 'react' +import { useRef, type ReactNode } from 'react' import { View } from 'react-native' import { Keyboard as KeyboardIcon } from 'lucide-react-native' import { composerInputStyles as inputStyles } from '../components/composer-input/composer-input-styles' @@ -13,7 +13,6 @@ import { terminalDockStyles as dockStyles } from '../terminal/session/terminal-d import { colors } from '../theme/mobile-theme' import { useMobileColorScheme } from '../theme/use-mobile-color-scheme' import { useMobileTranslation } from '../i18n/use-mobile-translation' -import { styles } from './mobile-session-styles' import type { MobileSessionController } from './use-mobile-session-controller' import { useMobileSessionKeyboardLift } from '../terminal/session/use-mobile-session-keyboard-lift' import { useLiveInputCaptureText } from '../terminal/session/live-input-capture' @@ -23,6 +22,8 @@ export function MobileSessionCommandDock({ controller }: { controller: MobileSes useMobileColorScheme() const rail = useSessionTerminalKeyRail(controller) const keyboardLift = useMobileSessionKeyboardLift(controller.dockBottomInset) + // The field's ✕, which the held mic may be released over. + const dictationCancelRef = useRef(null) const { insets, dictationMode, @@ -63,6 +64,7 @@ export function MobileSessionCommandDock({ controller }: { controller: MobileSes trailing={ void attachImage('library')} onAttachFile={() => void attachImage('files')} diff --git a/mobile/src/session/MobileSessionContentRow.tsx b/mobile/src/session/MobileSessionContentRow.tsx index c787976e2d6..9a7cea2d3f1 100644 --- a/mobile/src/session/MobileSessionContentRow.tsx +++ b/mobile/src/session/MobileSessionContentRow.tsx @@ -10,6 +10,8 @@ import type { MobileSessionController } from './use-mobile-session-controller' import { MobileSessionActiveContent } from './MobileSessionActiveContent' import { MobileSessionCommandDock } from './MobileSessionCommandDock' import { MobileDictationStatusAnnouncement } from '../dictation/MobileDictationStatusAnnouncement' +import { MobileDictationLiveContext } from '../dictation/mobile-dictation-live-context' +import { useMobileDictationLive } from '../dictation/use-mobile-dictation-live' export function MobileSessionContentRow({ controller }: { controller: MobileSessionController }) { useMobileColorScheme() @@ -25,8 +27,10 @@ export function MobileSessionContentRow({ controller }: { controller: MobileSess setCreateWarningState, createWarning, dictation, + cancelDictation, handleSessionContentRowLayout } = controller + const dictationLive = useMobileDictationLive(dictation, cancelDictation, hostId) return ( @@ -47,9 +51,11 @@ export function MobileSessionContentRow({ controller }: { controller: MobileSess ) : null} - - {/* Why: translate instead of resize so keyboard toggles don't trigger a server-side PTY viewport change. */} - + + + {/* Why: translate instead of resize so keyboard toggles don't trigger a server-side PTY viewport change. */} + + {canDockPanel && activePanel !== null && ( diff --git a/mobile/src/session/agent-launch/mobile-new-tab-agent-options.test.ts b/mobile/src/session/agent-launch/mobile-new-tab-agent-options.test.ts deleted file mode 100644 index 639e76e1828..00000000000 --- a/mobile/src/session/agent-launch/mobile-new-tab-agent-options.test.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { describe, expect, it } from 'vitest' - -import { orderMobileNewTabAgents } from './mobile-new-tab-agent-options' - -describe('mobile new-tab agent options', () => { - it('orders the enabled detected default first', () => { - expect(orderMobileNewTabAgents('codex', ['gemini', 'codex', 'claude'], ['gemini'])).toEqual([ - 'codex', - 'claude' - ]) - }) -}) diff --git a/mobile/src/session/agent-session-failure-copy.test.ts b/mobile/src/session/agent-session-failure-copy.test.ts deleted file mode 100644 index 13d469e14f9..00000000000 --- a/mobile/src/session/agent-session-failure-copy.test.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { afterEach, expect, it } from 'vitest' -import { agentSessionFailureSentence } from '../../../src/shared/agent-session/failures/agent-session-failure-words' -import { activateMobileUiLocale } from '../i18n/mobile-i18n' -import { sayMobileAgentSessionFailure } from './agent-session-failure-copy' - -afterEach(async () => { - await activateMobileUiLocale('en') -}) - -it('gives new-chat guidance while keeping a missing conversation diagnostic private', () => { - expect( - agentSessionFailureSentence( - { - kind: 'savedConversationMissing', - detail: { text: 'No conversation found with session ID: private-id', audience: 'log' } - }, - 'row', - { agentName: 'Claude' }, - sayMobileAgentSessionFailure - ) - ).toBe("Claude couldn't find this chat's saved conversation. Start a new chat to continue.") -}) - -it.each([ - [ - 'en', - 'OMP has no model selected. Check your model selection and OMP sign-in, then send again.', - "OMP couldn't use @worker_be. Update OMP to 18.1.9 or later to keep it after a restart, or pick another model and send again." - ], - [ - 'de', - 'OMP hat kein Modell ausgewählt. Modellauswahl und OMP-Anmeldung prüfen und erneut senden.', - expect.stringContaining('OMP auf 18.1.9 oder neuer aktualisieren') - ] -] as const)( - 'words a missing OMP model and the update hint on the phone (%s)', - async (locale, none, update) => { - await activateMobileUiLocale(locale) - const say = (fact: Parameters[0]) => - agentSessionFailureSentence( - fact, - 'rejection', - { agentName: 'OMP' }, - sayMobileAgentSessionFailure - ) - expect(say({ kind: 'modelNotSelected' })).toBe(none) - expect( - say({ - kind: 'modelUnavailable', - detail: { text: '@worker_be', audience: 'log' }, - agentUpdate: '18.1.9' - }) - ).toEqual(update) - } -) diff --git a/mobile/src/session/mobile-dictation-session-outcomes.test.tsx b/mobile/src/session/mobile-dictation-session-outcomes.test.tsx index 1950423c351..1c906784758 100644 --- a/mobile/src/session/mobile-dictation-session-outcomes.test.tsx +++ b/mobile/src/session/mobile-dictation-session-outcomes.test.tsx @@ -1,5 +1,5 @@ // Mount the real composing hooks over native capture: refused starts and lost transcripts were in how the session hook and dictation hook meet, which isolated handler tests would miss. -import { createElement, useRef } from 'react' +import { createElement, useContext, useRef } from 'react' import { act } from 'react-test-renderer' import { createWithQueryClient } from '../test-support/query-client-test-renderer' import { beforeEach, describe, expect, it, vi } from 'vitest' @@ -45,7 +45,10 @@ vi.mock('expo-keep-awake', () => ({ activateKeepAwakeAsync: () => Promise.resolve(), deactivateKeepAwake: () => Promise.resolve() })) -vi.mock('expo-router', () => ({ useFocusEffect: () => {} })) +vi.mock('expo-router', () => { + const router = { canGoBack: () => false, push: () => {}, dismissTo: () => {} } + return { useFocusEffect: () => {}, useRouter: () => router, useNavigation: () => undefined } +}) vi.mock('../platform/haptics', () => ({ triggerError: () => { seen.errorHaptics += 1 @@ -108,6 +111,14 @@ vi.mock('./use-mobile-send-completion-generation', () => ({ })) import { useMobileSessionNativeChatDictation } from './use-mobile-session-native-chat-dictation' +import { + MobileDictationHostProvider, + useMobileDictationHost +} from '../dictation/mobile-dictation-host' +import { + MobileDictationPillContext, + type MobileDictationPill +} from '../dictation/mobile-dictation-host-context' type Model = ReturnType @@ -117,11 +128,21 @@ const typeIntoTerminal = async (_handle: string, text: string): Promise return true } +type Host = ReturnType & { pill: MobileDictationPill | null } + function mount( client: FakeRpcClient, sendLive: (handle: string, text: string) => Promise = typeIntoTerminal -): { current: () => Model } { - const held: { model: Model | null } = { model: null } +): { current: () => Model; host: () => Host; leave: () => void } { + const held: { model: Model | null; host: Host | null; screen: boolean } = { + model: null, + host: null, + screen: true + } + function HostProbe(): null { + held.host = { ...useMobileDictationHost(), pill: useContext(MobileDictationPillContext) } + return null + } function Probe(): null { const scope = { @@ -132,7 +153,7 @@ function mount( agentSessionHostSupport: { promptCancel: true, questionAnswers: false }, activeHandle: 't1', activeSessionTabId: 'tab1', - activeSessionTab: { id: 'tab1', type: 'terminal', terminal: 't1' }, + activeSessionTab: { id: 'tab1', type: 'terminal', terminal: 't1', title: 'Claude Code' }, diffComments: [], diffCommentsRef: useRef([]), setShowDictationSetup: (next: boolean) => { @@ -152,15 +173,25 @@ function mount( showToast: (message: string) => { seen.toasts.push(message) }, - resetLiveInputFocus: () => {} + resetLiveInputFocus: () => {}, + // Leaving this session would leave the page, so a recording holds the first leave. + router: { canGoBack: () => false } } // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the scope carries every member this hook destructures; the rest of the session model is unreachable from the mic path. held.model = useMobileSessionNativeChatDictation(scope as never, sendLive) return null } + const tree = () => + createElement( + MobileDictationHostProvider, + null, + createElement(HostProbe), + held.screen ? createElement(Probe) : null + ) + let renderer: ReturnType | null = null act(() => { - createWithQueryClient(createElement(Probe)) + renderer = createWithQueryClient(tree()) }) return { current: () => { @@ -168,6 +199,17 @@ function mount( throw new Error('Probe did not render') } return held.model + }, + host: () => { + if (!held.host) { + throw new Error('HostProbe did not render') + } + return held.host + }, + // The session screen goes away (Back to the workspace list) while the page and its dictation stay. + leave: () => { + held.screen = false + act(() => renderer?.update(tree())) } } } @@ -203,7 +245,7 @@ async function settle( async function startRecording( rpc: FakeRpcClient, sendLive?: (handle: string, text: string) => Promise -): Promise<{ current: () => Model }> { +): Promise> { const mounted = mount(rpc, sendLive) act(() => mounted.current().handleDictationToggle()) await settle(rpc, '') @@ -322,3 +364,19 @@ describe('a dictation that ends after switching between chat and terminal', () = expect(seen.inputs).toEqual([]) }) }) + +describe('a dictation whose session screen was left', () => { + it('keeps recording, then puts its words in the chat it started in with a toast that opens it', async () => { + seen.chat = { shown: true, scope: 'chat-a' } + const rpc = createFakeRpcClient() + const mounted = await startRecording(rpc) + mounted.leave() + expect(mounted.host().getDictation().isRecording).toBe(true) + expect(mounted.host().pill?.away).toBe(true) + act(() => mounted.host().stop()) + await settle(rpc, 'ship it') + expect(seen.chatWrites).toEqual([['chat-a', 'ship it']]) + expect(mounted.host().pill?.toast?.message).toBe('Inserted in Claude Code') + expect(mounted.host().pill?.toast?.open).toBeTypeOf('function') + }) +}) diff --git a/mobile/src/session/mobile-prompt-controller.test.ts b/mobile/src/session/mobile-prompt-controller.test.ts index 23330511000..8b82f60e47a 100644 --- a/mobile/src/session/mobile-prompt-controller.test.ts +++ b/mobile/src/session/mobile-prompt-controller.test.ts @@ -19,8 +19,7 @@ import { sendButton, permissionAction, getController, - askAnswer, - getTree + askAnswer } from './__mocks__/mobile-prompt-controller' const client: RpcClient = { @@ -65,18 +64,6 @@ describe('prompt cards through the production controller, send contract and view } ) - it('shows a collapsed prompt again as a new wait', async () => { - await render({ tab: permissionTab }) - act(() => { - getTree().root.findByProps({ accessibilityLabel: 'Collapse' }).props.onPress() - }) - await render({ - tab: { ...permissionTab, agentStatus: { ...permissionTab.agentStatus, stateStartedAt: 20 } } - }) - expect(getController().nativeChatPermission).not.toBe(null) - expect(getController().nativeChatCollapsedPrompt).toBe(null) - }) - it('keeps an acknowledged Deny hidden after the chat screen remounts on a lingering status', async () => { await render({ tab: permissionTab }) await act(async () => { diff --git a/mobile/src/session/mobile-structured-agent-session-launch.test.ts b/mobile/src/session/mobile-structured-agent-session-launch.test.ts index 2218b37ac4e..b5b62c474c0 100644 --- a/mobile/src/session/mobile-structured-agent-session-launch.test.ts +++ b/mobile/src/session/mobile-structured-agent-session-launch.test.ts @@ -28,99 +28,6 @@ describe('mobile structured agent-session launch', () => { kind: 'unknown' }) }) - - it('treats malformed structured responses as unknown', async () => { - const client = clientReturning( - { ok: true, result: { supported: true } }, - { ok: true, result: { ok: true, value: { sessionId: '' } } } - ) - - await expect( - createMobileStructuredAgentSession(client, 'workspace-1', 'codex') - ).resolves.toMatchObject({ - kind: 'unknown' - }) - }) - - it.each(['structured_agent_session_unsupported', 'method_not_found'])( - 'treats a top-level %s as a definitive refusal', - async (code) => { - const client = clientReturning( - { ok: true, result: { supported: true } }, - { ok: false, error: { code, message: 'structured create unavailable' } } - ) - - await expect( - createMobileStructuredAgentSession(client, 'workspace-1', 'codex') - ).resolves.toEqual({ - kind: 'failed', - message: 'structured create unavailable' - }) - } - ) - - it.each(['agent_session_operation_unknown', 'runtime_error', 'future_unknown_code'])( - 'keeps a top-level %s outcome unknown', - async (code) => { - const client = clientReturning( - { ok: true, result: { supported: true } }, - { ok: false, error: { code, message: 'create outcome ambiguous' } } - ) - - await expect( - createMobileStructuredAgentSession(client, 'workspace-1', 'codex') - ).resolves.toEqual({ - kind: 'unknown', - message: 'create outcome ambiguous' - }) - } - ) - - it('treats an envelope unsupported refusal as definitive', async () => { - const client = clientReturning( - { ok: true, result: { supported: true } }, - { - ok: true, - result: { - ok: false, - refusal: { - code: 'structured_agent_session_unsupported', - message: 'structured create unavailable' - } - } - } - ) - - await expect( - createMobileStructuredAgentSession(client, 'workspace-1', 'codex') - ).resolves.toEqual({ - kind: 'failed', - message: 'structured create unavailable' - }) - }) - - it.each(['agent_session_operation_unknown', 'agent_session_ownership_unknown', 'future_code'])( - 'keeps an envelope %s refusal unknown', - async (code) => { - const client = clientReturning( - { ok: true, result: { supported: true } }, - { - ok: true, - result: { - ok: false, - refusal: { code, message: 'create outcome ambiguous' } - } - } - ) - - await expect( - createMobileStructuredAgentSession(client, 'workspace-1', 'codex') - ).resolves.toEqual({ - kind: 'unknown', - message: 'create outcome ambiguous' - }) - } - ) }) it('settles a proven missing-original fork refusal but keeps a lost earlier attempt unknown', async () => { diff --git a/mobile/src/session/mobile-structured-send-delivery.test.ts b/mobile/src/session/mobile-structured-send-delivery.test.ts deleted file mode 100644 index c6c718702d4..00000000000 --- a/mobile/src/session/mobile-structured-send-delivery.test.ts +++ /dev/null @@ -1,173 +0,0 @@ -import { describe, expect, it } from 'vitest' -import type { AgentJournalDispatchState } from '../../../src/shared/agent-session/journal/agent-session-journal-types' -import type { AgentSessionSendResult } from '../../../src/shared/agent-session/agent-session-wire' -import { DISPATCH_REJECTED_CANCELLED } from '../../../src/shared/agent-session/requests/structured-agent-session-dispatch-rejection' -import { STRUCTURED_AGENT_SESSION_SUBMISSION_MISSING } from '../../../src/shared/agent-session/requests/structured-agent-session-send-evidence' -import { mobileStructuredSendDelivery } from './mobile-structured-send-delivery' -import type { StructuredAgentSessionMutationCallResult } from './mobile-structured-agent-session-rpc' -import { structuredSendResultFixture } from './structured-agent-send-result.test-fixture' - -function accepted( - dispatchState: AgentJournalDispatchState, - reason: string | null = null -): StructuredAgentSessionMutationCallResult { - return { status: 'accepted', value: structuredSendResultFixture(dispatchState, reason) } -} - -describe('mobileStructuredSendDelivery', () => { - it.each([ - ['a sign-in rejection', 'Sign in to Grok with `grok login`.', { kind: 'notSignedIn' as const }], - ['a content rejection', 'Claude does not support .bmp', undefined], - ['a write failure', 'provider_write_failed: broken pipe', undefined] - ])('leaves %s to its recorded row', (_name, reason, rejection) => { - const value = structuredSendResultFixture('rejected', reason) - if (rejection && 'submission' in value) { - value.submission.rejection = rejection - } - expect(mobileStructuredSendDelivery({ status: 'accepted', value })).toEqual({ - outcome: 'accepted', - error: null - }) - }) - - it('distinguishes transport doubt from an admitted unknown ordinary message', () => { - expect(mobileStructuredSendDelivery({ status: 'unknown' })).toEqual({ - outcome: 'unknown', - error: null - }) - expect( - mobileStructuredSendDelivery(accepted('unknown', STRUCTURED_AGENT_SESSION_SUBMISSION_MISSING)) - ).toEqual({ outcome: 'unknown', error: null }) - expect(mobileStructuredSendDelivery(accepted('unknown'))).toEqual({ - outcome: 'accepted', - error: null - }) - }) - - it.each(['accepted', 'pending'] as const)('reports a written %s send as accepted', (state) => { - expect(mobileStructuredSendDelivery(accepted(state))).toEqual({ - outcome: 'accepted', - error: null - }) - }) - - it.each(['waiting', 'dispatched', 'returned'] as const)( - 'lets the host own its %s queued message without an optimistic bubble', - (state) => { - expect( - mobileStructuredSendDelivery({ - status: 'accepted', - value: { - clientMessageId: 'client-1', - queued: { messageId: 'client-1', position: 1, state } - } - }) - ).toEqual({ outcome: 'queued', error: null }) - } - ) - - it('hands back a withdrawn card instead of silently sending again', () => { - expect( - mobileStructuredSendDelivery({ - status: 'accepted', - value: { - clientMessageId: 'client-1', - queued: { messageId: 'client-1', position: 1, state: 'withdrawn' } - } - }) - ).toEqual({ outcome: 'rejected', error: 'Message not sent' }) - }) - - it('keeps a handed-off queued message unconfirmed until the stream identifies it', () => { - const value = structuredSendResultFixture('accepted') - if (!('submission' in value)) { - throw new Error('expected a submission answer') - } - expect( - mobileStructuredSendDelivery({ - status: 'accepted', - value: { - clientMessageId: 'draft-id', - submission: { - ...value.submission, - clientMessageId: 'fresh-id', - queuedMessageId: 'draft-id' - } - } - }) - ).toEqual({ outcome: 'unknown', error: null }) - }) - - it('fails closed when a malformed answer has no submission', () => { - expect(mobileStructuredSendDelivery({ status: 'accepted', value: JSON.parse('{}') })).toEqual({ - outcome: 'unknown', - error: null - }) - }) - - it('lets a kept queued card hold the text after a provider rejection', () => { - const value = structuredSendResultFixture('rejected', 'Orca restarted before this was sent.') - if (!('submission' in value)) { - throw new Error('expected a submission answer') - } - value.submission.keptAsQueuedMessageId = 'card-id' - expect(mobileStructuredSendDelivery({ status: 'accepted', value })).toEqual({ - outcome: 'queued', - error: null - }) - }) - - it.each([ - { reason: DISPATCH_REJECTED_CANCELLED, typed: false }, - { reason: 'This message was withdrawn before the agent started it.', typed: true } - ])('leaves a stopped submission in its existing chat row (typed $typed)', ({ reason, typed }) => { - const value = structuredSendResultFixture('rejected', reason) - if (typed && 'submission' in value) { - value.submission.rejection = { kind: 'cancelled' } - } - expect(mobileStructuredSendDelivery({ status: 'accepted', value })).toEqual({ - outcome: 'accepted', - error: null - }) - }) - - it.each([ - ['agent_session_operation_invalid', 'Invalid operation'], - ['agent_session_checkpoint_stale', 'Fence moved'], - ['agent_session_operation_expired', 'Operation expired'], - ['agent_session_operation_conflict', 'Operation conflict'] - ] as const)('reports the current %s refusal', (code, message) => { - expect( - mobileStructuredSendDelivery({ - status: 'refused', - code, - message, - failure: { kind: 'refused', code } - }) - ).toEqual({ - outcome: 'rejected', - error: message - }) - }) - - it('preserves an unknown operation refusal as uncertainty', () => { - expect( - mobileStructuredSendDelivery({ - status: 'refused', - code: 'agent_session_operation_unknown', - message: 'Outcome unknown', - failure: { kind: 'refused', code: 'agent_session_operation_unknown' } - }) - ).toEqual({ outcome: 'unknown', error: null }) - }) - - it('reports a request failure without consulting earlier sends', () => { - expect( - mobileStructuredSendDelivery({ - status: 'failed', - message: 'Your message was not sent. Send it again.', - failure: { kind: 'failed' } - }) - ).toEqual({ outcome: 'rejected', error: 'Your message was not sent. Send it again.' }) - }) -}) diff --git a/mobile/src/session/native-chat/agent-session/mobile-structured-agent-session-unnamed-stop.test.ts b/mobile/src/session/native-chat/agent-session/mobile-structured-agent-session-unnamed-stop.test.ts deleted file mode 100644 index fbc778f03f8..00000000000 --- a/mobile/src/session/native-chat/agent-session/mobile-structured-agent-session-unnamed-stop.test.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { describe, expect, it, vi } from 'vitest' -import type { StructuredAgentSessionState } from '../../../../../src/shared/agent-session/structured-agent-session-reducer' -import type { RpcClient } from '../../../transport/rpc/rpc-client-contract' -import { requestMobileStructuredAgentSessionCancel } from '../../mobile-structured-agent-session-cancel' - -type SentParams = Record & { envelope: { clientOperationId: string } } - -function recordingClient(sent: SentParams[]): RpcClient { - const sendRequest = async (_method: string, params: SentParams) => { - sent.push(params) - return { ok: true, result: { ok: true, value: { cancelled: true } }, _meta: { runtimeId: 'r' } } - } - // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: cancel reaches only `sendRequest`. - return { sendRequest } as unknown as RpcClient -} - -function state(turnId: string | null): StructuredAgentSessionState { - const items = turnId - ? [ - { - itemId: 'status-1', - revision: 1, - sequence: 1, - observedAt: 10, - body: { kind: 'status', text: 'Working', turnLifecycle: { turnId, state: 'running' } } - } - ] - : [] - // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: cancel reads only the fence and the running turn. - return { fence: 3, items } as unknown as StructuredAgentSessionState -} - -function press(input: { - sent: SentParams[] - turnId: string | null - hostStopsConversation: boolean | null - prompt?: { itemId: string; expectedRevision: number } - promptCancelSupported?: boolean -}) { - const onSendError = vi.fn() - const pressed = requestMobileStructuredAgentSessionCancel({ - client: recordingClient(input.sent), - sessionId: 'session-1', - enabled: true, - stateRef: { current: state(input.turnId) }, - promptCancelSupported: input.promptCancelSupported ?? true, - ...(input.prompt ? { prompt: input.prompt } : {}), - hostAnswersRepeatedStops: true, - hostStopsConversation: input.hostStopsConversation, - inFlight: new Map(), - onSendError - }) - return { pressed, onSendError } -} - -describe('phone Stop against a host that stops what the chat has in flight', () => { - it('names no turn while a turn runs either', async () => { - const sent: SentParams[] = [] - expect(await press({ sent, turnId: 'turn-1', hostStopsConversation: true }).pressed).toBe(true) - expect(sent[0]).not.toHaveProperty('turnId') - }) - - it("keeps naming a card's turn when the host cannot take the card's identity", async () => { - const sent: SentParams[] = [] - const prompt = { itemId: 'prompt-1', expectedRevision: 2 } - await press({ - sent, - turnId: 'turn-1', - hostStopsConversation: true, - prompt, - promptCancelSupported: false - }).pressed - expect(sent[0]).toMatchObject({ turnId: 'turn-1' }) - expect(sent[0]).not.toHaveProperty('prompt') - }) -}) diff --git a/mobile/src/session/native-chat/agent-session/use-mobile-structured-agent-session-read-failure.test.tsx b/mobile/src/session/native-chat/agent-session/use-mobile-structured-agent-session-read-failure.test.tsx deleted file mode 100644 index aa9c0983057..00000000000 --- a/mobile/src/session/native-chat/agent-session/use-mobile-structured-agent-session-read-failure.test.tsx +++ /dev/null @@ -1,94 +0,0 @@ -// Preserve typed final read refusals beside their words so unreadable history cannot render a sendable composer. - -import { createElement } from 'react' -import { act, type ReactTestRenderer } from 'react-test-renderer' -import { createWithQueryClient } from '../../../test-support/query-client-test-renderer' -import { afterEach, beforeEach, expect, it, vi } from 'vitest' -import type { RpcClient } from '../../../transport/rpc/rpc-client-contract' -import { useMobileStructuredAgentSession } from '../../use-mobile-structured-agent-session' -import { CAPABLE, SESSION_ID, ok } from './use-mobile-structured-agent-session-queued.test-fixture' - -const asyncStorage = vi.hoisted(() => ({ - getItem: vi.fn(async () => null), - setItem: vi.fn(async () => undefined), - removeItem: vi.fn(async () => undefined) -})) - -vi.mock('@react-native-async-storage/async-storage', () => ({ default: asyncStorage })) - -let renderer: ReactTestRenderer | null = null -let hook: ReturnType | null = null -let listener: ((value: unknown) => void) | null = null -const sendRequest = vi.fn() -const client: RpcClient = { - sendRequest, - subscribe: vi.fn((_method, _params, onData) => { - if (_method === 'agentSession.subscribe') { - listener = onData - } - return vi.fn() - }), - updateTerminalSubscriptionViewport: () => {}, - getState: () => 'connected', - getReconnectAttempt: () => 0, - getLastConnectedAt: () => null, - onStateChange: () => () => {}, - notifyForeground: () => {}, - close: () => {} -} - -function Harness(): null { - hook = useMobileStructuredAgentSession({ - client, - pairedHostClient: client, - sessionId: SESSION_ID, - sourceIdentity: 'host-a\0workspace-a', - enabled: true, - connected: true, - agent: 'claude', - hostSupport: CAPABLE, - appendComposerText: () => true, - onSendError: vi.fn() - }) - return null -} - -function refusedRead(reason: string) { - const error = { - code: 'runtime_error', - message: 'agent_session_journal_unreadable', - data: { refusal: { code: 'agent_session_journal_unreadable', details: { reason } } } - } - return { type: 'error', message: error.message, error } -} - -async function readFailedWith(reason: string) { - act(() => { - renderer = createWithQueryClient(createElement(Harness)) - }) - await vi.waitFor(() => expect(listener).toEqual(expect.any(Function))) - act(() => listener?.(refusedRead(reason))) - return hook!.session -} - -beforeEach(() => { - vi.clearAllMocks() - - sendRequest.mockImplementation(async (method) => - method === 'agentSession.options' ? ok({ models: [], current: {} }) : ok({}) - ) -}) - -afterEach(() => { - act(() => renderer?.unmount()) - renderer = null - hook = null - listener = null -}) - -it('reads a failure that can clear as one the chat keeps trying past', async () => { - expect(await readFailedWith('journalUnavailable')).toMatchObject({ - status: 'error', - readFailedFinally: false - }) -}) diff --git a/mobile/src/session/native-chat/agent-session/use-mobile-structured-agent-session.cut-turn-notice.test.tsx b/mobile/src/session/native-chat/agent-session/use-mobile-structured-agent-session.cut-turn-notice.test.tsx deleted file mode 100644 index c29e1229c36..00000000000 --- a/mobile/src/session/native-chat/agent-session/use-mobile-structured-agent-session.cut-turn-notice.test.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import { createElement } from 'react' -import { snapshotEvent } from './use-mobile-structured-agent-session-queued.test-fixture' -import { act, type ReactTestRenderer } from 'react-test-renderer' -import { createWithQueryClient } from '../../../test-support/query-client-test-renderer' -import { afterEach, describe, expect, it, vi } from 'vitest' -import type { AgentJournalRenderItem } from '../../../../../src/shared/agent-session/journal/agent-session-journal-types' -import type { AgentSessionSubscribeEvent } from '../../../../../src/shared/agent-session/agent-session-wire' -import type { RpcClient } from '../../../transport/rpc/rpc-client-contract' -import type { RpcResponse } from '../../../transport/rpc/rpc-wire-types' -import { useMobileStructuredAgentSession } from '../../use-mobile-structured-agent-session' -import { ANSWERED_PROMPT_ITEMS } from '../input/mobile-native-chat-answered-prompts.test-fixture' - -vi.mock('@react-native-async-storage/async-storage', () => ({ - default: { getItem: vi.fn(async () => null), setItem: vi.fn(), removeItem: vi.fn() } -})) - -function snapshot(items: AgentJournalRenderItem[]): AgentSessionSubscribeEvent { - return snapshotEvent({ items }) -} - -describe('useMobileStructuredAgentSession transcript', () => { - let renderer: ReactTestRenderer | null = null - afterEach(() => { - act(() => renderer?.unmount()) - renderer = null - }) - - async function mount(agent: string, items: AgentJournalRenderItem[]) { - let listener: ((value: unknown) => void) | null = null - const client: Pick = { - getState: () => 'connected', - onStateChange: () => () => {}, - sendRequest: vi.fn(async (): Promise => ({ - id: 'response-1', - ok: true, - result: {}, - _meta: { runtimeId: 'runtime-1' } - })), - subscribe: vi.fn((_method: string, _params: unknown, onData: (value: unknown) => void) => { - if (_method === 'agentSession.subscribe') { - listener = onData - } - return () => {} - }) - } - const rendered: { hook: ReturnType | null } = { - hook: null - } - function Harness(): null { - rendered.hook = useMobileStructuredAgentSession({ - // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: the hook's request, subscription and connection members are provided. - client: client as RpcClient, - pairedHostClient: null, - sessionId: 'session-1', - enabled: true, - connected: true, - hostSupport: null, - agent, - onSendError: vi.fn() - }) - return null - } - act(() => { - renderer = createWithQueryClient(createElement(Harness)) - }) - await vi.waitFor(() => expect(listener).toEqual(expect.any(Function))) - - act(() => listener?.(snapshot(items))) - return rendered - } - - it('draws an answered approval and question as receipts, never as their raw tool lines', async () => { - const rendered = await mount('claude', ANSWERED_PROMPT_ITEMS) - await vi.waitFor(() => expect(rendered.hook?.session.messages.length).toBeGreaterThan(0)) - - const { session, receipts } = rendered.hook! - expect( - session.messages.some((message) => - message.blocks.some( - (block) => block.type === 'tool-call' && block.name === 'AskUserQuestion' - ) - ) - ).toBe(false) - expect(session.messages.flatMap((message) => receipts.get(message.id)?.kind ?? [])).toEqual([ - 'approval', - 'question' - ]) - }) -}) diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.keyboard.web.test.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatComposer.keyboard.web.test.tsx index 928ca7efe92..e1cee3abee1 100644 --- a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.keyboard.web.test.tsx +++ b/mobile/src/session/native-chat/composer/MobileNativeChatComposer.keyboard.web.test.tsx @@ -173,27 +173,6 @@ describe('mobile composer modifier submit in the paired web page', () => { expect(input.value).toBe('retained draft') }) - it.each([true, false])( - 'sends raw text with alternate intent, retaining focus on accepted:%s', - async (accepted) => { - onSend.mockResolvedValue(accepted) - await render() - expect((await key({ metaKey: true })).defaultPrevented).toBe(true) - expect(onSend).toHaveBeenCalledExactlyOnceWith(' hello ', { alternate: true }) - expect(document.activeElement).toBe(field()) - expect(field().value).toBe(' hello ') - } - ) - - it('uses Ctrl on Android and leaves Cmd alone', async () => { - vi.spyOn(navigator, 'userAgent', 'get').mockReturnValue('Android') - await render() - expect((await key({ metaKey: true })).defaultPrevented).toBe(false) - expect(onSend).not.toHaveBeenCalled() - expect((await key({ ctrlKey: true })).defaultPrevented).toBe(true) - expect(onSend).toHaveBeenCalledExactlyOnceWith(' hello ', { alternate: true }) - }) - it.each([ {}, { shiftKey: true }, @@ -210,30 +189,6 @@ describe('mobile composer modifier submit in the paired web page', () => { expect(field().value).toBe(' hello ') }) - it('consumes a refused send without changing the draft or focus', async () => { - await render({ sendDisabled: true }) - expect((await key({ metaKey: true })).defaultPrevented).toBe(true) - expect(onSend).not.toHaveBeenCalled() - expect(field().value).toBe(' hello ') - expect(document.activeElement).toBe(field()) - }) - - it.each([ - { sendFollowUp: { action: 'queue', offersChoice: true }, alternateSteers: true }, - { sendFollowUp: { action: 'steer', offersChoice: true }, alternateSteers: false }, - { sendFollowUp: { action: 'queue', offersChoice: false }, alternateSteers: false }, - { sendFollowUp: null, alternateSteers: false } - ] as const)( - 'hands an empty chord to the head card, saying whether its other way is steer: %j', - async ({ sendFollowUp, alternateSteers }) => { - const steerHead = { steers: () => true, run: vi.fn(() => true), light: vi.fn() } - await render({ value: '', sendFollowUp, steerHead }) - expect((await key({ metaKey: true })).defaultPrevented).toBe(true) - expect(steerHead.run).toHaveBeenCalledExactlyOnceWith(alternateSteers) - expect(onSend).not.toHaveBeenCalled() - } - ) - it('holding Cmd alone on an empty composer shows Steer queued in Send, lights the head card and sends it on a press', async () => { vi.spyOn(document, 'hasFocus').mockReturnValue(true) const steerHead = { steers: () => true, run: vi.fn(() => true), light: vi.fn() } @@ -259,13 +214,6 @@ describe('mobile composer modifier submit in the paired web page', () => { expect(steerHead.light).toHaveBeenLastCalledWith(false) }) - it('saves a queued edit without alternate intent', async () => { - await render({ editSession: { cancel: vi.fn(), refuseCommand: () => false, locked: false } }) - expect((await key({ metaKey: true })).defaultPrevented).toBe(true) - expect(onSend).toHaveBeenCalledExactlyOnceWith(' hello ') - expect(document.activeElement).toBe(field()) - }) - it.each([ { value: '@rea', expected: '@README.md ', filePaths: ['README.md', 'src/read.ts'] }, { value: '/comp', expected: '/compact ', filePaths: [] } diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.paste.web.test.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatComposer.paste.web.test.tsx deleted file mode 100644 index 089dad5cdea..00000000000 --- a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.paste.web.test.tsx +++ /dev/null @@ -1,108 +0,0 @@ -// @vitest-environment happy-dom -import { act, type ComponentProps } from 'react' -import { createRoot, type Root } from 'react-dom/client' -import type * as ReactNative from 'react-native' -import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { MobileNativeChatComposer } from './MobileNativeChatComposer' - -vi.mock('react-native', () => vi.importActual('react-native-web')) -vi.mock('./MobileNativeChatComposerField', () => import('./MobileNativeChatComposerField.web')) -vi.mock('../../../platform/keyboard-occlusion', () => ({ useKeyboardOcclusion: () => 0 })) -vi.mock('lucide-react-native', () => ({ - Plus: () => null, - AtSign: () => null, - Image: () => null, - Package: () => null, - Paperclip: () => null, - Terminal: () => null -})) -vi.mock('../../../components/ActionSheetModal', () => ({ ActionSheetModal: () => null })) -vi.mock('../input/MobileNativeChatSessionOptionPickers', () => ({ - MobileNativeChatSessionOptionPickers: () => null -})) -vi.mock('./MobileNativeChatComposerMic', () => ({ MobileNativeChatComposerMic: () => null })) -vi.mock('./MobileNativeChatContextUsageRing', () => ({ - useMobileNativeChatContextRing: () => ({ barProps: {}, ring: null }) -})) -vi.mock('./MobileNativeChatSendButton', () => ({ MobileNativeChatSendButton: () => null })) -vi.mock('./MobileNativeChatEditActions', () => ({ MobileNativeChatEditActions: () => null })) -vi.mock('./MobileNativeChatComposerAttachments', () => ({ - MobileNativeChatComposerAttachments: () => null -})) -vi.mock('./MobileNativeChatComposerMenu', () => ({ - MobileNativeChatComposerSuggestions: () => null -})) - -type ComposerProps = ComponentProps - -describe('pasting into the mobile composer in the paired web page', () => { - let root: Root - let container: HTMLDivElement - const onPasteImages = vi.fn() - const onAttachPastedText = vi.fn() - - beforeEach(() => { - onPasteImages.mockReset() - onAttachPastedText.mockReset() - container = document.createElement('div') - document.body.append(container) - root = createRoot(container) - }) - - afterEach(async () => { - await act(async () => root.unmount()) - container.remove() - }) - - async function render(props: Partial = {}) { - await act(async () => - root.render( - 0} - getComposerEditGeneration={() => 0} - value="" - onChangeText={vi.fn()} - onSend={vi.fn()} - onPasteImages={onPasteImages} - structured={{ - catalog: { reported: [], conversationCommands: [] }, - files: [], - onRemoveFile: vi.fn(), - onSlashMenuOpen: vi.fn(), - onAttachPastedText - }} - {...props} - /> - ) - ) - } - - function paste(text: string, image?: File): Event { - const event = new Event('paste', { bubbles: true, cancelable: true }) - Object.defineProperty(event, 'clipboardData', { - value: { - items: image ? [{ type: image.type, getAsFile: () => image }] : [], - files: image ? [image] : [], - getData: (format: string) => (format === 'text/plain' ? text : '') - } - }) - const field = container.querySelector('textarea') - if (!field) { - throw new Error('Composer field missing') - } - field.dispatchEvent(event) - return event - } - - it('turns a 32 KB paste into a pasted-text file and leaves shorter text to the field', async () => { - await render() - const long = 'a'.repeat(32 * 1024) - expect(paste(long).defaultPrevented).toBe(true) - expect(onAttachPastedText).toHaveBeenCalledExactlyOnceWith(long) - - expect(paste(long.slice(1)).defaultPrevented).toBe(false) - expect(onAttachPastedText).toHaveBeenCalledTimes(1) - expect(onPasteImages).not.toHaveBeenCalled() - }) -}) diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.test.ts b/mobile/src/session/native-chat/composer/MobileNativeChatComposer.test.ts index d080a7c80bc..cd06bec969a 100644 --- a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.test.ts +++ b/mobile/src/session/native-chat/composer/MobileNativeChatComposer.test.ts @@ -1,4 +1,4 @@ -import { createElement, StrictMode, type ComponentProps, type ReactNode } from 'react' +import { createElement, type ComponentProps, type ReactNode } from 'react' import { act, create, type ReactTestInstance, type ReactTestRenderer } from 'react-test-renderer' import { Keyboard } from 'react-native' import { afterEach, describe, expect, it, vi } from 'vitest' @@ -365,29 +365,6 @@ describe('MobileNativeChatComposer', () => { expect(input().props.selection).toBeUndefined() }) - it('dismisses an accepted send after Strict Mode replays mount effects', async () => { - vi.mocked(Keyboard.dismiss).mockClear() - await act(async () => { - renderer = create( - createElement( - StrictMode, - null, - createElement(MobileNativeChatComposer, { - value: 'hello', - onChangeText: vi.fn(), - onSend: vi.fn().mockResolvedValue(true), - sendSurfaceId: 'tab-a', - getSendCompletionGeneration: getCurrentSendCompletionGeneration - }) - ) - ) - }) - - await act(async () => sendButton().props.onPress()) - - expect(Keyboard.dismiss).toHaveBeenCalledTimes(1) - }) - it('does not dismiss a newly focused composer when an old accepted send settles', async () => { vi.mocked(Keyboard.dismiss).mockClear() let resolveSend: ((accepted: boolean) => void) | null = null diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx index 9013e7c7cfb..b58cdede682 100644 --- a/mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx +++ b/mobile/src/session/native-chat/composer/MobileNativeChatComposer.tsx @@ -42,6 +42,7 @@ import { useMobileNativeChatContextRing } from './MobileNativeChatContextUsageRi import type { MobileNativeChatSendIntent } from '../mobile-native-chat-send' import { MobileNativeChatComposerMic } from './MobileNativeChatComposerMic' import type { MobileNativeChatMicProps } from './MobileNativeChatComposerMic' +import { MobileNativeChatDictationLeading } from './MobileNativeChatDictationLeading' import type { MobileNativeChatStructuredComposer } from './mobile-native-chat-structured-composer' import { useMobileNativeChatComposerGoalMode } from './use-mobile-native-chat-composer-goal-mode' import { MobileNativeChatComposerPlanChip } from './MobileNativeChatComposerPlanChip' @@ -151,6 +152,8 @@ export function MobileNativeChatComposer({ const fallbackInputRef = useRef(null) const fieldRef = inputRef ?? fallbackInputRef const groupRef = useRef(null) + // This composer's ✕, which its own held mic may be released over. + const cancelRef = useRef(null) const [focused, setFocused] = useState(false) const [picker, setPicker] = useMobileNativeChatPickerPresentation( sessionOptions?.controller.optionPickerRequest @@ -341,7 +344,9 @@ export function MobileNativeChatComposer({ textAlignVertical="top" /> - + {goal.chip} - - {contextRing.ring} + {onMicPress ? ( ) : null} diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatComposerMic.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatComposerMic.tsx index 6f4677f7ddc..4af343c5419 100644 --- a/mobile/src/session/native-chat/composer/MobileNativeChatComposerMic.tsx +++ b/mobile/src/session/native-chat/composer/MobileNativeChatComposerMic.tsx @@ -1,18 +1,18 @@ -import { ActivityIndicator, Pressable, View } from 'react-native' -import { Mic, Square } from 'lucide-react-native' -import { useContext } from 'react' -import { colors } from '../../../theme/mobile-theme' +import { Pressable, type View } from 'react-native' +import { useContext, type RefObject } from 'react' +import { MobileDictationLiveContext } from '../../../dictation/mobile-dictation-live-context' +import { dictationControlsCopy } from '../../../dictation/mobile-dictation-controls-copy' import { - MobileDictationGrapes, - MobileDictationTimer -} from '../../../dictation/MobileDictationMeter' -import { MobileDictationMeterContext } from '../../../dictation/mobile-dictation-meter-context' + MobileDictationMicIcon, + MobileDictationRetryButton +} from '../../../dictation/MobileDictationLiveControls' +import { useMobileDictationCancelDrop } from '../../../dictation/use-mobile-dictation-cancel-drop' +import { useMobileTranslation } from '../../../i18n/use-mobile-translation' import { keepHeldPressThroughLongPress } from '../../../platform/held-press-long-press' import { COMPOSER_CONTROL_HIT_SLOP, composerInputStyles as inputStyles } from '../../../components/composer-input/composer-input-styles' -import { mobileNativeChatComposerStyles as styles } from './mobile-native-chat-composer-styles' import { MobileNativeChatControlSwap } from '../input/mobile-native-chat-control-swap' export type MobileNativeChatMicProps = { @@ -36,61 +36,50 @@ export function MobileNativeChatComposerMic({ dictationMode = 'toggle', onMicPressIn, onMicPressOut, + cancelRef, disabled -}: MobileNativeChatMicProps & { disabled: boolean }): React.JSX.Element { - const meter = useContext(MobileDictationMeterContext) - const recordingMeter = micActive && !micStarting ? meter : null - // Keep the mic at the same fragment slot: remounting it mid-hold would lose the release. +}: MobileNativeChatMicProps & { + disabled: boolean + // The composer's ✕ that a held mic may be released over. + cancelRef?: RefObject +}): React.JSX.Element { + useMobileTranslation() + const live = useContext(MobileDictationLiveContext) + const release = useMobileDictationCancelDrop(cancelRef, live?.cancel, onMicPressOut) + if (live?.failureReason != null) { + return + } return ( - <> - {recordingMeter ? ( - - - - - ) : null} - [inputStyles.ghostButton, pressed && inputStyles.pressed]} - // Hold mode is walkie-talkie (press-in/out); toggle mode taps. - onPress={dictationMode === 'hold' ? undefined : onMicPress} - onPressIn={dictationMode === 'hold' ? onMicPressIn : undefined} - onPressOut={dictationMode === 'hold' ? onMicPressOut : undefined} - onLongPress={dictationMode === 'hold' ? keepHeldPressThroughLongPress : undefined} - disabled={disabled && !micActive} - hitSlop={COMPOSER_CONTROL_HIT_SLOP} - > - {/* The icon swaps on press; as the page's touch target, its removal would send + [inputStyles.ghostButton, pressed && inputStyles.pressed]} + // Hold mode is walkie-talkie (press-in/out); toggle mode taps. + onPress={dictationMode === 'hold' ? undefined : onMicPress} + onPressIn={dictationMode === 'hold' ? onMicPressIn : undefined} + onPressOut={dictationMode === 'hold' ? release : undefined} + onLongPress={dictationMode === 'hold' ? keepHeldPressThroughLongPress : undefined} + disabled={disabled && !micActive} + hitSlop={COMPOSER_CONTROL_HIT_SLOP} + > + {/* The icon swaps on press; as the page's touch target, its removal would send touchend to a detached node and lose the release. */} - - {micProcessing ? ( - - ) : micActive ? ( - - ) : ( - - )} - - - + + + + ) } diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatComposerSendSlot.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatComposerSendSlot.tsx index 44341d04025..cc4dd16223b 100644 --- a/mobile/src/session/native-chat/composer/MobileNativeChatComposerSendSlot.tsx +++ b/mobile/src/session/native-chat/composer/MobileNativeChatComposerSendSlot.tsx @@ -16,6 +16,7 @@ import { } from './MobileNativeChatSendButton' import type { MobileNativeChatSteerHead } from './use-mobile-native-chat-composer-tray' import { useMobileNativeChatSteerChordPreview } from './use-mobile-native-chat-steer-chord-preview' +import { useMobileNativeChatDictationFailed } from './MobileNativeChatDictationLeading' /** Send's slot outside a queued edit: Send, Stop where Send can't deliver, or what a held Cmd/Ctrl would do. */ export function MobileNativeChatComposerSendSlot({ @@ -51,7 +52,8 @@ export function MobileNativeChatComposerSendSlot({ attaching: boolean stop: { onStop?: () => void; held: boolean } | null onSend: (intent?: MobileNativeChatSendIntent, keepFocus?: boolean) => void -}): React.JSX.Element { +}): React.JSX.Element | null { + const dictationFailed = useMobileNativeChatDictationFailed() const steerChord = useMobileNativeChatSteerChordPreview({ fieldRef, hasDraft: value.trim() !== '' || attachmentCount > 0, @@ -83,6 +85,10 @@ export function MobileNativeChatComposerSendSlot({ draft: value, attachmentCount }) + // A dictation kept for Retry takes Send's room; a running agent keeps its Stop. + if (dictationFailed && !(showsStop && stop)) { + return null + } if (steerChord.preview && (steerChord.preview === 'steer-queued' || canSend)) { // As desktop, the preview takes Send's slot at once, with no ease. return ( diff --git a/mobile/src/session/native-chat/composer/MobileNativeChatDictationLeading.tsx b/mobile/src/session/native-chat/composer/MobileNativeChatDictationLeading.tsx new file mode 100644 index 00000000000..806609bf8f6 --- /dev/null +++ b/mobile/src/session/native-chat/composer/MobileNativeChatDictationLeading.tsx @@ -0,0 +1,66 @@ +import { useContext, type ReactNode, type RefObject } from 'react' +import { View } from 'react-native' +import { MobileDictationLiveContext } from '../../../dictation/mobile-dictation-live-context' +import { + MobileDictationCancelButton, + MobileDictationFailureNote, + MobileDictationFinishingNote, + MobileDictationRecordingMeter +} from '../../../dictation/MobileDictationLiveControls' +import { mobileNativeChatComposerStyles as styles } from './mobile-native-chat-composer-styles' + +// While dictating, the row's leading side swaps attach and the pickers for ✕ and the meter (or a kept failure), so the composer keeps its height. +export function MobileNativeChatDictationLeading({ + micActive, + micStarting = false, + micProcessing = false, + cancelRef, + trailing, + children +}: { + micActive: boolean + micStarting?: boolean + micProcessing?: boolean + cancelRef: RefObject + // The context ring after the leading controls; it steps aside with them. + trailing: ReactNode + children: ReactNode +}): React.JSX.Element { + const live = useContext(MobileDictationLiveContext) + if (live?.failureReason != null) { + return ( + + + + + ) + } + if (!live || (!micActive && !micProcessing)) { + return ( + <> + {children} + {trailing} + + ) + } + return ( + + + {micProcessing ? ( + + ) : micStarting ? null : ( + + )} + + ) +} + +// A dictation failed with its recording kept: Send gives its room to Retry. +export function useMobileNativeChatDictationFailed(): boolean { + return useContext(MobileDictationLiveContext)?.failureReason != null +} diff --git a/mobile/src/session/native-chat/composer/mobile-native-chat-composer-styles.ts b/mobile/src/session/native-chat/composer/mobile-native-chat-composer-styles.ts index b9ce2f30eb0..dc16f195e0b 100644 --- a/mobile/src/session/native-chat/composer/mobile-native-chat-composer-styles.ts +++ b/mobile/src/session/native-chat/composer/mobile-native-chat-composer-styles.ts @@ -22,12 +22,8 @@ export const mobileNativeChatComposerStyles = themedStyleSheet(() => ({ alignItems: 'center', gap: spacing.sm }, - dictationMeter: { - flexDirection: 'row', - alignItems: 'center', - justifyContent: 'flex-end', - gap: spacing.sm, - flexGrow: 6, - flexShrink: 0 + // One line while dictating: a long computer name truncates instead of wrapping and growing the composer. + dictationLeading: { + flexWrap: 'nowrap' } })) diff --git a/mobile/src/session/native-chat/composer/mobile-native-chat-image-attachment.test.ts b/mobile/src/session/native-chat/composer/mobile-native-chat-image-attachment.test.ts deleted file mode 100644 index e296b975b2c..00000000000 --- a/mobile/src/session/native-chat/composer/mobile-native-chat-image-attachment.test.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { describe, expect, it, vi } from 'vitest' -import type { RpcClient } from '../../../transport/rpc/rpc-client-contract' -import type { RpcResponse, RpcSuccess } from '../../../transport/rpc/rpc-wire-types' -import { uploadMobileNativeChatImages } from './mobile-native-chat-image-attachment' - -function ok(id: string, result: unknown): RpcSuccess { - return { id, ok: true, result, _meta: { runtimeId: 'runtime-1' } } -} - -function methodNotFound(id: string): RpcResponse { - return { - id, - ok: false, - error: { code: 'method_not_found', message: 'no' }, - _meta: { runtimeId: 'r' } - } -} - -function clientWithResponses(responses: RpcResponse[]): Pick & { - calls: { method: string; params: unknown }[] -} { - const calls: { method: string; params: unknown }[] = [] - return { - calls, - sendRequest: vi.fn(async (method: string, params?: unknown) => { - calls.push({ method, params }) - const response = responses.shift() - if (!response) { - throw new Error(`unexpected request: ${method}`) - } - return response - }) - } -} - -describe('uploadMobileNativeChatImages', () => { - it('uploads all three selected images in picker order', async () => { - const client = clientWithResponses([ - methodNotFound('start-a'), - ok('save-a', '/tmp/a.png'), - methodNotFound('start-b'), - ok('save-b', '/tmp/b.png'), - methodNotFound('start-c'), - ok('save-c', '/tmp/c.png') - ]) - - const order: string[] = [] - async function* pickImages() { - for (const image of [ - { base64: 'AAAA', uri: 'file:///a.jpg' }, - { base64: 'BBBB', uri: 'file:///b.jpg' }, - { base64: 'CCCC', uri: 'file:///c.jpg' } - ]) { - order.push(`read:${image.uri}`) - yield image - } - } - const result = await uploadMobileNativeChatImages('library', { - client, - getConnectionId: async () => 'conn-7', - pickImages, - onImageUploaded: (image) => order.push(`uploaded:${image.previewUri}`) - }) - - expect(result).toEqual([ - { - path: '/tmp/a.png', - previewUri: 'file:///a.jpg' - }, - { - path: '/tmp/b.png', - previewUri: 'file:///b.jpg' - }, - { - path: '/tmp/c.png', - previewUri: 'file:///c.jpg' - } - ]) - expect(order).toEqual([ - 'read:file:///a.jpg', - 'uploaded:file:///a.jpg', - 'read:file:///b.jpg', - 'uploaded:file:///b.jpg', - 'read:file:///c.jpg', - 'uploaded:file:///c.jpg' - ]) - }) -}) diff --git a/mobile/src/session/native-chat/mobile-native-chat-host-outage.ts b/mobile/src/session/native-chat/mobile-native-chat-host-outage.ts index fe84d7906f3..040e32baf4e 100644 --- a/mobile/src/session/native-chat/mobile-native-chat-host-outage.ts +++ b/mobile/src/session/native-chat/mobile-native-chat-host-outage.ts @@ -5,6 +5,7 @@ import { import type { ConnectionState } from '../../transport/connection/connection-state' import type { ServerHostDesktopReach } from '../../worktree/server-workspaces' import { translate, type Translate } from '../../i18n/mobile-i18n' +import { formatOfflineAsOfTime } from '../../components/offline-as-of-time' import type { MobileSessionController } from '../use-mobile-session-controller' /** The composer's status line while the chat's host is out, with Reconnect only when redialing can help. */ @@ -19,6 +20,10 @@ export function mobileNativeChatHostOutage( hostName: string /** The session header's Reconnect when it offers one, so the composer offers the same. */ reconnect: (() => void) | null + /** Before this page's first connect (a relaunch), the header covers connecting until an offline verdict. */ + neverConnected?: boolean + /** When the chat on screen was saved, while it is a stored copy no read has confirmed. */ + savedAt?: number | null server?: { state: ConnectionState name?: string | null @@ -31,13 +36,22 @@ export function mobileNativeChatHostOutage( offline ? t('connection.connectionHealth.hostOffline', '{{host}} is offline', { host }) : t('chat.hostOutage.reconnecting', '{{hostName}} is reconnecting…', { hostName: host }) - const { pairedVerdict: verdict } = args + const { pairedVerdict: verdict, savedAt } = args if (args.pairedHostState !== 'connected') { if (verdict.kind === 'auth-failed') { return { text: verdict.label } } const offline = isConnectionOutage(verdict) - const text = linkText(args.hostName, offline) + if (!offline && args.neverConnected) { + return null + } + const text = + offline && savedAt != null + ? t('chat.hostOutage.offlineAsOf', '{{host}} is offline · as of {{time}}', { + host: args.hostName, + time: formatOfflineAsOfTime(savedAt) + }) + : linkText(args.hostName, offline) return offline && args.reconnect ? { text, onReconnect: args.reconnect } : { text } } const { server } = args @@ -77,6 +91,8 @@ export function mobileSessionNativeChatHostOutage( | 'showConnectionRetry' | 'forceReconnectHost' | 'workspaceServer' + | 'lastConnectedAt' + | 'nativeChatController' >, hostName: string, t: Translate @@ -94,6 +110,8 @@ export function mobileSessionNativeChatHostOutage( session.showConnectionRetry && hostId && forceReconnect ? () => void forceReconnect(hostId) : null, + neverConnected: session.lastConnectedAt === null, + savedAt: session.nativeChatController.nativeChatSession.savedAt, server: session.workspaceServer }, t diff --git a/mobile/src/session/native-chat/mobile-native-chat-transcript-cache.ts b/mobile/src/session/native-chat/mobile-native-chat-transcript-cache.ts index c5c38f4fefe..7ea01a40f66 100644 --- a/mobile/src/session/native-chat/mobile-native-chat-transcript-cache.ts +++ b/mobile/src/session/native-chat/mobile-native-chat-transcript-cache.ts @@ -1,16 +1,19 @@ import { setBoundedScopeCacheEntry } from '../../../../src/shared/native-chat/native-chat-scope-cache' import type { NativeChatMessage } from '../../../../src/shared/native-chat/native-chat-types' import type { NativeChatResumePoint } from '../../../../src/shared/rpc-contract/native-chat-params' +import { peekStoredChatTranscript } from './mobile-native-chat-transcript-store' const MAX_CACHED_TRANSCRIPTS = 8 -type MobileNativeChatCachedTranscript = { +export type MobileNativeChatCachedTranscript = { messages: NativeChatMessage[] hasMore: boolean beforeOffset: number | null + // Set while the rows are an earlier launch's stored copy that no read in this page has confirmed. + savedAt?: number } -// Lives as long as the page: the WebView has no durable storage, so a relaunch starts empty. +// The first layer, for this page's lifetime; the phone's store (mobile-native-chat-transcript-store) is the second. export const mobileNativeChatTranscriptCache = new Map() export function cacheMobileNativeChatTranscript( @@ -25,6 +28,25 @@ export function cacheMobileNativeChatTranscript( ) } +/** This page's rows for a chat, else the phone's stored copy once read; undefined when neither is held. */ +export function heldMobileNativeChatTranscript( + identity: string +): MobileNativeChatCachedTranscript | undefined { + const cached = mobileNativeChatTranscriptCache.get(identity) + if (cached) { + return cached + } + const stored = peekStoredChatTranscript(identity) + return stored?.kind === 'terminal' + ? { + messages: stored.messages, + hasMore: stored.hasMore, + beforeOffset: stored.beforeOffset, + savedAt: stored.savedAt + } + : undefined +} + /** Older hosts send rows with no file offset; those get a normal snapshot. */ export function mobileNativeChatResumePoint( messages: readonly NativeChatMessage[] diff --git a/mobile/src/session/native-chat/mobile-native-chat-transcript-encode.ts b/mobile/src/session/native-chat/mobile-native-chat-transcript-encode.ts new file mode 100644 index 00000000000..daeeb767d09 --- /dev/null +++ b/mobile/src/session/native-chat/mobile-native-chat-transcript-encode.ts @@ -0,0 +1,160 @@ +import { Gzip, strToU8 } from 'fflate' +import { + trimRetainedItems, + mergeSubmissions +} from '../../../../src/shared/agent-session/view/structured-agent-session-item-retention' +import { agentSessionHasOlderTranscript } from '../../../../src/shared/agent-session/agent-session-context-clear' +import { DEVICE_STORE_MAX_VALUE_LENGTH } from '../../device-store/device-store-value-codec' +import { encodeBase64Bytes } from '../../transport/encryption/base64-byte-codec' +import { + STORED_TRANSCRIPT_VERSION, + type StoredChatTranscript, + type StoredStructuredChatTranscript, + type StoredTerminalChatTranscript +} from './mobile-native-chat-transcript-store' + +const MAX_STORED_ROWS = 500 +// A sliced encode hands the page back its thread this often, so a big chat never costs a dropped frame run. +const SLICE_MS = 8 +// Gzip input per push; small enough to stay well inside one slice on a phone. +const GZIP_CHUNK_BYTES = 64 * 1024 +// The window aimed for after a value came out too big, under the cap so the next try fits. +const REFIT_SHARE = 0.9 +const MAX_ATTEMPTS = 4 +// Base64 input per slice; a multiple of three, so the slices' outputs join into one valid string. +const BASE64_CHUNK_BYTES = 3 * 21_840 +// Stands in for the rows in the value's JSON, where the rows' own JSON then goes. +const ROWS_SENTINEL = '\u0000rows\u0000' +const ROWS_TOKEN = JSON.stringify(ROWS_SENTINEL) + +/** Gives the page its thread back between slices; null encodes in one go (hide, where the app may stop next). */ +export type EncodePause = (() => Promise) | null + +function rowsOf(stored: StoredChatTranscript): readonly unknown[] { + return stored.kind === 'terminal' ? stored.messages : stored.journal.items +} + +function terminalWindow( + stored: StoredTerminalChatTranscript, + rows: number +): StoredTerminalChatTranscript { + if (rows >= stored.messages.length) { + return stored + } + // Older rows past the window come back through Load earlier's tail read, so its offset no longer applies. + return { ...stored, messages: stored.messages.slice(-rows), hasMore: true, beforeOffset: null } +} + +function structuredWindow( + stored: StoredStructuredChatTranscript, + rows: number +): StoredStructuredChatTranscript { + const { journal } = stored + const items = trimRetainedItems(journal.items, rows, rows) + if (items === journal.items) { + return stored + } + return { + ...stored, + journal: { + ...journal, + items, + submissions: mergeSubmissions(journal.submissions, [], items), + hasOlder: agentSessionHasOlderTranscript(items, true) + } + } +} + +function windowOf(stored: StoredChatTranscript, rows: number): StoredChatTranscript { + return stored.kind === 'terminal' ? terminalWindow(stored, rows) : structuredWindow(stored, rows) +} + +// The value's JSON with its rows array replaced by the token. +function frameJson(stored: StoredChatTranscript): string { + const framed = + stored.kind === 'terminal' + ? { ...stored, messages: ROWS_SENTINEL } + : { ...stored, journal: { ...stored.journal, items: ROWS_SENTINEL } } + return JSON.stringify({ v: STORED_TRANSCRIPT_VERSION, stored: framed }) +} + +/** + * The newest rows that fit one store value (at most 500), as base64(gzip(JSON)); null when not even one row + * fits. With a pause, the work runs in slices of a few ms. Each row is stringified once, and a value over the + * cap is retried with the window its own bytes per row say will fit, never by blind halving. + */ +export async function encodeStoredChatTranscript( + stored: StoredChatTranscript, + pause: EncodePause = null +): Promise { + let sliceStart = performance.now() + const breathe = async (): Promise => { + if (pause && performance.now() - sliceStart >= SLICE_MS) { + await pause() + sliceStart = performance.now() + } + } + const all = rowsOf(stored) + const json = new Map() + for (const row of all.slice(-MAX_STORED_ROWS)) { + json.set(row, JSON.stringify(row)) + await breathe() + } + let rows = Math.min(all.length, MAX_STORED_ROWS) + for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt += 1) { + const window = windowOf(stored, rows) + const kept = rowsOf(window).map((row) => json.get(row) ?? JSON.stringify(row)) + const frame = frameJson(window) + const text = frame.replace(ROWS_TOKEN, () => `[${kept.join(',')}]`) + const value = await base64InSlices(await gzipInSlices(strToU8(text), breathe), breathe) + if (value.length <= DEVICE_STORE_MAX_VALUE_LENGTH) { + return value + } + // This attempt's encoded bytes per JSON byte say how many of the newest rows fit. + const perJsonByte = value.length / text.length + let budget = (DEVICE_STORE_MAX_VALUE_LENGTH * REFIT_SHARE) / perJsonByte - frame.length + let fit = 0 + for (let at = kept.length - 1; at >= 0 && budget >= kept[at]!.length + 1; at -= 1) { + budget -= kept[at]!.length + 1 + fit += 1 + } + if (fit === 0) { + return null + } + rows = Math.min(fit, rows - 1) + await breathe() + } + return null +} + +async function gzipInSlices(input: Uint8Array, breathe: () => Promise): Promise { + const parts: Uint8Array[] = [] + const gzip = new Gzip((chunk) => parts.push(chunk)) + for (let offset = 0; offset < input.length; offset += GZIP_CHUNK_BYTES) { + const end = Math.min(offset + GZIP_CHUNK_BYTES, input.length) + gzip.push(input.subarray(offset, end), end === input.length) + await breathe() + } + if (input.length === 0) { + gzip.push(input, true) + } + if (parts.length === 1) { + return parts[0]! + } + const out = new Uint8Array(parts.reduce((total, part) => total + part.length, 0)) + let at = 0 + for (const part of parts) { + out.set(part, at) + at += part.length + } + return out +} + +async function base64InSlices(bytes: Uint8Array, breathe: () => Promise): Promise { + const parts: string[] = [] + for (let offset = 0; offset < bytes.length; offset += BASE64_CHUNK_BYTES) { + parts.push(encodeBase64Bytes(bytes.subarray(offset, offset + BASE64_CHUNK_BYTES))) + await breathe() + } + return parts.join('') +} diff --git a/mobile/src/session/native-chat/mobile-native-chat-transcript-store.ts b/mobile/src/session/native-chat/mobile-native-chat-transcript-store.ts new file mode 100644 index 00000000000..b3c59746c44 --- /dev/null +++ b/mobile/src/session/native-chat/mobile-native-chat-transcript-store.ts @@ -0,0 +1,173 @@ +import { sha256 } from '@noble/hashes/sha256' +import { bytesToHex } from '@noble/hashes/utils' +import { setBoundedScopeCacheEntry } from '../../../../src/shared/native-chat/native-chat-scope-cache' +import type { NativeChatMessage } from '../../../../src/shared/native-chat/native-chat-types' +import { encodeNativeChatTranscriptIdentity } from '../../../../src/shared/native-chat/transcript/native-chat-transcript-retention' +import type { StructuredAgentSessionState } from '../../../../src/shared/agent-session/structured-agent-session-reducer' +import { decodeDeviceStoreValue } from '../../device-store/device-store-value-codec' +import { readPageDeviceStore } from '../../mobile-web-shell/bridge/page-device-store' +import { resolveMobileNativeChat, type MobileNativeChatTab } from './mobile-native-chat-eligibility' + +// Bump when a stored shape changes: other versions read as a miss. +export const STORED_TRANSCRIPT_VERSION = 1 +// Decoded copies this document keeps of what the store holds, so a remount skips the read. +const MAX_KNOWN_TRANSCRIPTS = 8 + +export type StoredTerminalChatTranscript = { + kind: 'terminal' + savedAt: number + messages: NativeChatMessage[] + hasMore: boolean + beforeOffset: number | null +} + +// Only the journal: what the agent is doing now (K1) comes from the live read. +export type StoredStructuredJournal = Pick< + StructuredAgentSessionState, + 'epoch' | 'cursor' | 'fence' | 'items' | 'submissions' | 'hasOlder' +> + +export type StoredStructuredChatTranscript = { + kind: 'structured' + savedAt: number + journal: StoredStructuredJournal +} + +export type StoredChatTranscript = StoredTerminalChatTranscript | StoredStructuredChatTranscript + +export function terminalChatTranscriptIdentity( + sourceIdentity: string, + agent: string | null, + sessionId: string | null, + transcriptPath: string | null +): string { + return encodeNativeChatTranscriptIdentity([sourceIdentity, agent, sessionId, transcriptPath]) +} + +export function structuredChatTranscriptIdentity( + sourceIdentity: string, + agent: string | null, + sessionId: string | null +): string { + return encodeNativeChatTranscriptIdentity([sourceIdentity, agent, sessionId]) +} + +/** The identity a stored tab's chat reads under, or null when the tab names no chat. */ +export function storedTabChatTranscriptIdentity( + hostId: string, + worktreeId: string, + tab: MobileNativeChatTab, + // The boot read assumes readable: priming a copy for a chat that can't open yet costs one key. + transcriptReadable = true +): string | null { + const resolution = resolveMobileNativeChat(tab, transcriptReadable) + if (!resolution) { + return null + } + const source = encodeNativeChatTranscriptIdentity([hostId, worktreeId]) + return tab.type === 'agent-session' + ? structuredChatTranscriptIdentity(source, resolution.agent, resolution.sessionId) + : terminalChatTranscriptIdentity( + source, + resolution.agent, + resolution.sessionId, + resolution.transcriptPath + ) +} + +// Identities carry worktree paths and transcript paths, so the key is a hash; the store already fences hosts. +export function chatTranscriptStoreKey(identity: string): string { + return `transcript:${bytesToHex(sha256(identity))}` +} + +function isRecord(value: unknown): value is Record { + return typeof value === 'object' && value !== null +} + +function readStoredValue(raw: string): StoredChatTranscript | null { + const value = decodeDeviceStoreValue(raw) + if (!isRecord(value) || value.v !== STORED_TRANSCRIPT_VERSION) { + return null + } + const { stored } = value + if (!isRecord(stored) || typeof stored.savedAt !== 'number') { + return null + } + if (stored.kind === 'terminal' && Array.isArray(stored.messages)) { + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: this page wrote the value under this version, and the store seals it. + return stored as StoredTerminalChatTranscript + } + if ( + stored.kind === 'structured' && + isRecord(stored.journal) && + Array.isArray(stored.journal.items) + ) { + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: as above. + return stored as StoredStructuredChatTranscript + } + return null +} + +// What this document knows the store holds per identity: a read in flight, or its answer. +const known = new Map>() +const settled = new Map() + +/** Records what the store now holds for a chat, as a write leaves it. */ +export function rememberStoredChatTranscript( + identity: string, + stored: StoredChatTranscript | null +): void { + setBoundedScopeCacheEntry(known, identity, Promise.resolve(stored), MAX_KNOWN_TRANSCRIPTS) + setBoundedScopeCacheEntry(settled, identity, stored, MAX_KNOWN_TRANSCRIPTS) +} + +function storeAvailable(): boolean { + return readPageDeviceStore()?.available() === true +} + +/** Reads several chats in one store call, as the first paint does for the active tab. */ +export function primeStoredChatTranscripts(identities: readonly string[]): Promise { + const store = readPageDeviceStore() + const unread = identities.filter((identity) => !known.has(identity)) + if (!store?.available() || unread.length === 0) { + return Promise.resolve() + } + const read = store.read('cache', unread.map(chatTranscriptStoreKey)).then( + (result) => (result.status === 'ok' ? result.values : unread.map(() => null)), + () => unread.map(() => null) + ) + unread.forEach((identity, at) => { + const value = read.then((values) => { + const raw = values[at] + const stored = raw ? readStoredValue(raw) : null + // A write that landed meanwhile is newer than this read. + if (!settled.has(identity)) { + rememberStoredChatTranscript(identity, stored) + } + return settled.get(identity) ?? null + }) + setBoundedScopeCacheEntry(known, identity, value, MAX_KNOWN_TRANSCRIPTS) + }) + return read.then(() => undefined) +} + +/** The stored copy when this document already holds the answer; undefined while unread. */ +export function peekStoredChatTranscript( + identity: string +): StoredChatTranscript | null | undefined { + if (!storeAvailable()) { + return null + } + return settled.has(identity) ? (settled.get(identity) ?? null) : undefined +} + +/** The stored copy, reading the store once per identity. */ +export function readStoredChatTranscript(identity: string): Promise { + if (!storeAvailable()) { + return Promise.resolve(null) + } + if (!known.has(identity)) { + void primeStoredChatTranscripts([identity]) + } + return known.get(identity) ?? Promise.resolve(null) +} diff --git a/mobile/src/session/native-chat/mobile-native-chat-transcript-writer.test.ts b/mobile/src/session/native-chat/mobile-native-chat-transcript-writer.test.ts new file mode 100644 index 00000000000..08a181f1f7d --- /dev/null +++ b/mobile/src/session/native-chat/mobile-native-chat-transcript-writer.test.ts @@ -0,0 +1,75 @@ +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import type { NativeChatMessage } from '../../../../src/shared/native-chat/native-chat-types' +import { publishPageDeviceStore } from '../../mobile-web-shell/bridge/page-device-store' +import { emitPageAppInactive } from '../../mobile-web-shell/bridge/bridge-app-inactive' +import { noteChatTranscript } from './mobile-native-chat-transcript-writer' + +function message(id: string): NativeChatMessage { + return { + id, + role: 'assistant', + blocks: [{ type: 'text', text: id }], + timestamp: 1, + source: 'transcript' + } +} + +describe('chat copies when the app leaves the foreground', () => { + const writes: string[] = [] + + beforeEach(() => { + writes.length = 0 + publishPageDeviceStore({ + available: () => true, + read: async (_table, keys) => ({ status: 'ok', values: keys.map(() => null) }), + write: async (_table, ops) => { + writes.push(...ops.map((op) => op.key)) + return { written: true } + } + }) + }) + + afterEach(() => { + vi.useRealTimers() + publishPageDeviceStore(null) + }) + + function note(rows: NativeChatMessage[]): void { + noteChatTranscript( + 'chat-leaving', + rows, + () => true, + (savedAt) => ({ + kind: 'terminal', + savedAt, + messages: rows, + hasMore: false, + beforeOffset: null + }) + ) + } + + it('saves new rows on leaving and writes nothing when a flap brings none', async () => { + vi.useFakeTimers() + const [m1, m2, m3] = [message('m1'), message('m2'), message('m3')] + note([m1, m2, m3]) + emitPageAppInactive() + await vi.runAllTimersAsync() + expect(writes).toHaveLength(1) + + // Two minutes later, Notification Centre and back: the rows on screen are a new list with the same rows. + vi.setSystemTime(Date.now() + 120_000) + note([m1, m2, m3]) + emitPageAppInactive() + note([m1, m2, m3]) + emitPageAppInactive() + await vi.runAllTimersAsync() + expect(writes).toHaveLength(1) + + // A middle row changed (a tool result landed), with the last row the same. + note([m1, { ...m2, blocks: [{ type: 'text', text: 'm2 with its result' }] }, m3]) + emitPageAppInactive() + await vi.runAllTimersAsync() + expect(writes).toHaveLength(2) + }) +}) diff --git a/mobile/src/session/native-chat/mobile-native-chat-transcript-writer.ts b/mobile/src/session/native-chat/mobile-native-chat-transcript-writer.ts new file mode 100644 index 00000000000..a500287955f --- /dev/null +++ b/mobile/src/session/native-chat/mobile-native-chat-transcript-writer.ts @@ -0,0 +1,268 @@ +import type { NativeChatMessage } from '../../../../src/shared/native-chat/native-chat-types' +import { onPageAppInactive } from '../../mobile-web-shell/bridge/bridge-app-inactive' +import { + EMPTY_STRUCTURED_AGENT_SESSION, + reduceStructuredAgentSession, + type StructuredAgentSessionAction, + type StructuredAgentSessionState +} from '../../../../src/shared/agent-session/structured-agent-session-reducer' +import { + MAX_RETAINED_ITEMS, + MAX_RETAINED_OWN_ITEMS +} from '../../../../src/shared/agent-session/view/structured-agent-session-item-retention' +import { readPageDeviceStore } from '../../mobile-web-shell/bridge/page-device-store' +import { + chatTranscriptStoreKey, + peekStoredChatTranscript, + rememberStoredChatTranscript, + type StoredChatTranscript, + type StoredStructuredChatTranscript +} from './mobile-native-chat-transcript-store' +import { encodeStoredChatTranscript } from './mobile-native-chat-transcript-encode' + +// Writes and restores chat copies; kept apart from the store's reads so the boot read stays small. + +// What a chat's copy is built from: its message list, or its session state. +type TranscriptSource = readonly NativeChatMessage[] | StructuredAgentSessionState + +type NotedTranscript = { + source: TranscriptSource + notedAt: number + isLive: () => boolean + build: (savedAt: number) => StoredChatTranscript +} + +// The newest copy each mounted chat holds, written at turn settle, on hidden and on unmount. +const pending = new Map() +// Per chat, the latest write handed to the store: only that one may come back for a retry. +const latestWrite = new Map() +let writes = 0 +const written = new WeakSet() + +/** + * Remembers a chat's current copy without encoding it; `source` is the array or state it came from. Its saved + * time is the write's while the chat is live, else when the copy last changed, so "as of" never claims more. + */ +export function noteChatTranscript( + identity: string, + source: TranscriptSource, + isLive: () => boolean, + build: (savedAt: number) => StoredChatTranscript +): void { + if (written.has(source)) { + pending.delete(identity) + return + } + pending.set(identity, { source, notedAt: Date.now(), isLive, build }) + listenForHidden() +} + +// An unchanged copy is still rewritten this long after the stored one, so its saved time stays within a minute. +const SAME_COPY_REWRITE_MS = 60_000 + +// Whether two copies hold the same rows: an open that changed nothing then skips re-encoding the whole window. +function sameRows(a: StoredChatTranscript, b: StoredChatTranscript): boolean { + // The merger replaces a row object whenever the row changes, anywhere in the list; a copy read back from the + // store holds other objects, so the first save after a relaunch writes once. + if (a.kind === 'terminal' && b.kind === 'terminal') { + return ( + a.messages.length === b.messages.length && + a.hasMore === b.hasMore && + a.messages.every((row, at) => row === b.messages[at]) + ) + } + // A journal's cursor moves with every change to its rows. + return ( + a.kind === 'structured' && + b.kind === 'structured' && + a.journal.epoch === b.journal.epoch && + a.journal.cursor?.sequence === b.journal.cursor?.sequence && + a.journal.items.length === b.journal.items.length && + a.journal.hasOlder === b.journal.hasOlder + ) +} + +// Chats whose copy is being encoded in slices; a hide takes the copy over and encodes it at once. +const encoding = new Map() + +function yieldToPage(): Promise { + return new Promise((resolve) => setTimeout(resolve, 0)) +} + +/** + * When a copy is written. `settle` (a turn settles, a chat closes) and `leave` (the app leaving the foreground, which + * also fires for Notification Centre, Face ID or an Android dialog) encode in slices, so even a big chat costs no long + * task; a swipe-kill from the app switcher comes a beat later. `leave` writes only rows the store doesn't hold yet and + * otherwise keeps the copy noted for the next hide. `hide` encodes in one go, since the app may stop right after. + */ +type FlushWhen = 'settle' | 'hide' | 'leave' + +/** Writes a chat's noted copy unless the store already holds it. */ +export function flushChatTranscript(identity: string, when: FlushWhen = 'settle'): void { + const now = when === 'hide' + const next = pending.get(identity) ?? (now ? encoding.get(identity) : undefined) + pending.delete(identity) + const store = readPageDeviceStore() + if (!next || !store?.available()) { + return + } + const stored = next.build(next.isLive() ? Date.now() : next.notedAt) + const kept = peekStoredChatTranscript(identity) + if (kept && sameRows(kept, stored)) { + if (when === 'leave') { + pending.set(identity, next) + return + } + if (stored.savedAt - kept.savedAt < SAME_COPY_REWRITE_MS) { + written.add(next.source) + return + } + } + const write = ++writes + latestWrite.set(identity, write) + const superseded = (): boolean => latestWrite.get(identity) !== write + if (now) { + encoding.delete(identity) + } else { + encoding.set(identity, next) + } + // A refused or failed write stays noted, so the next settle, hidden or close tries again. + const retry = (): void => { + if (!superseded() && !pending.has(identity)) { + pending.set(identity, next) + } + } + void encodeStoredChatTranscript(stored, now ? null : yieldToPage) + .then(async (value) => { + if (encoding.get(identity) === next) { + encoding.delete(identity) + } + // A newer flush of this chat started while this one encoded; it carries newer rows. + if (superseded()) { + return + } + // The shell finishes a write it was handed, so a page closing right after still keeps it. + const result = await store.write('cache', [{ key: chatTranscriptStoreKey(identity), value }]) + if (!result.written) { + retry() + return + } + written.add(next.source) + if (!superseded()) { + latestWrite.delete(identity) + rememberStoredChatTranscript(identity, value === null ? null : stored) + } + }) + .catch(retry) +} + +function flushAll(when: Exclude): void { + for (const identity of new Set([...pending.keys(), ...encoding.keys()])) { + flushChatTranscript(identity, when) + } +} + +let listening = false +function listenForHidden(): void { + if (listening) { + return + } + listening = true + // iOS hides the page only once the app is in the background; a swipe-kill from the app switcher comes sooner. + onPageAppInactive(() => flushAll('leave')) + if (typeof document === 'undefined') { + return + } + document.addEventListener('visibilitychange', () => { + if (document.visibilityState === 'hidden') { + flushAll('hide') + } + }) + // A document torn down while visible fires no hidden and runs no unmount cleanups. + window.addEventListener('pagehide', () => flushAll('hide')) +} + +// Reducer states that still show a stored copy no live read has confirmed, with when it was saved. +const unconfirmedStates = new WeakMap() +const restoredStates = new WeakMap() + +/** A stored structured journal as reducer state: shown, but claiming nothing about current work. One object per copy. */ +export function storedStructuredAgentSessionState( + stored: StoredStructuredChatTranscript +): StructuredAgentSessionState { + const restored = restoredStates.get(stored) + if (restored) { + return restored + } + const state: StructuredAgentSessionState = { + ...EMPTY_STRUCTURED_AGENT_SESSION, + ...stored.journal, + retainedOwnItemLimit: MAX_RETAINED_OWN_ITEMS, + retainedItemCap: MAX_RETAINED_ITEMS, + // The live read restates these; a stored running turn or pending send must not look like work. + working: false, + latestTurn: null, + actionablePromptIds: [] + } + restoredStates.set(stored, state) + unconfirmedStates.set(state, stored.savedAt) + return state +} + +/** The phone's copy of a structured session as reducer state; undefined while unread. */ +export function storedStructuredSessionState( + identity: string +): StructuredAgentSessionState | null | undefined { + const stored = peekStoredChatTranscript(identity) + if (stored === undefined) { + return undefined + } + return stored?.kind === 'structured' ? storedStructuredAgentSessionState(stored) : null +} + +/** When the stored copy a state still shows was saved; null once a live frame has replaced it. */ +export function unconfirmedStructuredStateSavedAt( + state: StructuredAgentSessionState +): number | null { + return unconfirmedStates.get(state) ?? null +} + +/** + * The session reducer over a state that may be a stored copy. A live frame applies to the copy without its + * "nothing running" placeholders, so the host's own fields decide (or an older host's row-derived fallbacks, as + * without a copy), and confirms it. Anything else keeps the copy's mark. Returns `previous` when nothing applied. + */ +export function reduceStructuredChatState( + previous: StructuredAgentSessionState, + action: StructuredAgentSessionAction, + receivedAt: number +): StructuredAgentSessionState { + const savedAt = unconfirmedStates.get(previous) + const live = + action.type === 'history-page' || (action.type === 'event' && action.event.type !== 'end') + const base = + savedAt !== undefined && live + ? { ...previous, working: undefined, latestTurn: undefined, actionablePromptIds: undefined } + : previous + const next = reduceStructuredAgentSession(base, action, receivedAt) + if (next === base) { + return previous + } + if (savedAt !== undefined && !live) { + unconfirmedStates.set(next, savedAt) + } + return next +} + +/** The copy a live structured state is stored as: its journal, saved now. */ +export function storedStructuredCopy( + state: StructuredAgentSessionState, + savedAt: number +): StoredStructuredChatTranscript { + const { epoch, cursor, fence, items, submissions, hasOlder } = state + return { + kind: 'structured', + savedAt, + journal: { epoch, cursor, fence, items, submissions, hasOlder } + } +} diff --git a/mobile/src/session/native-chat/transcript/MobileNativeChatNoticeRow.tsx b/mobile/src/session/native-chat/transcript/MobileNativeChatNoticeRow.tsx index 82d76d12e10..b849b08da44 100644 --- a/mobile/src/session/native-chat/transcript/MobileNativeChatNoticeRow.tsx +++ b/mobile/src/session/native-chat/transcript/MobileNativeChatNoticeRow.tsx @@ -157,17 +157,21 @@ export function MobileNativeChatNoticeRow({ case 'settled-permission': { const agent = names.agentName ?? look.agent const summary = - look.decision === 'denied' - ? t('chat.notice.permissionDenied', '{{agent}} denied permission. View details.', { + look.decision === 'approved' + ? t('chat.notice.safetyReviewApproved', '{{agent}} approved this action. View details.', { agent }) - : t( - 'chat.notice.safetyReview', - '{{agent}} reported a safety review warning. View details.', - { + : look.decision === 'denied' + ? t('chat.notice.permissionDenied', '{{agent}} denied permission. View details.', { agent - } - ) + }) + : t( + 'chat.notice.safetyReview', + '{{agent}} reported a safety review warning. View details.', + { + agent + } + ) return ( { expect(renders.at(-1)).toMatchObject({ status: 'loading', ids: ['a-1'] }) }) }) + +describe('useMobileNativeChatSession after a relaunch', () => { + let renderer: ReactTestRenderer | null = null + let stored: string | null = null + + beforeEach(() => { + publishPageDeviceStore({ + available: () => true, + read: async (_table, keys) => ({ + status: 'ok', + values: keys.map((key) => (key.startsWith('transcript:') ? stored : null)) + }), + write: async () => ({ written: true }) + }) + }) + + afterEach(() => { + act(() => renderer?.unmount()) + renderer = null + publishPageDeviceStore(null) + }) + + it('paints the stored rows and subscribes after the newest one', async () => { + // What an earlier launch's page saved when this chat's turn settled. + stored = await encodeStoredChatTranscript({ + kind: 'terminal', + savedAt: 1_700_000_000_000, + messages: [ + { ...message('m1'), transcriptOrder: 100 }, + { ...message('m2'), transcriptOrder: 200 } + ], + hasMore: false, + beforeOffset: null + }) + const subscribe = vi.fn(() => () => {}) + const client = stubRpcClient({ subscribe }) + const seen: { state: MobileNativeChatSession | null } = { state: null } + function Harness(): null { + seen.state = useMobileNativeChatSession({ + client, + sourceIdentity: 'host-a\0relaunched', + agent: 'claude', + sessionId: 'session', + transcriptPath: null + }) + return null + } + await act(async () => { + renderer = create(createElement(Harness)) + }) + + expect(subscribe).toHaveBeenCalledTimes(1) + expect(subscribe.mock.calls[0]?.[1]).toMatchObject({ + resumeAfter: { id: 'm2', transcriptOrder: 200, timestamp: 1 } + }) + expect(seen.state?.messages.map((entry) => entry.id)).toEqual(['m1', 'm2']) + expect(seen.state?.savedAt).toBe(1_700_000_000_000) + }) +}) diff --git a/mobile/src/session/native-chat/use-mobile-native-chat-session.ts b/mobile/src/session/native-chat/use-mobile-native-chat-session.ts index c1952510c32..978f859a8f3 100644 --- a/mobile/src/session/native-chat/use-mobile-native-chat-session.ts +++ b/mobile/src/session/native-chat/use-mobile-native-chat-session.ts @@ -1,8 +1,5 @@ import { useCallback, useEffect, useRef, useState } from 'react' -import { - EMPTY_NATIVE_CHAT_TRANSCRIPT, - encodeNativeChatTranscriptIdentity -} from '../../../../src/shared/native-chat/transcript/native-chat-transcript-retention' +import { EMPTY_NATIVE_CHAT_TRANSCRIPT } from '../../../../src/shared/native-chat/transcript/native-chat-transcript-retention' import { createNativeChatMerger, replaceList @@ -23,9 +20,13 @@ import { randomV4Uuid } from '../../platform/random-v4-uuid' import { useMobileOlderPageLoader, type OlderPagePhase } from '../use-mobile-older-page-loader' import { cacheMobileNativeChatTranscript, + heldMobileNativeChatTranscript, mobileNativeChatResumePoint, mobileNativeChatTranscriptCache } from './mobile-native-chat-transcript-cache' +import { terminalChatTranscriptIdentity } from './mobile-native-chat-transcript-store' +import { noteChatTranscript } from './mobile-native-chat-transcript-writer' +import { useStoredChatTranscript } from './use-stored-chat-transcript' import type { MobileNativeChatStatus } from './mobile-native-chat-session-status' export type { MobileNativeChatStatus } from './mobile-native-chat-session-status' @@ -48,6 +49,8 @@ export type MobileNativeChatSession = { loadEarlier: () => void /** Latest provider turn boundary from the transcript feed; absent from older hosts. */ transcriptLifecycle?: NativeChatTurnLifecycle + /** When the rows on screen were saved, while they are an earlier launch's copy no read has confirmed. */ + savedAt?: number | null } const INITIAL_LIMIT = 40 @@ -79,12 +82,7 @@ export function useMobileNativeChatSession(args: { }): MobileNativeChatSession { const { client, sourceIdentity, agent, sessionId, transcriptPath } = args const [messages, setMessages] = useState([]) - const identity = encodeNativeChatTranscriptIdentity([ - sourceIdentity, - agent, - sessionId, - transcriptPath - ]) + const identity = terminalChatTranscriptIdentity(sourceIdentity, agent, sessionId, transcriptPath) // Derive pre-read status from props now; a passive effect would lag one commit. const initialStatus: MobileNativeChatStatus = !client || !agent ? 'idle' : !sessionId ? 'waiting-session' : 'loading' @@ -123,13 +121,23 @@ export function useMobileNativeChatSession(args: { const settledReady = settled?.status === 'ready' useEffect(() => { if (settledReady) { - cacheMobileNativeChatTranscript(identity, { + const beforeOffset = beforeOffsetRef.current + cacheMobileNativeChatTranscript(identity, { messages, hasMore, beforeOffset }) + noteChatTranscript( + identity, messages, - hasMore, - beforeOffset: beforeOffsetRef.current - }) + () => client?.getState() === 'connected', + (savedAt) => ({ kind: 'terminal', savedAt, messages, hasMore, beforeOffset }) + ) } - }, [identity, messages, hasMore, settledReady]) + }, [client, identity, messages, hasMore, settledReady]) + const readingStore = useStoredChatTranscript({ + // A tab that names no session (or a structured one) has no copy of its own. + identity: agent && sessionId ? identity : null, + read: !mobileNativeChatTranscriptCache.has(identity), + turnSettled: + settledReady && (lifecycle?.identity !== identity || lifecycle.lifecycle?.state !== 'working') + }) const setList = useCallback((next: readonly NativeChatMessage[]) => { replaceList(mergerRef.current, next) @@ -142,14 +150,17 @@ export function useMobileNativeChatSession(args: { supersede() limitRef.current = INITIAL_LIMIT snapshotSeenRef.current = false - const cached = mobileNativeChatTranscriptCache.get(identity) + const cached = readingStore ? undefined : heldMobileNativeChatTranscript(identity) + if (cached && !mobileNativeChatTranscriptCache.has(identity)) { + cacheMobileNativeChatTranscript(identity, cached) + } const resumeAfter = cached ? mobileNativeChatResumePoint(cached.messages) : null const holdsCachedRows = Boolean(cached?.messages.length) setList(cached?.messages ?? EMPTY_NATIVE_CHAT_TRANSCRIPT) setError(undefined) setHasMore(cached?.hasMore ?? false) beforeOffsetRef.current = cached?.beforeOffset ?? null - if (!client || !agent) { + if (!client || !agent || readingStore) { return } if (!sessionId) { @@ -240,7 +251,7 @@ export function useMobileNativeChatSession(args: { supersede() unsubscribe() } - }, [client, agent, sessionId, transcriptPath, identity, setList, supersede]) + }, [client, agent, sessionId, transcriptPath, identity, readingStore, setList, supersede]) const loadEarlier = useCallback(() => { if (!client || !agent || !sessionId || !hasMore) { @@ -309,22 +320,25 @@ export function useMobileNativeChatSession(args: { }, [client, agent, sessionId, transcriptPath, hasMore, setList, loadOlderPages]) // Show the cached rows through any unsettled read: a reopen paints at once, and a disconnect or error can't blank the conversation. - const visibleMessages = settledReady - ? messages - : (mobileNativeChatTranscriptCache.get(identity)?.messages ?? EMPTY_NATIVE_CHAT_TRANSCRIPT) + const held = settledReady ? undefined : heldMobileNativeChatTranscript(identity) + const visibleMessages = settledReady ? messages : (held?.messages ?? EMPTY_NATIVE_CHAT_TRANSCRIPT) return { // Withhold rows until they belong to this identity; passive reset otherwise exposes previous-tab history for one commit. messages: visibleMessages, status, - // Rows left from an earlier visit can't answer "is this ask still open?" until a read confirms them. + // Rows left from an earlier visit or launch can't answer "is this ask still open?" until a read confirms them. transcriptLoading: - status === 'loading' || status === 'awaiting-transcript' || settled?.rowsUnconfirmed === true, + status === 'loading' || + status === 'awaiting-transcript' || + settled?.rowsUnconfirmed === true || + held?.savedAt !== undefined, error, hasMore, loadingEarlier: olderPages === 'loading', olderPages, loadEarlier, - transcriptLifecycle: lifecycle?.identity === identity ? lifecycle.lifecycle : undefined + transcriptLifecycle: lifecycle?.identity === identity ? lifecycle.lifecycle : undefined, + savedAt: held?.savedAt ?? null } } diff --git a/mobile/src/session/native-chat/use-stored-chat-transcript.ts b/mobile/src/session/native-chat/use-stored-chat-transcript.ts new file mode 100644 index 00000000000..a10fd5fb0f2 --- /dev/null +++ b/mobile/src/session/native-chat/use-stored-chat-transcript.ts @@ -0,0 +1,57 @@ +import { useEffect, useReducer, useState } from 'react' +import { + peekStoredChatTranscript, + readStoredChatTranscript +} from './mobile-native-chat-transcript-store' +import { flushChatTranscript } from './mobile-native-chat-transcript-writer' + +// The same cap the boot read has: past it, the chat reads live without its stored copy. +const STORE_READ_WAIT_MS = 150 + +/** + * A chat's link to the phone's stored copy. Returns true while the copy is still being read (a few ms, then + * one re-render), so the chat subscribes only once it can paint and resume from it. The copy the chat noted + * is written when its turn settles and when the chat closes; the store writes on hidden itself. + */ +export function useStoredChatTranscript(args: { + identity: string | null + // False when this page already holds the chat, so there is nothing to read. + read: boolean + turnSettled: boolean +}): boolean { + const { identity, turnSettled } = args + // A store that doesn't answer in time never holds the live read back; its late answer still fills the copy. + const [gaveUpOn, setGaveUpOn] = useState(null) + const reading = + args.read && + identity !== null && + gaveUpOn !== identity && + peekStoredChatTranscript(identity) === undefined + const [, answered] = useReducer((answers: number) => answers + 1, 0) + useEffect(() => { + if (!reading || identity === null) { + return + } + let current = true + const wait = setTimeout(() => current && setGaveUpOn(identity), STORE_READ_WAIT_MS) + void readStoredChatTranscript(identity).then(() => current && answered()) + return () => { + current = false + clearTimeout(wait) + } + }, [identity, reading]) + useEffect(() => { + if (turnSettled && identity !== null) { + flushChatTranscript(identity) + } + }, [identity, turnSettled]) + useEffect( + () => () => { + if (identity !== null) { + flushChatTranscript(identity) + } + }, + [identity] + ) + return reading +} diff --git a/mobile/src/session/tabs/active-session-tab.ts b/mobile/src/session/tabs/active-session-tab.ts index 0326b23dadd..674cb67abc1 100644 --- a/mobile/src/session/tabs/active-session-tab.ts +++ b/mobile/src/session/tabs/active-session-tab.ts @@ -16,6 +16,11 @@ export type ResolveActiveSessionTabResult = { retainSelectedSessionTabId: boolean } +/** The tab a strip marks active, else its first. */ +export function activeSessionTabOf(tabs: readonly T[]): T | null { + return tabs.find((tab) => tab.isActive) ?? tabs[0] ?? null +} + export function resolveActiveSessionTab( tabs: readonly T[], opts: { @@ -24,7 +29,7 @@ export function resolveActiveSessionTab( navigationIntent?: 'follow' } ): ResolveActiveSessionTabResult { - const snapshotActive = tabs.find((tab) => tab.isActive) ?? tabs[0] ?? null + const snapshotActive = activeSessionTabOf(tabs) const pendingActiveSessionTabId = opts.pendingActiveSessionTabId // Why: targeted follow is the only host action allowed to supersede phone-local intent. if (opts.navigationIntent === 'follow') { diff --git a/mobile/src/session/tabs/notification-pane-tab.ts b/mobile/src/session/tabs/notification-pane-tab.ts index 4a3c6e3ed90..ca3fcdad015 100644 --- a/mobile/src/session/tabs/notification-pane-tab.ts +++ b/mobile/src/session/tabs/notification-pane-tab.ts @@ -1,4 +1,4 @@ -import { parsePaneKey } from '../../../../src/shared/workspace-layout/stable-pane-id' +import { makePaneKey, parsePaneKey } from '../../../../src/shared/workspace-layout/stable-pane-id' import { structuredAgentSessionPaneKey, structuredAgentSessionTabId @@ -22,3 +22,21 @@ export function notificationPaneTab(tabs: readonly MobileSessionTab[], paneKey: ) === paneKey) ) } + +// The pane key that opens this tab again; notificationPaneTab finds the tab from it. +export function mobileSessionTabPaneKey( + tab: MobileSessionTab | null | undefined +): string | undefined { + if (tab?.type === 'agent-session') { + return structuredAgentSessionPaneKey(structuredAgentSessionTabId(tab.sessionId), tab.sessionId) + } + if (tab?.type !== 'terminal' || !tab.leafId) { + return undefined + } + try { + return makePaneKey(tab.parentTabId ?? tab.id, tab.leafId) + } catch { + // An id the pane key grammar refuses opens the session on its current tab instead. + return undefined + } +} diff --git a/mobile/src/session/use-mobile-session-controller.ts b/mobile/src/session/use-mobile-session-controller.ts index efd7d0a817e..fc11f3af02d 100644 --- a/mobile/src/session/use-mobile-session-controller.ts +++ b/mobile/src/session/use-mobile-session-controller.ts @@ -32,6 +32,7 @@ import { useMobileSessionContentCreateActions } from './use-mobile-session-conte import { useMobileSessionCloseActions } from './tabs/use-mobile-session-close-actions' import { useMobileSessionBulkClose } from './tabs/use-mobile-session-bulk-close' import { useMobileSessionPresentation } from './use-mobile-session-presentation' +import { useMobileSessionStoredChatTab } from './use-mobile-session-stored-chat-tab' import { useMobileSessionPanelRouteActions } from './use-mobile-session-panel-route-actions' export function useMobileSessionController() { @@ -94,6 +95,7 @@ export function useMobileSessionController() { const lifecycle = Object.assign(tabReconciliation, useMobileSessionLifecycle(tabReconciliation)) const keyboardState = Object.assign(lifecycle, useMobileSessionKeyboardState(lifecycle)) useMobileSessionStartup(keyboardState) + useMobileSessionStoredChatTab(keyboardState) const preferences = useMobileSessionPreferenceFocus(keyboardState) const tabSwitching = Object.assign(keyboardState, useMobileSessionTabSwitching(keyboardState)) const openNativeSession = useMobileStructuredSessionOpening(tabSwitching) diff --git a/mobile/src/session/use-mobile-session-dictation-setup.ts b/mobile/src/session/use-mobile-session-dictation-setup.ts new file mode 100644 index 00000000000..a1c46e002b8 --- /dev/null +++ b/mobile/src/session/use-mobile-session-dictation-setup.ts @@ -0,0 +1,77 @@ +import { useCallback, useRef, useState } from 'react' +import { AppState } from 'react-native' +import { useFocusEffect } from 'expo-router' +import { usePhoneDictationReady } from '../hooks/use-phone-dictation-ready' +import { + dictationMicHidden, + dictationNeedsSetup, + fetchDictationSetup +} from '../dictation/mobile-dictation-setup' +import type { MobileSessionFeedbackCapabilitiesModel } from './use-mobile-session-feedback-capabilities' +import type { DictationTerm } from '../../../src/shared/dictation-dictionary' + +// The computer's dictation settings as this session reads them: mic shown, mode, filler switch, and whether setup is needed first. +export function useMobileSessionDictationSetup(scope: MobileSessionFeedbackCapabilitiesModel) { + const { client, connState, worktreeId, setShowDictationSetup, setDictationMode } = scope + const { setDictationEnabled } = scope + // The phone's own recognizer needs no computer setup, and chat inserts its words on the phone. + const phoneDictation = usePhoneDictationReady() + // The host's filler switch and this worktree's terms, kept from its last setup read; fillers on until one says otherwise. + const [removeFillerWords, setRemoveFillerWords] = useState(true) + const [dictationTerms, setDictationTerms] = useState(undefined) + // Only a host setup read sets this; while false, the host's start refusal decides (older hosts, first tap before the read). + const dictationNeedsSetupRef = useRef(false) + + const dictationSettingsReadRef = useRef(0) + const refreshDictationMode = useCallback(async () => { + const read = ++dictationSettingsReadRef.current + void phoneDictation.refresh() + if (!client || connState !== 'connected') { + return + } + try { + const setup = await fetchDictationSetup(client, worktreeId) + if (read === dictationSettingsReadRef.current) { + setDictationMode(setup.dictationMode) + setRemoveFillerWords(setup.removeFillerWords !== false) + setDictationTerms(setup.dictationTerms) + setDictationEnabled(!dictationMicHidden(setup)) + dictationNeedsSetupRef.current = dictationNeedsSetup(setup) + } + } catch { + // Keep the last settings when an older host cannot report them. + } + }, [client, connState, phoneDictation.refresh, setDictationEnabled, setDictationMode, worktreeId]) + + // The sheet may have changed host setup: let the host judge taps until the fresh read lands. + const closeDictationSetup = useCallback(() => { + setShowDictationSetup(false) + dictationNeedsSetupRef.current = false + void refreshDictationMode() + }, [refreshDictationMode, setShowDictationSetup]) + + useFocusEffect( + useCallback(() => { + void refreshDictationMode() + const subscription = AppState.addEventListener('change', (state) => { + if (state === 'active') { + void refreshDictationMode() + } + }) + return () => { + // Late replies from a retired connection or focus must not rebind the mic. + dictationSettingsReadRef.current += 1 + subscription.remove() + } + }, [refreshDictationMode]) + ) + + return { + phoneDictation, + removeFillerWords, + dictationTerms, + dictationNeedsSetupRef, + closeDictationSetup, + refreshDictationMode + } +} diff --git a/mobile/src/session/use-mobile-session-dictation.ts b/mobile/src/session/use-mobile-session-dictation.ts new file mode 100644 index 00000000000..9212ed7d75d --- /dev/null +++ b/mobile/src/session/use-mobile-session-dictation.ts @@ -0,0 +1,305 @@ +import { + useCallback, + useEffect, + useLayoutEffect, + useRef, + useState, + useSyncExternalStore +} from 'react' +import { useFocusEffect, useNavigation } from 'expo-router' +import { HOST_SESSION_ROUTE } from '../navigation/host-stack-navigation' +import { useMobileSessionDictationSetup } from './use-mobile-session-dictation-setup' +import { triggerError } from '../platform/haptics' +import { useClipboardWriter } from '../platform/clipboard' +import { + useMobileDictationDestination, + useMobileDictationPreviews +} from '../dictation/use-mobile-dictation-destination' +import { + dictationFailureMessage, + isDictationSetupRequiredError +} from '../dictation/mobile-dictation-setup' +import { useMobileDictationLeaveHold } from '../dictation/mobile-dictation-leave-hold' +import { useMobileDictationHost } from '../dictation/mobile-dictation-host' +import { mobileDictationShownOnScreen } from '../dictation/mobile-dictation-shown' +import { nativeChatDictationCopy } from '../dictation/mobile-session-native-chat-dictation-copy' +import { + useWorkspaceExecutionHost, + workspaceRouteHref +} from '../navigation/workspace-execution-host' +import { mobileSessionTabPaneKey } from './tabs/notification-pane-tab' +import type { MobileSessionFeedbackCapabilitiesModel } from './use-mobile-session-feedback-capabilities' +import type { useMobileNativeChatController } from './native-chat/use-mobile-native-chat-controller' + +// The session screen's side of the page's one dictation: start it here, show it in place while this screen is in front, and insert where it started. +export function useMobileSessionDictation( + scope: MobileSessionFeedbackCapabilitiesModel, + nativeChatController: ReturnType, + sendLiveTerminalInput: (handle: string, bytes: string) => Promise +) { + const { + hostId, + worktreeId, + client, + connState, + activeHandle, + activeHandleRef, + activeSessionTab, + setShowDictationSetup, + dictationRouteContextRef, + flushPendingLiveInputBeforeExternalSend, + canSend, + showToast, + router + } = scope + const { showNativeChat, showNativeChatRef } = nativeChatController + const host = useMobileDictationHost() + const { start: startHost } = host + const executionHost = useWorkspaceExecutionHost() + const sessionKey = JSON.stringify([hostId, executionHost ?? null, worktreeId]) + const [instance] = useState(() => ({})) + const [inFront, setInFront] = useState(true) + useFocusEffect( + useCallback(() => { + setInFront(true) + return () => setInFront(false) + }, []) + ) + const shown = mobileDictationShownOnScreen({ + ownedHere: host.owner?.sessionKey === sessionKey, + inFront + }) + // Only the screen showing the dictation re-renders on its every word; the rest see one idle object and whether it is busy. + const dictation = useSyncExternalStore( + host.subscribe, + shown ? host.getDictation : host.getIdleDictation + ) + const busyElsewhere = useSyncExternalStore(host.subscribe, host.getUnderway) && !shown + // The screen's own navigation: bringing it back pops what was pushed over it, never another session's screen. + const navigation = useNavigation() + + // Share dictation error handling for start rejection and live errors so disabled host setup always opens the setup sheet. + const reportDictationFailure = useCallback( + (err: unknown) => { + const message = err instanceof Error ? err.message : String(err) + if (isDictationSetupRequiredError(message)) { + setShowDictationSetup(true) + return + } + triggerError() + showToast(dictationFailureMessage(message)) + }, + [setShowDictationSetup, showToast] + ) + + const clipboard = useClipboardWriter() + // A transcript its target refused must not vanish: keep it on the clipboard and say so. + const keepUndeliveredDictation = (text: string) => { + triggerError() + void clipboard.writeText(text).then( + () => showToast(nativeChatDictationCopy.insertFailedCopied()), + () => showToast(nativeChatDictationCopy.insertFailed()) + ) + } + + const destination = useMobileDictationDestination(nativeChatController) + // Chat dictation is inserted locally; a terminal's words are typed into it live, while it is the active one. + const insertHere = (text: string): boolean => { + if (destination.landsInChat(showNativeChatRef.current)) { + if (!destination.insertInChat(text)) { + keepUndeliveredDictation(text) + } + return true + } + const routeContext = dictationRouteContextRef.current + const insertHandle = routeContext?.handle ?? activeHandleRef.current + // Another terminal is in front: the host types the words into the one the dictation started in. + if (insertHandle === null || insertHandle !== activeHandleRef.current) { + return false + } + dictationRouteContextRef.current = null + void (async () => { + const sent = + (await flushPendingLiveInputBeforeExternalSend(insertHandle)) && + (await sendLiveTerminalInput(insertHandle, text)) + // Live input lands in a terminal the keyboard may cover, so say where the words went. + if (sent) { + showToast(nativeChatDictationCopy.inserted()) + } else { + keepUndeliveredDictation(text) + } + })().catch(() => keepUndeliveredDictation(text)) + return true + } + + const navigationRef = useRef(navigation) + useLayoutEffect(() => { + navigationRef.current = navigation + }) + const screenRef = useRef({ + shown, + insert: insertHere, + reportFailure: reportDictationFailure, + showToast + }) + useLayoutEffect(() => { + screenRef.current = { + shown, + insert: insertHere, + reportFailure: reportDictationFailure, + showToast + } + }) + const { attach, refresh } = host + useEffect( + () => + attach({ + instance, + sessionKey, + shown: () => screenRef.current.shown, + insert: (text) => screenRef.current.insert(text), + reportFailure: (err) => { + dictationRouteContextRef.current = null + screenRef.current.reportFailure(err) + }, + toast: (message) => screenRef.current.showToast(message), + bringToFront: (paneKey) => { + const current = navigationRef.current + // From this screen POP_TO starts at this route (the dispatch's source), so it stops here; merge keeps its params and swaps the pane. + current?.dispatch({ + type: 'POP_TO', + payload: { + name: HOST_SESSION_ROUTE, + params: paneKey ? { paneKey } : undefined, + merge: true + }, + target: current.getState()?.key + }) + } + }), + [attach, dictationRouteContextRef, instance, sessionKey] + ) + // The pill reads shown() on the host's render. + useEffect(() => refresh(), [refresh, shown]) + + const { + phoneDictation, + removeFillerWords, + dictationTerms, + dictationNeedsSetupRef, + closeDictationSetup, + refreshDictationMode + } = useMobileSessionDictationSetup(scope) + // Starting needs the host (unless the phone hears chat itself), but a reconnect must not end a recording: the host keeps the session through it. + const dictationCanStart = showNativeChat + ? connState === 'connected' || phoneDictation.ready + : canSend + + const leaveKeepsPage = useCallback(() => router.canGoBack(), [router]) + const dictationLeaveHold = useMobileDictationLeaveHold(dictation, leaveKeepsPage) + const previews = useMobileDictationPreviews(destination, dictation, activeHandle) + + const startDictation = useCallback(() => { + if (busyElsewhere) { + // One dictation per phone: the pill for the other one is on screen. + triggerError() + return + } + if (!dictationCanStart) { + return + } + if (dictationNeedsSetupRef.current && !phoneDictation.readyRef.current) { + // Explain setup before the OS microphone prompt: mic access cannot help until the host can transcribe. + setShowDictationSetup(true) + return + } + const routeContext = activeHandle ? { handle: activeHandle } : null + dictationRouteContextRef.current = routeContext + const target = destination.captureDestination(showNativeChat, activeHandle) + const paneKey = mobileSessionTabPaneKey(activeSessionTab) + // A refused start comes back through this screen's reportFailure while it is shown, or the host's toast. + void startHost({ + instance, + sessionKey, + client, + target: + target?.field === 'chat' + ? target.scope === null + ? null + : { field: 'chat', scope: target.scope } + : target, + title: activeSessionTab?.title ?? '', + paneKey, + href: workspaceRouteHref( + `/h/${encodeURIComponent(hostId)}/session/${encodeURIComponent(worktreeId)}${paneKey ? `?paneKey=${encodeURIComponent(paneKey)}` : ''}`, + executionHost + ), + dictationMode: scope.dictationMode, + removeFillerWords, + dictationTerms, + worktreeId + }) + }, [ + activeHandle, + activeSessionTab, + busyElsewhere, + client, + destination.captureDestination, + dictationCanStart, + dictationRouteContextRef, + executionHost, + hostId, + startHost, + instance, + phoneDictation.readyRef, + removeFillerWords, + dictationTerms, + scope.dictationMode, + sessionKey, + setShowDictationSetup, + showNativeChat, + worktreeId + ]) + + const stopDictation = host.stop + const cancelDictation = useCallback(() => { + dictationRouteContextRef.current = null + void dictation.cancel() + }, [dictationRouteContextRef, dictation]) + + const handleDictationToggle = useCallback(() => { + if (dictation.isProcessing) { + // Ignore toggles until finish settles; a tap must not discard what was said. + } else if (dictation.isStarting || dictation.isRecording) { + stopDictation() + } else { + startDictation() + } + }, [dictation, startDictation, stopDictation]) + + const handleDictationPressIn = useCallback(() => { + if (!dictation.isStarting && !dictation.isRecording && !dictation.isProcessing) { + startDictation() + } + }, [dictation, startDictation]) + + const handleDictationPressOut = useCallback(() => { + // Speech is held from the press, so a release while starting finishes once the host answers. + if (dictation.isStarting || dictation.isRecording) { + stopDictation() + } + }, [dictation, stopDictation]) + + return { + dictation, + dictationLeaveHold, + ...previews, + startDictation, + cancelDictation, + handleDictationToggle, + handleDictationPressIn, + handleDictationPressOut, + closeDictationSetup, + refreshDictationMode + } +} diff --git a/mobile/src/session/use-mobile-session-native-chat-dictation.ts b/mobile/src/session/use-mobile-session-native-chat-dictation.ts index e6dace40f3c..d339e2a6c63 100644 --- a/mobile/src/session/use-mobile-session-native-chat-dictation.ts +++ b/mobile/src/session/use-mobile-session-native-chat-dictation.ts @@ -1,32 +1,12 @@ -import { useEffect, useCallback, useRef, useState } from 'react' -import { AppState } from 'react-native' -import { useFocusEffect } from 'expo-router' -import { useMobileDictation } from '../hooks/use-mobile-dictation' -import { usePhoneDictationReady } from '../hooks/use-phone-dictation-ready' -import { triggerError } from '../platform/haptics' -import { useClipboardWriter } from '../platform/clipboard' -import { - useMobileDictationDestination, - useMobileDictationPreviews -} from '../dictation/use-mobile-dictation-destination' -import { - dictationFailureMessage, - dictationMicHidden, - dictationNeedsSetup, - fetchDictationSetup, - isDictationSetupRequiredError -} from '../dictation/mobile-dictation-setup' +import { useEffect } from 'react' +import { useMobileSessionDictation } from './use-mobile-session-dictation' import { useMobileNativeChatController } from './native-chat/use-mobile-native-chat-controller' -import { useMobileDictationLeaveHold } from '../dictation/mobile-dictation-leave-hold' -import { useMobileDictationHaptics } from '../dictation/use-mobile-dictation-haptics' -import { useMobileDictationSilenceStop } from '../dictation/use-mobile-dictation-silence-stop' import { useMobileNativeChatReadability } from './native-chat/transcript/use-mobile-native-chat-readability' import { useMobileNativeChatInputLease } from './native-chat/use-mobile-native-chat-input-lease' import { useMobileNativeChatSendError } from './native-chat/use-mobile-native-chat-send-error' import { mobileNativeChatScopeKey } from './native-chat/mobile-native-chat-scope-key' import { mobileNativeChatOverlayInputLockReason } from './native-chat/mobile-native-chat-overlay-lock-reason' import { useMobileSendCompletionGeneration } from './use-mobile-send-completion-generation' -import { nativeChatDictationCopy } from '../dictation/mobile-session-native-chat-dictation-copy' import type { MobileSessionFeedbackCapabilitiesModel } from './use-mobile-session-feedback-capabilities' export function useMobileSessionNativeChatDictation( @@ -44,17 +24,9 @@ export function useMobileSessionNativeChatDictation( activeSessionTabId, diffComments, diffCommentsRef, - setShowDictationSetup, - setDictationMode, - dictationEnabled, - setDictationEnabled, deviceTokenRef, - dictationRouteContextRef, activeHandleRef, activeSessionTab, - flushPendingLiveInputBeforeExternalSend, - canSend, - canCompose, showToast, resetLiveInputFocus } = scope @@ -105,180 +77,10 @@ export function useMobileSessionNativeChatDictation( surfaceKey: JSON.stringify([routeKey, activeHandle, showNativeChat]) }) - // Share dictation error handling for start rejection and live errors so disabled host setup always opens the setup sheet. - const reportDictationFailure = useCallback( - (err: unknown) => { - const message = err instanceof Error ? err.message : String(err) - if (isDictationSetupRequiredError(message)) { - setShowDictationSetup(true) - return - } - triggerError() - showToast(dictationFailureMessage(message)) - }, - [setShowDictationSetup, showToast] - ) - - const clipboard = useClipboardWriter() - // A transcript its target refused must not vanish: keep it on the clipboard and say so. - const keepUndeliveredDictation = (text: string) => { - triggerError() - void clipboard.writeText(text).then( - () => showToast(nativeChatDictationCopy.insertFailedCopied()), - () => showToast(nativeChatDictationCopy.insertFailed()) - ) - } - - const destination = useMobileDictationDestination(nativeChatController) - // The phone's own recognizer needs no computer setup, and chat inserts its words on the phone. - const phoneDictation = usePhoneDictationReady() - // Starting needs the host (unless the phone hears chat itself), but a reconnect must not end a recording: the host keeps the session through it. - const dictationCanStart = showNativeChat - ? connState === 'connected' || phoneDictation.ready - : canSend - // The host's filler switch, kept from its last setup read; on until one says otherwise. - const [removeFillerWords, setRemoveFillerWords] = useState(true) - const dictation = useMobileDictation({ - client, - enabled: (showNativeChat || canCompose) && dictationEnabled, - removeFillerWords, - onTranscript: (text) => { - // Chat dictation is inserted locally; a terminal's words are typed into it live. - if (destination.landsInChat(showNativeChatRef.current)) { - if (!destination.insertInChat(text)) { - keepUndeliveredDictation(text) - } - return - } - const routeContext = dictationRouteContextRef.current - dictationRouteContextRef.current = null - const insertHandle = routeContext?.handle ?? activeHandleRef.current - void (async () => { - const sent = - insertHandle !== null && - (await flushPendingLiveInputBeforeExternalSend(insertHandle)) && - (await sendLiveTerminalInput(insertHandle, text)) - // Live input lands in a terminal the keyboard may cover, so say where the words went. - if (sent) { - showToast(nativeChatDictationCopy.inserted()) - } else { - keepUndeliveredDictation(text) - } - })().catch(() => keepUndeliveredDictation(text)) - }, - onError: (err) => { - dictationRouteContextRef.current = null - reportDictationFailure(err) - } - }) - - const dictationLeaveHold = useMobileDictationLeaveHold(dictation) - const previews = useMobileDictationPreviews(destination, dictation, activeHandle) - - // Only a host setup read sets this; while false, the host's start refusal decides (older hosts, first tap before the read). - const dictationNeedsSetupRef = useRef(false) - - const startDictation = useCallback(() => { - if (!dictationCanStart) { - return - } - if (dictationNeedsSetupRef.current && !phoneDictation.readyRef.current) { - // Explain setup before the OS microphone prompt: mic access cannot help until the host can transcribe. - setShowDictationSetup(true) - return - } - const routeContext = activeHandle ? { handle: activeHandle } : null - dictationRouteContextRef.current = routeContext - destination.captureDestination(showNativeChat, activeHandle) - void dictation.start().catch((err) => { - if (dictationRouteContextRef.current === routeContext) { - dictationRouteContextRef.current = null - } - reportDictationFailure(err) - }) - }, [ - activeHandle, - destination.captureDestination, - dictation, - dictationCanStart, - phoneDictation.readyRef, - reportDictationFailure, - setShowDictationSetup, - showNativeChat - ]) - - const stopDictation = useMobileDictationHaptics(dictation) - useMobileDictationSilenceStop(dictation, scope.dictationMode, stopDictation, showToast) - - const cancelDictation = useCallback(() => { - dictationRouteContextRef.current = null - void dictation.cancel() - }, [dictation]) - - const handleDictationToggle = useCallback(() => { - if (dictation.isProcessing) { - // Ignore toggles until finish settles; a tap must not discard what was said. - } else if (dictation.isStarting || dictation.isRecording) { - stopDictation() - } else { - startDictation() - } - }, [dictation, startDictation, stopDictation]) - - const handleDictationPressIn = useCallback(() => { - if (!dictation.isStarting && !dictation.isRecording && !dictation.isProcessing) { - startDictation() - } - }, [dictation, startDictation]) - - const handleDictationPressOut = useCallback(() => { - // Speech is held from the press, so a release while starting finishes once the host answers. - if (dictation.isStarting || dictation.isRecording) { - stopDictation() - } - }, [dictation, stopDictation]) - - const dictationSettingsReadRef = useRef(0) - const refreshDictationMode = useCallback(async () => { - const read = ++dictationSettingsReadRef.current - void phoneDictation.refresh() - if (!client || connState !== 'connected') { - return - } - try { - const setup = await fetchDictationSetup(client) - if (read === dictationSettingsReadRef.current) { - setDictationMode(setup.dictationMode) - setRemoveFillerWords(setup.removeFillerWords !== false) - setDictationEnabled(!dictationMicHidden(setup)) - dictationNeedsSetupRef.current = dictationNeedsSetup(setup) - } - } catch { - // Keep the last settings when an older host cannot report them. - } - }, [client, connState, phoneDictation.refresh, setDictationEnabled, setDictationMode]) - - // The sheet may have changed host setup: let the host judge taps until the fresh read lands. - const closeDictationSetup = useCallback(() => { - setShowDictationSetup(false) - dictationNeedsSetupRef.current = false - void refreshDictationMode() - }, [refreshDictationMode, setShowDictationSetup]) - - useFocusEffect( - useCallback(() => { - void refreshDictationMode() - const subscription = AppState.addEventListener('change', (state) => { - if (state === 'active') { - void refreshDictationMode() - } - }) - return () => { - // Late replies from a retired connection or focus must not rebind the mic. - dictationSettingsReadRef.current += 1 - subscription.remove() - } - }, [refreshDictationMode]) + const sessionDictation = useMobileSessionDictation( + scope, + nativeChatController, + sendLiveTerminalInput ) useEffect(() => { @@ -299,16 +101,7 @@ export function useMobileSessionNativeChatDictation( toggleTabChatView, showNativeChat, showNativeChatRef, - dictation, - dictationLeaveHold, - ...previews, - startDictation, - cancelDictation, - handleDictationToggle, - handleDictationPressIn, - handleDictationPressOut, - closeDictationSetup, - refreshDictationMode + ...sessionDictation } } diff --git a/mobile/src/session/use-mobile-session-stored-chat-tab.ts b/mobile/src/session/use-mobile-session-stored-chat-tab.ts new file mode 100644 index 00000000000..6a88579b9a2 --- /dev/null +++ b/mobile/src/session/use-mobile-session-stored-chat-tab.ts @@ -0,0 +1,89 @@ +import { useEffect, useState } from 'react' +import { useLocalSearchParams } from 'expo-router' +import { firstParam } from '../navigation/route-param-reader' +import { usePageBridgeClient } from '../transport/connection/client-context.web' +import { activeSessionTabOf } from './tabs/active-session-tab' +import { + peekStoredChatTranscript, + readStoredChatTranscript, + storedTabChatTranscriptIdentity +} from './native-chat/mobile-native-chat-transcript-store' +import type { MobileSessionKeyboardStateModel } from '../terminal/session/use-mobile-session-keyboard-state' + +/** + * A relaunch opens on the chat the stored strip had active when the phone holds a copy of it, until the + * host's first snapshot picks the tab. Other tabs wait for that snapshot, so the body says connecting or offline. + */ +export function useMobileSessionStoredChatTab(scope: MobileSessionKeyboardStateModel): void { + const { + hostId, + worktreeId, + sessionTabs, + activeSessionTabId, + activeSessionTabIdRef, + activeSessionTabTypeRef, + appliedSnapshotMarkerRef, + pendingSelectionRef, + setActiveSessionTabId, + nativeChatTranscriptIsLocalReadable, + nativeChatController: { sessionViewReady, isTabChatView } + } = scope + // A notification or agent-row tap names its own pane (use-notification-pane-navigation), which wins. + const client = usePageBridgeClient() + const urlPaneKey = firstParam(useLocalSearchParams<{ paneKey?: string | string[] }>().paneKey) + const [opensPane] = useState( + () => Boolean(client.getShellSession()?.route?.params?.paneKey) || Boolean(urlPaneKey) + ) + const storedActiveTab = + activeSessionTabId === null && sessionViewReady && !opensPane + ? activeSessionTabOf(sessionTabs) + : null + const storedChat = + storedActiveTab && + (storedActiveTab.type === 'agent-session' || isTabChatView(storedActiveTab.id)) + ? storedTabChatTranscriptIdentity( + hostId, + worktreeId, + storedActiveTab, + nativeChatTranscriptIsLocalReadable + ) + : null + const storedChatTabId = storedChat ? storedActiveTab?.id : undefined + const storedChatTabType = storedChat ? storedActiveTab?.type : undefined + useEffect(() => { + if (!storedChat || !storedChatTabId || !storedChatTabType) { + return + } + let current = true + const open = (held: unknown): void => { + if ( + current && + held && + appliedSnapshotMarkerRef.current.version === -1 && + pendingSelectionRef.current === null + ) { + activeSessionTabTypeRef.current = storedChatTabType + activeSessionTabIdRef.current = storedChatTabId + setActiveSessionTabId(storedChatTabId) + } + } + const held = peekStoredChatTranscript(storedChat) + if (held === undefined) { + void readStoredChatTranscript(storedChat).then(open) + } else { + open(held) + } + return () => { + current = false + } + }, [ + activeSessionTabIdRef, + activeSessionTabTypeRef, + appliedSnapshotMarkerRef, + pendingSelectionRef, + setActiveSessionTabId, + storedChat, + storedChatTabId, + storedChatTabType + ]) +} diff --git a/mobile/src/session/use-mobile-structured-agent-session.ts b/mobile/src/session/use-mobile-structured-agent-session.ts index f15182b48eb..62c4cd9d9cd 100644 --- a/mobile/src/session/use-mobile-structured-agent-session.ts +++ b/mobile/src/session/use-mobile-structured-agent-session.ts @@ -1,6 +1,6 @@ import { asyncQuestionSourceScope as questionSourceScope } from '../../../src/shared/native-chat/input/native-chat-ask' +import { structuredChatTranscriptIdentity } from './native-chat/mobile-native-chat-transcript-store' import { useMemo, useRef } from 'react' -import { encodeNativeChatTranscriptIdentity } from '../../../src/shared/native-chat/transcript/native-chat-transcript-retention' import { tuiAgentDisplayName } from '../../../src/shared/agent-launch/catalog/tui-agent-display-names' import { mobileStructuredAgentSessionWorking } from './mobile-structured-agent-session-working' import { isFinalAgentSessionReadRefusal } from '../../../src/shared/agent-session/failures/structured-agent-session-read-refusal' @@ -75,10 +75,10 @@ export function useMobileStructuredAgentSession( const commandsWait = queueCapable && hostSupport?.queuedCommands === true const queueFollowUps = useQueueFollowUps(client, connected && enabled, sessionId, paired, enabled) const hostStopsConversation = hostSupport?.conversationStop ?? null - const sessionKey = encodeNativeChatTranscriptIdentity([sourceIdentity, agent, sessionId]) + const sessionKey = structuredChatTranscriptIdentity(sourceIdentity, agent, sessionId) const commandPendingRef = useRef(false) const stateArgs = { client, sessionId, sessionKey, enabled, connected, onCommandsChanged } - const { state, stateRef, queuedMessages, queuePause, olderPages, loadEarlier } = + const { state, stateRef, queuedMessages, queuePause, olderPages, loadEarlier, savedAt } = useMobileStructuredAgentState(stateArgs) const mutate = useMobileStructuredAgentMutate({ @@ -268,14 +268,16 @@ export function useMobileStructuredAgentSession( session: { messages, status, - transcriptLoading: status === 'loading', + // A stored copy can't answer "is this ask still open?" until a live frame confirms it. + transcriptLoading: status === 'loading' || savedAt !== null, error: state.error, readFailedFinally: status === 'error' && isFinalAgentSessionReadRefusal(state.readRefusal), clearing, hasMore: state.hasOlder && olderPages !== 'unavailable' && !clearing, loadingEarlier: olderPages === 'loading', olderPages, - loadEarlier + loadEarlier, + savedAt }, isWorking: isWorking || queueSendsNext, canStop, diff --git a/mobile/src/session/use-mobile-structured-agent-state.ts b/mobile/src/session/use-mobile-structured-agent-state.ts index 2a9fc65a5d9..c2bcae0c88e 100644 --- a/mobile/src/session/use-mobile-structured-agent-state.ts +++ b/mobile/src/session/use-mobile-structured-agent-state.ts @@ -18,7 +18,6 @@ import { isFinalAgentSessionReadRefusal } from '../../../src/shared/agent-sessio import { EMPTY_STRUCTURED_AGENT_SESSION, oldestStructuredAgentSessionCursor, - reduceStructuredAgentSession, type StructuredAgentSessionAction, type StructuredAgentSessionState } from '../../../src/shared/agent-session/structured-agent-session-reducer' @@ -41,8 +40,18 @@ import { } from './mobile-structured-agent-session-rpc' import { subscribeTranscriptAfterHold } from './mobile-structured-transcript-subscription' import { useMobileOlderPageLoader, type OlderPagePhase } from './use-mobile-older-page-loader' +import { mobileStructuredAgentSessionWorking } from './mobile-structured-agent-session-working' +import { + reduceStructuredChatState, + noteChatTranscript, + storedStructuredSessionState, + storedStructuredCopy, + unconfirmedStructuredStateSavedAt +} from './native-chat/mobile-native-chat-transcript-writer' +import { useStoredChatTranscript } from './native-chat/use-stored-chat-transcript' const MAX_RETAINED_SESSION_STATES = 32 + /** The host already batches streamed text, so phones merge only within about a frame; desktop keeps the shared window. */ const STREAMED_TEXT_COALESCE_MS = 16 @@ -90,6 +99,8 @@ export function useMobileStructuredAgentState(args: { queuePause: AgentSessionQueuePause | null olderPages: OlderPagePhase loadEarlier: () => void + /** When the transcript on screen was saved, while it is an earlier launch's copy no read has confirmed. */ + savedAt: number | null } { const { client, connected, enabled, sessionId, sessionKey } = args const commandsChanged = useRef(args.onCommandsChanged) @@ -100,10 +111,23 @@ export function useMobileStructuredAgentState(args: { const [sessionStates, setSessionStates] = useState>( () => new Map() ) - const state = - enabled && sessionKey - ? (sessionStates.get(sessionKey) ?? EMPTY_STRUCTURED_AGENT_SESSION) - : EMPTY_STRUCTURED_AGENT_SESSION + const retained = enabled && sessionKey ? sessionStates.get(sessionKey) : undefined + const stored = + enabled && sessionKey && !retained ? storedStructuredSessionState(sessionKey) : null + const state = retained ?? stored ?? EMPTY_STRUCTURED_AGENT_SESSION + // The phone's copy is written when a turn settles, on hidden and when the chat closes; never per frame. + const liveRead = enabled && sessionKey !== null && state.status === 'ready' + useEffect(() => { + if (liveRead && sessionKey) { + const isLive = () => client?.getState() === 'connected' + noteChatTranscript(sessionKey, state, isLive, (at) => storedStructuredCopy(state, at)) + } + }, [client, liveRead, sessionKey, state]) + const readingStore = useStoredChatTranscript({ + identity: enabled && sessionId ? sessionKey : null, + read: !retained, + turnSettled: liveRead && !mobileStructuredAgentSessionWorking(state) + }) const { phase: olderPages, load: loadOlderPages, supersede } = useMobileOlderPageLoader() const stateRef = useRef(state) useLayoutEffect(() => { @@ -116,8 +140,11 @@ export function useMobileStructuredAgentState(args: { return } setSessionStates((current) => { - const previous = current.get(sessionKey) ?? EMPTY_STRUCTURED_AGENT_SESSION - const next = reduceStructuredAgentSession(previous, action, Date.now()) + const previous = + current.get(sessionKey) ?? + storedStructuredSessionState(sessionKey) ?? + EMPTY_STRUCTURED_AGENT_SESSION + const next = reduceStructuredChatState(previous, action, Date.now()) if (next === previous) { return current } @@ -141,7 +168,7 @@ export function useMobileStructuredAgentState(args: { if (!client || !sessionId || !enabled) { return } - if (!connected) { + if (!connected || readingStore) { return } apply({ type: 'loading' }) @@ -198,7 +225,7 @@ export function useMobileStructuredAgentState(args: { ) .catch(() => undefined) } - }, [apply, client, connected, enabled, sessionId, sessionKey, supersede]) + }, [apply, client, connected, enabled, readingStore, sessionId, sessionKey, supersede]) const loadEarlier = useCallback(() => { const start = oldestStructuredAgentSessionCursor(stateRef.current) @@ -282,6 +309,7 @@ export function useMobileStructuredAgentState(args: { queuedMessages: state.queuedMessages === undefined ? null : (state.queuedMessages ?? []), queuePause: state.queuePause ?? null, olderPages, - loadEarlier + loadEarlier, + savedAt: unconfirmedStructuredStateSavedAt(state) } } diff --git a/mobile/src/settings/settings-screen-state.test.tsx b/mobile/src/settings/settings-screen-state.test.tsx index 6bd21b6b58c..0bcef5862e3 100644 --- a/mobile/src/settings/settings-screen-state.test.tsx +++ b/mobile/src/settings/settings-screen-state.test.tsx @@ -55,6 +55,36 @@ afterEach(() => { act(() => renderer?.unmount()) }) describe('shared settings screen state', () => { + it('shows a desktop on Auto as Auto and switches it to plain Toggle', async () => { + const operations: VoiceSettingsOperations = { + load: vi.fn().mockResolvedValue({ + enabled: true, + dictationMode: 'toggle', + dictationHoldToRecord: true, + selectedModelId: '', + models: [] + }), + configure: vi.fn(() => new Promise(() => {})), + download: vi.fn(), + delete: vi.fn() + } + await act(async () => { + renderer = create( + createElement(VoiceSettingsScreen, { operations, focused: true, onBack: vi.fn() }) + ) + }) + const modeProps = () => renderer.root.findByProps({ testIDPrefix: 'voice-mode-' }).props + expect(modeProps().selected).toBe('auto') + + await act(async () => { + modeProps().onSelect('toggle') + }) + expect(operations.configure).toHaveBeenCalledWith({ + dictationMode: 'toggle', + dictationHoldToRecord: false + }) + expect(modeProps().selected).toBe('toggle') + }) it('flips the Voice switch before the desktop replies and surfaces a rejected save', async () => { const loaded = { enabled: true, diff --git a/mobile/src/settings/voice-settings-operations.ts b/mobile/src/settings/voice-settings-operations.ts index fc5fced208d..bedcd866d1e 100644 --- a/mobile/src/settings/voice-settings-operations.ts +++ b/mobile/src/settings/voice-settings-operations.ts @@ -6,6 +6,7 @@ export interface VoiceSettingsOperations { enabled?: boolean modelId?: string dictationMode?: 'toggle' | 'hold' + dictationHoldToRecord?: boolean }): Promise download(modelId: string): Promise delete(modelId: string): Promise diff --git a/mobile/src/settings/voice-settings-screen.tsx b/mobile/src/settings/voice-settings-screen.tsx index 1766b7512d5..312cd102900 100644 --- a/mobile/src/settings/voice-settings-screen.tsx +++ b/mobile/src/settings/voice-settings-screen.tsx @@ -17,16 +17,23 @@ import { type MobileSpeechSetup } from '../dictation/mobile-dictation-setup' import { MobileSwitch } from '../components/MobileSwitch' +import { + dictationShortcutMode, + dictationShortcutModeSettings +} from '../../../src/shared/dictation-shortcut-mode' import { SettingsNote, SettingsScreen, SettingsSection } from './settings-screen-frame' import { VoiceTranscribeOnSection, voiceTranscribeOnShown } from './voice-transcribe-on-section' const POLL_INTERVAL_MS = 1500 -function dictationModes(t: Translate) { - return [ - { value: 'toggle', label: t('settings.voiceSettingsScreen.toggleMode', 'Toggle') }, - { value: 'hold', label: t('settings.voiceSettingsScreen.holdMode', 'Hold') } - ] as const +function dictationModes(t: Translate, offersAuto: boolean) { + const toggle = { + value: 'toggle', + label: t('settings.voiceSettingsScreen.toggleMode', 'Toggle') + } as const + const hold = { value: 'hold', label: t('settings.voiceSettingsScreen.holdMode', 'Hold') } as const + const auto = { value: 'auto', label: t('settings.voiceSettingsScreen.autoMode', 'Auto') } as const + return offersAuto ? [auto, hold, toggle] : [toggle, hold] } type ModelBusyAction = { modelId: string; type: 'download' | 'select' | 'delete' } @@ -154,13 +161,16 @@ export default function VoiceSettingsScreen({ return } setError(null) - const { enabled, dictationMode } = params + const { enabled, dictationMode, dictationHoldToRecord } = params setSetup((prev) => prev ? { ...prev, ...(enabled === undefined ? {} : { enabled }), - ...(dictationMode === undefined ? {} : { dictationMode }) + ...(dictationMode === undefined ? {} : { dictationMode }), + ...(dictationHoldToRecord === undefined || prev.dictationHoldToRecord === undefined + ? {} + : { dictationHoldToRecord }) } : prev ) @@ -243,6 +253,7 @@ export default function VoiceSettingsScreen({ ) const enabled = setup?.enabled ?? false + const offersAuto = setup?.dictationHoldToRecord !== undefined const selectedModel = setup?.models.find((m) => m.id === setup.selectedModelId) const selectedModelLabel = selectedModel?.label ?? t('settings.voiceSettingsScreen.noneSelected', 'None selected') @@ -299,10 +310,17 @@ export default function VoiceSettingsScreen({ first={!voiceTranscribeOnShown()} title={t('settings.voiceSettingsScreen.dictationHeading', 'DICTATION')} // The segmented control leaves the mode row no room for two lines of explanation. - footer={t( - 'settings.voiceSettingsScreen.dictationModeDescription', - 'Toggle: press once to start, again to stop. Hold: dictate while held.' - )} + footer={ + offersAuto + ? t( + 'settings.voiceSettingsScreen.dictationModeWithAutoDescription', + 'Auto: tap to start and stop; on your computer, holding the shortcut records until you let go. Hold: dictate while held. Toggle: press once to start, again to stop.' + ) + : t( + 'settings.voiceSettingsScreen.dictationModeDescription', + 'Toggle: press once to start, again to stop. Hold: dictate while held.' + ) + } > void configure({ dictationMode })} + segments={dictationModes(t, offersAuto)} + selected={offersAuto ? dictationShortcutMode(setup) : setup.dictationMode} + onSelect={(mode) => void configure(dictationShortcutModeSettings(mode))} testIDPrefix="voice-mode-" disabled={!enabled} /> diff --git a/mobile/src/source-control/MobileSourceControlNextStepBar.tsx b/mobile/src/source-control/MobileSourceControlNextStepBar.tsx index 97f854bd54a..6a524717c3e 100644 --- a/mobile/src/source-control/MobileSourceControlNextStepBar.tsx +++ b/mobile/src/source-control/MobileSourceControlNextStepBar.tsx @@ -30,6 +30,7 @@ import type { MobileNextStepTone } from './mobile-source-control-next-step' import { styles as sourceControlStyles } from './mobile-source-control-styles' +import { useMobileDictationClearance } from '../dictation/mobile-dictation-host-context' const ICONS: Record = { push: ArrowUp, @@ -84,13 +85,20 @@ export function MobileSourceControlNextStepBar({ const [composerFocused, setComposerFocused] = useState(false) // The bar rides the keyboard only for its own commit box; for any other field it steps aside. const lift = composerFocused && view.kind === 'composer' ? keyboardLift : 0 - if ((view.kind === 'hidden' && !notice) || (keyboardLift > 0 && lift === 0)) { + const hidden = (view.kind === 'hidden' && !notice) || (keyboardLift > 0 && lift === 0) + const [barHeight, setBarHeight] = useState(0) + // A dictation pill floats above this bar instead of over its buttons. + useMobileDictationClearance(hidden ? 0 : barHeight + lift) + if (hidden) { return null } const reason = view.kind === 'button' ? view.reason : null return ( onHeightChange(event.nativeEvent.layout.height)} + onLayout={(event) => { + setBarHeight(event.nativeEvent.layout.height) + onHeightChange(event.nativeEvent.layout.height) + }} style={[ styles.bar, { diff --git a/mobile/src/source-control/folder/use-folder-worktree-status.perf.test.ts b/mobile/src/source-control/folder/use-folder-worktree-status.perf.test.ts deleted file mode 100644 index 5cadbf87217..00000000000 --- a/mobile/src/source-control/folder/use-folder-worktree-status.perf.test.ts +++ /dev/null @@ -1,257 +0,0 @@ -import { createElement, Fragment } from 'react' -import { useQueryClient, type QueryClient } from '@tanstack/react-query' -import { act, create, type ReactTestRenderer } from 'react-test-renderer' -import { afterEach, describe, expect, it, vi } from 'vitest' -import type { ExecutionHostId } from '../../../../src/shared/execution-host' -import type { RuntimeClientEventStreamMessage } from '../../../../src/shared/runtime-client-events' -import { stubRpcClient } from '../../transport/rpc/rpc-client-test-stub' -import type { RpcClient } from '../../transport/rpc/rpc-client-contract' -import { - documentQueryClient, - settleQueryNotifications -} from '../../test-support/rpc-recording/hook-mount' -import { hostQueryKey } from '../../query/host-query-key' -import { - publishGitStatusSummary, - serverGitStatusSummaryQuery, - type GitStatusRead -} from '../mobile-git-status-query' -import { useFolderWorktreeStatus } from './use-folder-worktree-status' - -const STATUS = { branch: 'feature', entries: [] } - -type StatusRead = { worktree: string; includeLineStats?: boolean } - -function isStatusRead(params: unknown): params is StatusRead { - return typeof params === 'object' && params !== null && 'worktree' in params -} - -const runtimeHost = (environmentId: string): ExecutionHostId => `runtime:${environmentId}` -const READY: RuntimeClientEventStreamMessage = { type: 'ready', subscriptionId: 'sub-1' } - -function countingClient() { - const reads: StatusRead[] = [] - let eventStreams = 0 - let emit: (event: RuntimeClientEventStreamMessage) => void = () => {} - const client: RpcClient = stubRpcClient({ - getLastConnectedAt: () => 1, - sendRequest: async (method, params) => { - if (method === 'git.status') { - if (isStatusRead(params)) { - reads.push(params) - } - } - return { id: 'call', ok: true, result: STATUS, _meta: { runtimeId: 'runtime-1' } } - }, - subscribe: (method, _params, onEvent) => { - if (method === 'runtime.clientEvents.subscribe') { - eventStreams += 1 - emit = (event) => onEvent(event) - } - return () => {} - } - }) - return { - client, - reads, - eventStreams: () => eventStreams, - emit: (event: RuntimeClientEventStreamMessage) => emit(event) - } -} - -let renderer: ReactTestRenderer | null = null -const queries = documentQueryClient() - -afterEach(async () => { - act(() => renderer?.unmount()) - renderer = null - await queries.end() - vi.useRealTimers() -}) - -const REFRESHERS = new Set<() => void>() -const shown = new Map() -let queryClient: QueryClient | null = null -const rowKey = (row: RowSpec) => `${row.routeHost ?? 'local'}|${row.worktreeId}` - -function Row(props: { - client: RpcClient - worktreeId: string - routeHost: ExecutionHostId | undefined - subscribed: boolean -}): null { - queryClient = useQueryClient() - const status = useFolderWorktreeStatus({ - hostId: 'host-1', - client: props.client, - routeHost: props.routeHost, - worktreeId: props.worktreeId, - subscribed: props.subscribed, - refreshers: REFRESHERS - }) - shown.set(rowKey(props), { data: status.data, updatedAt: status.dataUpdatedAt }) - return null -} - -type RowSpec = { worktreeId: string; routeHost: ExecutionHostId | undefined } - -/** One folder's attached worktrees: N in repo-a and N in repo-b on the desktop, N spread over S relayed servers. */ -function folderRows(n: number, servers: number): RowSpec[] { - const local = ['repo-a', 'repo-b'].flatMap((repo) => - Array.from({ length: n }, (_, i) => ({ worktreeId: `${repo}::/w${i}`, routeHost: undefined })) - ) - const relayed = Array.from({ length: n }, (_, i) => ({ - worktreeId: `repo-s::/w${i}`, - routeHost: runtimeHost(`env-${i % servers}`) - })) - return [...local, ...relayed] -} - -async function mountFolder(rows: RowSpec[], client: RpcClient) { - const render = (subscribed: boolean) => - queries.wrap( - createElement( - Fragment, - null, - rows.map((row) => createElement(Row, { key: rowKey(row), client, ...row, subscribed })) - ) - ) - await act(async () => { - renderer = create(render(true)) - }) - await settleQueryNotifications() - return async (subscribed: boolean) => { - await act(async () => renderer?.update(render(subscribed))) - await settleQueryNotifications() - } -} - -// Past every read's one-second signal floor, so each signal reads at once. -function passSignalFloor(): void { - vi.setSystemTime(Date.now() + 5_000) -} - -describe.each([ - { n: 10, servers: 3 }, - { n: 100, servers: 30 } -])('folder Source Control rows at N=$n over $servers servers', ({ n, servers }) => { - it('read each status once without line stats, on one desktop event stream', async () => { - vi.useFakeTimers({ toFake: ['Date'] }) - const host = countingClient() - await mountFolder(folderRows(n, servers), host.client) - host.emit(READY) - await settleQueryNotifications() - - expect(host.reads).toHaveLength(3 * n) - expect(host.reads.every((read) => read.includeLineStats === false)).toBe(true) - // Relayed servers' statuses get no desktop signal, so they open no event stream of their own. - expect(host.eventStreams()).toBe(1) - }) - - it('read once per worktree a signal names, and not at all while hidden', async () => { - vi.useFakeTimers({ toFake: ['Date'] }) - const host = countingClient() - const setSubscribed = await mountFolder(folderRows(n, servers), host.client) - host.emit(READY) - await settleQueryNotifications() - - host.reads.length = 0 - passSignalFloor() - await act(async () => host.emit({ type: 'gitStatusChanged', repoId: 'repo-a' })) - await settleQueryNotifications() - expect(host.reads).toHaveLength(n) - - host.reads.length = 0 - passSignalFloor() - await act(async () => - host.emit({ type: 'gitStatusChanged', repoId: 'repo-a', worktreeIds: ['repo-a::/w0'] }) - ) - await settleQueryNotifications() - expect(host.reads.map((read) => read.worktree)).toEqual(['id:repo-a::/w0']) - - await setSubscribed(false) - host.reads.length = 0 - passSignalFloor() - await act(async () => host.emit({ type: 'gitStatusChanged', repoId: 'repo-a' })) - await settleQueryNotifications() - expect(host.reads).toHaveLength(0) - }) - - it("shows a child's detailed read on Back with no read of its own", async () => { - vi.useFakeTimers({ toFake: ['Date'] }) - const host = countingClient() - // The same worktree id on another server and on the desktop must keep their own summaries. - const opened: RowSpec = { worktreeId: 'repo-s::/w0', routeHost: 'runtime:env-0' } - const rows = [ - ...folderRows(n, servers), - { worktreeId: 'repo-s::/w0', routeHost: runtimeHost('env-x') }, - { worktreeId: 'repo-s::/w0', routeHost: undefined } - ] - const setSubscribed = await mountFolder(rows, host.client) - const before = new Map(shown) - const listed = before.get(rowKey(opened))! - if (listed.data?.kind !== 'ready') { - throw new Error('summary not read') - } - - // The child opens over the list, commits, and its forced reread lands. - await setSubscribed(false) - host.reads.length = 0 - vi.setSystemTime(Date.now() + 1_000) - const after: GitStatusRead = { - kind: 'ready', - status: { ...listed.data.status, branch: 'after' } - } - const target = { exec: opened.routeHost!, worktree: opened.worktreeId } - await act(() => - publishGitStatusSummary(queryClient!, 'host-1', target, after, Date.now(), true) - ) - // A detailed read older than the summary changes nothing. - await act(() => - publishGitStatusSummary( - queryClient!, - 'host-1', - target, - listed.data!, - listed.updatedAt - 1, - true - ) - ) - - // Back within three seconds, then well past them with no focus or signal. - vi.setSystemTime(Date.now() + 1_000) - await setSubscribed(true) - vi.setSystemTime(Date.now() + 10_000) - await setSubscribed(true) - expect(host.reads).toHaveLength(0) - expect(shown.get(rowKey(opened))?.data).toEqual(after) - const changed = rows.filter( - (row) => shown.get(rowKey(row))?.data !== before.get(rowKey(row))?.data - ) - expect(changed).toEqual([opened]) - }) - - it("keeps a summary's newer failure over an older detailed read", async () => { - vi.useFakeTimers({ toFake: ['Date'] }) - const host = countingClient() - const opened: RowSpec = { worktreeId: 'repo-s::/w0', routeHost: 'runtime:env-0' } - await mountFolder(folderRows(n, servers), host.client) - const listed = shown.get(rowKey(opened))! - const target = { exec: opened.routeHost!, worktree: opened.worktreeId } - const key = hostQueryKey('host-1', serverGitStatusSummaryQuery.family, target, {}) - const cachedDetailAt = Date.now() + 1_000 - vi.setSystemTime(cachedDetailAt + 1_000) - const failure = new Error('status read failed') - await act(async () => - queryClient! - .getQueryCache() - .find({ queryKey: key, exact: true })! - .setState({ status: 'error', error: failure, errorUpdatedAt: Date.now() }) - ) - - await act(() => - publishGitStatusSummary(queryClient!, 'host-1', target, listed.data!, cachedDetailAt, true) - ) - expect(queryClient!.getQueryState(key)?.error).toBe(failure) - }) -}) diff --git a/mobile/src/source-control/folder/use-mobile-folder-attached-worktrees.perf.test.ts b/mobile/src/source-control/folder/use-mobile-folder-attached-worktrees.perf.test.ts deleted file mode 100644 index b24b3c0908a..00000000000 --- a/mobile/src/source-control/folder/use-mobile-folder-attached-worktrees.perf.test.ts +++ /dev/null @@ -1,298 +0,0 @@ -import { createElement, Fragment } from 'react' -import { useQueryClient, type QueryClient } from '@tanstack/react-query' -import { act, create, type ReactTestRenderer } from 'react-test-renderer' -import { afterEach, describe, expect, it, vi } from 'vitest' -import type { RuntimeClientEventStreamMessage } from '../../../../src/shared/runtime-client-events' -import { stubRpcClient } from '../../transport/rpc/rpc-client-test-stub' -import type { RpcClient } from '../../transport/rpc/rpc-client-contract' -import type { Worktree } from '../../worktree/workspace-list-types' -import type * as MobileWorkspaceLineage from '../../worktree/mobile-workspace-lineage' -import type * as FolderLineageSerialization from './folder-lineage-serialization' -import type { MobileRelayHost } from '../../../../src/shared/remote-runtime/relay/mobile-relay-hosts-contract' -import { MOBILE_DESKTOP_RELAY_RUNTIME_CAPABILITY } from '../../../../src/shared/mobile-desktop-relay-contract' -import { HOST_LIST_TARGET, hostServerWorkspacesQuery } from '../../host-screen/host-list-queries' -import { hostQueryKey } from '../../query/host-query-key' -import { - documentQueryClient, - settleQueryNotifications -} from '../../test-support/rpc-recording/hook-mount' -import { - useMobileFolderAttachedWorktrees, - type MobileFolderAttachedWorktrees -} from './use-mobile-folder-attached-worktrees' -import { MobileFolderWorktreeRow } from './MobileFolderWorktreeRow' - -vi.mock('react-native', () => ({ AppState: {} })) -const gates = vi.hoisted(() => { - const hostCapabilities: string[] = [] - return { hostCapabilities } -}) -vi.mock('../../components/host-protocol-gates-context', () => ({ - useOptionalHostProtocolGates: () => gates -})) -const host = vi.hoisted(() => { - const state: { client: unknown } = { client: null } - return state -}) -vi.mock('../../transport/connection/host-client-hooks', () => ({ - useHostClient: () => ({ client: host.client, clientId: 'client-1', state: 'connected' }) -})) -const lineage = vi.hoisted(() => ({ resolutions: 0, serialized: 0, rowCommits: 0 })) -vi.mock('../../worktree/mobile-workspace-lineage', async (importOriginal) => { - const actual = await importOriginal() - return { - ...actual, - getMobileWorkspaceLineageChildren: ( - ...args: Parameters - ) => { - lineage.resolutions += 1 - return actual.getMobileWorkspaceLineageChildren(...args) - } - } -}) -// Runs behind the production key cache, so each call is a row serialized. -vi.mock('./folder-lineage-serialization', async (importOriginal) => { - const actual = await importOriginal() - return { - serializeFolderLineage: (row: Worktree) => { - lineage.serialized += 1 - return actual.serializeFolderLineage(row) - } - } -}) -// Inside the production row's memo boundary: each call is a committed row render. -vi.mock('../../components/list/ListGroup', () => ({ - ListRow: () => { - lineage.rowCommits += 1 - return null - } -})) -vi.mock('./use-folder-worktree-status', () => ({ - useFolderWorktreeStatus: () => NO_STATUS -})) -vi.mock('../../i18n/use-mobile-translation', () => ({ - useMobileTranslation: () => (_key: string, fallback: string) => fallback -})) -const NO_STATUS = vi.hoisted(() => ({ data: undefined, error: null })) -const REFRESHERS = new Set<() => void>() -const NOOP = (): void => {} - -const READY: RuntimeClientEventStreamMessage = { type: 'ready', subscriptionId: 'sub-1' } - -function row(worktreeId: string, overrides: Partial = {}): Worktree { - return { - worktreeId, - repoId: worktreeId.split('::')[0], - repo: 'api', - branch: 'feature', - displayName: worktreeId, - path: `/src/${worktreeId}`, - liveTerminalCount: 0, - hasAttachedPty: false, - unread: false, - isPinned: false, - linkedPR: null, - ...overrides - } -} - -/** H host rows: the folder, N attached worktrees, and unrelated ones. */ -function catalog(h: number, n: number, edit: (rows: Worktree[]) => void = () => {}): Worktree[] { - const rows = [row('folder:f-1', { workspaceKind: 'folder-workspace' })] - for (let i = 0; i < n; i++) { - rows.push( - row(`repo-a::/w${i}`, { - workspaceLineage: { parentWorkspaceKey: 'folder:f-1', parentInstanceId: null } - }) - ) - } - for (let i = rows.length; i < h; i++) { - rows.push(row(`repo-b::/other${i}`)) - } - edit(rows) - return rows -} - -function catalogHost(initial: Worktree[]) { - let rows = initial - let emit: (event: RuntimeClientEventStreamMessage) => void = () => {} - const client: RpcClient = stubRpcClient({ - getLastConnectedAt: () => 1, - sendRequest: async (method) => ({ - id: 'call', - ok: true, - result: method === 'worktree.ps' ? { worktrees: rows } : {}, - _meta: { runtimeId: 'runtime-1' } - }), - subscribe: (method, _params, onEvent) => { - if (method === 'runtime.clientEvents.subscribe') { - emit = (event) => onEvent(event) - } - return () => {} - } - }) - return { - client, - setRows: (next: Worktree[]) => { - rows = next - }, - emit: (event: RuntimeClientEventStreamMessage) => emit(event) - } -} - -let renderer: ReactTestRenderer | null = null -const queries = documentQueryClient() - -afterEach(async () => { - gates.hostCapabilities = [] - act(() => renderer?.unmount()) - renderer = null - await queries.end() - vi.useRealTimers() -}) - -let queryClient: QueryClient | null = null - -async function mount(read: { current: MobileFolderAttachedWorktrees | null }) { - function Harness() { - queryClient = useQueryClient() - const folder = useMobileFolderAttachedWorktrees('host-1', 'folder:f-1', true) - read.current = folder - return createElement( - Fragment, - null, - folder.worktrees.map((worktree) => - createElement(MobileFolderWorktreeRow, { - key: worktree.worktreeId, - hostId: 'host-1', - desktopCapabilities: folder.desktopCapabilities, - worktree, - unreachable: false, - subscribed: true, - refreshers: REFRESHERS, - onOpen: NOOP - }) - ) - ) - } - await act(async () => { - renderer = create(queries.wrap(createElement(Harness))) - }) - await settleQueryNotifications() -} - -async function rowsChanged(fake: ReturnType, next: Worktree[]) { - fake.setRows(next) - // Past the catalog's three-second signal floor. - vi.setSystemTime(Date.now() + 5_000) - await act(async () => fake.emit({ type: 'worktreeRowsChanged' })) - await settleQueryNotifications() -} - -function churn(rows: Worktree[]): void { - const h = rows.length - rows[1] = { ...rows[1], liveTerminalCount: 3, unread: true } - rows[h - 1] = { ...rows[h - 1], status: 'working' } - rows[h - 2] = { ...rows[h - 2], displayName: 'elsewhere', branch: 'other' } -} - -function rename(rows: Worktree[]): void { - rows[2] = { ...rows[2], displayName: 'renamed', branch: 'renamed-branch' } -} - -describe.each([ - { h: 750, n: 30 }, - { h: 7_500, n: 300 } -])('folder membership over H=$h host rows, N=$n attached', ({ h, n }) => { - it('resolves lineage only for lineage changes, serializing and committing only changed rows', async () => { - vi.useFakeTimers({ toFake: ['Date'] }) - const fake = catalogHost(catalog(h, n)) - host.client = fake.client - const read: { current: MobileFolderAttachedWorktrees | null } = { current: null } - await mount(read) - fake.emit(READY) - await settleQueryNotifications() - expect(read.current?.worktrees).toHaveLength(n) - const members = read.current!.worktrees - lineage.resolutions = 0 - lineage.serialized = 0 - lineage.rowCommits = 0 - - // Agent attention and terminal counts on a member and an unrelated row, and an unrelated rename. - await rowsChanged(fake, catalog(h, n, churn)) - expect(lineage.resolutions).toBe(0) - expect(lineage.serialized).toBe(3) - expect(lineage.rowCommits).toBe(0) - expect(read.current?.worktrees).toBe(members) - - // A member renamed: shown at once, without resolving lineage or touching the other members. - lineage.serialized = 0 - await rowsChanged( - fake, - catalog(h, n, (rows) => { - churn(rows) - rename(rows) - }) - ) - expect(lineage.resolutions).toBe(0) - expect(lineage.serialized).toBe(1) - expect(lineage.rowCommits).toBe(1) - const renamed = read.current!.worktrees - expect(renamed[1]).toMatchObject({ displayName: 'renamed', branch: 'renamed-branch' }) - expect(renamed.filter((member, index) => member !== members[index])).toHaveLength(1) - - // A worktree attached: membership follows. - await rowsChanged( - fake, - catalog(h, n, (rows) => { - churn(rows) - rename(rows) - rows[h - 1] = { - ...rows[h - 1], - workspaceLineage: { parentWorkspaceKey: 'folder:f-1', parentInstanceId: null } - } - }) - ) - expect(lineage.resolutions).toBe(1) - expect(read.current?.worktrees).toHaveLength(n + 1) - }) - - it('resolves lineage again for a server store change, not for its health', async () => { - gates.hostCapabilities = [MOBILE_DESKTOP_RELAY_RUNTIME_CAPABILITY] - const fake = catalogHost(catalog(h, n)) - host.client = fake.client - const read: { current: MobileFolderAttachedWorktrees | null } = { current: null } - await mount(read) - const serversKey = hostQueryKey('host-1', hostServerWorkspacesQuery.family, HOST_LIST_TARGET, { - deltas: false - }) - const servers = (overrides: Partial) => ({ - hosts: Array.from({ length: 30 }, (_, i) => ({ - hostId: `runtime:env-${i}` as const, - label: `env ${i}`, - health: 'available' as const, - relay: 'ready' as const, - installationId: `install-${i}`, - ...(i === 0 ? overrides : {}) - })), - worktrees: [] - }) - const setServers = async (overrides: Partial) => { - await act(async () => { - queryClient!.setQueryData(serversKey, servers(overrides)) - }) - await settleQueryNotifications() - } - await setServers({}) - expect(read.current?.worktrees).toHaveLength(n) - const members = read.current!.worktrees - lineage.resolutions = 0 - - await setServers({ health: 'connecting', relay: 'unavailable' }) - expect(lineage.resolutions).toBe(0) - expect(read.current?.worktrees).toBe(members) - - await setServers({ installationId: 'install-new' }) - expect(lineage.resolutions).toBe(1) - }) -}) diff --git a/mobile/src/source-control/review/github-pr-rpc.ts b/mobile/src/source-control/review/github-pr-rpc.ts index 595d67de125..0b46be0adc6 100644 --- a/mobile/src/source-control/review/github-pr-rpc.ts +++ b/mobile/src/source-control/review/github-pr-rpc.ts @@ -100,7 +100,9 @@ export async function fetchPRForBranch( branch: string linkedPRNumber?: number | null fallbackPRNumber?: number | null + acceptMergedFallbackPR?: boolean currentHeadOid?: string | null + // An action's read: re-learn host status, and join no host lookup begun before it. refresh?: boolean } ): Promise> { @@ -131,7 +133,9 @@ export async function fetchPRForBranch( branch: args.branch, linkedPRNumber: args.linkedPRNumber ?? null, fallbackPRNumber: args.fallbackPRNumber ?? null, - currentHeadOid: args.currentHeadOid ?? null + ...(args.acceptMergedFallbackPR ? { acceptMergedFallbackPR: true } : {}), + currentHeadOid: args.currentHeadOid ?? null, + ...(args.refresh ? { userRefresh: true } : {}) }), contract.options ) @@ -222,7 +226,13 @@ export async function fetchWorkItemDetails( export function fetchPRChecks( client: RpcOperationSender, worktreeId: string, - args: { prNumber: number; headSha?: string | null; prRepo?: GitHubPrRepoSlug | null } + args: { + prNumber: number + headSha?: string | null + prRepo?: GitHubPrRepoSlug | null + // An action's read: past gh's response cache, joining no host read begun before it. + refresh?: boolean + } ): Promise> { return settleGithubPrRead(githubPrChecksRead, () => githubPrChecksRead.request( @@ -230,7 +240,10 @@ export function fetchPRChecks( githubPrRequestParams( githubPrChecksRead.operation.method, worktreeId, - { prNumber: args.prNumber }, + { + prNumber: args.prNumber, + ...(args.refresh ? { noCache: true, userRefresh: true } : {}) + }, { prRepo: args.prRepo, headSha: args.headSha } ) ) diff --git a/mobile/src/source-control/review/mobile-diff-review-branch-compare-cache.ts b/mobile/src/source-control/review/mobile-diff-review-branch-compare-cache.ts index 1a85fde8f6e..afa29ec9504 100644 --- a/mobile/src/source-control/review/mobile-diff-review-branch-compare-cache.ts +++ b/mobile/src/source-control/review/mobile-diff-review-branch-compare-cache.ts @@ -3,7 +3,10 @@ import { defineHostQuery, fetchHostQuery } from '../../query/host-query' import { hostQueryKey, type HostQueryTarget } from '../../query/host-query-key' import type { RpcClient } from '../../transport/rpc/rpc-client-contract' import { gitStatusQuery } from '../mobile-git-status-query' -import type { BranchCompareLoadResult } from './mobile-diff-review-loaders' +import type { + BranchCompareLoadResult, + MobileBranchCompareCache +} from './mobile-diff-review-loaders' export type ReviewBranchCompareKey = { baseRef: string; head: string } @@ -14,29 +17,54 @@ const reviewBranchCompareQuery = defineHostQuery boolean + // A compare a git change marked as it landed: newer than the shown one, and being read again. + onStale: (loaded: BranchCompareLoadResult) => void + // The compare the build read, once it settles; until then the build reads it again itself after a git change. + onSettled: (key: ReviewBranchCompareKey) => void +} + +// The branch compare cache one Review build reads through. A superseded build's compare is never shown. +export function reviewBuildBranchCompareCache( queryClient: QueryClient, host: { hostId: string; client: RpcClient }, target: HostQueryTarget, - key: ReviewBranchCompareKey, - read: () => Promise -): Promise { - const loaded = await fetchHostQuery( - queryClient, - reviewBranchCompareQuery, - host, - target, - key, - read - ) - // Only a compare that landed for this head is worth reusing; cached status can trail a commit. - if (loaded.result?.summary.headOid !== key.head) { - queryClient.removeQueries({ - queryKey: hostQueryKey(host.hostId, reviewBranchCompareQuery.family, target, key), - exact: true - }) + build: ReviewBuild +): MobileBranchCompareCache { + const { isCurrent, onStale } = build + return async (key, read) => { + if (!isCurrent()) { + return { result: null } + } + try { + const loaded = await fetchHostQuery( + queryClient, + reviewBranchCompareQuery, + host, + target, + key, + { + read, + isCurrent, + onStale + } + ) + // Only a compare that landed for this head is worth reusing; cached status can trail a commit. + // A superseded build's answer may predate the entry a newer build is reading, so only the current one evicts. + if (isCurrent() && loaded.result?.summary.headOid !== key.head) { + queryClient.removeQueries({ + queryKey: hostQueryKey(host.hostId, reviewBranchCompareQuery.family, target, key), + exact: true + }) + } + return loaded + } finally { + if (isCurrent()) { + build.onSettled(key) + } + } } - return loaded } // Marked by a git change and not being read again, so only a new build brings the current compare. diff --git a/mobile/src/source-control/review/mobile-pr-queries.ts b/mobile/src/source-control/review/mobile-pr-queries.ts index d4279971f0e..adec08baecd 100644 --- a/mobile/src/source-control/review/mobile-pr-queries.ts +++ b/mobile/src/source-control/review/mobile-pr-queries.ts @@ -15,7 +15,9 @@ import { resolveGitHubWorkItemTarget } from '../../../../src/shared/github/work-item-target' import type { GitHubWorkItemDetails } from '../../../../src/shared/github/work-item-types' -import { defineHostQuery } from '../../query/host-query' +import { LOCAL_EXECUTION_HOST_ID } from '../../../../src/shared/execution-host' +import { worktreeIdsEqual } from '../../../../src/shared/worktree/id' +import { defineHostQuery, type HostQuerySignal, type HostSignalEvent } from '../../query/host-query' import { hostQueryKey, type HostQueryParams, @@ -126,11 +128,27 @@ function keepCheckObservation( return pr ? { ...next, pr } : next } -// No desktop signal for PR changes reaches the phone, so it revalidates on focus and polls while shown. +// The desktop's own workspaces only: a relayed server's PR refreshes never reach this stream. +function namesThisCheckout(event: HostSignalEvent, target: HostQueryTarget): boolean { + return ( + event.type === 'pullRequestChanged' && + target.exec === LOCAL_EXECUTION_HOST_ID && + worktreeIdsEqual(event.worktreeId, target.worktree ?? '') + ) +} + +// Sent when a desktop PR refresh sees the PR change; changes no desktop refresh sees still wait for focus or the poll. +const pullRequestChangedSignal: HostQuerySignal = { + events: ['pullRequestChanged'], + floorMs: 1_000, + matches: namesThisCheckout +} + export const prBranchReviewQuery = defineHostQuery({ family: 'pr.forBranch', staleTime: 30_000, refetchOnWindowFocus: true, + signal: pullRequestChangedSignal, fetch: async (client, target, input: PrBranchInput, previous: PrBranchReview | undefined, read) => keepCheckObservation( await loadPrBranchReview( @@ -146,7 +164,8 @@ export const prBranchReviewQuery = defineHostQuery({ branch: input.branch, headSha: input.head, // Only an action's read re-learns host status; revalidations reuse what this connection knows. - refresh: read.live + refresh: read.live, + previous } ), previous @@ -157,12 +176,21 @@ export const prChecksQuery = defineHostQuery({ family: 'pr.checks', staleTime: 15_000, refetchOnWindowFocus: true, - fetch: async (client, target, input: PrChecksInput): Promise => { + // The event also fires when the checks rollup moves, which the summary alone can't list. + signal: pullRequestChangedSignal, + fetch: async ( + client, + target, + input: PrChecksInput, + _previous, + read + ): Promise => { const outcome = await fetchPRChecks(client, target.worktree ?? '', { prNumber: input.number, headSha: input.head, // Fork checks must use the PR's own repo identity. - prRepo: prRepoSlug(input) + prRepo: prRepoSlug(input), + refresh: read.live }) if (!outcome.ok) { throw new Error(outcome.error) diff --git a/mobile/src/source-control/review/mobile-pr-sidebar-state.ts b/mobile/src/source-control/review/mobile-pr-sidebar-state.ts index 34416229028..5038ee8801d 100644 --- a/mobile/src/source-control/review/mobile-pr-sidebar-state.ts +++ b/mobile/src/source-control/review/mobile-pr-sidebar-state.ts @@ -9,6 +9,11 @@ import type { GitHubWorkItemDetails } from '../../../../src/shared/github/work-i import type { HostedReviewInfo } from '../../../../src/shared/source-control/hosted-review/hosted-review-contracts' import type { GitHubPrReadOutcome } from './github-pr-rpc' import { isGitHubPRSuppressed } from '../../../../src/shared/worktree/github-pr-suppression' +import { + prBranchFallbackNeedsHint, + resolvePRBranchFallback, + shouldAcceptMergedFallbackPR +} from '../../../../src/shared/github/pr-branch-fallback-rule' import { shouldApplyBranchMismatchedLinkedPRClear, shouldApplyDivergedLinkedPRClear, @@ -72,6 +77,7 @@ export type PrSidebarLoadDeps = { branch: string linkedPRNumber?: number | null fallbackPRNumber?: number | null + acceptMergedFallbackPR?: boolean currentHeadOid?: string | null refresh?: boolean } @@ -109,12 +115,25 @@ function resolveStaleLink( return null } +/** The hosted-review hint a branch lookup fell back to, kept so a branch with no PR isn't asked twice per read. */ +export type PrBranchHint = { number: number | null; readAt: number } + /** The branch's GitHub review: its PR and the workspace's push target, or none. */ export type PrBranchReview = - | { kind: 'found'; pr: PRInfo; pushTarget: GitPushTarget | null } - | { kind: 'none' } + // linkedPRNumber: the link the PR was read with, so a later link change drops it as a fallback. + | { kind: 'found'; pr: PRInfo; pushTarget: GitPushTarget | null; linkedPRNumber: number | null } + | { kind: 'none'; hint?: PrBranchHint } + +// The host re-reads a selected branch's hosted review once a minute, so a younger hint is still its answer. +const BRANCH_HINT_STALE_MS = 60_000 + +function keptHint(previous: PrBranchReview | undefined): PrBranchHint | null { + const hint = previous?.kind === 'none' ? previous.hint : undefined + return hint && Date.now() - hint.readAt < BRANCH_HINT_STALE_MS ? hint : null +} // Parallel link resolution also retains closed/merged reviews. A failed read throws its message, classified when shown. +// Like desktop, the last PR result is the lookup's fallback, so the hint is read only for a branch with none. export async function loadPrBranchReview( deps: PrSidebarLoadDeps, args: { @@ -122,37 +141,68 @@ export async function loadPrBranchReview( branch: string headSha?: string | null refresh?: boolean + previous?: PrBranchReview } ): Promise { - const [hintOutcome, link] = await Promise.all([ - deps.fetchForBranch(args.worktreeId, { branch: args.branch }), - deps.fetchWorktreeGitHubPRLink(args.worktreeId) + const previousRead = args.previous?.kind === 'found' ? args.previous : null + // Desktop drops its last PR when the workspace's link changes; a result read under another link is no fallback. + const fallbackPR = (linkedPRNumber: number | null) => + previousRead && previousRead.linkedPRNumber === linkedPRNumber ? previousRead.pr : null + const kept = keptHint(args.previous) + // A failed hint read is no hint, and is not kept. + let hintRead: Promise | undefined + const readHint = () => + (hintRead ??= kept + ? Promise.resolve(kept) + : deps.fetchForBranch(args.worktreeId, { branch: args.branch }).then((outcome) => + outcome.ok + ? { + number: outcome.result?.provider === 'github' ? outcome.result.number : null, + readAt: Date.now() + } + : null + )) + // The link isn't known yet: with no PR read before, start the hint alongside it (a linked PR wastes it); + // a link that changed since the last read waits for the hint instead. + const [link] = await Promise.all([ + deps.fetchWorktreeGitHubPRLink(args.worktreeId), + prBranchFallbackNeedsHint({ linkedPRNumber: null, cachedPR: previousRead }) ? readHint() : null ]) - const branchHint = - hintOutcome.ok && hintOutcome.result?.provider === 'github' ? hintOutcome.result.number : null const requestHeadOid = args.headSha ?? null - // Same as desktop: the explicit link wins; the branch's review is only a fallback. - const fetchPR = (linkedPRNumber: number | null) => - deps.fetchPRForBranch(args.worktreeId, { + // Same as desktop: the explicit link wins; the last PR result, else the branch's review, is only a fallback. + const fetchPR = async (linkedPRNumber: number | null, cachedPR: PRInfo | null) => { + const fallback = resolvePRBranchFallback({ + linkedPRNumber, + cachedPR, + hintPRNumber: prBranchFallbackNeedsHint({ linkedPRNumber, cachedPR }) + ? ((await readHint())?.number ?? null) + : null, + currentHeadOid: requestHeadOid + }) + return deps.fetchPRForBranch(args.worktreeId, { branch: args.branch, linkedPRNumber, - fallbackPRNumber: linkedPRNumber === null ? branchHint : null, + fallbackPRNumber: fallback.fallbackPRNumber, + ...(shouldAcceptMergedFallbackPR({ linkedPRNumber, ...fallback }) + ? { acceptMergedFallbackPR: true } + : {}), currentHeadOid: requestHeadOid, ...(args.refresh ? { refresh: true } : {}) }) + } let linkedPR = link.linkedPR - let prOutcome = await fetchPR(linkedPR) + let prOutcome = await fetchPR(linkedPR, fallbackPR(linkedPR)) const staleLink = prOutcome.ok ? resolveStaleLink(prOutcome.result, link, args.branch, requestHeadOid) : null - // Desktop drops a link the branch has moved past, then resolves by branch. + // Desktop drops a link the branch has moved past, then resolves by branch with only the hint. if (staleLink) { linkedPR = null // The refetch sends no link, so it need not wait for the clear to land. ;[, prOutcome] = await Promise.all([ deps.clearWorktreeReviewLink(args.worktreeId, staleLink), - fetchPR(null) + fetchPR(null, null) ]) } if (!prOutcome.ok) { @@ -165,9 +215,15 @@ export async function loadPrBranchReview( prOutcome.result.number ) ) { - return { kind: 'none' } + const hint = await hintRead + return hint ? { kind: 'none', hint } : { kind: 'none' } + } + return { + kind: 'found', + pr: prOutcome.result, + pushTarget: link.pushTarget, + linkedPRNumber: linkedPR } - return { kind: 'found', pr: prOutcome.result, pushTarget: link.pushTarget } } // What the screen shows for a PR read that failed with nothing accepted to keep. diff --git a/mobile/src/source-control/review/use-mobile-diff-review-comment-actions.ts b/mobile/src/source-control/review/use-mobile-diff-review-comment-actions.ts index 8770531221a..a9d92e9dfd2 100644 --- a/mobile/src/source-control/review/use-mobile-diff-review-comment-actions.ts +++ b/mobile/src/source-control/review/use-mobile-diff-review-comment-actions.ts @@ -24,7 +24,7 @@ import { reviewDescriptorFromItem } from './mobile-diff-review-screen-model' import type { ReviewSheetIntents } from './mobile-diff-review-sheets' -import { useMobileDiffReviewNoteDraft } from './use-mobile-diff-review-note-draft' +import type { MobileDiffReviewNoteDraft } from './use-mobile-diff-review-note-draft' type CommentActionsInput = { client: RpcClient | null @@ -43,9 +43,12 @@ type CommentActionsInput = { navigationRef: { readonly current: number } /** GitHub's viewed mark for a PR file, or null when the file's viewed state lives on the phone. */ remoteViewed: (item: MobileDiffReviewQueueItem, viewed: boolean) => Promise | null - setComposerBody: Dispatch> + noteDraft: Pick< + MobileDiffReviewNoteDraft, + 'openNewNoteSheet' | 'openEditComposer' | 'clearSavedNote' + > setActionError: Dispatch> - sheets: Pick + sheets: Pick } export function useMobileDiffReviewCommentActions(input: CommentActionsInput) { @@ -64,11 +67,12 @@ export function useMobileDiffReviewCommentActions(input: CommentActionsInput) { selectIndex, navigationRef, remoteViewed, - setComposerBody, + noteDraft, setActionError, sheets } = input - const { openSheet, openSheetWhenIdle, closeSheet } = sheets + const { openSheetWhenIdle, closeSheet } = sheets + const { openNewNoteSheet, openEditComposer, clearSavedNote } = noteDraft const persistMetadata = useCallback( async ( @@ -147,12 +151,6 @@ export function useMobileDiffReviewCommentActions(input: CommentActionsInput) { [persistMetadata, screenState, setActionError, setScreenState, updateReadyState, worktreeId] ) - const { openNewNoteSheet, openEditComposer, clearSavedNote } = useMobileDiffReviewNoteDraft({ - composerBody, - setComposerBody, - openSheet - }) - const openComposer = useCallback( (lineNumber: number) => openNewNoteSheet({ kind: 'composer', composer: { mode: 'create', lineNumber } }), diff --git a/mobile/src/source-control/review/use-mobile-diff-review-controller.test.ts b/mobile/src/source-control/review/use-mobile-diff-review-controller.test.ts index 4b951d0b466..7bcd5c31744 100644 --- a/mobile/src/source-control/review/use-mobile-diff-review-controller.test.ts +++ b/mobile/src/source-control/review/use-mobile-diff-review-controller.test.ts @@ -6,6 +6,9 @@ import { createFakeRpcClient } from '../../mobile-web-shell/bridge-host-test-fak import type { ReviewScreenState } from './mobile-diff-review-screen-model' import { useMobileDiffReviewController } from './use-mobile-diff-review-controller' import { documentQueryClient } from '../../test-support/rpc-recording/hook-mount' +import { publishPageDeviceStore } from '../../mobile-web-shell/bridge/page-device-store' +import { resetDurableDraftFieldsForTests } from '../../drafts/durable-draft-fields' +import { publishInMemoryDeviceStore } from '../../drafts/in-memory-device-store.test-support' const loadSnapshot = vi.hoisted(() => vi.fn()) // Each build's notes-and-files read; status comes from the shared git.status query, held pending here. @@ -92,6 +95,8 @@ describe('useMobileDiffReviewController', () => { afterEach(() => { act(() => renderer?.unmount()) renderer = null + resetDurableDraftFieldsForTests() + publishPageDeviceStore(null) }) describe('Stage · next file', () => { @@ -204,5 +209,44 @@ describe('useMobileDiffReviewController', () => { act(() => controller?.openComposer(3)) expect(controller?.composerBody).toBe('') }) + + it('brings an unsaved new note back after the app is killed, not the text of an edit', async () => { + // The shell's draft table outlives the page; nothing else does. + const table = new Map() + publishInMemoryDeviceStore(table) + const openReview = async () => { + loadSnapshot.mockResolvedValueOnce(unstaged(['c.ts'])) + await act(async () => { + renderer = create(queries.wrap(createElement(StageProbe))) + await new Promise((resolve) => setTimeout(resolve, 0)) + }) + } + await openReview() + act(() => controller?.openComposer(3)) + act(() => controller?.setComposerBody('rename this')) + act(() => controller?.closeComposer()) + act(() => + controller?.openEditComposer({ + id: 'saved', + worktreeId: 'wt-1', + filePath: 'c.ts', + lineNumber: 1, + side: 'modified', + body: 'older note', + createdAt: 1 + }) + ) + act(() => controller?.setComposerBody('older note, edited')) + // The draft row saves once typing settles. + await act(async () => { + await vi.waitFor(() => expect(table.size).toBe(1)) + }) + act(() => renderer?.unmount()) + resetDurableDraftFieldsForTests() + + await openReview() + act(() => controller?.openComposer(3)) + expect(controller?.composerBody).toBe('rename this') + }) }) }) diff --git a/mobile/src/source-control/review/use-mobile-diff-review-controller.ts b/mobile/src/source-control/review/use-mobile-diff-review-controller.ts index 6b7e9501774..8ee31adcf5d 100644 --- a/mobile/src/source-control/review/use-mobile-diff-review-controller.ts +++ b/mobile/src/source-control/review/use-mobile-diff-review-controller.ts @@ -27,6 +27,9 @@ import { useMobilePrSidebarController } from './use-mobile-pr-sidebar-controller import { useMobileDiffReviewGitHub } from './use-mobile-diff-review-github' import { mobileDiffReviewThreadsForItem } from './mobile-diff-review-github' import { mobileDiffReviewNotesForItem } from './mobile-diff-comments' +import { useMobileDiffReviewNoteDraft } from './use-mobile-diff-review-note-draft' +import { workspaceDraftRowKey } from '../../drafts/durable-draft-rows' +import { useWorkspaceExecutionHost } from '../../navigation/workspace-execution-host' const NO_COMMENTS: readonly DiffComment[] = [] @@ -74,7 +77,12 @@ export function useMobileDiffReviewController(input: ControllerInput) { const [sheets, dispatchSheets] = useReducer(reduceReviewSheets, NO_REVIEW_SHEETS) const sheetIntents = useMemo(() => reviewSheetIntents(dispatchSheets), []) const composer = reviewComposer(sheets) - const [composerBody, setComposerBody] = useState('') + const executionHost = useWorkspaceExecutionHost() + const noteDraft = useMobileDiffReviewNoteDraft({ + draftKey: workspaceDraftRowKey('reviewNote', { hostId, executionHost, worktreeId }, ''), + openSheet: sheetIntents.openSheet + }) + const { composerBody, setComposerBody } = noteDraft const [actionError, setActionError] = useState(null) const [busyAction, setBusyAction] = useState(null) const worktreeLabel = getWorktreeLabel(name, worktreeId) @@ -182,7 +190,7 @@ export function useMobileDiffReviewController(input: ControllerInput) { selectKey, moveSelection, remoteViewed: setRemoteViewed, - setComposerBody, + noteDraft, setActionError, setBusyAction, sheets: sheetIntents, diff --git a/mobile/src/source-control/review/use-mobile-diff-review-interactions.ts b/mobile/src/source-control/review/use-mobile-diff-review-interactions.ts index 6176651f97d..10bbfc7a0d6 100644 --- a/mobile/src/source-control/review/use-mobile-diff-review-interactions.ts +++ b/mobile/src/source-control/review/use-mobile-diff-review-interactions.ts @@ -6,6 +6,7 @@ import type { MobileDiffReviewQueueItem } from './mobile-diff-review-queue' import type { ComposerState, ReviewScreenState } from './mobile-diff-review-screen-model' import type { ReviewSheet, ReviewSheetIntents } from './mobile-diff-review-sheets' import type { MobileReviewTerminalTab } from './review-terminal-reply-schema' +import type { MobileDiffReviewNoteDraft } from './use-mobile-diff-review-note-draft' import { sourceFileDiffOpenRun } from '../mobile-source-file-open-operations' import { refusedRpcMessageOrFallback } from '../../transport/rpc/rpc-refusal-message' import { useMobileDiffReviewCommentActions } from './use-mobile-diff-review-comment-actions' @@ -33,7 +34,7 @@ type InteractionInput = { selectKey: (key: string) => void moveSelection: (direction: 'next' | 'previous') => void remoteViewed: (item: MobileDiffReviewQueueItem, viewed: boolean) => Promise | null - setComposerBody: Dispatch> + noteDraft: MobileDiffReviewNoteDraft setActionError: Dispatch> setBusyAction: Dispatch> sheets: ReviewSheetIntents @@ -61,7 +62,7 @@ export function useMobileDiffReviewInteractions(input: InteractionInput) { selectKey, moveSelection, remoteViewed, - setComposerBody, + noteDraft, setActionError, setBusyAction, sheets, @@ -99,7 +100,7 @@ export function useMobileDiffReviewInteractions(input: InteractionInput) { selectIndex, navigationRef, remoteViewed, - setComposerBody, + noteDraft, setActionError, sheets }) diff --git a/mobile/src/source-control/review/use-mobile-diff-review-note-draft.ts b/mobile/src/source-control/review/use-mobile-diff-review-note-draft.ts index 2a04dc98a06..cb50996f0ca 100644 --- a/mobile/src/source-control/review/use-mobile-diff-review-note-draft.ts +++ b/mobile/src/source-control/review/use-mobile-diff-review-note-draft.ts @@ -1,10 +1,11 @@ -import { useCallback, useRef, type Dispatch, type SetStateAction } from 'react' +import { useCallback, useState, type SetStateAction } from 'react' import type { DiffComment } from '../../../../src/shared/diff-comment-types' +import { useDurableDraftField } from '../../drafts/durable-draft-fields' import type { ReviewSheet, ReviewSheetIntents } from './mobile-diff-review-sheets' type NoteDraftInput = { - composerBody: string - setComposerBody: Dispatch> + // Where the new note waits through leaving the review and the app being killed. + draftKey: string openSheet: ReviewSheetIntents['openSheet'] } @@ -13,45 +14,46 @@ type NewNoteSheet = | { kind: 'composer'; composer: { mode: 'create'; lineNumber: number } } /** The review's unsaved new note: kept across Cancel, reopen and picking other lines, cleared only once saved. */ -export function useMobileDiffReviewNoteDraft({ - composerBody, - setComposerBody, - openSheet -}: NoteDraftInput) { - // Set while an edit borrows the text field; the new note comes back when a new-note sheet opens. - const setAsideNoteRef = useRef(null) +export function useMobileDiffReviewNoteDraft({ draftKey, openSheet }: NoteDraftInput) { + const [newNote, setNewNote] = useDurableDraftField(draftKey, 'note') + // An edit borrows the text field with its own text, until a new-note sheet opens; the new note is untouched + // underneath. Kept past the edit sheet closing, so its text stays while it slides away. + const [editBody, setEditBody] = useState(null) + const setEditText = useCallback( + (next: SetStateAction) => + setEditBody((current) => (typeof next === 'function' ? next(current ?? '') : next)), + [] + ) + const openNewNoteSheet = useCallback( (sheet: NewNoteSheet) => { - if (setAsideNoteRef.current !== null) { - setComposerBody(setAsideNoteRef.current) - setAsideNoteRef.current = null - } + setEditBody(null) openSheet(sheet) }, - [openSheet, setComposerBody] + [openSheet] ) // The user may have moved on while a note was saving; drop only the text that was saved. const clearSavedNote = useCallback( - (saved: string) => { - const isSaved = (text: string) => text.trim() === saved.trim() - if (setAsideNoteRef.current === null) { - setComposerBody((current) => (isSaved(current) ? '' : current)) - } else if (isSaved(setAsideNoteRef.current)) { - setAsideNoteRef.current = '' - } - }, - [setComposerBody] + (saved: string) => setNewNote((current) => (current.trim() === saved.trim() ? '' : current)), + [setNewNote] ) const openEditComposer = useCallback( (comment: DiffComment) => { - setAsideNoteRef.current ??= composerBody openSheet({ kind: 'composer', composer: { mode: 'edit', comment } }) - setComposerBody(comment.body) + setEditBody(comment.body) }, - [composerBody, openSheet, setComposerBody] + [openSheet] ) - return { openNewNoteSheet, openEditComposer, clearSavedNote } + return { + composerBody: editBody ?? newNote, + setComposerBody: editBody === null ? setNewNote : setEditText, + openNewNoteSheet, + openEditComposer, + clearSavedNote + } } + +export type MobileDiffReviewNoteDraft = ReturnType diff --git a/mobile/src/source-control/review/use-mobile-diff-review-snapshot.ts b/mobile/src/source-control/review/use-mobile-diff-review-snapshot.ts index 10fe03182a0..8122c702baf 100644 --- a/mobile/src/source-control/review/use-mobile-diff-review-snapshot.ts +++ b/mobile/src/source-control/review/use-mobile-diff-review-snapshot.ts @@ -9,10 +9,10 @@ import { useMobileSourceControlSettings } from '../mobile-source-control-setting import type { RpcClient } from '../../transport/rpc/rpc-client-contract' import type { ConnectionState } from '../../transport/connection/connection-state' import { loadMobileDiffReviewCommitSnapshot } from './mobile-diff-review-commit-loader' -import type { MobileBranchCompareCache } from './mobile-diff-review-loaders' +import type { BranchCompareLoadResult } from './mobile-diff-review-loaders' import { - readCachedReviewBranchCompare, reviewBranchCompareNeedsRead, + reviewBuildBranchCompareCache, type ReviewBranchCompareKey } from './mobile-diff-review-branch-compare-cache' import type { MobileDiffReviewQueueFilter } from './mobile-diff-review-queue' @@ -73,7 +73,7 @@ export function useMobileDiffReviewSnapshot(input: SnapshotInput) { ) // The status read the shown snapshot was built from; AWAITING while a build waits for its first read. const builtFromRef = useRef(undefined) - // The compare the current build read, so a git change that marked it stale rebuilds even when status held. + // The compare the current build has read, so a git change that marked it stale rebuilds even when status held. const builtCompareRef = useRef(null) // Reloads after a write wait for the rebuild they cause, so the screen's buttons match the new files. const buildWaitersRef = useRef<(() => void)[]>([]) @@ -170,14 +170,45 @@ export function useMobileDiffReviewSnapshot(input: SnapshotInput) { throw err } ) - const cacheBranchCompare: MobileBranchCompareCache = async (key, read) => { - // A superseded build's compare is never shown. - if (!isCurrent()) { - return { result: null } + // Once this build's files show, a later compare goes onto the screen, keeping note edits made since. + // Without a compare (null) the shown one holds until the new one lands. + let shownBuild = false + const showBuilt = (state: ReviewScreenState, loaded: BranchCompareLoadResult | null) => { + const onShown = shownBuild + shownBuild = true + if (!sameStatus && !onShown) { + setStatusRevision(queryClient.getQueryState(statusKey)?.dataUpdatedAt ?? 0) } - builtCompareRef.current = key - return readCachedReviewBranchCompare(queryClient, { hostId, client }, target, key, read) + setScreenState((prev) => { + const held = + prev.kind === 'ready' ? { result: prev.branchCompare, error: prev.branchError } : null + const compare = loaded ?? held + const base = onShown && prev.kind === 'ready' ? prev : state + return compare ? withMobileDiffReviewBranch(base, compare, worktreeId) : base + }) + if (loaded) { + setActionError(loaded.error ?? null) + } + settleWaiters() } + // A compare a git change marked as it landed is newer than the shown one, so it shows while read again. + const showStaleCompare = (loaded: BranchCompareLoadResult) => + void snapshot.then( + (state) => isCurrent() && showBuilt(state, loaded), + () => {} + ) + const cacheBranchCompare = reviewBuildBranchCompareCache( + queryClient, + { hostId, client }, + target, + { + isCurrent, + onStale: showStaleCompare, + onSettled: (key) => { + builtCompareRef.current = key + } + } + ) const { snapshot, branch } = startMobileDiffReviewSnapshot(client, worktreeId, { status: statusInput, compareAgainstUpstream, @@ -191,30 +222,13 @@ export function useMobileDiffReviewSnapshot(input: SnapshotInput) { if (!isCurrent()) { return } - if (!sameStatus) { - setStatusRevision(queryClient.getQueryState(statusKey)?.dataUpdatedAt ?? 0) - } - if (loaded) { - setScreenState(withMobileDiffReviewBranch(state, loaded, worktreeId)) - setActionError(loaded.error ?? null) - return - } - // Hold the shown compare until the new one lands. - setScreenState((prev) => - prev.kind === 'ready' - ? withMobileDiffReviewBranch( - state, - { result: prev.branchCompare, error: prev.branchError }, - worktreeId - ) - : state - ) // A write waits for the files it changed, not for the branch compare. - settleWaiters() - const settled = await branch - if (isCurrent()) { - setScreenState((prev) => withMobileDiffReviewBranch(prev, settled, worktreeId)) - setActionError(settled.error ?? null) + showBuilt(state, loaded) + if (!loaded) { + const settled = await branch + if (isCurrent()) { + showBuilt(state, settled) + } } } catch (err) { fail(err) @@ -233,9 +247,18 @@ export function useMobileDiffReviewSnapshot(input: SnapshotInput) { ) }, [client, commitOid, connState, queryClient, reloadNonce, statusKey, worktreeReview]) + // Closing Review ends its build, so a compare it is still reading is not read again for later git changes. + useEffect( + () => () => { + loadGenerationRef.current += 1 + settleWaiters() + }, + [] + ) + // A status read that changed what Changes shows rebuilds the snapshot; one in flight already brings its own. // A read that lands unchanged rebuilds too once a git change marked the shown compare stale; a compare - // still out is read again by its own build when it lands marked. + // its build has not settled yet is read again by that build. const rebuildOnStatusRead = useEffectEvent((read: GitStatusRead) => { const built = builtFromRef.current if (built === AWAITING) { diff --git a/mobile/src/source-control/review/use-mobile-pr-comment-actions.ts b/mobile/src/source-control/review/use-mobile-pr-comment-actions.ts index 6df40877f65..d1f83cd1e96 100644 --- a/mobile/src/source-control/review/use-mobile-pr-comment-actions.ts +++ b/mobile/src/source-control/review/use-mobile-pr-comment-actions.ts @@ -15,6 +15,8 @@ import { } from './pr-comment-actions' import { prCommentTarget, prCommentWrite, type PrCommentWrite } from './pr-comment-writes' import type { PrQueryScope } from './mobile-pr-queries' +import { workspaceDraftRowKey } from '../../drafts/durable-draft-rows' +import { useWorkspaceExecutionHost } from '../../navigation/workspace-execution-host' export type PrCommentActionsInput = { hostId: string @@ -52,6 +54,22 @@ export function useMobilePrCommentActions(input: PrCommentActionsInput) { const { mutate, blockedOffline } = useHostMutation(prCommentWrite, { hostId, client }) const ready = client !== null && connState === 'connected' && !blockedOffline const target = useMemo(() => prCommentTarget(queries), [queries]) + const executionHost = useWorkspaceExecutionHost() + // A fork's #N and upstream #N keep separate drafts; null is a new root comment. + const draftKey = useCallback( + (replyTo: number | null): string | null => { + if (prNumber <= 0) { + return null + } + const repo = prRepo ? `${prRepo.host ?? ''}/${prRepo.owner}/${prRepo.repo}` : '' + return workspaceDraftRowKey( + 'prComment', + { hostId, executionHost, worktreeId }, + `${repo}#${prNumber}#${replyTo ?? 'new'}` + ) + }, + [executionHost, hostId, prNumber, prRepo, worktreeId] + ) const setBusy = useCallback((key: string, busy: boolean) => { setBusyKeys((prev) => { @@ -160,6 +178,7 @@ export function useMobilePrCommentActions(input: PrCommentActionsInput) { [busyKeys] ), isRootBusy: busyKeys.has(ROOT_KEY), + draftKey, reply, toggleResolve, addRootComment, diff --git a/mobile/src/source-control/use-mobile-source-control-commit-runners.ts b/mobile/src/source-control/use-mobile-source-control-commit-runners.ts index 5a9b6fbcc05..48bcfadf5bd 100644 --- a/mobile/src/source-control/use-mobile-source-control-commit-runners.ts +++ b/mobile/src/source-control/use-mobile-source-control-commit-runners.ts @@ -1,4 +1,4 @@ -import { useCallback, type MutableRefObject } from 'react' +import { useCallback, type Dispatch, type MutableRefObject, type SetStateAction } from 'react' import { translate } from '../i18n/mobile-i18n' import { triggerError, triggerSuccess } from '../platform/haptics' import type { LoadStatusOptions } from './mobile-source-control-screen-state' @@ -12,7 +12,8 @@ type SendGitRequest = (method: string, params?: Record) => P type RunGitWorkflow = ( actionId: string, runner: () => Promise, - options?: { clearCommitMessage?: boolean } + // The committed message; the field is cleared only while it still holds that text. + options?: { clearCommitMessage?: string } ) => Promise type Params = { @@ -28,7 +29,7 @@ type Params = { busyActionRef: MutableRefObject setBusyAction: (next: string | null) => void setActionError: (next: string | null) => void - setCommitMessage: (next: string) => void + setCommitMessage: Dispatch> recordCommitFailure: RecordMobileCommitFailure } @@ -80,7 +81,7 @@ export function useMobileSourceControlCommitRunners(params: Params) { throw err } }, - { clearCommitMessage: true } + { clearCommitMessage: message } ) }, [commitMessage, recordCommitFailure, runGitWorkflow, sendCommitRequest, stagedEntries]) @@ -101,11 +102,12 @@ export function useMobileSourceControlCommitRunners(params: Params) { try { await sendCommitRequest(message) didCommit = true + // The commit landed: a kill during the push must not bring its message back, and text typed since stays. + setCommitMessage((current) => (current.trim() === message ? '' : current)) await afterCommit() if (!mountedRef.current) { return false } - setCommitMessage('') triggerSuccess() await loadStatus({ force: true }) return true @@ -122,7 +124,6 @@ export function useMobileSourceControlCommitRunners(params: Params) { recordCommitFailure({ error: errorMessage, commitMessage: message, stagedEntries }) } if (didCommit) { - setCommitMessage('') await loadStatus({ clearActionErrorOnSuccess: false, force: true diff --git a/mobile/src/source-control/use-mobile-source-control-loaders.test.ts b/mobile/src/source-control/use-mobile-source-control-loaders.test.ts index be243eb6934..8a548d0cba1 100644 --- a/mobile/src/source-control/use-mobile-source-control-loaders.test.ts +++ b/mobile/src/source-control/use-mobile-source-control-loaders.test.ts @@ -423,37 +423,6 @@ describe('useMobileSourceControlLoaders status summary', () => { }) expect(child.writesTo(summaryKey)).toBe(2) }) - - it.each([10, 100])('touches one summary of N=%i listed beside it', async (n) => { - vi.useFakeTimers({ toFake: ['Date'] }) - const calls: PendingCall[] = [] - const child = setup(calls) - const others = Array.from({ length: n }, (_, i) => [ - hostQueryKey( - 'host-1', - gitStatusSummaryQuery.family, - { exec: 'local', worktree: `repo42::/o${i}` }, - {} - ), - hostQueryKey( - 'host-1', - serverGitStatusSummaryQuery.family, - { exec: `runtime:env-${i}`, worktree: WORKTREE }, - {} - ) - ]).flat() - for (const key of [summaryKey, ...others]) { - child.queryClient.setQueryData(key, readOf('first')) - } - child.clearWrites() - vi.setSystemTime(Date.now() + 1) - await child.mount() - await act(async () => takeRead(calls, false).settle(statusReply('opened'))) - await settleQueryNotifications() - expect(child.writesTo(summaryKey)).toBe(1) - expect(others.filter((key) => child.writesTo(key) > 0)).toHaveLength(0) - expect(calls.filter((call) => call.method === 'git.status')).toHaveLength(0) - }) }) function memoryStore() { diff --git a/mobile/src/source-control/use-mobile-source-control-runners.ts b/mobile/src/source-control/use-mobile-source-control-runners.ts index 4fc63f59aba..956899af2a6 100644 --- a/mobile/src/source-control/use-mobile-source-control-runners.ts +++ b/mobile/src/source-control/use-mobile-source-control-runners.ts @@ -83,7 +83,7 @@ export function useMobileSourceControlRunners(params: Params) { async ( actionId: string, runner: () => Promise, - options?: { clearCommitMessage?: boolean; refreshOnError?: boolean } + options?: { clearCommitMessage?: string; refreshOnError?: boolean } ) => { if (busyActionRef.current) { return false @@ -94,12 +94,14 @@ export function useMobileSourceControlRunners(params: Params) { recordCommitFailure(null) try { await runner() + // The commit landed, so its message must not come back, even when the screen has left. + const committed = options?.clearCommitMessage + if (committed !== undefined) { + setCommitMessage((current) => (current.trim() === committed ? '' : current)) + } if (!mountedRef.current) { return false } - if (options?.clearCommitMessage) { - setCommitMessage('') - } triggerSuccess() await loadStatus({ force: true }) return true @@ -148,7 +150,7 @@ export function useMobileSourceControlRunners(params: Params) { ) const runGitSequence = useCallback( - async (actionId: string, steps: GitStep[], options?: { clearCommitMessage?: boolean }) => { + async (actionId: string, steps: GitStep[], options?: { clearCommitMessage?: string }) => { return await runGitWorkflow( actionId, async () => { diff --git a/mobile/src/source-control/use-mobile-source-control-state.ts b/mobile/src/source-control/use-mobile-source-control-state.ts index 168fa193856..7b1a96b3edd 100644 --- a/mobile/src/source-control/use-mobile-source-control-state.ts +++ b/mobile/src/source-control/use-mobile-source-control-state.ts @@ -4,6 +4,9 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context' import { useForceReconnect } from '../transport/connection/host-client-hooks' import { useWorkspaceClient } from '../worktree/use-workspace-client' import { getWorktreeLabel } from '../worktree/worktree-label' +import { workspaceDraftRowKey } from '../drafts/durable-draft-rows' +import { useDurableDraftField } from '../drafts/durable-draft-fields' +import { useWorkspaceExecutionHost } from '../navigation/workspace-execution-host' import { useMobileGitRequests } from './use-mobile-git-requests' import { useMobileSourceControlLoaders } from './use-mobile-source-control-loaders' import { useMobileSourceControlOpeners } from './use-mobile-source-control-openers' @@ -48,7 +51,12 @@ export function useMobileSourceControlState(params: MobileSourceControlStatePara const { client, state: connState } = useWorkspaceClient(hostId) const forceReconnect = useForceReconnect() const [busyAction, setBusyAction] = useState(null) - const [commitMessage, setCommitMessage] = useState('') + const executionHost = useWorkspaceExecutionHost() + // The message waits through leaving the screen and the app being killed; a commit clears it. + const [commitMessage, setCommitMessage] = useDurableDraftField( + workspaceDraftRowKey('commit', { hostId, executionHost, worktreeId }, ''), + 'message' + ) const [generatingMessage, setGeneratingMessage] = useState(false) const [showBranchPicker, setShowBranchPicker] = useState(false) const [localBranches, setLocalBranches] = useState(null) diff --git a/mobile/src/stats/home-stats-summary-read.ts b/mobile/src/stats/home-stats-summary-read.ts index 365bb32b0bb..e1ee4807167 100644 --- a/mobile/src/stats/home-stats-summary-read.ts +++ b/mobile/src/stats/home-stats-summary-read.ts @@ -1,6 +1,8 @@ import { z } from 'zod' import { salvagedOptional } from '../../../src/shared/zod-salvage' -import type { RpcClient } from '../transport/rpc/rpc-client-contract' +import { HOST_LIST_TARGET, NO_HOST_LIST_INPUT } from '../host-screen/host-list-queries' +import { defineHostQuery } from '../query/host-query' +import { hostQueryKey } from '../query/host-query-key' import { bindDeferredRpcOperation, defineRpcOperation } from '../transport/rpc/rpc-operation' import { rpcResultVariant } from '../transport/rpc/rpc-operation-result-reader' import type { HomeStatsRow } from './home-stats-total' @@ -15,7 +17,6 @@ const homeStatsSummarySchema = z .nullish() .catch(undefined) -// Decorative totals: a refusal keeps the last shown reply. const homeStatsSummaryRead = bindDeferredRpcOperation( defineRpcOperation({ name: 'stats.home-summary-or-skip', @@ -26,23 +27,35 @@ const homeStatsSummaryRead = bindDeferredRpcOperation( }) ) -export type HomeStatsSetter = ( - updater: (previous: Record) => Record -) => void +type HomeStats = Exclude -export function fetchHomeHostStats( - client: RpcClient, - hostId: string, - setStats: HomeStatsSetter, - disposed: () => boolean -): void { - homeStatsSummaryRead - .requestSingleFlight(client, hostId) - .then((reply) => { - const summary = homeStatsSummaryRead.interpret(reply) - if (!disposed() && summary.accepted) { - setStats((previous) => ({ ...previous, [hostId]: summary.value })) - } - }) - .catch(() => {}) -} +export const homeStatsQuery = defineHostQuery({ + family: 'stats.summary', + fetch: async (client, _target, _input, previous, read) => { + const summary = homeStatsSummaryRead.interpret(await homeStatsSummaryRead.request(client)) + if (summary.accepted) { + return summary.value ?? null + } + // Decorative totals: a refusal keeps the last reply this launch read, never re-dates a stored one. + if (previous !== undefined && !read.previousFromStore) { + return previous + } + throw new Error('stats.summary unavailable') + }, + // Re-read each time Home comes back, as before; nothing on the desktop signals new totals. + staleTime: 0, + gcTime: Infinity, + persist: { + version: 1, + dataSchema: z + .looseObject({ + totalAgentsSpawned: z.number().optional(), + totalPRsCreated: z.number().optional(), + totalAgentTimeMs: z.number().optional() + }) + .nullable() + } +}) + +export const homeStatsKey = (hostId: string) => + hostQueryKey(hostId, homeStatsQuery.family, HOST_LIST_TARGET, NO_HOST_LIST_INPUT) diff --git a/mobile/src/tasks/github-review-publication.test.tsx b/mobile/src/tasks/github-review-publication.test.tsx index 6b8eecf228c..27ef19d09c3 100644 --- a/mobile/src/tasks/github-review-publication.test.tsx +++ b/mobile/src/tasks/github-review-publication.test.tsx @@ -11,6 +11,7 @@ import type { TaskItem } from './mobile-tasks-project-workspace-types' import { useMobileTasksHostedCommentReviewActions } from './use-mobile-tasks-hosted-comment-review-actions' import { useMobileTasksMutation } from './use-mobile-tasks-workspace-and-project-state' import { useMobileTasksItemState } from './use-mobile-tasks-item-state' +import { useTaskCommentDraft } from './task-draft-rows' import { useMobileTasksItemDetailLoading } from './use-mobile-tasks-item-detail-loading' vi.mock('./mobile-tasks-dependencies', async () => ({ @@ -60,6 +61,7 @@ async function mount(loadDetails = false) { itemState.readDetailPayload, itemState.reconcilePrFileConnection ) + const [itemCommentDraft, setItemCommentDraft] = useTaskCommentDraft(selection.actionItem) const mutation = useMobileTasksMutation() const [items, setItems] = useState([selected]) const [error, setError] = useState('') @@ -70,6 +72,8 @@ async function mount(loadDetails = false) { ...selection, ...mutation, ...itemState, + itemCommentDraft, + setItemCommentDraft, client, tasksSupported: true, setError, diff --git a/mobile/src/tasks/gitlab-check-summary.ts b/mobile/src/tasks/gitlab-check-summary.ts index b97d1998125..ca1e1319b05 100644 --- a/mobile/src/tasks/gitlab-check-summary.ts +++ b/mobile/src/tasks/gitlab-check-summary.ts @@ -1,13 +1,12 @@ import { gitLabPipelineToPRCheck, - mapGitLabPipelineJobStatusToCheckStatus, - mapGitLabPipelineJobStatusToConclusion + gitLabPipelineJobOutcome } from '../../../src/shared/source-control/checks/gitlab/gitlab-pipeline-checks' import { summarizeProviderChecks } from '../../../src/shared/source-control/checks/provider-check-summary' import type { ProviderCheckSummary } from '../../../src/shared/github/pull-request-types' import type { GitLabPipeline } from '../../../src/shared/gitlab-types' -type GitLabPipelineJobLike = { status: string } +type GitLabPipelineJobLike = { status: string; allowFailure?: boolean } export function buildGitLabCheckSummary( jobs: GitLabPipelineJobLike[], @@ -20,10 +19,5 @@ export function buildGitLabCheckSummary( scope: 'pipeline' } } - return summarizeProviderChecks( - jobs.map((job) => ({ - status: mapGitLabPipelineJobStatusToCheckStatus(job.status), - conclusion: mapGitLabPipelineJobStatusToConclusion(job.status) - })) - ) + return summarizeProviderChecks(jobs.map(gitLabPipelineJobOutcome)) } diff --git a/mobile/src/tasks/mobile-tasks-provider-detail-types.ts b/mobile/src/tasks/mobile-tasks-provider-detail-types.ts index c0ff759eaa2..6976859f1e6 100644 --- a/mobile/src/tasks/mobile-tasks-provider-detail-types.ts +++ b/mobile/src/tasks/mobile-tasks-provider-detail-types.ts @@ -246,14 +246,15 @@ export type DetailPayload = comments: DetailComment[] labels: string[] assignees: string[] - pipelineJobs: Array<{ + pipelineJobs: { id?: number name: string stage: string status: string + allowFailure?: boolean webUrl?: string | null duration?: number | null - }> + }[] } | { provider: 'linear' diff --git a/mobile/src/tasks/task-draft-rows.ts b/mobile/src/tasks/task-draft-rows.ts new file mode 100644 index 00000000000..9a9d25f0d89 --- /dev/null +++ b/mobile/src/tasks/task-draft-rows.ts @@ -0,0 +1,35 @@ +import { durableDraftRowKey } from '../drafts/durable-draft-rows' +import { useDurableDraftField } from '../drafts/durable-draft-fields' +import { githubTaskKey } from './github-task-identity' +import type { ActionableTaskItem } from './mobile-tasks-project-workspace-types' +import type { GitHubProjectRow } from './mobile-tasks-view-state-types' + +/** The item a status edit or refresh hands over as a new object is still the same item. */ +export function taskItemIdentity(item: ActionableTaskItem): string { + return item.provider === 'github' ? `github:${githubTaskKey(item.source)}` : item.key +} + +// Tasks rows are host-scoped (`''` worktree part); the shell binds the host. +function taskCommentDraftKey(id: string | null): string | null { + return id === null ? null : durableDraftRowKey('taskComment', '', id) +} + +const TASK_CREATE_DRAFT_KEY = durableDraftRowKey('taskCreate', '', '') + +/** The open item's comment box, kept per item. */ +export function useTaskCommentDraft(item: ActionableTaskItem | null) { + return useDurableDraftField(taskCommentDraftKey(item && taskItemIdentity(item)), 'text') +} + +/** A GitHub project row's comment box, kept per row. */ +export function useProjectRowCommentDraft(row: GitHubProjectRow | null) { + return useDurableDraftField(taskCommentDraftKey(row && `githubProject:${row.id}`), 'text') +} + +/** The New issue sheet's title and body, kept until a create succeeds and read only once the sheet opens. */ +export function useTaskCreateDraft(open: boolean) { + const key = open ? TASK_CREATE_DRAFT_KEY : null + const [createTitle, setCreateTitle] = useDurableDraftField(key, 'title') + const [createBody, setCreateBody] = useDurableDraftField(key, 'body') + return { createTitle, setCreateTitle, createBody, setCreateBody } +} diff --git a/mobile/src/tasks/task-item-detail-reply-schema.ts b/mobile/src/tasks/task-item-detail-reply-schema.ts index 951a41ab2be..e58a0ee5058 100644 --- a/mobile/src/tasks/task-item-detail-reply-schema.ts +++ b/mobile/src/tasks/task-item-detail-reply-schema.ts @@ -74,6 +74,7 @@ export const gitlabWorkItemDetailSchema = z name: z.string(), stage: z.string(), status: z.string(), + allowFailure: salvagedOptional('allowFailure', z.boolean()), webUrl: prNullableText('webUrl'), duration: salvagedOptional('duration', z.number().finite().nullable()) }) diff --git a/mobile/src/tasks/use-mobile-task-comment-send-outcome.ts b/mobile/src/tasks/use-mobile-task-comment-send-outcome.ts index f0225f11fe1..ac847f9fc26 100644 --- a/mobile/src/tasks/use-mobile-task-comment-send-outcome.ts +++ b/mobile/src/tasks/use-mobile-task-comment-send-outcome.ts @@ -5,7 +5,7 @@ import { useRef, useState } from './mobile-tasks-dependencies' -import { githubTaskKey } from './github-task-identity' +import { taskItemIdentity } from './task-draft-rows' import type { ActionableTaskItem } from './mobile-tasks-project-workspace-types' import type { DetailPayload } from './mobile-tasks-provider-detail-types' import { isRpcDeliveryUnknown } from '../transport/rpc/rpc-delivery-ambiguity' @@ -33,7 +33,7 @@ type CommentSendOutcome = { } function itemIdentity(item: ActionableTaskItem | null): string | null { - return item?.provider === 'github' ? githubTaskKey(item.source) : (item?.key ?? null) + return item && taskItemIdentity(item) } function sameCommentText(a: string, b: string): boolean { diff --git a/mobile/src/tasks/use-mobile-tasks-hosted-comment-review-actions.tsx b/mobile/src/tasks/use-mobile-tasks-hosted-comment-review-actions.tsx index b2399a1c5ee..21908343735 100644 --- a/mobile/src/tasks/use-mobile-tasks-hosted-comment-review-actions.tsx +++ b/mobile/src/tasks/use-mobile-tasks-hosted-comment-review-actions.tsx @@ -160,7 +160,7 @@ export function useMobileTasksHostedCommentReviewActions< finish() } }, - [claimPublication, client, itemCommentDraft, tryBeginMutation] + [claimPublication, client, itemCommentDraft, setItemCommentDraft, tryBeginMutation] ) const copyTaskLink = useCallback( diff --git a/mobile/src/tasks/use-mobile-tasks-item-state.tsx b/mobile/src/tasks/use-mobile-tasks-item-state.tsx index 09470fdf41a..c20f71c2f7c 100644 --- a/mobile/src/tasks/use-mobile-tasks-item-state.tsx +++ b/mobile/src/tasks/use-mobile-tasks-item-state.tsx @@ -27,7 +27,6 @@ export function useMobileTasksItemState() { }, []) const [itemTitleDraft, setItemTitleDraft] = useState('') const [itemBodyDraft, setItemBodyDraft] = useState('') - const [itemCommentDraft, setItemCommentDraft] = useState('') const [itemAddLabelsDraft, setItemAddLabelsDraft] = useState('') const [itemRemoveLabelsDraft, setItemRemoveLabelsDraft] = useState('') const [itemAddAssigneesDraft, setItemAddAssigneesDraft] = useState('') @@ -110,8 +109,6 @@ export function useMobileTasksItemState() { setItemTitleDraft, itemBodyDraft, setItemBodyDraft, - itemCommentDraft, - setItemCommentDraft, itemAddLabelsDraft, setItemAddLabelsDraft, itemRemoveLabelsDraft, diff --git a/mobile/src/tasks/use-mobile-tasks-linear-item-actions.tsx b/mobile/src/tasks/use-mobile-tasks-linear-item-actions.tsx index b1ff0216e05..c5c85a0ee1a 100644 --- a/mobile/src/tasks/use-mobile-tasks-linear-item-actions.tsx +++ b/mobile/src/tasks/use-mobile-tasks-linear-item-actions.tsx @@ -81,7 +81,7 @@ export function useMobileTasksLinearItemActions< finish() } }, - [client, linearCommentDraft, tryBeginMutation] + [client, linearCommentDraft, setLinearCommentDraft, tryBeginMutation] ) const openLinearSubIssue = useCallback( diff --git a/mobile/src/tasks/use-mobile-tasks-list-and-detail-effects.tsx b/mobile/src/tasks/use-mobile-tasks-list-and-detail-effects.tsx index da5a090f2fa..1c5aaeccc21 100644 --- a/mobile/src/tasks/use-mobile-tasks-list-and-detail-effects.tsx +++ b/mobile/src/tasks/use-mobile-tasks-list-and-detail-effects.tsx @@ -1,4 +1,5 @@ import { githubTaskKey } from './github-task-identity' +import { taskItemIdentity } from './task-draft-rows' import { translate } from '../i18n/mobile-i18n' import type { ProjectLoadingActionsModel } from './use-mobile-tasks-project-loading-actions' import { @@ -52,7 +53,6 @@ export function useMobileTasksListAndDetailEffects(model: ProjectLoadingActionsM setError, setGithubProjectError, setGithubRepoSlugCache, - setLinearCommentDraft, setLinearStates, setLinearStatesError, setLinearStatesLoading, @@ -246,7 +246,6 @@ export function useMobileTasksListAndDetailEffects(model: ProjectLoadingActionsM const linearMetadataKey = linearMetadataItem?.key ?? null useEffect(() => { - setLinearCommentDraft('') setLinearSubIssueTitle('') }, [linearMetadataKey]) @@ -315,7 +314,6 @@ export function useMobileTasksItemSelectionEffects( | 'setItemAddAssigneesDraft' | 'setItemAddLabelsDraft' | 'setItemBodyDraft' - | 'setItemCommentDraft' | 'setItemRemoveAssigneesDraft' | 'setItemRemoveLabelsDraft' | 'setItemReplyDrafts' @@ -333,7 +331,6 @@ export function useMobileTasksItemSelectionEffects( setItemAddAssigneesDraft, setItemAddLabelsDraft, setItemBodyDraft, - setItemCommentDraft, setItemRemoveAssigneesDraft, setItemRemoveLabelsDraft, setItemReplyDrafts, @@ -341,8 +338,7 @@ export function useMobileTasksItemSelectionEffects( setItemTitleDraft, setPrFileCommentDrafts } = model - const actionIdentity = - actionItem?.provider === 'github' ? githubTaskKey(actionItem.source) : actionItem?.key + const actionIdentity = actionItem && taskItemIdentity(actionItem) const fileRevision = model.detailPayload?.provider === 'github' @@ -357,10 +353,10 @@ export function useMobileTasksItemSelectionEffects( }, [actionIdentity, client, fileRevision, resetPrFiles]) // Keyed on identity: status edits, refreshes and reconnects hand over a new object for the same item. + // The comment box is not reset: it is kept per item in its draft row. useEffect(() => { setItemTitleDraft(actionItem?.title ?? '') setItemBodyDraft('') - setItemCommentDraft('') setItemAddLabelsDraft('') setItemRemoveLabelsDraft('') setItemAddAssigneesDraft('') diff --git a/mobile/src/tasks/use-mobile-tasks-project-detail-loading.tsx b/mobile/src/tasks/use-mobile-tasks-project-detail-loading.tsx index 35fbe3e4e86..c7a950ce7c4 100644 --- a/mobile/src/tasks/use-mobile-tasks-project-detail-loading.tsx +++ b/mobile/src/tasks/use-mobile-tasks-project-detail-loading.tsx @@ -20,7 +20,6 @@ export function useMobileTasksProjectDetailLoading< | 'setPrFileCommentDrafts' | 'resetPrFiles' | 'setProjectBodyDraft' - | 'setProjectCommentDraft' | 'setProjectEditingCommentDraft' | 'setProjectEditingCommentId' | 'setProjectFieldDrafts' @@ -42,7 +41,6 @@ export function useMobileTasksProjectDetailLoading< setPrFileCommentDrafts, resetPrFiles, setProjectBodyDraft, - setProjectCommentDraft, setProjectEditingCommentDraft, setProjectEditingCommentId, setProjectFieldDrafts, @@ -57,11 +55,11 @@ export function useMobileTasksProjectDetailLoading< resetPrFiles() }, [projectRowItem, client, projectRowDetailRefreshSeq, resetPrFiles]) // Keyed on row id: field edits, merges and reconnects hand over a new object for the same row. + // The comment box is not reset: it is kept per row in its draft row. const projectRowId = projectRowItem?.id ?? null useEffect(() => { setProjectTitleDraft(projectRowItem?.content.title ?? '') setProjectBodyDraft(projectRowItem?.content.body ?? '') - setProjectCommentDraft('') setProjectEditingCommentId(null) setProjectEditingCommentDraft('') setProjectReviewersDraft('') diff --git a/mobile/src/tasks/use-mobile-tasks-project-workspace-comment-actions.tsx b/mobile/src/tasks/use-mobile-tasks-project-workspace-comment-actions.tsx index f606200946d..3640476072c 100644 --- a/mobile/src/tasks/use-mobile-tasks-project-workspace-comment-actions.tsx +++ b/mobile/src/tasks/use-mobile-tasks-project-workspace-comment-actions.tsx @@ -233,7 +233,7 @@ export function useMobileTasksProjectWorkspaceCommentActions(model: WorkspaceCre setProjectMutating(false) } }, - [activeGitHubProjectHost, client, projectCommentDraft, projectMutating] + [activeGitHubProjectHost, client, projectCommentDraft, projectMutating, setProjectCommentDraft] ) const updateProjectRowComment = useCallback( diff --git a/mobile/src/tasks/use-mobile-tasks-route-and-item-state.tsx b/mobile/src/tasks/use-mobile-tasks-route-and-item-state.tsx index 2d4e4b8e826..70aaa0eb0a9 100644 --- a/mobile/src/tasks/use-mobile-tasks-route-and-item-state.tsx +++ b/mobile/src/tasks/use-mobile-tasks-route-and-item-state.tsx @@ -50,6 +50,7 @@ import { } from './mobile-tasks-legacy-foundation' import { getTaskPresetQuery } from '../../../src/shared/work-items/task-preset-query' import { useMobileTasksItemState } from './use-mobile-tasks-item-state' +import { useTaskCommentDraft, useTaskCreateDraft } from './task-draft-rows' import { useMobileJiraConnectionState } from './use-mobile-jira-connection-state' import type { JiraIssueFilter } from '../../../src/shared/jira/jira-types' @@ -165,8 +166,8 @@ export function useMobileTasksRouteAndItemState() { const [showGitHubPagePicker, setShowGitHubPagePicker] = useState(false) const [showCreateTask, setShowCreateTask] = useState(false) const [showCreateTargetPicker, setShowCreateTargetPicker] = useState(false) - const [createTitle, setCreateTitle] = useState('') - const [createBody, setCreateBody] = useState('') + const { createTitle, setCreateTitle, createBody, setCreateBody } = + useTaskCreateDraft(showCreateTask) const [createRepoId, setCreateRepoId] = useState(null) const [createTeamId, setCreateTeamId] = useState(null) const [linearTeams, setLinearTeams] = useState([]) @@ -186,6 +187,7 @@ export function useMobileTasksRouteAndItemState() { itemState.readDetailPayload, itemState.reconcilePrFileConnection ) + const [itemCommentDraft, setItemCommentDraft] = useTaskCommentDraft(itemSelection.actionItem) const [mergeMethodTaskItem, setMergeMethodTaskItem] = useState< Extract | Extract | null >(null) @@ -360,7 +362,9 @@ export function useMobileTasksRouteAndItemState() { setPendingProjectGitHubMerge, pendingHostedStateChange, setPendingHostedStateChange, - ...itemState + ...itemState, + itemCommentDraft, + setItemCommentDraft } } diff --git a/mobile/src/tasks/use-mobile-tasks-task-create-actions.tsx b/mobile/src/tasks/use-mobile-tasks-task-create-actions.tsx index 59e08b80ce2..d794ab4f4f1 100644 --- a/mobile/src/tasks/use-mobile-tasks-task-create-actions.tsx +++ b/mobile/src/tasks/use-mobile-tasks-task-create-actions.tsx @@ -141,8 +141,9 @@ export function useMobileTasksTaskCreateActions(model: LinearItemActionsModel) { ) } setShowCreateTask(false) - setCreateTitle('') - setCreateBody('') + // Text typed while the create ran, here or in a reopened sheet, is not what it sent. + setCreateTitle((current) => (current === createTitle ? '' : current)) + setCreateBody((current) => (current === createBody ? '' : current)) await loadTasks({ silent: true }) } catch (err) { setError(err instanceof Error ? err.message : 'Failed to create task') diff --git a/mobile/src/tasks/use-mobile-tasks-workspace-and-project-state.tsx b/mobile/src/tasks/use-mobile-tasks-workspace-and-project-state.tsx index 6f9ba1e71d5..c557bd86ec4 100644 --- a/mobile/src/tasks/use-mobile-tasks-workspace-and-project-state.tsx +++ b/mobile/src/tasks/use-mobile-tasks-workspace-and-project-state.tsx @@ -2,6 +2,7 @@ import { useRef, useCallback } from 'react' import { useBottomDrawerFollowUp } from '../components/bottom-drawer/use-bottom-drawer-follow-up' import type { RouteAndItemStateModel } from './use-mobile-tasks-route-and-item-state' import type { WorkspaceSshRecord } from './workspace-ssh-gate' +import { useProjectRowCommentDraft, useTaskCommentDraft } from './task-draft-rows' import { type BaseRefSearchResult, type GitHubProjectPartialFailure, @@ -86,7 +87,9 @@ export function useMobileTasksWorkspaceAndProjectState(model: RouteAndItemStateM const [linearStates, setLinearStates] = useState([]) const [linearStatesLoading, setLinearStatesLoading] = useState(false) const [linearStatesError, setLinearStatesError] = useState('') - const [linearCommentDraft, setLinearCommentDraft] = useState('') + const [linearCommentDraft, setLinearCommentDraft] = useTaskCommentDraft( + model.actionItem?.provider === 'linear' ? model.actionItem : null + ) const [linearSubIssueTitle, setLinearSubIssueTitle] = useState('') const [taskStateHydrated, setTaskStateHydrated] = useState(false) const [runtimeTaskSettings, setRuntimeTaskSettings] = useState({}) @@ -131,7 +134,7 @@ export function useMobileTasksWorkspaceAndProjectState(model: RouteAndItemStateM const [projectRowDetailRefreshSeq, setProjectRowDetailRefreshSeq] = useState(0) const [projectTitleDraft, setProjectTitleDraft] = useState('') const [projectBodyDraft, setProjectBodyDraft] = useState('') - const [projectCommentDraft, setProjectCommentDraft] = useState('') + const [projectCommentDraft, setProjectCommentDraft] = useProjectRowCommentDraft(projectRowItem) const [projectEditingCommentId, setProjectEditingCommentId] = useState(null) const [projectEditingCommentDraft, setProjectEditingCommentDraft] = useState('') const [projectReviewersDraft, setProjectReviewersDraft] = useState('') diff --git a/mobile/src/terminal/session/MobileTerminalInputActions.tsx b/mobile/src/terminal/session/MobileTerminalInputActions.tsx index cba804c7220..3730693bdad 100644 --- a/mobile/src/terminal/session/MobileTerminalInputActions.tsx +++ b/mobile/src/terminal/session/MobileTerminalInputActions.tsx @@ -1,5 +1,12 @@ -import { ActivityIndicator, Pressable, type StyleProp, type ViewStyle } from 'react-native' -import { ImagePlus, Mic } from 'lucide-react-native' +import { useContext, type RefObject } from 'react' +import { + ActivityIndicator, + Pressable, + type StyleProp, + type View, + type ViewStyle +} from 'react-native' +import { ImagePlus } from 'lucide-react-native' import { colors } from '../../theme/mobile-theme' import { COMPOSER_CONTROL_HIT_SLOP, @@ -8,6 +15,13 @@ import { import { useMobileTranslation } from '../../i18n/use-mobile-translation' import { useMobileColorScheme } from '../../theme/use-mobile-color-scheme' import { keepHeldPressThroughLongPress } from '../../platform/held-press-long-press' +import { dictationControlsCopy } from '../../dictation/mobile-dictation-controls-copy' +import { useMobileDictationCancelDrop } from '../../dictation/use-mobile-dictation-cancel-drop' +import { + MobileDictationMicIcon, + MobileDictationRetryButton +} from '../../dictation/MobileDictationLiveControls' +import { MobileDictationLiveContext } from '../../dictation/mobile-dictation-live-context' type DictationState = { readonly isStarting: boolean @@ -21,8 +35,9 @@ type MobileTerminalDictationButtonProps = { readonly dictationMode: string | undefined readonly dictationEnabled?: boolean readonly buttonStyle: StyleProp - readonly activeButtonStyle: StyleProp readonly disabledButtonStyle: StyleProp + // The ✕ on the field that a held mic may be released over. + readonly dictationCancelRef: RefObject readonly onDictationToggle: () => void readonly onDictationPressIn: () => void readonly onDictationPressOut: () => void @@ -42,10 +57,21 @@ type MobileTerminalInputActionsProps = MobileTerminalDictationButtonProps & MobileTerminalAttachButtonProps export function MobileTerminalInputActions(props: MobileTerminalInputActionsProps) { + const { isStarting, isRecording, isProcessing } = props.dictation + const live = useContext(MobileDictationLiveContext) + // A kept failure is cleared by every start and Retry, so it never shows while dictating. + const failureReason = live?.failureReason ?? null + // Attach steps aside while dictating or holding a failed recording, so the field gets the room. return ( <> - - + {isStarting || isRecording || isProcessing || failureReason !== null ? null : ( + + )} + {failureReason !== null && live ? ( + + ) : ( + + )} ) } @@ -98,15 +124,20 @@ function MobileTerminalDictationButton({ dictationMode, dictationEnabled = true, buttonStyle, - activeButtonStyle, disabledButtonStyle, + dictationCancelRef, onDictationToggle, onDictationPressIn, onDictationPressOut, onDictationCancel }: MobileTerminalDictationButtonProps) { useMobileColorScheme() - const t = useMobileTranslation() + useMobileTranslation() + const release = useMobileDictationCancelDrop( + dictationCancelRef, + onDictationCancel, + onDictationPressOut + ) if (!dictationEnabled) { return null } @@ -117,7 +148,6 @@ function MobileTerminalDictationButton({ [ buttonStyle, - dictationActive && activeButtonStyle, pressed && composerInputStyles.pressed, micDisabled && disabledButtonStyle ]} @@ -125,7 +155,7 @@ function MobileTerminalDictationButton({ hitSlop={COMPOSER_CONTROL_HIT_SLOP} onPress={dictationMode === 'toggle' ? onDictationToggle : undefined} onPressIn={dictationMode === 'hold' ? onDictationPressIn : undefined} - onPressOut={dictationMode === 'hold' ? onDictationPressOut : undefined} + onPressOut={dictationMode === 'hold' ? release : undefined} onLongPress={ dictationMode === 'toggle' ? () => { @@ -137,28 +167,18 @@ function MobileTerminalDictationButton({ } accessibilityRole="button" aria-busy={dictation.isStarting || dictation.isProcessing} - accessibilityLabel={ - dictation.isRecording - ? t('session.terminalInputActions.stopDictation', 'Stop voice dictation') - : dictation.isProcessing - ? t( - 'session.terminalInputActions.transcribingDictation', - 'Transcribing voice dictation' - ) - : dictation.isStarting - ? t('session.terminalInputActions.startingDictation', 'Starting voice dictation') - : t('session.terminalInputActions.startDictation', 'Start voice dictation') - } + accessibilityLabel={dictationControlsCopy.mic({ + starting: dictation.isStarting, + active: dictationActive, + processing: dictation.isProcessing + })} > - {dictation.isProcessing ? ( - - ) : ( - - )} + ) } diff --git a/mobile/src/terminal/session/MobileTerminalLiveInputStatus.tsx b/mobile/src/terminal/session/MobileTerminalLiveInputStatus.tsx index 5dff7a4700d..45d018b21eb 100644 --- a/mobile/src/terminal/session/MobileTerminalLiveInputStatus.tsx +++ b/mobile/src/terminal/session/MobileTerminalLiveInputStatus.tsx @@ -1,5 +1,5 @@ +import { useContext, type RefObject } from 'react' import { Text, View } from 'react-native' -import type { UseMobileDictationResult } from '../../hooks/mobile-dictation-session-state' import { colors, radii, spacing, typography } from '../../theme/mobile-theme' import { useMobileColorScheme } from '../../theme/use-mobile-color-scheme' import { useMobileTranslation } from '../../i18n/use-mobile-translation' @@ -9,58 +9,91 @@ import { mobileDictationStatusTitle, type MobileDictationStatusFlags } from '../../dictation/MobileDictationStatusAnnouncement' -import { MobileDictationGrapes, MobileDictationTimer } from '../../dictation/MobileDictationMeter' +import { MobileDictationLiveContext } from '../../dictation/mobile-dictation-live-context' +import { + MobileDictationCancelButton, + MobileDictationFailureNote, + MobileDictationFinishingNote, + MobileDictationRecordingMeter +} from '../../dictation/MobileDictationLiveControls' type MobileTerminalLiveInputStatusProps = { - readonly dictation: MobileDictationStatusFlags & Pick + readonly dictation: MobileDictationStatusFlags + readonly cancelRef: RefObject readonly dictationMode: string | undefined readonly isAttaching: boolean // Words heard so far that will be typed into this terminal. readonly heard: string } -/** Shows transient recording/upload status over the field without intercepting its touches. */ +/** Shows transient recording/upload status over the field; only its ✕ takes touches. */ export function MobileTerminalLiveInputStatus({ dictation, + cancelRef, dictationMode, isAttaching, heard }: MobileTerminalLiveInputStatusProps) { useMobileColorScheme() const t = useMobileTranslation() + const live = useContext(MobileDictationLiveContext) const dictationTitle = mobileDictationStatusTitle(dictation) - if (!dictationTitle && !isAttaching) { - return null + if (live?.failureReason != null) { + return ( + + + + + + + ) + } + if (!dictationTitle) { + return isAttaching ? ( + + + {t('session.terminalLiveInputStatus.uploadingImageTitle', 'Uploading image')} + + + + {t('session.terminalLiveInputStatus.uploadingImage', 'Uploading image to host')} + + + + ) : null } - const title = - dictationTitle ?? t('session.terminalLiveInputStatus.uploadingImageTitle', 'Uploading image') // Live input can't type into the terminal until the text is final, so the newest words show here. const detail = heard || (dictation.isRecording ? dictationMode === 'hold' ? t('session.terminalLiveInputStatus.releaseMicHint', 'Release mic to stop') - : t('session.terminalLiveInputStatus.stopHint', 'Tap mic to stop') - : dictation.isProcessing - ? t('session.terminalLiveInputStatus.transcribing', 'Transcribing on desktop') - : dictation.isStarting - ? t('session.terminalLiveInputStatus.preparingMic', 'Preparing microphone') - : t('session.terminalLiveInputStatus.uploadingImage', 'Uploading image to host')) - + : dictationTitle + : dictation.isStarting + ? t('session.terminalLiveInputStatus.preparingMic', 'Preparing microphone') + : '') return ( - - - {title} - - {dictation.isRecording ? : null} - - - {detail} - - - {dictation.isRecording ? ( - + + {live ? ( + ) : null} + + + + {detail} + + + {live === null ? null : dictation.isRecording ? ( + + ) : dictation.isProcessing ? ( + + ) : null} + ) } @@ -80,6 +113,17 @@ const styles = themedStyleSheet(() => ({ borderRadius: radii.pill, backgroundColor: colors.bgRaised }, + // The ✕ hugs the field's left edge, the way the mock's cancel sits in the pill. + dictating: { + paddingLeft: 4 + }, + dictationLine: { + flex: 1, + minWidth: 0, + flexDirection: 'row', + alignItems: 'center', + gap: spacing.sm + }, title: { color: colors.textPrimary, fontSize: typography.metaSize, diff --git a/mobile/src/terminal/session/TerminalPaneView.tsx b/mobile/src/terminal/session/TerminalPaneView.tsx index a063818cc14..5cacb727223 100644 --- a/mobile/src/terminal/session/TerminalPaneView.tsx +++ b/mobile/src/terminal/session/TerminalPaneView.tsx @@ -10,12 +10,12 @@ import { useMobileColorScheme } from '../../theme/use-mobile-color-scheme' import type { TerminalFrame } from '../terminal-webview-messages' import { TerminalWebView } from '../TerminalWebView' import type { - MobileTerminalTheme, TerminalKeyboardAvoidanceMetrics, TerminalModes, TerminalPointerInput, TerminalWebViewHandle } from '../terminal-webview-contract' +import type { RuntimeMobileTerminalTheme } from '../../../../src/shared/runtime-mobile-session-tab-contracts' type TerminalPaneViewProps = { handle: string @@ -28,9 +28,11 @@ type TerminalPaneViewProps = { title?: string onFrame?: (handle: string, frame: TerminalFrame) => void keyboardLift: number - terminalTheme?: MobileTerminalTheme + terminalTheme?: RuntimeMobileTerminalTheme textScale: number onRef: (handle: string, ref: TerminalWebViewHandle | null) => void + // Must keep one identity: the pane reports its document gone when it unmounts. + onDocumentReleased: (handle: string) => void onWebReady: (handle: string) => void onSelectionMode: (handle: string, active: boolean) => void onSelectionCopy: (handle: string, text: string) => void @@ -63,6 +65,7 @@ export function TerminalPaneView({ terminalTheme, textScale, onRef, + onDocumentReleased, onWebReady, onSelectionMode, onSelectionCopy, @@ -82,10 +85,7 @@ export function TerminalPaneView({ }: TerminalPaneViewProps) { useMobileColorScheme() const t = useMobileTranslation() - const [visited, setVisited] = useState(visible) - if (visible && !visited) { - setVisited(true) - } + useEffect(() => () => onDocumentReleased(handle), [handle, onDocumentReleased]) const [routeFocused, setRouteFocused] = useState(false) useFocusEffect( useCallback(() => { @@ -113,13 +113,9 @@ export function TerminalPaneView({ ? terminalPaneKeyboardLayout(splitFrame, splitDirection, splitIndex, keyboardInset) : null - if (!visible && !visited) { - return null - } - return (