Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved consent and authorization gaps can expose screenshots after consent withdrawal or deletion and reveal learning content that should be withheld.
11 open issues
Revoke Hub screenshot access before withdrawing the grant · New Verify a live screenshot reference before serving copied URLs · New Revalidate screenshot consent immediately before sending · New Preserve grant identity to prevent old reports seeing new screenshots · New Apply consent and integrity checks to usage commit responses · New Load applied learnings after rendering instead of blocking the prototype · New Batch screenshot lookups and read the active grant once · New Test screenshot consent filtering in applied-learning responses · New Test revoked access, invalid inputs, and missing screenshots · New Add usageForCommit to the public TypeScript declarations · New Pin the delivered version instead of resolving the latest digest match · New
What changed in this PR
Connects agents’ unverified learning-use reports to Hub’s existing Applied learnings dialog for the selected Build.
Changes:
- Adds commit-based usage queries to the learning store and CLI.
- Loads reported learnings, versions, and screenshot links on the prototype page.
- Adds screenshot endpoints, consent filtering, API contracts, tests, and documentation.
| File | Description |
|---|---|
packages/learning/test/cli.test.mjs |
Checks usage lookup and deletion behavior. |
packages/learning/src/store.mjs |
Retrieves usage reports for a commit. |
packages/learning/src/cli.mjs |
Adds the usage --commit command. |
packages/learning/README.md |
Documents the usage command. |
hub/server/routes/index.ts |
Registers applied-learning and screenshot endpoints. |
hub/server/routes/api/learnings/types.ts |
Defines new route dependencies. |
hub/server/routes/api/learnings/screenshots/get/index.ts |
Serves screenshots after access checks. |
hub/server/routes/api/learnings/index.test.ts |
Tests the new endpoints’ success responses. |
hub/server/routes/api/learnings/create-learnings-route-dependencies/index.ts |
Connects usage queries, consent filtering, and storage. |
hub/server/routes/api/learnings/create-learnings-route-dependencies/applied-learnings.db.test.ts |
Tests screenshot reads after consent changes. |
hub/server/routes/api/learnings/applied/get/index.ts |
Validates and returns applied-learning requests. |
hub/server/repositories/agent-screenshots/find-consented-agent-screenshot/index.ts |
Finds screenshots under the configured grant. |
hub/server/index.ts |
Supplies artifact storage to learning routes. |
hub/server/domains/learning/types.ts |
Defines applied-learning records. |
hub/server/domains/learning/get-applied-learnings/index.ts |
Maps commit reports to prototype learnings. |
hub/server/domains/learning/get-applied-learnings/index.test.ts |
Tests report filtering and screenshot mapping. |
hub/docs/learning-foundation.md |
Documents Build matching and screenshot behavior. |
hub/client/application/hub/view-models/prototype-show-data/index.ts |
Builds dialog labels and screenshot links. |
hub/client/application/hub/view-models/prototype-show-data/index.test.ts |
Tests selected-Build dialog data. |
hub/client/application/hub/screens/prototype-screen/index.tsx |
Passes applied learnings into page data. |
hub/client/application/hub/routes/prototype/index.tsx |
Loads applied learnings alongside prototype data. |
hub/client/application/hub/routes/prototype/index.test.ts |
Tests fallback when learnings are unavailable. |
hub/client/application/hub/routes/fixtures/preview-handlers/index.ts |
Stubs usage requests in preview fixtures. |
hub/client/application/hub/requests/get-applied-learnings/index.ts |
Adds the applied-learnings API request. |
hub/client/application/hub/learnings-contracts/types.ts |
Defines client response types. |
hub/client/application/hub/learnings-contracts/index.ts |
Validates applied-learning API responses. |
Review effort: Max (adaptive)
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
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
nshki
force-pushed
the
nshki/feat/hub/applied-learnings
branch
from
November 26, 2026 08:30
0a8ddda to
c29d07d
Compare
… in usage 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
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
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 25291e01-0146-42cb-ac6d-f5e1dd5c35f5
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
Agents can already report which learnings they applied while building a prototype, but nobody can see those reports. Before Hub can judge whether a learning helped, people need to see what the agent said it used, on the Build it made. This shows those reports on the prototype page.
What changes
When someone opens a Build with
?build=N, Hub looks up usage reports made for that Build's commit. If there are any, More actions offers Applied learnings. The dialog lists each learning with the version the agent received. It links to before and after screenshots when the repository allows screenshots. The dialog says the list is the agent's report and is not verified.The learning package gains a
usage --commit <sha>command that lists those reports. Hub calls it the same way it reads learning history. Hub serves screenshots itself, and only while the screenshot consent they were saved under is still active.Needs design review
Storybook screenshots
No story presentation changes. The dialog already existed in the stories; this connects it to real data.
Hub/Pages/Prototype review › Applied learnings (light, 1280×800)