mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-01 06:24:41 +01:00
fix(design): mockup board loop matches the daemon CLI (s02 H1, s02 H2, s02 H3)
- H1: $D compare --serve publishes to the design daemon and exits; read BOARD_URL from stderr, wait with AskUserQuestion, then read feedback.json / feedback-pending.json. The fallback no longer names a $D serve command the step never runs. - H2: the reload POST uses the jq --arg form, so $_DESIGN_DIR expands (the single-quoted JSON sent the literal variable name). - H3: Content & Microcopy lists 11 items, not 8. No test pins the removed text. expected red until the regeneration commit
This commit is contained in:
1 parent
4171000aca
commit
24251600b7
1 file changed
+10
-6
@@ -362,7 +362,7 @@ Apply these at each page. Each finding gets an impact rating (high/medium/polish
|
||||
- Only \`transform\` and \`opacity\` animated (not layout properties like width, height, top, left)
|
||||
- One authored motion moment per page: not the same entrance on every section, not a hover effect on everything. Ease-out from an already-visible default; content never hides behind animation timing
|
||||
|
||||
**8. Content & Microcopy** (8 items)
|
||||
**8. Content & Microcopy** (11 items)
|
||||
- Empty states designed with warmth (message + action + illustration/icon)
|
||||
- Error messages specific: what happened + why + what to do next
|
||||
- Button labels specific ("Save API Key" not "Continue" or "Submit")
|
||||
@@ -1204,11 +1204,15 @@ create and serve the comparison board:
|
||||
$D compare --images "$_DESIGN_DIR/variant-A.png,$_DESIGN_DIR/variant-B.png,$_DESIGN_DIR/variant-C.png" --output "$_DESIGN_DIR/design-board.html" --serve
|
||||
\`\`\`
|
||||
|
||||
This opens the board in the user's default browser and blocks until feedback is
|
||||
received. Read stdout for the structured JSON result. No polling needed.
|
||||
This publishes the board to the design daemon, opens it in the user's default
|
||||
browser, and exits; it does not wait for feedback. Read captured stderr for the
|
||||
\`BOARD_URL: http://127.0.0.1:N/boards/<id>/\` line, then wait with AskUserQuestion:
|
||||
"Review <BOARD_URL>, click Submit or Regenerate, then tell me (or paste your
|
||||
preferences here)." After the answer, read \`feedback.json\` or
|
||||
\`feedback-pending.json\` next to the board HTML.
|
||||
|
||||
If \`$D serve\` is not available or fails, fall back to AskUserQuestion:
|
||||
"I've opened the design board. Which variant do you prefer? Any feedback?"
|
||||
If the command exits nonzero or prints no \`BOARD_URL\`, show each variant inline
|
||||
with Read and fall back to AskUserQuestion: "Which variant do you prefer? Any feedback?"
|
||||
|
||||
**Step 5: Handle feedback**
|
||||
|
||||
@@ -1220,7 +1224,7 @@ If the JSON contains \`"regenerated": true\`:
|
||||
(\`BOARD_URL: http://127.0.0.1:N/boards/<id>/\` — the daemon path) or fall
|
||||
back to the legacy port (\`SERVE_STARTED: port=N\` — only emitted under
|
||||
\`--no-daemon\`, hits \`/api/reload\` root). Daemon path:
|
||||
\`curl -X POST "\${BOARD_URL}api/reload" -H 'Content-Type: application/json' -d '{"html":"$_DESIGN_DIR/design-board.html"}'\`
|
||||
\`jq -nc --arg html "$_DESIGN_DIR/design-board.html" '{html: $html}' | curl -sS -X POST "\${BOARD_URL}api/reload" -H 'Content-Type: application/json' --data-binary @-\`
|
||||
5. Board auto-refreshes in the same tab
|
||||
|
||||
If \`"regenerated": false\`: proceed with the approved variant.
|
||||
|
||||
Reference in new issue
Block a user