Repository navigation
Learning: examples as a compact list with a detail panel - #246
Merged
Merged
Conversation
"Examples in use" printed every example as a card with its whole excerpt, in two tall columns, raw markup included. It is now one list: a row per example (clean title, why it is an example, kind/category/path tags, repo and PR link, reward and use chips), To follow / To avoid toggles with counts, search, repository and kind filters, most used first, ten at a time. A row opens the example in a side panel (full screen on a phone) with the rendered summary, PR and run links, reward, use count, when it was last used and by which runs. Older gateways that send only `text` are read the same way.
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.
Summary
"Examples in use" on the Learning page was turning into a wall: two tall columns of cards, each with the full excerpt, raw markup included (HTML comments,
##,**bold**, "Source ticket" lines, callouts, words cut in half). It now follows the issue-list pattern (Linear, GitHub, Sentry): a dense list of one-line rows, filters above, and the full item in a side panel beside the list. Server side (clean title, summary, reason, recent uses) is CoderHelm/coderhelm-platform#334; this works with or without it.Changes
src/app/learning/examples.tsx(new), replacing the card columns inpage.tsx:Drawer: a side panel on desktop and a full-screen sheet on a phone. It shows the summary rendered as markdown (react-markdown, raw HTML skipped, HTML comments removed), repository, PR link, path, a link to the run that wrote it, reward with its number of outcomes, use count, last used, date added, and recent uses (review of #N or a coding run, with links). Examples have no admin actions (remove or demote) yet, so the panel shows none.text(an older one), the page builds the title, summary and reason fromtextitself, the same way the gateway does.Drawer: areturnFocusTooption, so closing a panel opened from a row's own button puts focus back on that row.LearningExemplartype:title,summary,reason,events,run_id,last_used_at,used_by.Verification
npm run lint,npm run typecheck,npm run check:openapi,npm run build, and the full e2e suite on the static build (E2E_STATIC=1): 1144 passed.learning.spec.ts: