Skip to content

fix(visuals): stop silently missing UI changes (chat flow, gap warning, param-route guard) - #185

Merged
crs48 merged 3 commits into
mainfrom
claude/visual-capture-coverage-fix
Jun 18, 2026
Merged

fix(visuals): stop silently missing UI changes (chat flow, gap warning, param-route guard)#185
crs48 merged 3 commits into
mainfrom
claude/visual-capture-coverage-fix

Conversation

@crs48

@crs48 crs48 commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Why

Our Visual UI Capture system silently misses big UI changes. The trigger: PR #174 rewrote the entire chat layer (2,364 lines under apps/web/src/comms/) and its capture comment read "No visual differences detected in the changed UI." — the absence of change reported for one of the largest UI changes in the project.

Root cause (full write-up in exploration 0200): capture targets come from a hand-curated allowlist of param-free routes + co-located stories. Chat matched none — no story, no route glob, and it only renders at the parameterized /channel/$channelId route (needs an id + seed data, so the static-route capturer can't reach it). computeCaptureSet then fell back to capturing home, which diffs clean, so the comment said "no differences." A coverage gap was made indistinguishable from a no-op. The 0191 drift-guard that was meant to catch this explicitly skips $-routes, the exact place chat lives.

What this does

C — make misses loud (keystone). When changed UI files map to no story/route/flow, computeCaptureSet now records fallbackUsed + unmappedFiles (threaded capture-set → capture → diff → comment). The PR comment renders a > [!WARNING] listing the unmapped files instead of "No visual differences detected." This converts every future silent miss into an actionable nudge.

A — chat flow. A new interaction flow seeds a channel, posts messages, reacts, and opens a thread — recording the redesigned /channel/$channelId surface. Maps apps/web/src/comms/**, so a chat-only PR like #174 now resolves to this flow.

B — close the drift-guard hole. manifest-coverage.test.mjs now requires every parameterized route to be flow-covered or listed in PARAM_EXEMPT with a reason (+ a stale-exempt guard). channel is covered by the chat flow; 8 others are exempted as explicit TODOs.

D — chat primitive stories. PresenceDot + ReactionBar stories give the pipeline a stable, seed-free baseline captured by the co-location rule. (MessageRow is router/hook-coupled — not a stable isolated story; deferred.)

Verification

  • Fix proven against the real manifest: PR feat(web): polished chat & channels UI (0198) #174's 19-file diff now yields { flows: ['chat'], fallbackUsed: false } — maps to the chat flow, not the silent home fallback.
  • Gap warning end-to-end: an unmapped file yields fallbackUsed: true and comment.mjs renders the [!WARNING] block listing it.
  • Guard bites: with the chat flow removed, the guard reports channel.$channelId uncovered (would go red).
  • pnpm test:visuals green (27 tests); xnet-web typecheck clean; eslint + prettier clean; Storybook builds and indexes all 4 new comms stories.
  • The visual-capture workflow on this PR (it touches apps/web/src/comms/**) will run the new chat flow and post the GIF — the live validation of Option A.

🤖 Generated with Claude Code

xNet Test and others added 3 commits June 17, 2026 19:19
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nges

When changed UI files map to no story/route/flow, the capture set now falls
back to home AND records fallbackUsed + unmappedFiles. The PR comment renders a
loud [!WARNING] listing the unmapped files instead of the misleading 'No visual
differences detected' that hid PR #174's chat redesign. Threaded through
capture-set -> capture -> diff -> comment. (exploration 0200, Option C)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Option A: add a 'chat' interaction flow (seed a channel, post messages, react,
open a thread) mapping apps/web/src/comms/** -> the redesigned /channel/$channelId
surface that no static route shot could reach. PR #174's diff now resolves to
this flow instead of the silent home fallback.

Option B: extend manifest-coverage.test.mjs to require every parameterized route
be flow-covered or listed in PARAM_EXEMPT with a reason (+ a stale-exempt guard).
This closes the 0191 drift-guard hole that skipped $-routes -- the exact gap chat
fell through. channel is covered by the chat flow; 8 others are exempted as TODOs.

Option D: add PresenceDot + ReactionBar stories so the chat primitives get a
stable, seed-free baseline captured by the co-location rule.

Docs: README tuning notes for parameterized routes + the gap warning; check off
exploration 0200 ([_] -> [x]).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@crs48
crs48 temporarily deployed to pr-185 June 18, 2026 02:41 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

✓ Changelog fragment found — thanks!

@crs48 crs48 added the skip-changelog Exclude this PR from the changelog label Jun 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🖼️ UI changes in this PR

Components

🆕 Web/Comms/PresenceDot — Active

Web/Comms/PresenceDot — Active

🆕 Web/Comms/PresenceDot — All Statuses

Web/Comms/PresenceDot — All Statuses

🆕 Web/Comms/ReactionBar — Default

Web/Comms/ReactionBar — Default

🆕 Web/Comms/ReactionBar — Single Reaction

Web/Comms/ReactionBar — Single Reaction

Interactions

🎬 Open a channel and post a message

Open a channel and post a message

▶ Watch MP4

Auto-captured by CI · run. Informational — not a blocking check.

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Preview removed for PR #185.

github-actions Bot added a commit that referenced this pull request Jun 18, 2026
@crs48
crs48 merged commit 3388436 into main Jun 18, 2026
13 of 14 checks passed
@crs48
crs48 deleted the claude/visual-capture-coverage-fix branch June 18, 2026 02:50
github-actions Bot added a commit that referenced this pull request Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Exclude this PR from the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant