Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 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
Isolate optional panel failures from the Learnings page · New Reject training requests when confirmed settings have changed · New Reset panel drafts and confirmations when repositories change · New Invalidate promotion and rollback confirmations when generation changes · New Normalize cancellation state before validating the response · New Scope mock state by validated repository ID · New Use a seeded Build ID in the prototype link · New Prevent rollback to a rejected candidate · New Label the count as total samples, not held-out samples · New Show blockers only for blocked preflight states · New Avoid asserting a timezone-dependent rejection date · New Reset the idempotency key after a training request is accepted · New Make the horizontally scrolling table keyboard-focusable · New Move focus into confirmations and restore it on cancel · New Move presentation types and fixtures into the feature · New Remove the unreachable Storybook-only critical alert · New Add screenshots for every affected Learnings story · New Link to the control-plane guide instead of duplicating it · New
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)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
alliscode
force-pushed
the
alliscode-decision-model-ux
branch
from
November 20, 2026 00:41
06d81bb to
f72b07e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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]Storybook screenshots
Existing Learnings states affected by the new panel
Hub/Pages/Learnings — Default — dark theme — desktop viewport
Hub/Pages/Learnings — Access Denied — dark theme — desktop viewport
Hub/Pages/Learnings — Opposing Evidence — dark theme — desktop viewport
Hub/Pages/Learnings — First Visit — dark theme — desktop viewport
Hub/Pages/Learnings — Missing Metadata — dark theme — desktop viewport
Hub/Pages/Learnings — Identity Revalidation — dark theme — desktop viewport
Hub/Pages/Learnings — Replacing Guidance — dark theme — desktop viewport
Hub/Pages/Learnings — Copilot Refused — dark theme — desktop viewport
Hub/Pages/Learnings — Running — dark theme — desktop viewport
Hub/Pages/Learnings — Daily Run Waiting — dark theme — desktop viewport
Hub/Pages/Learnings — Failed Run — dark theme — desktop viewport
Hub/Pages/Learnings — Load Error — dark theme — desktop viewport
Decision-model lifecycle and privacy states
Hub/Pages/Learnings — Decision Runtime Not Configured — dark theme — desktop viewport
Hub/Pages/Learnings — Decision Runtime Unavailable — dark theme — desktop viewport
Hub/Pages/Learnings — Repository Learning Authority Only — dark theme — desktop viewport
Hub/Pages/Learnings — Decision Training Paused — dark theme — desktop viewport
Hub/Pages/Learnings — Decision Training Blocked — dark theme — desktop viewport
Hub/Pages/Learnings — Decision Training Queued — dark theme — desktop viewport
Hub/Pages/Learnings — Decision Training Running — dark theme — desktop viewport
Hub/Pages/Learnings — Decision Training Failures — dark theme — desktop viewport
Hub/Pages/Learnings — Decision Candidate Promoted — dark theme — desktop viewport
Hub/Pages/Learnings — Decision Candidate Rejected — dark theme — desktop viewport
Hub/Pages/Learnings — Legacy Build Evaluation — dark theme — desktop viewport
Hub/Pages/Learnings — Removed Learning Text — dark theme — desktop viewport
Hub/Pages/Learnings — Runtime Deletion Pending — dark theme — desktop viewport
Explicit confirmations
Hub/Pages/Learnings — Training Confirmation — dark theme — desktop viewport
Hub/Pages/Learnings — Promotion Confirmation — dark theme — desktop viewport
Hub/Pages/Learnings — Rejection Confirmation — dark theme — desktop viewport
Hub/Pages/Learnings — Rollback Confirmation — dark theme — desktop viewport