Repository navigation
feat: add a run strip gallery - #1150
small-angel wants to merge 2 commits into
Conversation
The composer has launch, monitor, flag, and sweep states that are hard to reproduce on demand. Render the real banner from fixtures in a standalone Vite entry so these states can be audited at different widths, themes, and text directions. Render every specimen in CI. Assisted-by: gpt-6.2-sol Assisted-by: claude-opus-5.5
[Low impact] The change is contained to a standalone developer gallery. The gallery’s UI text must follow the repository’s translation requirement before merging. FindingsFix with agent prompt### Issue 1
ui/tests/runStripGallery.test.mjs:11-12
The test never gives charts a nonzero size. Happy-dom does not lay out elements, and `Chart` skips lines, bars and points when `width` is zero. The text and error checks can therefore pass without exercising those drawing paths. Set element sizes as `runCharts.test.mjs` does, then check that chart specimens produce their expected marks.
### Issue 2
ui/gallery/Gallery.tsx:93-98
The new controls, instructions and action messages use hardcoded English instead of Paraglide. The repository guide requires UI text to go through Paraglide, with new keys in every catalog. Move this page text into the catalogs before merging; fixture data can remain specimen content.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryAdds a standalone gallery with 135 fixture specimens using the real run components.
Intentional existing findings acknowledged by Review used source inspection only. Tests and browser checks were not run. Reviews (1) · Last reviewed commit: "feat: add a run strip gallery" · Reviewed by Greptile |
| const { container } = await render(createElement(Gallery)); | ||
| await settle(); |
There was a problem hiding this comment.
Charts never draw during testing
The test never gives charts a nonzero size. Happy-dom does not lay out elements, and Chart skips lines, bars and points when width is zero. The text and error checks can therefore pass without exercising those drawing paths. Set element sizes as runCharts.test.mjs does, then check that chart specimens produce their expected marks.
Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/tests/runStripGallery.test.mjs
Line: 11-12
Comment:
**Charts never draw during testing**
The test never gives charts a nonzero size. Happy-dom does not lay out elements, and `Chart` skips lines, bars and points when `width` is zero. The text and error checks can therefore pass without exercising those drawing paths. Set element sizes as `runCharts.test.mjs` does, then check that chart specimens produce their expected marks.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
valid. dfb15a9 gives elements a size the way runCharts.test.mjs does and checks every chart specimen draws a line, point or bar. at zero width the new check fails on the first chart specimen.
| <h1>Run strip gallery</h1> | ||
| <div className="gallery-controls"> | ||
| <label>Theme | ||
| <select value={theme} onChange={(event) => setTheme(event.target.value === "dark" ? "dark" : "light")}> | ||
| <option value="light">Light</option> | ||
| <option value="dark">Dark</option> |
There was a problem hiding this comment.
Gallery controls bypass translation
The new controls, instructions and action messages use hardcoded English instead of Paraglide. The repository guide requires UI text to go through Paraglide, with new keys in every catalog. Move this page text into the catalogs before merging; fixture data can remain specimen content.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/gallery/Gallery.tsx
Line: 93-98
Comment:
**Gallery controls bypass translation**
The new controls, instructions and action messages use hardcoded English instead of Paraglide. The repository guide requires UI text to go through Paraglide, with new keys in every catalog. Move this page text into the catalogs before merging; fixture data can remain specimen content.
**Context Used:** AGENTS.md ([source](https://github.com/alphaxiv/openresearch/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
leaving these in English on purpose: the gallery is a developer page that never ships (vite build only takes index.html), and its labels describe fixtures. putting them in the 12 catalogs would send translators strings no user sees. the components it renders still take every word from Paraglide, which is why the gallery has a language switch.
There was a problem hiding this comment.
That distinction makes sense. The gallery is a developer-only page excluded from the shipped build, and translating its fixture labels and controls in every catalog would add noise without improving user-facing localization. The rendered run-strip components still use Paraglide. My comment applied the UI-text rule too broadly; I retract it.
Happy-dom lays out nothing, so every chart in the gallery test had zero width and drew no lines, points or bars. Give elements a size as the chart tests do, and check each chart specimen draws marks. Assisted-by: claude-opus-5.5
A standalone page for auditing everything the run strip above the composer can show:
pnpm --dir ui galleryopens/gallery.html. It renders the real strip, run line, stage card, flag choices, notices and sweep summary from fixtures (no backend, nothing leaves the page), with 135 specimens grouped by lifecycle, stage cards, watcher and flags, freshness and contact, numbers and charts, several runs, and text stress. Theme, width (1440 / 720 / 420), language (English or Arabic) and group are switchable. It's a second Vite entry, sodist/doesn't include it, andrunStripGallery.test.mjsrenders every specimen so a fixture that stops matching the components fails CI.Specimens that render wrong today are kept as they are and labelled Finding: repeated error and retry lines in the expanded strip, Connect offered twice, bars for repeated categories overlapping, and the first chart marker clipped at step zero.
Assisted-by: gpt-6.2-sol
Assisted-by: claude-opus-5.5