Add selected collaborators to session visibility - #2474
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 20eee8ba-b9cd-41ef-9358-30ba5f67ebf3
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Generated RPC documentation still describes the obsolete repository-reader visibility contract.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
scripts/codegen/utils.ts — This bridge updates only the definition-level status text, so regenerated public APIs still publish… |
What changed in this PR
Adds selected-collaborator session visibility support to generated TypeScript and Rust RPC APIs.
Changes:
- Adds an interim schema bridge and generated collaborator fields.
- Tests absent, empty, and populated Rust wire shapes.
- Makes Rust snapshot scripts Bash 3 compatible.
| File | Description |
|---|---|
scripts/codegen/utils.ts |
Adds the visibility schema bridge. |
scripts/codegen/typescript.ts |
Applies the bridge to TypeScript generation. |
scripts/codegen/rust.ts |
Applies the bridge to Rust generation. |
nodejs/src/generated/rpc.ts |
Exposes collaborator fields in TypeScript. |
nodejs/test/shared-codegen.test.ts |
Tests schema augmentation. |
rust/src/generated/api_types.rs |
Exposes collaborator fields in Rust. |
rust/tests/api_types_test.rs |
Tests collaborator wire shapes. |
rust/tests/e2e/rpc_session_state_extras.rs |
Updates an existing request literal. |
rust/scripts/snapshot-bundled-cli-version.sh |
Replaces associative hash storage. |
rust/scripts/snapshot-bundled-in-process-version.sh |
Replaces associative integrity storage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| const status = requestSchema.properties?.status; | ||
| if ( | ||
| status && | ||
| typeof status === "object" && | ||
| status.description === LEGACY_VISIBILITY_SET_STATUS_DESCRIPTION |
|
I moved this PR to draft for tracking. Thanks for pushing on richer session-sharing controls — that is a reasonable product direction. The pinned runtime/schema does not currently expose |
|
Closing at the author's request; continuing local branch-only validation. |

Summary
Extend the experimental session visibility contract with explicit collaborator access.
collaboratorLoginstoVisibilitySetRequest,VisibilityGetResult, andVisibilitySetResult.SessionVisibilityStatusunchanged.reporepresents repository collaborators with push access, whileunsharedplus a non-empty collaborator list represents selected-person sharing.Validation
cargo +nightly-2026-04-14 fmt --checkCOPILOT_SKIP_CLI_DOWNLOAD=1 cargo clippy --all-features --all-targets -- -D warnings/bin/bash3.2The pinned
@github/copilot@1.0.83-1tarball was unavailable from the local registry, so a full codegen rerun could not complete locally. The same missing runtime stopped the bundled-runtime-dependentcli_resolution_test::stale_env_override_falls_throughafter the preceding Rust suites passed.