Repository navigation
fix(harness): the UI evidence shot takes --width/--height/--token, and refuses a flag it does not implement - #1770
Merged
Merged
Conversation
samxu01
pushed a commit
that referenced
this pull request
Sep 19, 2026
…side (TASK-050) The UI hold asks for a before/after pair at 390 and 1200. Wren's read named the one view that can carry this fix on a phone: the row's `… may use it` line is hidden under 760px by v2.css (#1712), so the audience only paints in the Manage aside. - before = main dbd5270, after = dbd5270 + this PR's head ede0647 - one backend at main, both frontends pointed at it, same seeded pod and grant - harness: scripts/ui-evidence-shot.mjs on kai/harness-width-flag @ a730a1e (#1770). It now takes --width/--height and --click, refuses a flag it does not implement, and prints the viewport it used — so these files are 780x1800 and 2400x1800, not the 2880x1800 that `--width 390` used to produce under a `-390` name. Measured: aside @390 `agents allowed` an agent -> localdev; row @1200 same change; row @390 unchanged, which is what the hide rule requires.
samxu01
pushed a commit
that referenced
this pull request
Sep 19, 2026
…-056) Wren's read of the pair is on the PR; this commits the files it read. - before = main dbd5270, after = dbd5270 + this PR's head a740d5f - surface: the legacy ChatRoom at /pods/team/6aace2b11df344bc6ccdf0ef, one seeded PG card message (`message_type='card'`, `[approval needed] …`), one backend at main - harness as in #1770, so the 390 files are 780x1800 rather than an unlabelled 1440 Measured: the bubble under the author line gains the fallback body at both widths — 807->863ch at 390, 819->875ch at 1200.
samxu01
pushed a commit
that referenced
this pull request
Sep 19, 2026
Rule 27 said the fix "made the sizes real" as though it were on `main`. It is not: on `main` `scripts/ui-evidence-shot.mjs:87` still hardcodes a 1440x900 viewport and drops `--width` without a warning. Rule 27 (and the same latent reading in rule 28) now name #1770 the way rule 26 names its PR. Tip commit on the cleared head; docs-only, one file, no version slot.
lilyshen0722
added a commit
that referenced
this pull request
Sep 19, 2026
Rule 27 said the fix "made the sizes real" as though it were on `main`. It is not: on `main` `scripts/ui-evidence-shot.mjs:87` still hardcodes a 1440x900 viewport and drops `--width` without a warning. Rule 27 (and the same latent reading in rule 28) now name #1770 the way rule 26 names its PR. Tip commit on the cleared head; docs-only, one file, no version slot.
lilyshen0722
added a commit
that referenced
this pull request
Sep 19, 2026
…strings, and merge verification (#1771) * docs(review-checklist): rules 27-32 — evidence instruments, rendered strings, and merge verification Six incident-derived rules, appended per the file's own numbering convention: - 27: an evidence tool that accepts a parameter it does not implement makes its own evidence lie, and it lies in the filename (the harness --width hole, plus the woff2 403 that changed the typeface between revisions). - 28: a byte-identical before/after pair is evidence about the surface, not a null result; rendering-aware innerText vs textContent separates hidden from absent, and byte-identity is not a property of two sessions. - 29: one renderer, two meanings — classify a label helper's call sites by the data they receive; the ledger settles which string was a defect. - 30: what a rendered value means is answered from the store, not the renderer; and fixture provenance travels with the artifact. - 31: a flake fix is proven by making the defect reproducible; an assertion over a process-global resource must watch the subject's own identity. - 32: verify a merge at the consumer — squash merge tree == carried head tree. Docs-only; no version slot. * docs(review-checklist): attribute the harness fix to #1770, not main Rule 27 said the fix "made the sizes real" as though it were on `main`. It is not: on `main` `scripts/ui-evidence-shot.mjs:87` still hardcodes a 1440x900 viewport and drops `--width` without a warning. Rule 27 (and the same latent reading in rule 28) now name #1770 the way rule 26 names its PR. Tip commit on the cleared head; docs-only, one file, no version slot.
lilyshen0722
added a commit
that referenced
this pull request
Sep 19, 2026
…side (TASK-050) The UI hold asks for a before/after pair at 390 and 1200. Wren's read named the one view that can carry this fix on a phone: the row's `… may use it` line is hidden under 760px by v2.css (#1712), so the audience only paints in the Manage aside. - before = main dbd5270, after = dbd5270 + this PR's head ede0647 - one backend at main, both frontends pointed at it, same seeded pod and grant - harness: scripts/ui-evidence-shot.mjs on kai/harness-width-flag @ a730a1e (#1770). It now takes --width/--height and --click, refuses a flag it does not implement, and prints the viewport it used — so these files are 780x1800 and 2400x1800, not the 2880x1800 that `--width 390` used to produce under a `-390` name. Measured: aside @390 `agents allowed` an agent -> localdev; row @1200 same change; row @390 unchanged, which is what the hide rule requires.
lilyshen0722
added a commit
that referenced
this pull request
Sep 19, 2026
… agent" (TASK-050) (#1757) * fix(v2): name a human in a grant audience instead of calling them "an agent" A pod grant's audience is a snapshot of the room's members, so it can name a human; `seats` holds agents only, and every id it could not find was labelled "an agent". The stranger's Tools row read "an agent, an agent, C4 smoke may use it" for two people. Resolve the member's username before falling back to the generic label, the same helper the grantor line already uses. The row named two options; this is the first one, and the reason is on the row: enforcement needs an agent identity, so naming the person is accurate under either reading of what an audience means, and the audience-model question is left to the pod rather than settled here. Mutation-proven: dropping the fallback reds exactly the new case. Frontend 108 suites / 884 tests, tsc clean. TASK-050. * docs(evidence): the TASK-050 audience pair at 390 and 1200, row and aside (TASK-050) The UI hold asks for a before/after pair at 390 and 1200. Wren's read named the one view that can carry this fix on a phone: the row's `… may use it` line is hidden under 760px by v2.css (#1712), so the audience only paints in the Manage aside. - before = main dbd5270, after = dbd5270 + this PR's head ede0647 - one backend at main, both frontends pointed at it, same seeded pod and grant - harness: scripts/ui-evidence-shot.mjs on kai/harness-width-flag @ a730a1e (#1770). It now takes --width/--height and --click, refuses a flag it does not implement, and prints the viewport it used — so these files are 780x1800 and 2400x1800, not the 2880x1800 that `--width 390` used to produce under a `-390` name. Measured: aside @390 `agents allowed` an agent -> localdev; row @1200 same change; row @390 unchanged, which is what the hide rule requires.
lilyshen0722
added a commit
that referenced
this pull request
Sep 19, 2026
…-056) Wren's read of the pair is on the PR; this commits the files it read. - before = main dbd5270, after = dbd5270 + this PR's head a740d5f - surface: the legacy ChatRoom at /pods/team/6aace2b11df344bc6ccdf0ef, one seeded PG card message (`message_type='card'`, `[approval needed] …`), one backend at main - harness as in #1770, so the 390 files are 780x1800 rather than an unlabelled 1440 Measured: the bubble under the author line gains the fallback body at both widths — 807->863ch at 390, 819->875ch at 1200.
lilyshen0722
added a commit
that referenced
this pull request
Sep 19, 2026
…roval card's fallback text was dropped (TASK-056) (#1758) * fix(chat): render the plain-text fallback for a non-text message type The approval card posts `message_type: 'card'` and this bubble returned a body only for `text` (or `image`), so a member reading the room here saw the author and a timestamp over nothing. `content` is written as the plain-text fallback for exactly these legacy surfaces — the card component is v2-only — so render it. TASK-056. * docs(evidence): the TASK-056 card-fallback pair at 390 and 1200 (TASK-056) Wren's read of the pair is on the PR; this commits the files it read. - before = main dbd5270, after = dbd5270 + this PR's head a740d5f - surface: the legacy ChatRoom at /pods/team/6aace2b11df344bc6ccdf0ef, one seeded PG card message (`message_type='card'`, `[approval needed] …`), one backend at main - harness as in #1770, so the 390 files are 780x1800 rather than an unlabelled 1440 Measured: the bubble under the author line gains the fallback body at both widths — 807->863ch at 390, 819->875ch at 1200.
…d refuses a flag it does not implement
…aptured after the interaction
…nder in different typefaces
lilyshen0722
force-pushed
the
kai/harness-width-flag
branch
from
September 19, 2026 17:43
75d7a52 to
1d29882
Compare
samxu01
pushed a commit
that referenced
this pull request
Sep 19, 2026
… no flag, and prefers UI_TOKEN over --token Two follow-ups Vera read out of the harness after #1770 (70101, corrected in 70102): - `--width 390 400` passed: the `400` belonged to no flag and the parser skipped it with `continue`, so the capture ran with 390 and never said so. A value that belongs to no flag is now refused with exit 2 and named, in the same message that already lists the known flags. Argument parsing moved to `scripts/lib/ui-evidence-args.js` — it imports nothing, so the argument contract has a witness that needs no browser, and Playwright is now imported after validation (a usage error no longer requires a browser to be installed). - `--token <jwt>` puts the seat's JWT in the process table and in shell history. `UI_TOKEN` carries the same value through a channel that shows in neither, so both the runbook and the script's usage block now lead with the environment form and keep `--token` as the explicit fallback. Docs: the table's "an unknown flag is refused" row now covers stray values as well — the sentence was accurate as written (it said *flag*), which is why the gap was in the tool rather than in the claim.
lilyshen0722
added a commit
that referenced
this pull request
Sep 19, 2026
… no flag, and prefers UI_TOKEN over --token (#1775) Two follow-ups Vera read out of the harness after #1770 (70101, corrected in 70102): - `--width 390 400` passed: the `400` belonged to no flag and the parser skipped it with `continue`, so the capture ran with 390 and never said so. A value that belongs to no flag is now refused with exit 2 and named, in the same message that already lists the known flags. Argument parsing moved to `scripts/lib/ui-evidence-args.js` — it imports nothing, so the argument contract has a witness that needs no browser, and Playwright is now imported after validation (a usage error no longer requires a browser to be installed). - `--token <jwt>` puts the seat's JWT in the process table and in shell history. `UI_TOKEN` carries the same value through a channel that shows in neither, so both the runbook and the script's usage block now lead with the environment form and keep `--token` as the explicit fallback. Docs: the table's "an unknown flag is refused" row now covers stray values as well — the sentence was accurate as written (it said *flag*), which is why the gap was in the tool rather than in the claim.
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.
The instrument the UI hold depends on silently ignored the flag the hold asks for. This is the
harness that produces the before/after pair (390 and 1200) required for a
frontend/PR, soits silent hole is a hole in the evidence gate, not a convenience defect.
The defect
scripts/ui-evidence-shot.mjsparsed--widthinto its arg map and never read it: the viewportwas hardcoded
1440×900. Sowrote a 1440×900 capture under a
-390name. Measured on the PNG header, not on the name:kai-1757-before-390.pngkai-1757-before-1200.pngBoth "widths" were the same picture, and nothing in the output said so. A reviewer checking a
mobile pair would have been shown a desktop shot twice.
What changes
--width/--height(defaults 1440×900), validated (integer, 200–4000), used for thecontext viewport; every run now prints
viewport <w>x<h>@2x, so a capture names its ownshape instead of relying on its filename.
--widht 390used to bedropped in silence; that silence is what produced the table above.
--token <jwt>skips the login.POST /api/auth/loginis rate-limited to 20 attempts per15 minutes, and a pair is captured run by run, so the fifth shot in a batch got
429and thepage dumped
Failed to load chat room. Please try again.— indistinguishable from a brokenrevision. Hit for real while capturing these pairs; the run line now says
auth tokenvsauth login.docs/runbooks/local-ui-render-harness.mdgains a flag table and the rule behind it: a pairthat is byte-identical is not automatically a null result — check whether the element is
display: nonerather than absent, becauseinnerTextdrops hidden text whiletextContentkeeps it. That is exactly what the
#1757390 pair turned out to be (see below).Why now — it was found producing evidence for the two held PRs
#1757and#1758sit under the UI hold and need this pair. Captured with the fixed script:#1757(/v2/connectors) @1200:an agent may use it · every write asks first→localdev may use it · every write asks first. @390 the pair is byte-identical(
668afc05e85eboth revisions) becausefrontend/src/v2/v2.csshides.v2-connector-row__detailfor live rows under the phone breakpoint — a DOM probe at 390 stillreads the changed string, so the fix is unpainted there, not absent.
#1758(/pods/team/<podId>, the legacyChatRoom) differs at both widths; thepreviously-empty bubble body gains
[approval needed] …(807→863ch at 390, 819→875ch at 1200).No
frontend/,backend/orcli/change, so no version bump is involved.TASK-050, TASK-056.