You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
page-fidelity.js class dimension counts only literal Class: strings in the page body: snippet contents, ButtonStyle classes and layout chrome read as missing #157
project-bin/page-fidelity.jsscore() (~l.404) builds the page's class set from the page's own MDL only: Class: '…' and DynamicClasses tokens. It drops a small fixed chromeSet (topbar, userchip, avatar, content, or the dialog frame on popups).
Three sources of classes that really render are invisible to it, so the wireframe's classes read as missing:
Snippet calls are not expanded. A page that embeds a snippet contributes none of the snippet's classes. grep -i snippet project-bin/page-fidelity.js → nothing.
ButtonStyle: is not mapped to its classes.ButtonStyle: Default renders btn btn-default, and Primary renders btn btn-primary, etc. A wireframe a.btn reads as a missing class on every page that uses styled buttons.
Layout-owned chrome beyond the fixed four. The rail/sidebar/topbar classes a project's own layout renders are not the page's to declare, but only the hard-coded set is excluded. Sample width classes a wireframe uses to mock data (e.g. bar-w-*) are counted too.
A dashboard page scored 69% (classes 58/82, actions 1/2).
3 of the 24 "missing" classes were present inside the health snippet the page embeds.
Most of the rest were the layout's rail/topbar chrome and the wireframe's sample bar-w-* widths, which the page sets at runtime.
Checked against the wireframe class list vs the page and snippet MDL classes (comm).
The style-gallery page scored 80%, with a.btn missing on every default button.
In both cases the LOOK, not the score, was the check.
Suggested fix
Resolve snippetcall <Module>.<Snippet> in the page body, fetch the snippet's MDL the same way the page's is fetched, and union its classes. Do this recursively, with a cycle guard.
Map ButtonStyle: <X> to btn + btn-<lowercase X>. Map other widget properties with a fixed rendered class the same way, only where verified in a rendered DOM.
Let the chrome set come from the page's layout: the classes in the layout's own MDL, or a chromeClasses list in the project config. Keep reporting them as "chrome (layout-supplied, not scored)", as today.
Keep printing the miss list. The percentage stays advisory.
These need golden captures, for example describe snippet output and a rendered DOM for ButtonStyle mapping. That is why this is filed rather than fixed.
Files
project-bin/page-fidelity.js: score(), pageMdl()
skills/ui-preflight-pages.md / LOOK guidance, if the score's scope changes
Related: the text-match looseness of the same scorer is filed separately.
Status after 1.0 (v2026.10.19): snippet expansion, ButtonStyle classes and layout chrome are now handled in page-fidelity.js. Still to check: the wireframe sample bar-w-* width classes on a real page. If that scores right, this can close.
Fixed. Same synthetic wireframe and MDL, run on two versions. Inputs: a snippet with card/kpi, ButtonStyle: Primary, a layout carrying rail, and one bar-w-40.
Master: classes 5/6, with rail reported as layout chrome (not scored), 93%.
Snippet bodies are expanded (95bb212, #191). ButtonStyle maps to btn btn-<style>, and layout chrome is read from describe layout or --chrome (31e90ae, #329). On the open bar-w-* point: when the bar rows repeat, as sample bars do, master classes them as a bound-data mock and does not score them. Only a single-use width class is still counted, and --chrome excludes it. Part of release v2026.10.19. Reopen if a field page misscores.
Activity
Merge #318: page-fidelity scorer matches displayed text (closes #158,…
MendixMau commentedon Oct 19, 2026
Status after 1.0 (v2026.10.19): snippet expansion, ButtonStyle classes and layout chrome are now handled in page-fidelity.js. Still to check: the wireframe sample
bar-w-*width classes on a real page. If that scores right, this can close.MendixMau commentedon Oct 20, 2026
Fixed. Same synthetic wireframe and MDL, run on two versions. Inputs: a snippet with
card/kpi,ButtonStyle: Primary, a layout carryingrail, and onebar-w-40.classes 3/7, missed: rail bar-w-40 btn btn-primary, 75%.classes 5/6, withrailreported as layout chrome (not scored), 93%.Snippet bodies are expanded (95bb212, #191). ButtonStyle maps to
btn btn-<style>, and layout chrome is read fromdescribe layoutor--chrome(31e90ae, #329). On the openbar-w-*point: when the bar rows repeat, as sample bars do, master classes them as a bound-data mock and does not score them. Only a single-use width class is still counted, and--chromeexcludes it. Part of release v2026.10.19. Reopen if a field page misscores.Generated by Claude Code