Repository navigation
fix(hub): keep Canvas connections aligned with navigation - #358
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new account-mismatch recovery screen lacks the required embedded Storybook coverage and PR screenshot, leaving its presentation within workspace navigation unreviewed.
1 open issue
What changed in this PR
Keeps Canvas connections aligned with the account shown in Hub navigation after #346 separated their loading.
Changes:
- Returns the current Hub user ID with the connections list.
- Hides connections when accounts differ and offers Try again.
- Adds response-order regression coverage and documents recovery behavior.
| File | Description |
|---|---|
hub/server/routes/api/canvas/index.ts |
Includes viewer identity in the connections response. |
hub/server/routes/api/canvas/extension.db.test.ts |
Verifies viewer identity before and after revocation. |
hub/server/repositories/canvas/authority/index.ts |
Adds Hub user ID to Canvas authority data. |
hub/server/domains/canvas/connections/index.ts |
Returns connections alongside their viewer identity. |
hub/docs/prototype-canvas.md |
Documents account mismatch and retry behavior. |
hub/client/application/hub/routes/real-workspace-navigation.test.tsx |
Covers both response orders and successful retry. |
hub/client/application/hub/routes/canvas-connections/index.tsx |
Checks account alignment and displays retry feedback. |
hub/client/application/hub/canvas-connections/contract.ts |
Requires a viewer ID in the response schema. |
Review effort: Balanced (adaptive)
Comment on lines
+104
to
+108
| <RouteFeedback | ||
| kind="error" | ||
| heading="Canvas connections unavailable" | ||
| description="Your Hub account changed while loading connections. Try again to see your connections." | ||
| embedded |
arniebradfo
added a commit
that referenced
this pull request
Nov 24, 2026
<!-- Use a conventional commit-style title, such as "fix(hub): retain prototype history". --> ## Why <!-- Explain the problem and why this change matters in a short, plain-English paragraph. Link the issue when applicable. --> Reviewers need to see the Canvas account recovery screen introduced in #358 inside workspace navigation. ## What changes <!-- Describe what becomes different for a first-time reader. Explain necessary terms. Include accurate Mermaid diagrams when they clarify the proposal, using before/after diagrams when helpful. Add screenshots for meaningful UI changes. --> <!-- Omit validation sections, checklists, and routine test/CI summaries such as "CI is green" or "tests passed". Mention only known verification gaps that affect the change, not disclaimers about drafting this description. --> <!-- For UI changes, prune obsolete and duplicate stories in the affected catalogues as part of the change. Explain removed UI or consolidated coverage where needed; see hub/docs/storybook.md#ui-changes-and-pull-request-evidence. --> Storybook now shows the account-mismatch screen and its retry-in-progress state using the production feedback component inside workspace navigation. Application behavior is unchanged. ## Storybook screenshots <!-- For Hub or canvas UI changes, follow hub/docs/storybook.md#ui-changes-and-pull-request-evidence. Embed uploaded screenshots of EVERY added or changed story, including stories affected indirectly by shared code, styles, copy, or fixtures. Label each with its full story title/name, theme, and viewport. Keep this section last and refresh images after UI revisions. Name any missing story and its rendering/upload blocker; incomplete evidence is not completion. Remove this section only when no story presentation changes. --> ### Hub/Pages/Route Feedback / Canvas Account Mismatch Light theme, desktop viewport (1440 x 900).  ### Hub/Pages/Route Feedback / Canvas Account Retrying Light theme, desktop viewport (1440 x 900).  Co-authored-by: Copilot <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 connections and the sidebar load independently after #346. If the active Hub account changes while the page loads, the connections list should stay in sync with navigation.
What changes
Hub only shows Canvas connections when the list and navigation belong to the same account. If they differ, the page hides the list and offers Try again. Signing in and revoking a connection work as before.
Storybook coverage and the screenshots below are included in follow-up #363. This PR merged before the story additions were committed.
Storybook screenshots
Hub/Pages/Route Feedback / Canvas Account Mismatch
Light theme, desktop viewport (1440 x 900).
Hub/Pages/Route Feedback / Canvas Account Retrying
Light theme, desktop viewport (1440 x 900).