Skip to content

fix(desktop): realign eight renderer contract tests with the remote-session gates - #1567

Merged
vastsa merged 1 commit into
mainfrom
fix/renderer-test-drift
Oct 11, 2026
Merged

vastsa merged 1 commit into
mainfrom
fix/renderer-test-drift

Conversation

@vastsa

@vastsa vastsa commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Why

The main CI JS build / typecheck / lint / architecture / test job has failed on
the same nine cases since the remote-projects integration (c771a6824) landed:
eight renderer source-contract tests still pinned the pre-remote text, and three
transpile harnesses crashed because they did not declare the imports the
components under test gained. This is the failure visible on every run of main
since f24984d6; it is not introduced by any single PR.

What changed

Only tests under apps/desktop/test/. No renderer or main-process behavior
changes.

  • plan-mode-source-contract, plan-renderer-flow: controlsBlocked now also
    requires the session's canConfigureModel capability. The guard still starts
    from approvalPending || nativeSession.
  • native-pi-sessions: model readiness now branches on remoteSession ? promptAllowed : nativeSession ? activeSessionSummary.capabilities…; the
    expression harness passes the two new bindings and adds the remote cases
    (a remote session reads its own prompt capability and never a local provider).
  • transcript-style: editableUserMessage now also requires
    canEditMessages; delete/edit still stay on user rows.
  • subagent-transcript: the delegation row's onClick is now guarded by
    localToolsAllowed before openSubagentTab(...).
  • session-message-presentation, session-reference-ui,
    tool-row-file-refs: declare remote-session-safety (the real module),
    use-slots, and use-chat-session-capability, and give the recorded store
    the sessions array the components read.

Validation

Base origin/main 06c04e99d; candidate 7b037ef9f.

  • All nine previously failing cases pass.
  • Full desktop suite: 3785/3785 pass (node --test test/*.test.mjs). One case
    (settings-inline-import-user-path) needs the out/renderer build output
    that build:js produces in CI; it passes in the worktree once that artifact
    is present.
  • tsc -p tsconfig.json --noEmit clean; biome lint clean.

…ession gates

The remote-projects integration (c771a68) added remote-session safety arms to
the renderer but left the source-contract tests pinning the old text, so the
main JS job has failed on the same nine cases since that merge: three
transpile harnesses (`session-message-presentation`, `session-reference-ui`,
`tool-row-file-refs`) did not declare the new `remote-session-safety`,
`use-slots`, and `use-chat-session-capability` imports and then crashed while
loading the component under test.

Every guard keeps its intent and now also covers the remote arm:

- composer control gating still starts from `approvalPending || nativeSession`
  and additionally requires the session's own `canConfigureModel` capability
- native model readiness still reads `activeSessionSummary.capabilities`, with
  a remote session reading its own `promptAllowed` and never a local provider
- only user rows stay editable, now also behind `canEditMessages`
The three harness tests also gained the `sessions` store field the components
now read.
  behavior under test depends on them

The three harness tests also gained the `sessions` store field the components
now read.

Refs #1560
Copilot AI balanced review requested due to automatic review settings October 11, 2026 14:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vastsa
vastsa merged commit 9d3273f into main Oct 11, 2026
5 checks passed
@vastsa
vastsa deleted the fix/renderer-test-drift branch October 11, 2026 14:45

This branch was previously deployed

1 inactive deployment
Preview — 7b037ef9 Deployed Oct 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants