Repository navigation
style(byo): put Bring your own agent onto Signal (TASK-166) - #1897
Conversation
Seven items from ux-lead's spec on the row, all one shape — something the artboard draws and the component does not: 1. the submit is ink, radius 4 (rule 2: a filled control inside the app is ink on white; cobalt fills one control only, a decision card's primary) 2. the chosen mode card is a 2px accent border with 1px less padding per side, not the focus ring used as a halo; radius 12 -> 4. The base padding is the three-value `16px 18px 14px`, so the `.v2-team-card--needsYou` precedent's uniform `15px` does not transfer (it would also lose 2px of width): the compensation is `15px 17px 13px` 3. the mode kicker is mono 500 at 11px and lowercase — the caps were data in en.json, so they are fixed there rather than hidden by a transform (which would be the wrong instrument over zh-CN copy), and the colour now follows the chosen card instead of a static `--quiet` 4. same for the aside label, whose caps lived in the CSS over an en literal that was already sentence case 5. `.v2-byo__input` radius 8 -> 4 (controls) 6. `.v2-byo__preview-card` radius 12 -> 6 (cards are not controls) 7. `.v2-byo__layout .v2-avatar` is a 4px square, border 0, no shadow, and `.v2-byo__layout .v2-avatar__online` is cobalt. The pair lands together on purpose: the square is what UNCLIPS the dot — at 50% the base class's `overflow: hidden` cuts it to a lens (ux-lead measured 13 device px at DPR 2 against 68 once square), so the square without the cobalt paints the full green dot on the placed and hosted result cards (Signal §3: connected/live is cobalt, never green). Guards, and why item 7's is not a presence line. Items 1-6 are presence assertions, which is sufficient here because those selectors are already rooted at `.v2-root button.…` and so cannot be outranked by the bare reset at v2.css:201 the way the landing pill was in TASK-159. Item 7 is a descendant selector over a (0,2,0) rule beating a (0,1,0) one, so it gets three: the square WINS (specificity compared, both rules proven read — a comparison against an empty body asserts nothing), the cobalt rule declares cobalt and must NOT declare a radius (the dot's own 50% is what keeps it round, and a square dot is invisible in a screenshot), and the pressed card must NOT declare a shadow (the ring belongs to `:focus-visible`, v2.css:383). Containment is asserted twice, source-level (tag-counted from the `.v2-byo__layout` opening tag, because the first `</div>` closes `__main` while the aside sits after it) and at the DOM: jsdom matches selectors even though it has no layout engine, so `render` proves the carrier resolves and that every avatar in the page body is under it — with the rail's account avatar asserted present to keep that exclusion non-vacuous. What jsdom cannot see (the 4px box, the cobalt fill) stays ux-lead's browser gate at 1200/390. An existing guard caught a consequence I had not looked for: changing items 3 and 4 satisfies the mono type floor, so `v2-type-floors.test.ts` reds on its own burn-down rule — the allowlist may not carry a selector that no longer violates. Both entries are removed rather than updated, which is what that test exists to force. Vitest-free evidence: frontend suite 109 suites / 955 tests green, `tsc --noEmit` clean, `vite build` green, seo/nginx node tests 3/3. Seven mutations, each red on the assertion it should red and each restored byte-identical: square rule back to 50% -> item 7a; the cobalt line removed -> 7b; the cobalt rule overreaching onto `border-radius` -> 7b; the ring back on the pressed card -> item 2; the submit back to cobalt -> item 1; the caps back in en.json -> item 3; the preview aside moved out of the carrier -> item 7c and the DOM test, both.
lilyshen0722
left a comment
There was a problem hiding this comment.
UX-GATE: FAIL @ 9746461 — items 1–7 land as specified. Two things still need to go in: one en string my spec listed and the build missed, and the preview status line, which my spec left out. I re-gate the new head once both are in.
I measured this in a real browser at 1200 and 390, in en and zh-CN, with fixture data, against merge-base 92895ff. The evidence sheet is in the pod.
- Mode cards. Radius 4. The chosen card is 2px rgb(29,63,209) at 15px 17px 13px with no shadow. The title sits at (19, 38) on both chosen and unchosen cards, so nothing shifts. Tab shows the focus ring on both, a mouse click shows none, and hover only swaps the fill.
- Kicker and preview label. Plex Mono 500 11/16, no tracking, no text-transform. The kicker is cobalt on the chosen card only, in en and zh.
- Controls, cards and avatars.
- The submit is ink rgb(16,24,40), hovers to rgb(29,41,57), radius 4.
- Inputs are radius 4.
- The preview card is radius 6 with no shadow.
- Avatars are 4px squares with border 0 and no shadow. The online dot is round and cobalt, and no longer clipped.
- 390. No horizontal scroll.
Fold-in 1 (the missed string). en agentByo.preview.title: "Your agent" → "your agent". My spec lowercased three en strings and this is the third one (frontend/src/i18n/locales/en.json:1395). Today it renders as mono "Your agent".
Fold-in 2 (the status line, missing from my spec). It is in README frame 5. Today it is a Plex Sans 600 12px pill in three versions:
- draft: grey, #475467 on #f2f4f7;
- starting: an orange #f4a23a dot;
- live: green, #0f7a53 on #e3f6ec with a #10b981 dot.
Since item 7, the live card shows a cobalt avatar dot and a green pill side by side. Here are the values that match the §3 grammar and the team-card status line:
.v2-byo__preview-status:padding: 0; border-radius: 0; background: none; font: 500 11px/16px var(--v2-font-mono); color: var(--v2-text-muted);. Keep inline-flex, gap 6px and margin-top 10px.--draft(§3 not yet). The dot getsbox-sizing: border-box; background: transparent; border: 1px dashed var(--v2-border-strong);, which is the Connectors not-yet dot (v2.css:9797). The text stays muted rather than placeholder, because #98a2b3 at 11px is 2.6:1.--starting(§3 working).- Text:
color: var(--v2-accent-text). - Dot:
background: var(--v2-accent); animation: v2-team-pulse 1.6s ease-in-out infinite;, withanimation: noneunder reduced motion. - This is the same as
.v2-team-card__status--working(v2.css:12113–12122).
- Text:
--live(§3 connected / live). Drop the success colour and background, so the text is muted. The dot is solidbackground: var(--v2-accent).- Strings. en
preview.draft/starting/livebecome "not created yet" / "starting…" / "listening". zh-CN is untouched.
Add one invariant line each, as before.
Not in this PR. These are filed as their own row, and I render those states before anyone builds them:
- the result cards (the green ✓ line, the stat tiles at r10, "Install another" at r8);
- the agent name in the result headings (UA Courier);
- the persona card (r12);
- the error box (red fill);
- the command snippets, which are not yet §4 command blocks.
ux-lead's gate FAILED 9746461 with two fold-ins and passed items 1-7 in en and zh at 1200/390. Both are here. FOLD-IN 1, the missing string. `agentByo.preview.title` was "Your agent" and is now "your agent" (en.json:1395). Items 3 and 4 fixed their caps in the sheet because those caps were a `text-transform` over sentence-case data; this one was caps in the data itself, which is why nothing in the sheet moved and the spec's third string went missing. FOLD-IN 2, the status line, which ux-lead's spec did not cover and which this gate found. Since item 7 the avatar's online dot is cobalt, and the status line beside it was a green success pill — the same agent showing two states. It is now the team card's line: mono 500 11/16, muted, no padding, no radius, no background, dot carrying the state. Per state, per §3: draft dot is the Connectors not-yet mark — `border: 1px dashed var(--v2-border-strong)`, transparent, `box-sizing: border-box` so the ring does not grow the 7px dot to 9px. Text stays muted rather than placeholder: #98a2b3 at 11px is 2.6:1. starting text `var(--v2-accent-text)`, dot cobalt with the team card's `v2-team-pulse 1.6s` — the same animation `.v2-team-card__status--working` uses (v2.css:12116), so "an agent is starting" means one thing in both places — and `animation: none` under reduced motion, as there. live text muted, dot cobalt. The success colour and the pill fill are gone, which is the half that made the pill contradict the avatar. Strings: draft/starting/live become "not created yet" / "starting…" / "listening". zh-CN untouched, and the caps are in the data rather than a transform for the same reason as fold-in 1. GUARDS. One presence line each, as before, plus one negative that says what the fold-in removed: no `--v2-success`, `--v2-success-text`, `--v2-success-soft`, `--v2-warning` or `--v2-surface-hover` anywhere in the status block. The three new values check the fix; only that check sees a fourth state's colours coming back. The pulse assertion names the team card's rule and the keyframes as non-vacuity, so "same pulse as the team card" is measured rather than asserted in prose. The reduced-motion rule is read from the media block itself — `lastRuleBody` cannot reach an indented selector and returns the BASE rule instead, which is how the first form of this assertion passed while the escape hatch was missing. EVIDENCE. Full frontend suite 109 suites / 958 tests green (three new); the seven earlier mutations still red where they should. Nine mutations on these fold-ins, each red on the assertion it should red, each restored byte-identical with a green baseline after: the pill back (padding/radius/ fill), the live text back to success, the live dot back to green, the starting dot back to warning with no pulse, the draft ring solid instead of dashed and without border-box, the title string re-capitalised, the live string re-capitalised, the reduced-motion escape deleted, and the starting dot given a different pulse than the team card.
lilyshen0722
left a comment
There was a problem hiding this comment.
UX-GATE: PASS @ ff7ce22 — both fold-ins land; items 1–7 carry from the 9746461 gate (commit 1 range-diff =)
Re-gated at 1200 in en and zh-CN, DPR 2, on a sample-data build of the head: 0 console errors, 0 fixture misses, 0 external requests. I re-shot 390 too, but the preview is display:none at ≤940, so the status line can only be checked at 1200.
Fold-in 1: title. your agent, Plex Mono 500 11/16, #667085. The zh title 你的智能体 is unchanged.
Fold-in 2: a status line, not a pill. Mono 500 11/16, padding 0, radius 0, no background, 16 tall. The dot is 7×7, border-box, 50%, centred on the text.
- not yet (
not created yet/ 尚未创建): hollow dot with a 1px dashed #98a2b3 border; text #667085. - working (
starting…/ 正在启动…): #1d3fd1 dot runningv2-team-pulse1.6s ease-in-out infinite; text #1d3fd1. Underprefers-reduced-motion: reduce, the animation isnoneandgetAnimations()returns nothing. - live (
listening/ 监听中): solid #1d3fd1 dot; text #667085. The avatar's online dot is the same cobalt in the preview and in the result card, so the two marks agree. There is no green anywhere in the block.
Layout. The card drops from 188 to 176 tall because the 28 px pill is now a 16 px line. Its x, y, width, radius 6 and no-shadow are unchanged. scrollWidth equals clientWidth in all 16 shots.
Pixel diff against 9746461:
- At 1200, every change sits inside the preview column (css bbox 847,190 → 1127,442). Everything outside it is anti-aliasing, at most 13/255.
- At 390, four shots differ by 0 px, and the fifth by 40 px of anti-aliasing noise.
Invariants. The +81 lines pin:
- the title;
- the status base;
- each state and the keyframes;
- the reduced-motion block;
- the en strings;
- a negative on
--v2-success,--v2-warningand--v2-surface-hoverinside the block.
That is the guard jsdom can give here.
Pin. The scoped patch-id is 88358fa9 at ff7ce22 (components, v2.css and locales, tests excluded). If the head moves and the id holds, this gate carries.
For TASK-169. None of these block this PR; all three were already there before it and none are in this diff:
- After the token is issued, the page says "Waiting for fern to check in…" while the aside says "not created yet", which is false once the install has succeeded. The mapping is
issued && listening ? live : draft, and the draft string already read "Not created yet" at 92895ff. The fix is a fourth state, issued-and-waiting, that keeps the dashed not-yet dot and gets its own string. I'll spec the string; lily-shen reads the zh. .v2-byo__memory-doneis still green (#1e6b2a).- These radii are off the scale:
.v2-byo__stat10,.v2-byo__secondary8,.v2-byo__snippet8,.v2-byo__persona12.
The evidence sheet is posted in the pod. Rows: 9746461, ff7ce22 en, ff7ce22 zh-CN. Columns: draft, starting, live.
The code gate is sprint-review's.
…m-Commonly#1917) * style(byo): put the after-submit surfaces onto Signal (TASK-169) The form went onto Signal in Team-Commonly#1897; this is the same pass over what its gate did not reach — the after-submit lines, the persona/stat/error cards and the snippets. Values are ux-lead's, rendered at 1200 and 390. 1. live lines lose the green and the leading checkmark; the mark is the cobalt dot the preview rail already shows one column over. 2. stat cards radius 10 -> 6, and the counts are data, so mono. 3. the secondary button is a control: radius 8 -> 4. 4. the persona card is a card: radius 12 -> 6. 5. an error is a bordered white card in ink, not a red fill with an icon. 6. snippets stop being cards: each is a flat section whose command sits on an ink ground with Copy beside it. minmax(0,1fr) is the clipping fix — a bare 1fr may not shrink below a nowrap command's min-content width. 7. the mono stacks are the token. The textarea needs the element in its selector: .v2-root textarea sets font-family:inherit and outranked the lone class, so its 'SF Mono' stack never applied. 8. the agent's name in a result heading is mono in cobalt. Plus the fourth preview state: once a token is issued and nothing has checked in, the rail says 'not listening yet' rather than 'not created yet', which contradicted the page beside it. Copy: the leading checkmark leaves en and zh (the dot marks the line now), and zh's listen.waiting no longer promises a checkmark. New agentByo.preview.waiting. Tests: one invariant per item in v2-layout-invariants, the waiting state in V2AgentBYOListenVerify, and .v2-byo__stat-label leaves the type-floors allowlist because it now names the mono family in-rule. * style(byo): zero the result's child margins and pin the live dot to the first line (TASK-169) ux-lead's render gate on Team-Commonly#1917 found the spec's own gap: a <p> keeps its user-agent margin in a flex column, so `.v2-byo__result`'s authored 28px was drawing as 42 (28 + the paragraph's 1em), and the h2's 4px rode on the gap after it. The fix is the four declarations ux-lead measured, taken verbatim from their gate harness (`.dev/signal/g1917/gate-1917-final.js`, the addStyleTag line), not reinterpreted: .v2-byo__result > p { margin: 0; } .v2-byo__result h2 { margin: 0; } .v2-byo__live { align-items: flex-start; } .v2-byo__live::before { margin-top: 6.5px; } The `>` is load-bearing: it zeroes the result's own flex children and leaves a paragraph nested inside a snippet its own rhythm, so a descendant selector is the wrong shape even though it would also make the measured gap read 28. The dot moves off `center` because the live line wraps at 390: centred, it floats between the two lines instead of marking the first. 6.5px is (20px line box - 7px dot) / 2. Guard: one invariant per rule, each naming its negative — the descendant form must not appear, align-items may not be `center`, and the container's 28px is asserted alongside so the fix cannot be "hide the bug by moving the rhythm". Five mutation controls each red on that test, then restored. Not verified here: the render. jsdom has no layout engine, so the 28-at-1200- and-390 measurement stays ux-lead's, on the new head. * test(byo): state the scope's real reason — it guards the NEXT paragraph The `>` in `.v2-byo__result > p` was justified in a comment with a claim that is false at this head: that the descendant form "would zero the listen card's own paragraphs". sprint-review swapped the two forms in a browser and nothing moved, then proved the probe could see a difference by removing `.v2-byo__snippet > p` (paragraphs regained 14px 0px) and restoring it (back to 0). They are right, and the enumeration says why: every paragraph currently reachable under a result is a direct child of one of three containers that each zero their own `> p` — the result, the snippet, the memory block. So the child and descendant forms are indistinguishable today. What the child form actually buys is the NEXT paragraph: one added later inside some other wrapper in a result, which the descendant form would zero silently and the child form leaves alone. That reason survives, so the negative stays and the comment now says the true thing. The reasoning is also pinned rather than written down: the two nested containers are now asserted, so if either container rule goes, the test reds and names the swap that stops being free. Control run for that: removing `.v2-byo__snippet > p` reds this test (149/150), and the sheet was restored byte-identical. Comment and assertions only — no CSS in this commit. --------- Co-authored-by: Lily Shen <[email protected]>
Puts Bring your own agent onto Signal, per ux-lead's seven-item spec on TASK-166. The page is one of the six Coverage screens drawn 2026-09-04 (
signal-identity.md:97) and no BYO rule had changed since, so every item is the same shape: something the artboard draws and the component does not. Found by drawing README frame 5.The seven items
background: var(--v2-accent), radius 8var(--v2-ink)/var(--v2-ink-hover), radius 4box-shadow: var(--v2-focus-ring)15px 17px 13pxpadding; the ring belongs to:focus-visibleen.json, colour fixed by a static--quiettext-transform: uppercase.v2-byo__inputradius 8.v2-byo__preview-cardradius 12.v2-avatar; live dot painted--v2-success.v2-byo__layout .v2-avatar { border-radius: 4px; border: 0; box-shadow: none }and.v2-byo__layout .v2-avatar__online { background: var(--v2-accent) }Two details from the row worth repeating because they are not guessable from the spec:
16px 18px 14px, so.v2-team-card--needsYou's uniform15pxwould both move the text and lose 2px of width. The compensation is15px 17px 13px.overflow: hiddencuts the 9px dot to a lens (ux-lead measured 13 device px at DPR 2 against 68 once square). Shipping the square without the cobalt paints the full green dot on the placed and hosted result cards, and Signal §3 says connected/live is a solid cobalt dot, never green.zh-CN.jsonis untouched: the caps were fixed in the en strings rather than by atext-transform, which would be the wrong instrument over CJK copy.Guards
Items 1–6 are presence assertions, and that is sufficient here rather than a shortcut: those selectors are already rooted at
.v2-root button.…, so the bare reset atv2.css:201cannot outrank them the way it did the landing pill in TASK-159.Item 7 is a descendant selector over a rule that must BEAT the global one, so it gets three assertions — each aimed at a failure mode a presence line cannot see:
.v2-byo__layout .v2-avataris (0,2,0) against.v2-avatar's (0,1,0), so the guard compares specificity and proves both rules were read: a specificity comparison against an empty body asserts nothing, and--lg/--mdare asserted to carry no radius of their own. It wins on specificity alone, with no dependency on document order (which is what the TASK-159 pill pair and the TASK-162 gear did depend on).border-radius— the dot's own 50% is what keeps it round, and a square dot is invisible in a screenshot, i.e. a silent regression.:focus-visible's (v2.css:383); a ring on the pressed state is precisely what item 2 removes.Containment — the rule going silently dead if its carrier moves — is asserted twice, because it is a DOM fact and neither check alone is enough:
V2AgentBYO.tsxfrom the.v2-byo__layoutopening tag to its matching close, and require all four<V2Avatarcall sites inside it, with the full-file count as non-vacuity. Tag counting matters here: the first</div>after the opening tag ends__main, and the aside sits after it..v2-byo__layout .v2-avatarresolves and that every avatar in the page body is under it. The rail's account avatar (.v2-rail__account) is asserted present so the exclusion is not an empty set — it is chrome outside the page body and the row deliberately leaves it alone.What jsdom structurally cannot see — the 4px box, the cobalt fill, the 2px border holding the card's position — stays ux-lead's browser gate at 1200/390. Nothing here claims those.
An existing guard caught a consequence I had not looked for
Changing items 3 and 4 satisfies the mono type floor, so
v2-type-floors.test.tsredded on its own burn-down rule: the allowlist may not carry a selector that no longer violates..v2-byo__mode-kicker(10.0px, no family) and.v2-byo__preview-label(11.0px, no family) are removed from the list rather than updated in place, which is what that test exists to force. It is the second assertion of that file doing exactly its job.Evidence
tsc --noEmitclean;vite buildgreen; the seo/nginx node tests 3/3.border-radius→ 7b; the ring back on the pressed card → item 2; the submit back to cobalt → item 1; the caps back inen.json→ item 3; the preview aside moved out of the carrier → 7c and the DOM test.