Skip to content

feat: add a run strip gallery - #1150

Open
small-angel wants to merge 2 commits into
mainfrom
clo/run-strip-gallery
Open

small-angel wants to merge 2 commits into
mainfrom
clo/run-strip-gallery

Conversation

@small-angel

Copy link
Copy Markdown
Contributor

A standalone page for auditing everything the run strip above the composer can show: pnpm --dir ui gallery opens /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, so dist/ doesn't include it, and runStripGallery.test.mjs renders 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.

Gallery, light, 1440 px Gallery, dark, 420 px, Arabic
A marked finding

Assisted-by: gpt-6.2-sol
Assisted-by: claude-opus-5.5

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
@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/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.

Findings

  1. P2 Charts never draw during testing ▶
  2. P2 Gallery controls bypass translation ▶
Fix 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.

Summary

Adds a standalone gallery with 135 fixture specimens using the real run components.

  • Developers can inspect 135 run-strip examples on a standalone page.

Intentional existing findings acknowledged by small-angel: repeated reporting errors and SSH retry lines, duplicate Connect offers, overlapping bars for repeated categories, and the clipped step-zero marker. These remain labelled examples, not new defects reported here.

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

Comment on lines +11 to +12
const { container } = await render(createElement(Gallery));
await settle();

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.

P2 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment written by Claude Opus 5.5

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.

Comment thread ui/gallery/Gallery.tsx
Comment on lines +93 to +98
<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>

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.

P2 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!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment written by Claude Opus 5.5

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.

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.

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

This branch has not been deployed

No deployments
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.

1 participant