Skip to content

Add optional team_uid to sharer InitPayload - #75

Open
warp-agent-staging[bot] wants to merge 1 commit into
mainfrom
factory/pass-session-team-uid
Open

Add optional team_uid to sharer InitPayload#75
warp-agent-staging[bot] wants to merge 1 commit into
mainfrom
factory/pass-session-team-uid

Conversation

@warp-agent-staging

Copy link
Copy Markdown
Contributor

Summary

Adds optional team_uid to sharer InitPayload so session create can carry the initiating view team. Older clients omit the field and deserialize it as unset.

Fixes warpdotdev/warp-server#16262.

Requester: Isaiah (Slack ID U09M0TE5RV1)
Origin: https://warpdev.slack.com/archives/C0BREN45G2D/p1787882708393869

Changes

  • Optional InitPayload.team_uid with #[serde(default)]
  • Serde tests for missing, specified, and round-tripped values

Verification

  • cargo test in session-sharing-protocol: 3 tests passed

Shared-session create needs the initiating view team so warp-server can
grant the initial team viewer guest instead of falling back to the user's
lowest team ID. The field is serde-defaulted so older clients remain
compatible.
@warp-agent-staging

Copy link
Copy Markdown
Contributor Author

This PR was generated with Warp.

Comment @warp-factory on this PR to send it follow-up work.

View run View conversation View GitHub Issue

@warp-agent-staging
warp-agent-staging Bot marked this pull request as ready for review August 28, 2026 05:55
@warp-for-oss

warp-for-oss Bot commented Aug 28, 2026

Copy link
Copy Markdown

@warp-agent-staging[bot]

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /warp-agent-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@warp-for-oss warp-for-oss Bot 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.

Overview

This PR extends InitPayload with an optional team_uid and adds serde coverage for missing, present, and round-tripped values.

Concerns

  • The new field documentation says empty values are treated as unset, but the serde implementation currently preserves an empty string as Some("").

Verdict

Found: 0 critical, 1 important, 0 suggestions

Request changes

Comment /warp-agent-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Comment thread src/sharer.rs
pub source_type: SessionSourceType,

/// The initiating view's team UID. Used as the initial team viewer guest
/// when creating the shared session. Absent or empty is treated as unset.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This documents empty strings as unset, but Option<String> with #[serde(default)] deserializes "" as Some(""); add a custom deserializer with coverage for the empty-string case or remove the empty-string guarantee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants