Strengthen design contract + instantiation: shared Rating, hero wiring, visual gate - #8
Merged
Merged
Conversation
…idelity The built app diverged from the target design: broken hero image, modal rating stars as grey outlines instead of filled orange, boxed stats, monospace input. The contract specified these correctly; the instantiation and tasks did not enforce it, and there was no visual gate, so tsc/lint/test passed while the page looked wrong. - design-contract §4.9: build the Rating once (one component, three modes); picker marks are filled signal/primary, not outline-only - design-contract §4.10: inputs/textareas inherit the Barlow UI font, not the user-agent monospace default; §8 checklist gains rating-fill, brand-media- renders, and non-monospace items - instantiation §3.0: brand-asset wiring (copy into src/assets or public, never import across the specs/ boundary); §3.2 hero required + must render; §3.3 stat cluster not boxed; new §3.8 shared Rating component - AGENTS.md: design-bearing tasks get a visual check (verify is necessary, not sufficient); tasks 2/3/4 gain concrete "run the app" gates Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR tightens the spec “harness” for the EPPC session feedback Code App so the generated UI is forced to match the design contract (especially the hero asset pipeline, the Rating component’s filled stars, the stat cluster layout, and textarea font), and adds a visual verification gate for design-bearing tasks.
Changes:
- Require a single shared Rating component (mode-switched) across card, modal picker, and confirmation, with explicit “filled” behavior in the picker.
- Add explicit asset wiring requirements to avoid importing brand media across the
specs/boundary and ensure hero/logo actually render. - Introduce “Visual check (run the app)” gates for Tasks 2/3/4 and expand the conformance checklist accordingly.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| specs/tasks/task-2-home-list.md | Requires building the shared Rating component in Task 2 and adds a visual check for stat cluster + gold settled stars. |
| specs/tasks/task-3-rate-modal.md | Requires reusing the shared Rating component in the modal and adds a visual check for filled orange picker stars + textarea font. |
| specs/tasks/task-4-branding.md | Clarifies brand asset wiring + hero requiredness and adds a visual check for hero/logo rendering. |
| specs/session-feedback-instantiation.md | Adds explicit “brand assets and wiring” section and pins shared Rating usage across all surfaces. |
| specs/design-contract.md | Strengthens Rating guidance (single component, filled picker marks) and adds textarea/input font-family requirement plus checklist items. |
| AGENTS.md | Adds a design visual-check requirement for Tasks 2/3/4 (verify is necessary but not sufficient). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+19
to
+21
| - The brand assets **wired into the app** per instantiation §3.0 (copied into `src/assets/` or | ||
| `public/`, referenced the Vite way — not imported across the `specs/` boundary) in place of the | ||
| scaffold's generic placeholders. This is the visible payoff the whole build was leading to. |
Power Apps Code Apps are served from the Power Platform CDN at a non-root base path, so absolute public/ asset URLs (/hero.jpg) break on deploy. The correct method is a bundled import from src/assets (Vite fingerprints and rewrites the URL against the base set by the @microsoft/power-apps-vite plugin). Corrects the earlier "src/assets or public/" guidance in this PR, which would reproduce the broken-hero failure on the CDN. - instantiation §3.0: mandate bundled import from src/assets; explain the non-root CDN base; warn off public/ absolute paths (need import.meta.env.BASE_URL) - scaffold skill (.agents + .claude): keep the powerApps() vite plugin (sets the CDN-safe asset base); else set base: './' - task-4: asset wiring is bundled import from src/assets, not public/ Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A run-through showed the built app diverging sharply from the design we are aiming for: the hero rendered as a broken image (empty box with
alttext), the modal rating stars were thin grey outlines instead of filled orange, the hero stats came out as boxed tiles, and the comment textarea was in a monospace font. The design contract actually specifies all of this correctly, so the contract is not the problem. The problem is that the instantiation and tasks did not force the agent to honour it, and there was no visual gate, sotsc/lint/test passed while the page looked wrong.This PR strengthens the spec where it was weak and adds the missing design verification. Follows PR #7; sits on top of it.
Root causes and fixes
1. The Rating was hand-rolled three times, so the fills drifted. The produced app had three separate star blocks (
session-card__star,modal__rating-readout,modal__star) and the picker never applied the orange active fill. Fix: make "build it once, reuse by mode" a hard requirement.design-contract.md§4.9: a> Build it oncenote (one component, three modes; per-surface star code is the named failure) and an explicit "on marks are filled#F5400D, not a coloured stroke; outline-only pickers fail conformance".session-feedback-instantiation.mdnew §3.8: the card read-out, modal picker, and success confirmation all use the one shared component, with the two fills restated (gold settled, orange picker).2. The hero broke because the asset was imported across the
specs/boundary and nothing checked it. The agent wroteimport heroImage from "../specs/assets/hero.jpg", which is fragile under Vite. Fix:session-feedback-instantiation.mdnew §3.0 "Brand assets and wiring" — copy assets intosrc/assets/orpublic/and reference the Vite way, never acrossspecs/. The hero is made required for this app (it is the "Power Up" key art, the brand moment Vibe cannot match), overriding the contract's optional-hero allowance. Task 4 scope/gate updated to wire assets and confirm the hero renders.3. Stats were boxed; textarea was monospace. Cheap, visible misses the contract already implies. Fix: instantiation §3.3 pins the baseline stat cluster (not boxes); contract §4.10 now says inputs/textareas set
font-familyto the Barlow UI font (browsers default<textarea>to monospace).4. None of it was caught, because design fidelity had no gate. The verify gate is
tsc/lint/test, none of which can see a broken hero, outline stars, a mono input, or boxed stats. Fix:AGENTS.md"How we work" adds a visual check for design-bearing tasks (2, 3, 4) — run the app and compare against the contract §8 checklist; greenverifyis necessary, not sufficient. Each of Tasks 2/3/4 gains a concrete "Visual check (run the app)" gate. The contract §8 checklist gains items for the shared Rating fills, brand media actually rendering, and inputs not being monospace.Whitepaper alignment
No
src/,package.json, ortsconfig*is committed: the app is regenerated on the day, so the fixes live in the contract, the instantiation, the tasks, and the steering doc.