feat: add exact snapshot preview - #97
Merged
Merged
Conversation
luhe19001
marked this pull request as draft
August 18, 2026 14:23
luhe19001
force-pushed
the
feature/t2-c2-exact-preview
branch
3 times, most recently
from
August 18, 2026 15:39
579db39 to
0d5c113
Compare
luhe19001
marked this pull request as ready for review
August 18, 2026 15:40
luhe19001
force-pushed
the
feature/t2-c2-exact-preview
branch
from
August 18, 2026 15:59
0d5c113 to
1d90ea8
Compare
Publish the snapshot-preview/v1 adapter and exact-byte parity helpers, expose a revision-bound local preview API, and add the See what gets shared dialog with privacy and failure states. Verification: go test ./..., go vet ./..., frontend tests/build/lint/format, and pinned server snapshot conformance.
luhe19001
force-pushed
the
feature/t2-c2-exact-preview
branch
from
August 18, 2026 16:14
1d90ea8 to
1ad93b1
Compare
calvintvu
reviewed
Aug 18, 2026
calvintvu
reviewed
Aug 18, 2026
calvintvu
reviewed
Aug 18, 2026
calvintvu
reviewed
Aug 18, 2026
calvintvu
approved these changes
Aug 18, 2026
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.
What this changes
This PR adds an exact, local preview of the session snapshot that a future Team sharing flow will upload. The preview is created before any data leaves the machine and from the selected saved session revision.
What users see
The normal local-only experience is unchanged: no sharing button is shown.
When the development test entry point is enabled, a session has a Team sharing preview action. The dialog is labeled PREVIEW ONLY · TEAM FEATURE and shows:
Other sensitive text can remain in the bounded
firstPrompt, so the dialog shows its exact value for review rather than claiming that every possible credential format is removed.The preview blocks approval when the snapshot is invalid, uses an unsupported format, no longer matches the selected revision, or exceeds the 256 KiB payload limit. This PR does not provide an approval or upload action.
Implementation boundary
The local collector owns this preview because both the session source and the existing
session-snapshot/v1serializer are local. The collector serializes the snapshot once, and the preview decodes those same bytes for display. A future Team sharing flow must upload those unchanged, already-reviewed bytes.This PR includes:
/api/share-previewendpoint for one session ID and revision;snapshot-preview/v1response and its fail-closed states;This PR does not include Team eligibility, authentication, destination selection, multi-session selection, consent submission, upload, retry, or success navigation. Those belong to the production Team sharing flow that will consume this preview.
Try the preview
collector/, runmake run.frontend/, runnpm run dev.http://127.0.0.1:5173/?team-preview=1.Remove
?team-preview=1to confirm that the local-only UI contains no sharing action.Verification
go test ./...go vet ./...c0fabc8Follow-up requirement
The production Team sharing flow must open this controlled preview only after the user enters a sharing flow and selects what to share. It must upload the exact canonical bytes the user reviewed, rather than rebuilding the snapshot.