Skip to content

feat(hub): add decision model learnings flow - #304

Open
alliscode wants to merge 1 commit into
alliscode-decision-taskset-sourcefrom
alliscode-decision-model-ux
Open

alliscode wants to merge 1 commit into
alliscode-decision-taskset-sourcefrom
alliscode-decision-model-ux

Conversation

@alliscode

@alliscode alliscode commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Why

Repository administrators need one place to decide whether customer-run decision-model training is ready, bounded, and worth promoting. The control plane now exposes the evidence and lifecycle, but without this flow designers cannot review coverage, training progress, candidate quality, privacy deletions, or Build findings in Hub.

What changes

The Learnings page now adds a human-controlled decision-model flow for Hub administrators with repository access. It keeps repository learning authority separate from Hub administration, isolates an unavailable runtime from accepted learning decisions, shows authoritative taskset coverage and blockers, and lets an administrator save bounded training settings.

Training confirmation is bound to the settings generation the administrator reviewed. Administrators can follow and cancel active work, distinguish retryable and terminal failures, and compare candidates using held-out reward, calibration, per-learning changes, elapsed time, usage, and cost. Promotion, rejection, and rollback stay explicit and generation-bound; there is no automatic promotion.

The latest saved Build evaluation links to the accepted Build and names the learning, route, viewport, theme, probabilities, and explanation. Removed learning text remains private, runtime deletion progress is visible, and legacy evaluations remain visibly unavailable. Deterministic fixture results are labeled as local contract examples rather than proof of model quality.

flowchart LR
  evidence[Accepted learnings and Build screenshots] --> readiness[Coverage and readiness]
  readiness --> training[Confirmed bounded training]
  training --> candidate[Candidate comparison]
  candidate --> decision{Administrator decision}
  decision -->|Promote| evaluation[Build findings]
  decision -->|Reject| rejected[Rejected candidate]
  evaluation -->|Rollback| prior[Previous promoted model]
  withdrawal[Consent withdrawal] --> deletion[Runtime deletion status]
Loading

Storybook screenshots

Existing Learnings states affected by the new panel

Hub/Pages/Learnings — Default — dark theme — desktop viewport

Default Learnings page with decision model

Hub/Pages/Learnings — Access Denied — dark theme — desktop viewport

Learnings access denied

Hub/Pages/Learnings — Opposing Evidence — dark theme — desktop viewport

Opposing evidence with decision model

Hub/Pages/Learnings — First Visit — dark theme — desktop viewport

First visit with decision model

Hub/Pages/Learnings — Missing Metadata — dark theme — desktop viewport

Missing learning metadata with decision model

Hub/Pages/Learnings — Identity Revalidation — dark theme — desktop viewport

Identity revalidation with decision model

Hub/Pages/Learnings — Replacing Guidance — dark theme — desktop viewport

Replacing guidance with decision model

Hub/Pages/Learnings — Copilot Refused — dark theme — desktop viewport

Copilot refusal with decision model

Hub/Pages/Learnings — Running — dark theme — desktop viewport

Learning run in progress with decision model

Hub/Pages/Learnings — Daily Run Waiting — dark theme — desktop viewport

Daily learning run waiting

Hub/Pages/Learnings — Failed Run — dark theme — desktop viewport

Failed learning run

Hub/Pages/Learnings — Load Error — dark theme — desktop viewport

Learning store load error with decision model

Decision-model lifecycle and privacy states

Hub/Pages/Learnings — Decision Runtime Not Configured — dark theme — desktop viewport

Decision runtime not configured guidance

Hub/Pages/Learnings — Decision Runtime Unavailable — dark theme — desktop viewport

Decision runtime unavailable guidance

Hub/Pages/Learnings — Repository Learning Authority Only — dark theme — desktop viewport

Repository learning authority without Hub administration

Hub/Pages/Learnings — Decision Training Paused — dark theme — desktop viewport

Decision training paused

Hub/Pages/Learnings — Decision Training Blocked — dark theme — desktop viewport

Decision training evidence blockers

Hub/Pages/Learnings — Decision Training Queued — dark theme — desktop viewport

Queued decision training

Hub/Pages/Learnings — Decision Training Running — dark theme — desktop viewport

Running decision training

Hub/Pages/Learnings — Decision Training Failures — dark theme — desktop viewport

Retryable and terminal training failures

Hub/Pages/Learnings — Decision Candidate Promoted — dark theme — desktop viewport

Promoted candidate comparison

Hub/Pages/Learnings — Decision Candidate Rejected — dark theme — desktop viewport

Persisted candidate rejection

Hub/Pages/Learnings — Legacy Build Evaluation — dark theme — desktop viewport

Legacy Build evaluation without structured findings

Hub/Pages/Learnings — Removed Learning Text — dark theme — desktop viewport

Privacy-safe finding after learning text removal

Hub/Pages/Learnings — Runtime Deletion Pending — dark theme — desktop viewport

Runtime deletion progress

Explicit confirmations

Hub/Pages/Learnings — Training Confirmation — dark theme — desktop viewport

Generation-bound training confirmation

Hub/Pages/Learnings — Promotion Confirmation — dark theme — desktop viewport

Candidate promotion confirmation

Hub/Pages/Learnings — Rejection Confirmation — dark theme — desktop viewport

Candidate rejection confirmation

Hub/Pages/Learnings — Rollback Confirmation — dark theme — desktop viewport

Promoted model rollback confirmation

@alliscode
alliscode requested review from a team and nshki as code owners November 19, 2026 18:31
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 18:31

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

Critical state-isolation and concurrency flaws can overwrite another repository’s settings and execute promotion, rollback, or training actions based on stale confirmations.

18 open issues
What changed in this PR

Adds a decision-model workflow to the repository Learnings page, connecting Hub administrators to the existing training and Build-evaluation control plane.

Changes:

  • Adds bounded training settings, readiness, job history, candidate comparisons, and explicit model decisions.
  • Connects overview requests and mutations through client contracts, route actions, and mock handlers.
  • Adds component, route, and contract tests, Storybook states, and frontend documentation.
File Description
hub/​docs/​frontend.md Documents the Learnings decision-model interface.
hub/​docs/​decision-model-control-plane.md Describes the frontend boundary and supported workflow.
hub/​client/​pages/​learnings-page/​types.ts Defines decision-model presentation data.
hub/​client/​pages/​learnings-page/​stories.tsx Adds runtime, training, candidate, and evaluation states.
hub/​client/​pages/​learnings-page/​index.tsx Integrates the decision-model panel.
hub/​client/​features/​decision-model-panel/​styles.css Styles settings, comparisons, history, and findings.
hub/​client/​features/​decision-model-panel/​index.tsx Implements controls, confirmations, and evidence displays.
hub/​client/​features/​decision-model-panel/​index.test.tsx Covers panel states and confirmation forms.
hub/​client/​application/​hub/​view-models/​settings-learnings/​index.ts Maps control-plane responses to presentation data.
hub/​client/​application/​hub/​view-models/​settings-learnings/​index.test.ts Covers authority, coverage, metrics, and failure mappings.
hub/​client/​application/​hub/​routes/​settings-learnings/​index.tsx Loads overviews and submits decision-model mutations.
hub/​client/​application/​hub/​routes/​settings-learnings/​index.test.ts Covers loading, mutation payloads, and stale-generation responses.
hub/​client/​application/​hub/​mocks/​create-mock-handlers/​index.ts Registers decision-model mock endpoints.
hub/​client/​application/​hub/​mocks/​create-decision-model-handlers/​index.ts Provides mock control-plane data and mutations.
hub/​client/​application/​hub/​decision-model-contracts/​types.ts Defines client control-plane response types.
hub/​client/​application/​hub/​decision-model-contracts/​index.ts Adds response-validation schemas.
hub/​client/​application/​hub/​decision-model-contracts/​index.test.ts Covers overview validation and configuration bounds.

Review effort: Max (adaptive)

Comment thread hub/docs/frontend.md Resolved
@alliscode
alliscode added this pull request to stack #320 November 20, 2026 00:27
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@alliscode
alliscode force-pushed the alliscode-decision-model-ux branch from 06d81bb to f72b07e Compare November 20, 2026 00:41
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