Repository navigation
fix(desktop): realign eight renderer contract tests with the remote-session gates - #1567
Merged
Merged
Conversation
…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
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The main CI
JS build / typecheck / lint / architecture / testjob has failed onthe 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
mainsince
f24984d6; it is not introduced by any single PR.What changed
Only tests under
apps/desktop/test/. No renderer or main-process behaviorchanges.
plan-mode-source-contract,plan-renderer-flow:controlsBlockednow alsorequires the session's
canConfigureModelcapability. The guard still startsfrom
approvalPending || nativeSession.native-pi-sessions: model readiness now branches onremoteSession ? promptAllowed : nativeSession ? activeSessionSummary.capabilities…; theexpression 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:editableUserMessagenow also requirescanEditMessages; delete/edit still stay on user rows.subagent-transcript: the delegation row'sonClickis now guarded bylocalToolsAllowedbeforeopenSubagentTab(...).session-message-presentation,session-reference-ui,tool-row-file-refs: declareremote-session-safety(the real module),use-slots, anduse-chat-session-capability, and give the recorded storethe
sessionsarray the components read.Validation
Base
origin/main06c04e99d; candidate7b037ef9f.node --test test/*.test.mjs). One case(
settings-inline-import-user-path) needs theout/rendererbuild outputthat
build:jsproduces in CI; it passes in the worktree once that artifactis present.
tsc -p tsconfig.json --noEmitclean;biome lintclean.