Skip to content

feat(hub): support Solo learnings in local Hub - #442

Open
nshki wants to merge 25 commits into
nshki/feat/learning/03-hub-domainfrom
nshki/feat/hub/04-learnings-page
Open

nshki wants to merge 25 commits into
nshki/feat/learning/03-hub-domainfrom
nshki/feat/hub/04-learnings-page

Conversation

@nshki

@nshki nshki commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Why

Developers using local Hub should be able to review the same learnings their agents use in Solo mode, without maintaining a second learning store.

What changes

Local Hub discovers prototype checkouts at startup. The Learnings page shows Solo activity and setup guidance, lets members browse suggestions and past decisions, and lets repository administrators decide which guidance to keep. Hub rechecks the local configuration before saving a decision.

Administrators can open Recent runs to see a run's status, results, and Copilot usage. Before accepting a rejected learning again, they can see what it would replace and read conflicting feedback. Hub keeps the decision history visible when the wording is unavailable, but does not offer to accept it. The default index example now covers starting a run; it replaces the separate WithoutDailyRuns example.

On the published revision (2269f43fa), the Hub database checks reached the tests but failed when Hub could not read the learning command's output.

Storybook screenshots

Hub/Pages/Learnings/Index

Hub/Pages/Learnings/Index/Default — Light — 1440×900

Hub/Pages/Learnings/Index/Recent Runs — Light — 1440×900

Hub/Pages/Learnings/Index/AccessDenied — Light — 1140x860

Hub/Pages/Learnings/Index/Many Learnings — Light — 1440×900

Hub/Pages/Learnings/Index/Empty Status — Light — 1440×900

Hub/Pages/Learnings/Index/No Search Results — Light — 1440×900

Hub/Pages/Learnings/Index/First Visit — Light — 1440×900

Hub/Pages/Learnings/Index/Identity Revalidation — Light — 1440×900

Hub/Pages/Learnings/Index/Readable Member — Light — 1440×900

Hub/Pages/Learnings/Index/Copilot Refused — Light — 1440×900

Hub/Pages/Learnings/Index/LocalLearning — Light — 1140x860

Hub/Pages/Learnings/Index/LocalLearningSetup — Light — 1140x860

Hub/Pages/Learnings/Index/Load Error — Light — 1440×900

Hub/Pages/Learnings/Index/Redaction Follow Up — Light — 1440×900

Hub/Pages/Learnings/Detail

Hub/Pages/Learnings/Detail/Suggestion — Light — 1140x860

Hub/Pages/Learnings/Detail/SuggestionWithOpposingEvidence — Light — 1140x860

Hub/Pages/Learnings/Detail/Active — Light — 1140x860

Hub/Pages/Learnings/Detail/Not Recalled — Light — 1440×900

Hub/Pages/Learnings/Detail/Editing Learning — Light — 1440×900

Hub/Pages/Learnings/Detail/Rejected — Light — 1440×900

Hub/Pages/Learnings/Detail/Unavailable Rejected Wording — Light — 1440×900

Hub/Pages/Learnings/Detail/Member — Light — 1140x860

Hub/Pages/Learnings/Detail/UnavailableWording — Light — 1140x860

Hub/Features/Settings form boundary

Hub/Features/Settings form boundary/Error — Light — 1440×900

Hub/Features/Settings form boundary/Success — Light — 1440×900

nshki and others added 9 commits November 30, 2026 09:38
Checkouts under the prototype root now appear in a local Hub before their
first Build, so their Learnings pages are reachable right away.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
Members who can see a repository now read every learning, including
rejected and retired ones, with titles and decision history. Only
repository administrators decide, run, and see usage. Administrators
can also edit and reinstate learnings from Hub.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
The Learnings page had grown far past the Learnings Library prototype.
It now shows only what the prototype shows, and its stories are grouped
under Index, Detail, and Settings.

The decision-model settings are removed from the UI until the team
agrees how people should manage the model. Its API stays, and the docs
say so. These changes share the same route, view model, page, and
stories, so splitting them would leave commits that don't compile.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 137e1253-cf5f-46e1-aa73-d44f61c1ea60
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
@nshki
nshki added this pull request to stack #446 November 30, 2026 21:32
nshki and others added 2 commits November 30, 2026 14:52
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Copilot AI adaptive review requested due to automatic review settings November 30, 2026 23:02
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
nshki and others added 2 commits November 30, 2026 15:16
Use the same address rules in the history and decision routes and before calling the Learning command. Valid existing identifiers are unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352

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

Unresolved critical flaws can send decisions to stale repository scopes, misreport successful decisions during recovery, and expose administrator-only migration details to ordinary repository readers.

16 open issues
What changed in this PR

This PR connects local Hub to each checkout’s existing Solo learning store, letting users browse and review learnings without configuring separate Hub storage.

Changes:

  • Registers local checkouts and adds Solo store discovery with repository-scope checks.
  • Adds learning lists, detail history, activity summaries, and edit/reinstate support.
  • Updates contracts, audits, tests, and setup guidance; removes the decision-model frontend while retaining its API.
File Description
infrastructure/​README.md Clarifies deployed learning setup and migration.
hub/​server/​routes/​index.ts Registers the learning-history endpoint.
hub/​server/​routes/​api/​workspace/​get/​index.db.test.ts Covers registration on the first local workspace request.
hub/​server/​routes/​api/​product/​create-product-route-dependencies/​index.ts Registers checkouts before listing local repositories.
hub/​server/​routes/​api/​product-index/​index.db.test.ts Updates learning visibility and response expectations.
hub/​server/​routes/​api/​learnings/​types.ts Adds history, activity, and Solo dependency contracts.
hub/​server/​routes/​api/​learnings/​history/​get/​index.ts Serves history with access rechecks.
hub/​server/​routes/​api/​learnings/​get/​index.ts Separates library reads from administrator capabilities.
hub/​server/​routes/​api/​learnings/​decision/​post/​index.ts Accepts edit and reinstate decisions.
hub/​server/​routes/​api/​learnings/​create-learnings-route-dependencies/​repository-authority.db.test.ts Covers reader access and Solo scope changes.
hub/​server/​routes/​api/​learnings/​create-learnings-route-dependencies/​index.ts Selects stores and connects Solo learning operations.
hub/​server/​repositories/​security-audits/​parse-security-audit-event/​index.ts Parses the additional decision actions.
hub/​server/​repositories/​security-audits/​create-security-audit/​types.ts Extends learning-decision audit types.
hub/​server/​repositories/​local-repositories/​register-local-repository/​index.ts Registers checkouts and grants local administration.
hub/​server/​repositories/​local-builds/​prepare-local-build/​index.ts Reuses checkout registration during Build preparation.
hub/​server/​repositories/​learning-decision-operations/​create-learning-decision-operation/​index.ts Records edit and reinstate operations.
hub/​server/​repositories/​learning-decision-operations/​create-learning-decision-operation/​index.db.test.ts Covers allowed decision values.
hub/​server/​index.ts Connects checkout registration to startup and workspace reads.
hub/​server/​domains/​local-development/​register-local-repositories/​index.ts Discovers checkouts without creating Builds.
hub/​server/​domains/​local-development/​register-local-repositories/​index.db.test.ts Covers registration and administrator grants.
hub/​server/​domains/​learning/​types.ts Adds titles, digests, rejected records, and history types.
hub/​server/​domains/​learning/​reconcile-learning-decision-operation/​index.ts Extends recovery to the new decision actions.
hub/​server/​domains/​learning/​list-local-learning-activity/​index.ts Aggregates Solo activity by UTC day.
hub/​server/​domains/​learning/​list-local-learning-activity/​index.test.ts Covers daily aggregation and malformed records.
hub/​server/​domains/​learning/​learning-store-arguments/​index.ts Supports Solo scopes without Hub legacy identifiers.
hub/​server/​domains/​learning/​get-learning-overview/​index.ts Reads Solo stores and projects rejected learnings.
hub/​server/​domains/​learning/​get-learning-overview/​index.test.ts Covers mixed evidence and rejected-record projection.
hub/​server/​domains/​learning/​get-learning-history/​index.ts Projects stored decisions and supporting evidence.
hub/​server/​domains/​learning/​get-learning-history/​index.test.ts Covers history projection and evidence batching.
hub/​server/​domains/​learning/​find-solo-learning-store/​index.ts Locates checkout stores and reads their scope.
hub/​server/​domains/​learning/​find-solo-learning-store/​index.test.ts Covers supported scopes and symbolic-link rejection.
hub/​server/​domains/​learning/​execute-learning-decision/​index.ts Applies Solo decisions and passes edit fields privately.
hub/​server/​domains/​learning/​execute-learning-decision/​index.test.ts Covers Solo targeting and temporary-file cleanup.
hub/​server/​domains/​learning/​create-learning-job-processors/​index.ts Selects Solo stores during decision recovery.
hub/​schema/​migrations/​20261220120000_learning_decision_actions/​migration.sql Allows edit and reinstate operation records.
hub/​docs/​storybook.md Updates learning index and detail story links.
hub/​docs/​README.md Updates the learning guide description.
hub/​docs/​frontend.md Documents the API-only decision-model boundary.
hub/​docs/​development.md Explains checkout discovery and shared Solo storage.
hub/​docs/​decision-model-control-plane.md Documents removal of decision-model page controls.
hub/​docs/​copilot.md Clarifies deployed Copilot connection setup.
hub/​client/​storybook/​fixtures/​learnings.ts Adds shared library and detail fixtures.
hub/​client/​pages/​learnings-page/​types.ts Defines the redesigned learning page data.
hub/​client/​pages/​learnings-page/​styles.css Styles the revised page layout.
hub/​client/​pages/​learnings-page/​detail/​stories.tsx Adds learning detail and decision states.
hub/​client/​features/​learnings-library/​types.ts Defines library rows, details, and history entries.
hub/​client/​features/​learnings-library/​styles.css Styles lists, details, evidence, and decision forms.
hub/​client/​features/​learning-activity-grid/​types.ts Defines daily activity presentation data.
hub/​client/​features/​learning-activity-grid/​styles.css Styles the responsive activity calendar.
hub/​client/​features/​learning-activity-grid/​index.tsx Adds activity selection and keyboard navigation.
hub/​client/​features/​learning-activity-grid/​index.test.tsx Covers calendar interaction and year changes.
hub/​client/​features/​decision-model-panel/​types.ts Removes decision-model panel data types.
hub/​client/​features/​decision-model-panel/​styles.css Removes decision-model panel styling.
hub/​client/​application/​hub/​view-models/​settings-learnings/​index.test.ts Updates page mapping and Solo activity coverage.
hub/​client/​application/​hub/​view-models/​learnings-library/​index.ts Maps filtering, pagination, details, and decisions.
hub/​client/​application/​hub/​view-models/​learnings-library/​index.test.ts Covers library navigation and detail mapping.
hub/​client/​application/​hub/​routes/​settings-learnings/​index.test.ts Removes decision-model route-action tests.
hub/​client/​application/​hub/​routes/​route-naming.test.tsx Updates learning navigation and decision assertions.
hub/​client/​application/​hub/​routes/​fixtures/​empty-learnings/​index.ts Extends the empty learning response fixture.
hub/​client/​application/​hub/​learnings-contracts/​types.ts Adds Solo, history, activity, and decision response types.
hub/​client/​application/​hub/​learnings-contracts/​index.ts Validates the expanded learning API contracts.
hub/​client/​application/​hub/​learnings-contracts/​index.test.ts Covers expanded responses and Solo activity.
hub/​client/​application/​hub/​decision-model-contracts/​types.ts Removes frontend decision-model response types.
hub/​client/​application/​hub/​decision-model-contracts/​index.ts Removes frontend decision-model validators.
hub/​client/​application/​hub/​decision-model-contracts/​index.test.ts Removes decision-model contract tests.

Review effort: Max (adaptive)

nshki and others added 8 commits November 30, 2026 15:21
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
…daries

Return export follow-up details only after the current administrator check. Keep Solo activity types in the domain and compose checkout registration and Build preparation in one domain transaction.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Keep the manual first run available with daily runs. Show status, results, and Copilot usage in an expandable summary, and do not link to destinations before they exist.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Keep excluded guidance and withheld decisions honest. Show opposing evidence and replacement targets before reconsidering rejected guidance, and do not count a carried-forward edit as a second decision. Accept Solo-length guidance throughout the edit flow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Keep checkout identity checks and decisions under Solo's config lock. Record the original scope and store key so recovery can verify an interrupted decision without opening a replacement store.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
nshki and others added 2 commits November 30, 2026 15:42
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
Deploy later migrations after the access migration under test, not into a schema that intentionally lacks its columns. Keep the populated record, backfill, and authority assertions intact.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 459b160c-a7ab-4c14-8a06-098ca9096352
@nshki
nshki marked this pull request as ready for review December 1, 2026 01:39
@nshki
nshki requested a review from a team as a code owner December 1, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants