Skip to content

fix(hub): keep Canvas connections aligned with navigation - #358

Merged
arniebradfo merged 1 commit into
build/hub/newfrom
fix/hub-canvas-connections-viewer
Nov 24, 2026
Merged

arniebradfo merged 1 commit into
build/hub/newfrom
fix/hub-canvas-connections-viewer

Conversation

@arniebradfo

@arniebradfo arniebradfo commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

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).

Canvas account mismatch recovery inside workspace navigation

Hub/Pages/Route Feedback / Canvas Account Retrying

Light theme, desktop viewport (1440 x 900).

Canvas account mismatch recovery with the retry button disabled while loading

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@arniebradfo
arniebradfo requested review from a team and nshki as code owners November 24, 2026 19:25
Copilot AI adaptive review requested due to automatic review settings November 24, 2026 19:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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 arniebradfo self-assigned this Nov 24, 2026
@arniebradfo
arniebradfo merged commit 955de7e into build/hub/new Nov 24, 2026
58 checks passed
@arniebradfo
arniebradfo deleted the fix/hub-canvas-connections-viewer branch November 24, 2026 20:09
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).

![Canvas account mismatch recovery inside workspace
navigation](https://github.com/user-attachments/assets/de3b9ddf-d051-4539-96b9-e7b25ab74b0b)

### Hub/Pages/Route Feedback / Canvas Account Retrying

Light theme, desktop viewport (1440 x 900).

![Canvas account mismatch recovery with the retry button disabled while
loading](https://github.com/user-attachments/assets/ecfd8f55-a1d9-4303-8970-50a8ccee3416)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants