Skip to content

fix(page-fidelity): score a popup wireframe's dialog, not the page behind it (#471) - #482

Merged
MendixMau merged 3 commits into
masterfrom
fix/page-fidelity-popup
Oct 20, 2026
Merged

MendixMau merged 3 commits into
masterfrom
fix/page-fidelity-popup

Conversation

@MendixMau

@MendixMau MendixMau commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Fixes #471

Direct lane (changes to skills/, bug-logs/, bin/, project-bin/, project-tests/, pipelines)

What changed and why (one paragraph):
project-bin/page-fidelity.js contentOf() picks the wireframe's content boundary from a preference list (<main>, wf-screen, wf-shell, mockup-frame, div.main, div.content, <body>). A popup wireframe draws the caller's page behind a scrim: .popup-stage > .shell-behind + .dialog-scrim > .dialog. The shell behind carries its own div.main, so the popup was scored against the caller's page head, <h1> and card. The issue measured 29% on a popup whose fields and bindings all matched, and 13% on a throwaway wireframe. The file's own header already said popup content is wrapped in .dialog, but nothing handled it. The fix switches to the dialog boundary only with popup evidence: a .popup-stage or .dialog-scrim in the wireframe, or a page MDL whose Layout: names a popup layout (the same test the scorer already uses for its chrome set). With evidence, it scores the element whose class list contains the word dialog (dialog-head/dialog-foot never count; div/section/dialog/aside tags are accepted). If there is no .dialog, it scores the stage minus .shell-behind. Without evidence nothing changes. .dialog is the design system's own component, and a full-page wireframe may draw an open confirm with it; the first cut of this PR switched on any .dialog, which scored a grouped overview plus an inline confirm as the confirm alone (39% on master, 5% on that cut). A bare-.dialog popup wireframe with no stage or scrim still reads <body>, as before, unless its page uses a popup layout. The annotation stripping after the boundary (wf-*, anno, bind tables, .bound) is unchanged.

Golden input: tests/wave2/fixtures/page-fidelity-popup/product-newedit-describe-v023.mdl is a verbatim describe page of a real popup page (Layout: Atlas_Core.PopupLayout), mxcli v0.23.0. It is copied unchanged from the context-pack fixture's capture. The wireframe product-newedit-popup.html is hand-drawn in the issue's quoted shape, because the issue quotes the structure, not the file. CAPTURE.md beside it says so and asks for a re-capture when a real popup wireframe can be shared.

Field evidence (rule 4):
Reported by jopterhorst against release/v1.0 at 2d80287: 29% on the field popup and 13% on a minimal throwaway, every miss in .shell-behind. Reproduced here on master with the fixture: 18% (headings 0/2 actions 0/1 content 1/2 classes 2/7). Every miss came from the shell: Product catalog, Active items, New item, page-head sub page-actions card card-sub. With the fix the result is 100% (headings 1/1 actions 2/2 content 2/2 classes 6/6, with dialog-head dialog-foot reported as layout chrome). Owed by the maintainer: one run on the reporter's popup wireframe.

Impact

Row Answer
Process: human steps or gates added/removed; does anything new block; new stage artifacts none: the instrument is not a gate. Scoring change: a wireframe with popup evidence (a .popup-stage or .dialog-scrim, or a page on a popup layout) and a .dialog is now scored on that dialog only, so its recorded text-match moves, usually up, because the caller's page leaves the denominator. A full-page wireframe that draws a .dialog without that evidence scores exactly as before; the fixture pins this at the master number.
Dependencies: shared files touched; order vs other open PRs; new tools/platform assumptions; new artifact reads + their producer Only project-bin/page-fidelity.js. No new reads or tools. prototype-route.js callers are unaffected (test-prototype-route.sh 14/0). No ordering constraint against #469/#470/#477 beyond a trivial CHANGELOG.md line merge.
Context cost: always-loaded words per role, base → head none: no routed or always-loaded file touched (bin/render-routing.sh --check clean).
Behaviour: A/B for agent-read text n/a: scripts only.
Runtime n/a. Two more regex scans of one HTML file.
  • No client data anywhere in the diff (whole-word grep of added lines for the denylist terms, /Users/ and /home/user: 0 hits; LEAKGUARD_ALLOW_NO_DENYLIST=1 bin/check-no-client-data.sh clean)
  • Size cap: 6 files, about 30 lines changed in the scorer; the rest is fixtures and CHANGELOG (the branch also carries a merge of origin/master)
  • Test tier reached: T1. tests/wave2/test-page-fidelity-mocks.sh project-bin/page-fidelity.js gives 78/78. It has 10 new cases:
    • the shell's h1, card and button are not scored, and the dialog matches at 100%;
    • a stage without .dialog still drops the shell;
    • popup evidence with no .dialog and no stage keeps the old div.main boundary;
    • a popup layout in the MDL alone is enough evidence;
    • the review's regression case: grouped-overview plus an inline .dialog confirm scores the master number unchanged (39%, headings 1/2 actions 1/3 content 1/2 classes 1/5).
    • On master's scorer the fixture gives 8 FAIL; on this PR's first head (160d180), 1 FAIL, which is the inline-confirm regression. test-prototype-route.sh (drives page-fidelity on a file and a route) gives 14/0. bin/check-scripts.sh, bin/check-portability.sh, bin/render-routing.sh --check and bin/check-pr-discipline.sh origin/master are clean.
  • For a changed instrument: MDL golden is captured. The wireframe is drawn to the issue's quoted structure, stated in CAPTURE.md. Layouts: the scorer reads its two inputs by path; project-root discovery is unchanged. Platforms: pure Node string handling.
  • For a new skill: n/a
  • CHANGELOG.md line appended, crediting jopterhorst
  • New bug entries: n/a

Left open: a full-page wireframe that draws an inline .dialog and a .dialog-scrim, for example a full page shown with its own confirm open over a scrim, is read as a popup and scored as the confirm. That shape needs .popup-stage/.shell-behind to be scored the other way.

https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw


Generated by Claude Code

…hind it (#471)

contentOf() tried div.main before anything else, and a popup wireframe's
.shell-behind carries the caller's div.main, so the popup was scored
against the caller's page. A wireframe with a .dialog now scores the
dialog; a .popup-stage without one scores the stage minus .shell-behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
…dence (#471 review)

.dialog is the design system's own component, so any class-word .dialog
turned a full-page wireframe with an inline confirm into that confirm
(39% on master, 5% on the first cut). The dialog boundary now needs a
.popup-stage or .dialog-scrim in the wireframe, or a popup layout in the
page MDL; otherwise the old boundary list applies unchanged. Fixture
78/78: 8 FAIL on master, 1 (the inline-confirm regression) on the
previous head.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
@MendixMau
MendixMau merged commit 6c97adf into master Oct 20, 2026
2 checks passed
MendixMau added a commit that referenced this pull request Oct 20, 2026
Merges six independently reviewed bug fixes. Each was MERGE after one fix round.
- #486 progress-report nav (#479 items 1-3)
- #480 conformance-check (#470)
- #482 page-fidelity popup (#471)
- #481 monkey sign-out i18n (#469)
- #484 bare $VAR before non-ASCII (#467)
- #485 \t in sed/grep brackets (#468)

Verified on the integrated tree:
- check-scripts, check-portability, render-routing --check, pr-discipline and the leak guard are clean.
- progress-report polish 53, field-fixes 105 and pages 54 pass.
- conformance-absent-marker 24, monkey-left-app 22, page-fidelity-mocks 78, status-bare-var 3, sed-tab-bracket 9, context-pack 55 and bug03-gates 47 pass.
Field runs on real projects are owed by the maintainer.

Fixes #479 items 1-3, #470, #471, #469, #467, #468.
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.

page-fidelity.js scores a popup wireframe against the page drawn behind the dialog

2 participants