Repository navigation
Conversation
Remove unsupported live updates and legacy client plumbing, harden preview recovery and navigation, and preserve repository and dialog behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved state-handling issues mislabel sync notices as errors, hide authorized repository-admin actions, and repeatedly interrupt preview selection after bridge compatibility failures.
3 open issues
2 files not reviewed
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js: Generated file.github/extensions/replica-prototype/assets/renderer.js: Generated file
What changed in this PR
Cleans up Hub’s client and shared prototype canvas, removing obsolete integrations and improving recovery, navigation, and permissions.
Changes:
- Removes unsupported live updates, unused GitHub App pages, and Rails token plumbing.
- Improves preview recovery, saved-note navigation, and repository matching.
- Refines HTTP errors, inbox failures, dialog focus, tests, and documentation.
| File | Description |
|---|---|
hub/docs/storybook.md |
Documents retained parent-story coverage. |
hub/docs/prototype-canvas.md |
Clarifies periodic comment refresh. |
hub/docs/authentication.md |
Documents token-free mutations. |
hub/client/utils/install-controls-bridge/index.ts |
Relocates the shared Controls bridge. |
hub/client/utils/install-controls-bridge/index.test.ts |
Updates the relocated import. |
hub/client/storybook/fixtures/signed-in-workspace.ts |
Removes obsolete token data. |
hub/client/storybook/fixtures/hub-administration.ts |
Removes obsolete token data. |
hub/client/storybook/fixtures/authenticated-header.ts |
Removes obsolete token data. |
hub/client/storybook/banner-inventory/stories.tsx |
Removes the token prop. |
hub/client/pages/welcome-page/index.tsx |
Removes the hidden token field. |
hub/client/pages/welcome-page/index.test.tsx |
Checks token-free submission. |
hub/client/pages/sharing-settings-page/index.tsx |
Removes the hidden token field. |
hub/client/pages/sharing-settings-page/index.test.tsx |
Updates submission expectations. |
hub/client/pages/share-links-index-page/index.tsx |
Removes token plumbing. |
hub/client/pages/share-links-index-page/index.test.tsx |
Checks token-free forms. |
hub/client/pages/session-revocation-page/index.tsx |
Removes the hidden token field. |
hub/client/pages/session-revocation-page/index.test.tsx |
Updates submission expectations. |
hub/client/pages/security-audit-page/types.ts |
Removes the token property. |
hub/client/pages/security-audit-page/index.tsx |
Removes the sign-out token field. |
hub/client/pages/security-audit-page/index.test.tsx |
Removes obsolete fixture data. |
hub/client/pages/repositories-show-page/stories.tsx |
Removes obsolete token data. |
hub/client/pages/repositories-show-page/index.tsx |
Removes form token plumbing. |
hub/client/pages/repositories-show-page/index.test.tsx |
Checks token-free branch forms. |
hub/client/pages/prototypes-show-page/stories.tsx |
Removes obsolete token data. |
hub/client/pages/prototypes-show-page/prototype-description-dialog/index.tsx |
Removes the hidden token field. |
hub/client/pages/prototypes-show-page/index.test.tsx |
Updates review and form expectations. |
hub/client/pages/prototype-management-page/index.tsx |
Removes the token prop. |
hub/client/pages/new-prototype-page/index.test.tsx |
Removes obsolete fixture data. |
hub/client/pages/learnings-page/request-learning-run/index.tsx |
Removes token plumbing. |
hub/client/pages/learnings-page/index.tsx |
Removes token props. |
hub/client/pages/learnings-page/index.test.tsx |
Checks token-free decisions. |
hub/client/pages/hub-admins-page/index.tsx |
Removes the token prop. |
hub/client/pages/hub-admin-confirmation-page/index.tsx |
Removes the hidden token field. |
hub/client/pages/hub-admin-confirmation-page/index.test.tsx |
Updates confirmation expectations. |
hub/client/pages/github-app-setup-register-page/types.ts |
Deletes unused registration types. |
hub/client/pages/github-app-setup-register-page/styles.css |
Deletes unused registration styles. |
hub/client/pages/github-app-setup-register-page/stories.tsx |
Deletes the legacy registration story. |
hub/client/pages/github-app-setup-register-page/index.tsx |
Deletes the unused registration page. |
hub/client/pages/github-app-setup-register-page/index.test.tsx |
Deletes obsolete registration tests. |
hub/client/pages/github-app-setup-install-page/types.ts |
Deletes unused installation types. |
hub/client/pages/github-app-setup-install-page/stories.tsx |
Deletes the legacy installation story. |
hub/client/pages/github-app-setup-install-page/index.tsx |
Deletes the unused installation page. |
hub/client/pages/github-app-setup-install-page/index.test.tsx |
Deletes obsolete installation tests. |
hub/client/pages/github-app-page/types.ts |
Deletes unused settings types. |
hub/client/pages/github-app-page/styles.css |
Deletes unused settings styles. |
hub/client/pages/github-app-page/stories.tsx |
Deletes the legacy settings story. |
hub/client/pages/github-app-page/index.tsx |
Deletes the unused settings page. |
hub/client/pages/github-app-page/index.test.tsx |
Deletes obsolete settings tests. |
hub/client/pages/fresh-authorization-page/types.ts |
Removes the token property. |
hub/client/pages/fresh-authorization-page/stories.tsx |
Removes obsolete token data. |
hub/client/pages/fresh-authorization-page/index.tsx |
Removes hidden token fields. |
hub/client/pages/fresh-authorization-page/index.test.tsx |
Updates authorization-form expectations. |
hub/client/pages/copilot-connection-page/index.tsx |
Removes hidden token fields. |
hub/client/pages/copilot-connection-page/index.test.tsx |
Checks token-free connection submission. |
hub/client/pages/canvas-pairings-page/types.ts |
Removes the token property. |
hub/client/pages/canvas-pairings-page/index.tsx |
Removes pairing-form token fields. |
hub/client/pages/canvas-pairings-page/index.test.tsx |
Updates pairing-form expectations. |
hub/client/pages/builds-index-page/stories.tsx |
Removes obsolete token data. |
hub/client/pages/analytics-page/index.tsx |
Removes form token fields. |
hub/client/pages/analytics-page/index.test.tsx |
Updates disconnect-form expectations. |
hub/client/hooks/use-review-comments/use-review-comments-client/types.ts |
Removes the token option. |
hub/client/hooks/use-review-comments/use-review-comments-client/index.ts |
Removes legacy request headers. |
hub/client/hooks/use-review-comments/index.ts |
Simplifies the hook signature. |
hub/client/hooks/use-review-comments/index.test.ts |
Updates calls and header expectations. |
hub/client/hooks/use-prototype-review/types.ts |
Removes the token option. |
hub/client/hooks/use-prototype-review/index.ts |
Simplifies comment-hook integration. |
hub/client/hooks/use-prototype-review/index.test.tsx |
Updates hook setup. |
hub/client/hooks/use-notification-inbox/index.ts |
Handles missing items without throwing. |
hub/client/hooks/use-notification-inbox/index.test.tsx |
Covers missing-item failure behavior. |
hub/client/features/workspace-nav/inbox.tsx |
Removes the token option. |
hub/client/features/workflow-installation/stories.tsx |
Removes obsolete token data. |
hub/client/features/workflow-installation/index.tsx |
Removes token plumbing. |
hub/client/features/workflow-installation/index.test.tsx |
Updates component calls. |
hub/client/features/share-links-form/index.test.tsx |
Uses a neutral hidden-field fixture. |
hub/client/features/share-link-item/types.ts |
Removes the token prop. |
hub/client/features/share-link-item/stories.tsx |
Removes obsolete token data. |
hub/client/features/share-link-item/index.tsx |
Removes the hidden token field. |
hub/client/features/prototype-metadata-management/index.tsx |
Removes token plumbing. |
hub/client/features/prototype-metadata-management/index.test.tsx |
Updates calls and submitted fields. |
hub/client/features/prototype-canvas-improvement-notes/use-saved-notes/index.ts |
Adds sync-notice classification. |
hub/client/features/prototype-canvas-improvement-notes/use-preview-selection/index.ts |
Tracks outages and valid responses. |
hub/client/features/prototype-canvas-improvement-notes/use-preview-selection/index.test.tsx |
Covers timeout and heartbeat behavior. |
hub/client/features/prototype-canvas-improvement-notes/index.tsx |
Checks saved routes and notice kinds. |
hub/client/features/prototype-canvas-hub-panel/stories.tsx |
Removes unsupported live-update states. |
hub/client/features/prototype-canvas-hub-panel/reaction-updates.test.tsx |
Uses polling for refresh coverage. |
hub/client/features/prototype-canvas-hub-panel/index.tsx |
Removes unsupported event requests. |
hub/client/features/prototype-canvas-hub-panel/comment-refresh.test.tsx |
Covers periodic refresh without events. |
hub/client/features/learnings-library/index.tsx |
Removes form token plumbing. |
hub/client/features/install-replica-controls-bridge/index.ts |
Uses the relocated bridge. |
hub/client/features/hub-administration-page/types.ts |
Removes the token property. |
hub/client/features/hub-administration-page/index.tsx |
Removes the sign-out token field. |
hub/client/features/build-controls/story-preview/index.ts |
Uses the relocated bridge. |
hub/client/features/add-hub-administrators/stories.tsx |
Removes obsolete token data. |
hub/client/features/add-hub-administrators/index.tsx |
Removes token plumbing. |
hub/client/features/add-hub-administrators/index.test.tsx |
Updates administrator-form expectations. |
hub/client/components/workspace-navigation/types.ts |
Removes the account token property. |
hub/client/components/workspace-navigation/index.tsx |
Removes the token prop. |
hub/client/components/repository-user-menu/stories.tsx |
Removes obsolete token data. |
hub/client/components/repository-user-menu/index.tsx |
Removes sign-out token plumbing. |
hub/client/components/repository-user-menu/index.test.tsx |
Removes obsolete fixture data. |
hub/client/components/copilot-app-continuation-dialog/index.tsx |
Restores focus without overriding callers. |
hub/client/components/copilot-app-continuation-dialog/index.test.tsx |
Covers dismissal focus destinations. |
hub/client/application/prototype-preview-bridge/index.ts |
Uses the relocated Controls bridge. |
hub/client/application/prototype-canvas/tests/improvement-notes.test.tsx |
Covers notice kinds and safe routes. |
hub/client/application/hub/view-models/workspace-navigation/index.ts |
Removes obsolete token data. |
hub/client/application/hub/view-models/session-revocation-page-data/index.ts |
Removes obsolete token data. |
hub/client/application/hub/view-models/security-audit-page-data/index.ts |
Removes obsolete token data. |
hub/client/application/hub/view-models/product-sharing-settings-data/index.ts |
Removes obsolete token data. |
hub/client/application/hub/view-models/copilot-connection-page-data/index.ts |
Removes obsolete token data. |
hub/client/application/hub/view-models/administrators-page-data/index.ts |
Removes obsolete token data. |
hub/client/application/hub/view-models/administrator-confirmation-page-data/index.ts |
Removes obsolete token data. |
hub/client/application/hub/use-workspace-repository-permissions/index.ts |
Matches repository IDs case-insensitively. |
hub/client/application/hub/use-workspace-repository-permissions/index.test.tsx |
Covers repository permission selection. |
hub/client/application/hub/screens/real-inbox-screen/index.tsx |
Removes the token option. |
hub/client/application/hub/screens/prototype-screen/index.tsx |
Uses shared identifier validation. |
hub/client/application/hub/routes/settings-copilot-authorization/index.tsx |
Removes obsolete token data. |
hub/client/application/hub/routes/settings-analytics/read-destination-form/index.ts |
Corrects the form-helper import. |
hub/client/application/hub/routes/settings-administrator-authorization/index.tsx |
Removes obsolete token data. |
hub/client/application/hub/routes/legacy-repository-settings/index.tsx |
Matches repository IDs case-insensitively. |
hub/client/application/hub/routes/legacy-repository-settings/index.test.ts |
Covers uppercase-ID redirects. |
hub/client/application/hub/requests/request-json/index.ts |
Preserves status for non-JSON failures. |
hub/client/application/hub/requests/request-json/index.test.ts |
Covers HTTP and contract failures. |
hub/client/application/hub/create-review-transport/index.test.tsx |
Updates comment-hook calls. |
.github/extensions/replica-prototype/improvement-notes/index.test.mjs |
Covers persisted notice classification. |
.github/extensions/replica-prototype/improvement-notes/index.mts |
Adds saved sync-notice classification. |
.github/extensions/replica-prototype/improvement-notes/index.mjs |
Updates the generated runtime. |
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js |
Updates the bundled notes interface. |
Review effort: Max (adaptive)
…ction consistent Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved functional issues hide navigation and history-request failures, show misleading Hub connection guidance, and retrigger bridge-outage callbacks after note updates.
6 open issues
Use connection-specific copy for unpaired Hubs · New Require a valid API error body for missing learnings · New Show a visible error for rejected saved routes · New Preserve outage state across note-list updates · New Document current behavior instead of removal history · New Separate component-usage documentation under its own heading · New
3 resolved since last review
2 files not reviewed
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js: Generated file.github/extensions/replica-prototype/assets/renderer.js: Generated file
Review effort: Max (adaptive)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
62cc170 to
64a3df8
Compare
…machine speed The protected review test paired with a token that expired after 60 seconds, so on a slow machine later requests ran disconnected. The learnings test gave recall a 1 second deadline that also covers local git lookups, and its slow Hub answer raced that deadline. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved response handling can mistake endpoint failures for signed-out states or permission denials and silently omit learning history, while uppercase IDs still break canonical settings URLs.
3 open issues
6 resolved since last review
Preserve outage state across note-list updates Show a visible error for rejected saved routes Require a valid API error body for missing learnings Use connection-specific copy for unpaired Hubs Separate component-usage documentation under its own heading Document current behavior instead of removal history
3 files not reviewed
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js: Generated file.github/extensions/replica-prototype/assets/renderer-prototype-canvas-improvement-threads.js: Generated file.github/extensions/replica-prototype/assets/renderer.js: Generated file
Review effort: Max (adaptive)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…anvas-and-client-fixes Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Interacting authentication, permission, persisted-note compatibility, and iframe recovery contracts across Hub and the extension require substantive cross-layer review beyond the limited-consequence scope.
No open issues 🎉
3 files not reviewed
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js: Generated file.github/extensions/replica-prototype/assets/renderer-prototype-canvas-improvement-threads.js: Generated file.github/extensions/replica-prototype/assets/renderer.js: Generated file
Review effort: Balanced (adaptive)
<!-- copilot-assessment:v1 --> ### Agent assessment Self-reported assessment, not an independent review. Assessed revision: `21344a36afbcf6482c1d9bc039e1f8296b89ee65` | Dimension | Assessment | Rationale | |---|---|---| | Change confidence | 9/10 | ↑ Removes only values that were always empty and never read by the server.<br>↑ Typecheck, lint, canvas asset check and all 1778 client tests pass on this head.<br>↓ No rendered check, since only hidden inputs and headers change. | <!-- /copilot-assessment --> ## Why Hub still carried Rails-era CSRF plumbing: an `authenticityToken` prop that was always an empty string, hidden `authenticity_token` form fields, and empty `X-CSRF-Token` headers. The server never reads them. Hub protects mutations by requiring the exact application origin instead. This is the first part of splitting #475 into smaller reviews. ## What changes The token prop, hidden fields, and headers are removed from pages, features, hooks, fixtures, and stories. Tests now check that forms and requests don't send them. The authentication guide states that forms and JSON mutations rely on the exact-origin check. This PR doesn't change behavior. #475's behavior fixes will sit on top of this PR and the GitHub App page removal. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the GitHub App page removals from this stacked PR; the merged base only removed the legacy CSRF field from those pages. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Rebuild extension assets after resolving generated bundle conflicts. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Interacting authentication-error handling, preview-bridge recovery, and persisted-note migration across Hub and the extension warrant human integration review.
No open issues 🎉
3 files not reviewed
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js: Generated file.github/extensions/replica-prototype/assets/renderer-prototype-canvas-improvement-threads.js: Generated file.github/extensions/replica-prototype/assets/renderer.js: Generated file
Review effort: Balanced (adaptive)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…pages' into tmp-475-merge
There was a problem hiding this comment.
🔵 Needs a closer look
Interacting changes to session-error handling, permissions, persisted note migration, and iframe recovery require cross-layer review beyond the limited-consequence scope of automated approval.
No open issues 🎉
3 files not reviewed
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js: Generated file.github/extensions/replica-prototype/assets/renderer-prototype-canvas-improvement-threads.js: Generated file.github/extensions/replica-prototype/assets/renderer.js: Generated file
Review effort: Balanced (adaptive)
<!-- copilot-assessment:v1 --> ### Agent assessment Self-reported assessment, not an independent review. Assessed revision: `0f357353e5e1fb03f147807454e1238d5adde664` | Dimension | Assessment | Rationale | |---|---|---| | Change confidence | 9.5/10 | ↑ The deleted pages had no callers outside their own tests and stories.<br>↑ Typecheck, lint and the Storybook build pass after removal. | <!-- /copilot-assessment --> ## Why The legacy GitHub App settings, manual registration, and installation pages were left over from the Rails Hub. No route renders them; only their own tests and stories import them. The registration page still rendered a live form that posted to an endpoint Hub doesn't serve. This is the second part of splitting #475. ## What changes The three pages and their **Hub / Design / Legacy GitHub App** stories are deleted. The Storybook guide now just points to guided GitHub App setup, which replaces them. This PR is stacked on #525, the CSRF cleanup. --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Rebuild generated canvas assets after merging #511. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Interacting changes to authentication, repository permissions, persisted-note migration, and iframe recovery across Hub and the extension require broader review than automated approval supports.
No open issues 🎉
3 files not reviewed
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js: Generated file.github/extensions/replica-prototype/assets/renderer-prototype-canvas-improvement-threads.js: Generated file.github/extensions/replica-prototype/assets/renderer.js: Generated file
Review effort: Balanced (adaptive)
Rebuild generated canvas assets after merging #500. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-runtime changes to authentication-error handling, persisted-note migration, and iframe recovery require broader review of their interacting access and lifecycle contracts.
No open issues 🎉
3 files not reviewed
.github/extensions/replica-prototype/assets/renderer-improvement-notes-prototype.js: Generated file.github/extensions/replica-prototype/assets/renderer-prototype-canvas-improvement-threads.js: Generated file.github/extensions/replica-prototype/assets/renderer.js: Generated file
Review effort: Balanced (adaptive)


Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
adc6f584a8e3e31a21357ee2c00cfa5b6f26eacb↑ 1825 of 1826 Hub browser tests pass; the unchanged legacy-publication test timed out under full-suite load and passes in isolation.
↑ Updated base merge conflicts were limited to generated bundles, which were rebuilt from the merged sources.
↓ CI for this head is still running; required check completion would change this assessment.
↑ Server code confirms the signed-out session body and the missing-learning codes.
↓ The findings came from review rather than an end-user incident; no authenticated Hub deployment was exercised.
Why
The Hub client and prototype canvas still carried unsupported live-update handling. Preview timeouts could repeatedly cancel a selection, and uppercase repository identifiers could show the wrong permissions or fail to load settings.
What changes
Keep the existing 30-second comment refresh without requesting the unsupported events endpoint or displaying a permanent paused notice. Report a preview bridge outage once, until the frame reloads or a compatible bridge responds. Distinguish connection guidance from branch discovery for local notes, including notes saved before this update. Reject invalid or off-origin saved routes and show the route error even when a sync error is present.
This PR is stacked on #526, which removes the unused GitHub App pages, and #525, which removes Rails CSRF leftovers. Those cleanups were split out so this diff shows only behavior fixes. The change also:
The Storybook guide records which parent stories cover the missing standalone states. The obsolete live-update failure story is removed. The comment stories use a same-origin fixture so they can render the preview and exercise the bridge. The Copilot app installation link was verified against its public README and remains unchanged.
This revision also makes two extension tests independent of machine speed: the protected-review pairing token no longer expires mid-test, and the Learnings-off timeout case can no longer race its deadline. One unchanged Hub browser test, legacy publication, can exceed its 5-second limit under heavy local load; it passes in isolation. No authenticated Hub deployment was exercised.
Storybook screenshots
Prototype canvas comments — dark, 1280 × 720
Prototype canvas / Hub panel / Pin With Comments Closed — dark, 1280 × 720
Prototype canvas / Hub panel / Rate Limited — dark, 1280 × 720
Prototype canvas / Hub panel / Local Draft Comments — dark, 1280 × 720
Prototype canvas / Hub panel / Local Comments Before First Publish — dark, 1280 × 720
Prototype canvas / Hub panel / Local Comment Upload Failed — dark, 1280 × 720
Prototype canvas / Hub panel / Posted Comment With Comments Closed — dark, 1280 × 720
Prototype canvas / Hub panel / Review Revision Failed — dark, 1280 × 720
Prototype canvas / Hub panel / Canvas Comments — dark, 1280 × 720
Prototype canvas / Hub panel / Comments Empty — dark, 1280 × 720
Prototype canvas / Hub panel / Comments Loading — dark, 1280 × 720
Prototype canvas / Hub panel / Comments Failed — dark, 1280 × 720
Improvement notes and Hub flows — dark, 1280 × 720
Components / Prototype canvas / Improvement threads / Saved Route Unavailable — dark, 1280 × 720
Hub / Pages / Repositories / Create / Submitted — dark, 1280 × 720
Hub / Pages / Replica Browse / Template Handoff — dark, 1280 × 720
Hub / Pages / Prototype Review / Branch Handoff — dark, 1280 × 720
Hub / Pages / Inbox / Failure — dark, 1280 × 720
Hub / Pages / Learnings / Index / Load Error — dark, 1280 × 720