Repository navigation
ci: run the page and ui sections on pull requests, add a same-look check - #3500
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. Walkthrough
Merge Risk:
|
There was a problem hiding this comment.
🟡 Changes recommended
The native screenshot path is unsupported, comparison errors can be misreported as passes, and cache keys omit standard-library dependencies, undermining the render checks and CI verification.
4 open issues
The native runtime does not consume SALAM_UI_SCRIPT or implement theshotcommand: RunPage calls… · New Converting comparison stderr through awk before validating it turns an ImageMagick error such as… · New This cache omits the compiler's standard-library dependencies. For example,… · New The compiler also compiles standard-library dependencies, including gui.style imported by… · New
What changed in this PR
Adds CI coverage for Salam’s page and native UI features, plus a nightly comparison of web and native rendering.
Changes:
- Adds a path-filtered gate running page and UI test sections in English and Persian.
- Adds a screenshot comparison script and scheduled workflow with configurable tolerance.
- Adds three sample pages for visual comparisons.
| File | Description |
|---|---|
.github/workflows/ui-pr-gate.yml |
Builds the compiler and gates page/UI test results. |
.github/workflows/ui-look-check.yml |
Schedules render comparisons and uploads artifacts. |
tools/bash/ui-look-check.sh |
Captures and compares web/native screenshots. |
tools/ui-look/pages/cards.salam |
Exercises components and flex card layout. |
tools/ui-look/pages/form.salam |
Exercises text and button styling. |
tools/ui-look/pages/list.salam |
Exercises stacked boxes and backgrounds. |
Review effort: Balanced
| printf 'shot %s\nquit\n' "$work/native.png" >"$work/shot.script" | ||
| (cd "$work" && SALAM_WINDOW_BACKEND=headless SALAM_UI_SCRIPT="$work/shot.script" timeout 60 ./app) >"$work/native-run.log" 2>&1 |
| diffpx=$($IM_COMPARE -metric AE -fuzz "${FUZZ}%" "$work/web-fit.png" "$work/native-fit.png" "$OUT/$name-diff.png" 2>&1 | awk '{ print int($1) }') | ||
| case "$diffpx" in '' | *[!0-9]*) diffpx=$((W * H)) ;; esac |
sha=dca23efe9211b225da9d97ba79dc21ea1ecdbeca
🤖 Salam AI reviewVerdict: 🛠️ Changes needed before merging commit SummaryThis pull request adds a path-filtered PR and main-branch gate for the What changed
Review
Tests
Risks
|
|
Deployment failed for project salam with the following error: |
|
Deployment failed for project salam with the following error: |


Adds a light, path-filtered pull request gate for the
pageanduitest sections (en and fa), and a nightly web vs native same-look check.What changed
.github/workflows/ui-pr-gate.yml: runs on pull requests, pushes to main, nightly and by hand. A changes job filters on std/gui/{ui,style,flow,color,paint,typeset,window,reactive}, std/layout, compiler/sal_layout, compiler/semantic/sema_layout*.salam, tools/salam/style-.tsv, tests//page, tests/*/ui and the gate's own files. The compiler is built once from the PR with the pinned 0.6.3 seed (about 3.5 minutes on a hosted runner) and cached on a hash of compiler/, std/, VERSION and the build script, then shared as an artifact. Six legs run headless (page en and fa split in two shards, ui en and fa). A finalUI and pages gatejob is the one to make required, since it also passes when the filter skipped everything.tools/bash/ui-gate-run.sh: runs a section, puts a 150 s limit on every compiler call, and fails only on failures that are not intools/ui-gate-known-failures.txt.tools/ui-gate-known-failures.txt: the failing tests on main today (18 ui en, 17 ui fa, 146 page en, 160 page fa, from the baseline built at 6f9e114). Both sections are red on main right now (the style-standard migration is in flight), so a plain gate would block every PR. The list only shrinks: delete a name when its fix lands. Two page error tests hang the compiler on main (runtime_layout_if_not_bool, static_layout_if); the per-call limit turns that into a normal failure instead of a 40 minute stall..github/workflows/ui-look-check.ymlandtools/bash/ui-look-check.sh: nightly and manual, not required. Renders the pages intools/ui-look/pagesas web (headless Chrome screenshot ofsalam page buildoutput) and native (the program--ui=nativegenerates, drawn byui.RenderPageand saved withpaint.SavePNG, because theSALAM_UI_SCRIPTshotdriver is not in std on main), then compares with ImageMagick under a percent tolerance. Reports and diff images are uploaded. It reports only unlessstrictis set.Examples
A page in the look corpus:
Tested
padding = 8, 16orborder = 2, solid, cyet); extend the pages as the standard lands.Summary by CodeRabbit