Skip to content

feat(hub): show real Build history - #261

Merged
nshki merged 6 commits into
nshki/feat/hub/prototype-introductionsfrom
nshki/feat/hub/real-build-history
Nov 16, 2026
Merged

nshki merged 6 commits into
nshki/feat/hub/prototype-introductionsfrom
nshki/feat/hub/real-build-history

Conversation

@nshki

@nshki nshki commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Why

Members need to browse a prototype's actual Builds and return to an earlier successful Build.

What changes

History now lists real Builds newest first by workflow time, falling back to when Hub stored the Build. The displayed time is labeled "Added to Hub" and includes the viewer's local timezone. The Build picker includes every state. Successful Builds open in the prototype view. Other Builds remain unlinked until Hub can import their Actions run URLs.

History loads one page at a time. Its picker includes that page's Builds and the successful Build selected in the URL. The page links still reach every Build. The prototype view's picker is unchanged.

Storybook screenshots

Six stories, light theme, 1440 × 900 viewport

Hub/Pages/Builds/Index / Single

Single Build with its Added to Hub time

Hub/Pages/Builds/Index / Unlinked Author

Build with an unlinked author and Added to Hub time

Hub/Pages/Builds/Index / Multiple

Build history with multiple states

Hub/Pages/Builds/Index / Real History

Older History page with Build 28 still selected
Bounded picker with the page's three Builds and selected Build 28

Hub/Pages/Prototype Review / Preview Hosting Unavailable

Prototype with preview hosting unavailable
History action

Hub/Pages/Prototype Review / Editing Draft

Editing a draft

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1bb10333-1d49-4426-896d-d9a04178b836
@nshki
nshki added this pull request to stack #255 November 14, 2026 17:09
@nshki
nshki requested an adaptive review from Copilot November 14, 2026 17:09

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 flow test checks href on the focusable menu-item wrapper rather than its nested link, causing the test to fail even when navigation is correct.

1 open issue
What changed in this PR

This PR connects Hub’s History view to stored Builds, letting signed-in members browse past Builds and return to an earlier successful Build in the prototype view.

Changes:

  • Adds a session-protected Build history API with 25-Build pages.
  • Enables real-mode History navigation and preserves pinned Build selections across pages.
  • Updates route coverage, Storybook examples, and documentation.
File Description
hub/​server/​routes/​index.ts Registers the Build history endpoint.
hub/​server/​routes/​api/​repositories/​prototypes/​builds/​get/​index.ts Returns paginated history after session checks.
hub/​server/​routes/​api/​repositories/​prototypes/​builds/​get/​index.test.ts Covers pagination validation and session changes.
hub/​server/​routes/​api/​repositories/​prototypes/​builds/​get/​index.db.test.ts Covers stored Builds, visibility, ordering, and pagination.
hub/​README.md Lists Build history among available APIs.
hub/​docs/​frontend.md Documents real History behavior and its API contract.
hub/​docs/​development.md Updates locally available features.
hub/​docs/​architecture.md Adds Build history to supported Hub flows.
hub/​client/​pages/​prototypes-show-page/​stories.tsx Updates History links and real-mode story data.
hub/​client/​pages/​builds-index-page/​stories.tsx Adds a real History example with an expanded picker.
hub/​client/​application/​hub/​view-models/​prototype-workspace/​index.ts Preserves pinned Builds in prototype links.
hub/​client/​application/​hub/​view-models/​prototype-show-data/​index.ts Enables History links in real mode.
hub/​client/​application/​hub/​view-models/​build-history-data/​index.ts Applies real-mode capabilities and successful-Build selection.
hub/​client/​application/​hub/​screens/​build-history-screen/​index.tsx Passes the active mode to the History adapter.
hub/​client/​application/​hub/​routes/​real-prototype-index.test.tsx Updates expectations for the enabled actions menu.
hub/​client/​application/​hub/​routes/​real-build-history.test.tsx Adds navigation and pinned-selection flow coverage.
hub/​AGENTS.md Updates contributor guidance to include Build history.

Review effort: Balanced (dynamic)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1bb10333-1d49-4426-896d-d9a04178b836

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 authenticated History API combines prototype visibility, session revalidation, pagination, and pinned-Build navigation, requiring review of interacting access and routing contracts beyond straightforward-change scope.

No open issues 🎉

1 resolved since last review

Review effort: Balanced (dynamic)

@nshki
nshki marked this pull request as ready for review November 16, 2026 15:35
@nshki
nshki requested a review from a team as a code owner November 16, 2026 15:35
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1bb10333-1d49-4426-896d-d9a04178b836

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 authenticated history flow couples session revalidation, prototype visibility, pagination, and pinned-Build navigation across backend and browser contracts, requiring broader review than the limited straightforward-change scope allows.

No open issues 🎉

Review effort: Balanced (dynamic)

nshki and others added 2 commits November 16, 2026 09:04
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1bb10333-1d49-4426-896d-d9a04178b836
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1bb10333-1d49-4426-896d-d9a04178b836

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 authenticated API and real-mode navigation couple session revalidation, prototype visibility, pagination, and pinned-Build selection across screens, exceeding the limited local-change review scope.

No open issues 🎉

Review effort: Balanced (dynamic)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 1bb10333-1d49-4426-896d-d9a04178b836

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 authenticated history flow couples transactional pagination, off-page Build pins, global current-Build status, and URL navigation, requiring cross-layer review beyond a straightforward local change.

No open issues 🎉

Review effort: Balanced (dynamic)

@nshki
nshki merged commit 1f5b485 into build/hub/new Nov 16, 2026
50 checks passed
@nshki
nshki deleted the nshki/feat/hub/real-build-history branch November 16, 2026 17:48
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