Skip to content

fix(hub): restore gallery screenshots and polish browsing - #331

Merged
weastler merged 4 commits into
build/hub/newfrom
build/hub/new-ui-polish
Nov 21, 2026
Merged

weastler merged 4 commits into
build/hub/newfrom
build/hub/new-ui-polish

Conversation

@arniebradfo

Copy link
Copy Markdown
Collaborator

Why

Hub imported Build screenshots, but the Prototypes gallery never received their URLs. The gallery also shifted during navigation, and repository names could wrap or truncate too early in its controls.

What changes

The gallery loads one saved thumbnail per prototype from the newest successful Build with a screenshot. A newer Build without a screenshot does not replace that thumbnail or hide the current Build status. Existing screenshots work without changing or rerunning the Actions workflow.

The top loading bar replaces the inline “Updating prototypes” message, so the cards stay in place. GitHub profile links use just the user’s name and underline it on hover or keyboard focus. The repository menu widens without changing the sidebar, and the audit scope button grows before truncating long names to fit the available space.

The separate Updating story was removed because it showed the deleted inline message.

Storybook screenshots

Components/Prototype Card

Components/Prototype Card / Card — light, 1440 × 900

Components/Repository Selector

Components/Repository Selector / Collapsed — light, 1440 × 900

Components/Repository Selector / Default — light, 1440 × 900

Components/Repository Selector / Long Name — dark, 390 × 844

Components/Repository Selector / Long Name — light, 1440 × 900

Hub/Pages/Inbox prototype

Hub/Pages/Inbox prototype / Collapsed Sidebar — light, 1440 × 900

Hub/Pages/Inbox prototype / Empty — light, 1440 × 900

Hub/Pages/Inbox prototype / Inbox Preview — light, 1440 × 900

Hub/Pages/Inbox prototype / Workspace — light, 1440 × 900

Hub/Pages/Repositories/Show

Hub/Pages/Repositories/Show / Fresh Local Example — light, 1440 × 900

Hub/Pages/Repositories/Show / Local Writer With Unlisted Branches — light, 1440 × 900

Hub/Pages/Repositories/Show / Me Selected — light, 1440 × 900

Hub/Pages/Repositories/Show / Multiple Recent Branches — light, 1440 × 900

Hub/Pages/Repositories/Show / Multiple — light, 1440 × 900

Hub/Pages/Repositories/Show / Paginated — light, 1440 × 900

Hub/Pages/Repositories/Show / Read Only — light, 1440 × 900

Hub/Pages/Repositories/Show / Real Index List — light, 1440 × 900

Hub/Pages/Repositories/Show / Real Index Single — light, 1440 × 900

Hub/Pages/Repositories/Show / Real Index — light, 1440 × 900

Hub/Pages/Repositories/Show / Request Failed — light, 1440 × 900

Hub/Pages/Repositories/Show / Searched — light, 1440 × 900

Hub/Pages/Repositories/Show / Single — light, 1440 × 900

Hub/Pages/Repositories/Show / Wide View Switching — light, 1920 × 1080

Hub/Pages/Repositories/Show / Writer With Unlisted Branches — light, 1440 × 900

Hub/Pages/Security/Audit

Hub/Pages/Security/Audit / Authorization Succeeded — light, 1440 × 900

Hub/Pages/Security/Audit / Empty — light, 1440 × 900

Hub/Pages/Security/Audit / Hub Only — light, 1440 × 900

Hub/Pages/Security/Audit / Long Repository Name — dark, 390 × 844

Hub/Pages/Security/Audit / Long Repository Name — light, 1440 × 900

Hub/Pages/Security/Audit / Multiple — light, 1440 × 900

Hub/Pages/Security/Audit / Repository And Hub Admin — light, 1440 × 900

Hub/Pages/Security/Audit / Repository Empty — light, 1440 × 900

Hub/Pages/Security/Audit / Repository — light, 1440 × 900

Hub/Pages/Security/Audit / Scopes Unavailable — light, 1440 × 900

Hub/Pages/Security/Audit / Single — light, 1440 × 900

arniebradfo and others added 4 commits November 20, 2026 15:39
Keep the gallery steady during navigation, make author links text-sized, and let repository and audit controls accommodate longer names.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Select one saved image per visible prototype without loading Build history. Keep a usable screenshot when a newer Build fails or its screenshot has not arrived.

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

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.

🔵 Needs a closer look

The change combines PostgreSQL thumbnail selection, client API behavior, and live repository/session authorization for preview grants, requiring broader review of interacting data and access paths.

No open issues 🎉

What changed in this PR

Restores saved screenshots in Hub’s Prototypes gallery while preserving current Build status and improving browsing layout.

Changes:

  • Selects the newest eligible Build with a screenshot and exposes its thumbnail through the gallery API, with current-authority checks for access.
  • Removes the inline loading message, simplifies profile links, and improves long repository-name handling.
  • Updates regression coverage, Storybook examples, and documentation.
File Description
hub/​test/​local-smoke/​seed-local-workspace/​index.ts Seeds a saved screenshot for smoke coverage.
hub/​test/​local-smoke/​browser.js Checks that the gallery screenshot loads.
hub/​server/​routes/​api/​repositories/​prototypes/​builds/​access/​get/​index.ts Rechecks session authority and repository visibility before granting access.
hub/​server/​routes/​api/​repositories/​prototypes/​builds/​access/​get/​index.test.ts Covers loss of repository visibility.
hub/​server/​routes/​api/​product/​create-product-route-dependencies/​index.ts Supplies artifact URL generation to the repository index.
hub/​server/​routes/​api/​product-index/​index.db.test.ts Covers thumbnail selection independently of current Build status.
hub/​server/​repositories/​prototype-index/​find-repository-index/​index.ts Selects one eligible preview Build per gallery card.
hub/​docs/​github-actions-builds.md Documents thumbnail selection and missing-screenshot troubleshooting.
hub/​docs/​frontend.md Documents stable gallery loading behavior.
hub/​client/​utils/​prototype-listing/​types.ts Removes obsolete loading-message copy.
hub/​client/​storybook/​fixtures/​prototype-listing.ts Removes the obsolete fixture message.
hub/​client/​pages/​security-audit-page/​styles.css Lets scope controls grow while containing long labels.
hub/​client/​pages/​security-audit-page/​stories.tsx Adds a long repository-name example.
hub/​client/​pages/​repositories-show-page/​stories.tsx Updates preview fixtures and removes the obsolete Updating story.
hub/​client/​pages/​repositories-show-page/​index.tsx Removes the layout-shifting inline loading message.
hub/​client/​pages/​repositories-show-page/​index.test.tsx Updates loading and profile-link assertions.
hub/​client/​components/​repository-selector/​styles.css Widens the menu within viewport limits.
hub/​client/​components/​repository-selector/​stories.tsx Opens the long-name menu for visual coverage.
hub/​client/​components/​prototype-card/​styles.css Adds bounded profile-link sizing and hover/focus underlines.
hub/​client/​components/​prototype-card/​index.tsx Uses the user’s name as profile-link text.
hub/​client/​application/​hub/​view-models/​repository-show-data/​index.ts Maps gallery preview summaries and removes unused loading copy.
hub/​client/​application/​hub/​contracts/​index.ts Accepts optional preview Build summaries in repository responses.

Review effort: Balanced (adaptive)

@weastler
weastler merged commit 57f9bec into build/hub/new Nov 21, 2026
52 checks passed
@weastler
weastler deleted the build/hub/new-ui-polish branch November 21, 2026 01:14
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.

3 participants