Repository navigation
fix(canvas): match the Hub share-link contract - #500
Merged
Merged
Conversation
Use Hub share UUIDs, public addresses and link permissions. Keep the displayed Build pinned and refresh in-progress exports without reporting completion early. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove cached and recovery links on a hidden-target read, while keeping mutation failures distinct. Reject delayed pages from the discarded scope. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Clear cached URLs when Hub cannot confirm the target, keep reader addresses unmodified, and compare links by value when an Open and a refresh overlap. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Do not interpret a partial refresh as removing a previously loaded link. Update known statuses as pages arrive and discard unseen links only after a complete refresh. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A later pagination failure discards earlier revocation or URL updates, leaving stale share links available to copy.
1 open issue
1 file not reviewed
.github/extensions/replica-prototype/assets/renderer.js: Generated file
What changed in this PR
Aligns Canvas sharing with the Hub API introduced in #485, allowing connected users to manage links pinned to the displayed published Build.
Changes:
- Adopts UUIDs, Hub-provided URLs, permissions, and revocation responses.
- Displays export states, refreshes pending links, and clears cached links after access denial.
- Updates regression coverage, stories, and documentation.
| File | Description |
|---|---|
hub/test/canvas/share-links-client/index.db.test.ts |
Tests Build-pinned sharing through Hub. |
hub/docs/prototype-canvas.md |
Documents the updated sharing contract. |
hub/client/hooks/use-canvas-share-links/types.ts |
Reuses Hub contract types. |
hub/client/hooks/use-canvas-share-links/index.ts |
Updates revocation, polling, and access handling. |
hub/client/hooks/use-canvas-share-links/index.test.tsx |
Covers polling and recovery behavior. |
hub/client/hooks/use-canvas-share-links/en.ts |
Adds export-status messages. |
hub/client/features/share-link-row/types.ts |
Allows unavailable URLs. |
hub/client/features/share-link-row/index.tsx |
Omits unavailable URL inputs. |
hub/client/features/prototype-canvas-share-links/stories.tsx |
Adds export-state examples. |
hub/client/features/prototype-canvas-share-links/index.tsx |
Applies link availability and permissions. |
hub/client/features/prototype-canvas-share-links/index.test.tsx |
Tests link actions and export settings. |
hub/client/application/prototype-canvas/stories.tsx |
Updates connected-sharing fixtures. |
hub/client/application/prototype-canvas/stories.test.tsx |
Updates expected share URLs. |
.github/extensions/replica-prototype/start-canvas-server/index.test.mjs |
Updates server integration expectations. |
.github/extensions/replica-prototype/share-links/index.test.mjs |
Covers contract validation and lifecycle behavior. |
.github/extensions/replica-prototype/share-links/index.mts |
Implements the updated extension contract. |
.github/extensions/replica-prototype/share-links/index.mjs |
Updates the runtime JavaScript counterpart. |
Review effort: Balanced (adaptive)
Keep the Hub login changes from #501 and rebuild the renderer from the combined source instead of merging generated JavaScript. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Preserve the published sharing branch while incorporating the exact upstream sources before reviewing the pagination fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply updates to displayed links as they arrive, without treating a partial refresh as complete. Keep revocation and address removal after a later read fails. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Integrate the live Hub base and rebuild the renderer from the combined sources. Keep the upstream Controls sharing test on the current UUID contract. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Port the selected origin contract from #510 without importing its history. Keep older same-Hub links and the existing sharing lifecycle safeguards. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Integrate the current Hub base and rebuild the installed sharing transport from the validated combined tree. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bind reader URLs to the authenticated Hub response, clear stale links, and restart list reads without changing the displayed Build or replaying writes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the exact validated combined source tree, preserving the merged browser wrapper and regenerating the renderer and sharing transport together. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the Hub password migration and themed confirmation, collect and submit generated passwords through the shared form, and preserve the reader cutover and Build pin while refreshing policy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
arniebradfo
marked this pull request as ready for review
December 4, 2026 03:14
alliscode
added a commit
that referenced
this pull request
Dec 4, 2026
Rebuild generated canvas assets after merging #500. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
Canvas still expects the old Hub's share-link response. Connected users need to create and revoke links to published Builds using the Hub API that landed in #485.
What changes
New links stay pinned to the published Build shown when Share prototype opens. Canvas uses Hub's permissions and clears previously loaded public links if access is lost or the public reader address changes. It reloads the list without changing the displayed Build or retrying a create that may have finished.
For public exports, Canvas fills in a password under Hub's sharing policy. Copy it before creating the link and send it separately. Canvas copies reader URLs without adding current control settings. If Hub requires a password, an older link without one can still be revoked but cannot be copied or opened.
The Never Expires story was removed because current Hub links always have an expiry. The preview shell, Controls, comments, and Hub's sharing policy are unchanged. The hosted export worker was not exercised against a deployed service.
Storybook screenshots
Share links and export status
Creation, refresh, and recovery
Including control settings
Connected Canvas sharing