Repository navigation
fix(byo): drop the unreachable persona notice, name the machine in the note (TASK-163) - #1872
Merged
Merged
Conversation
…e note
TASK-163, both items from ux-lead's TASK-161 BYO frame.
1. The !personaCard notice ("No colleague selected — this is the
blank-agent path") rendered on EVERY entry, because nothing in
frontend/src links ?persona= since #1534 retired the catalog. It
described a choice this page cannot offer. Remove the block, its
agentByo.persona.none key in both locales, and the now-dead
.v2-byo__persona--none rule. The ?persona= reader stays live:
prefill.persona still names the agent and carries its description onto
the hosted, machine and webhook install paths, and V2AgentBYOPersona:69
pins that card.
2. "On my computer" showed the BYO note ("once your runtime connects with
the token") in a mode that issues no token. Add
agentByo.preview.noteMachine (en + zh-CN, zh staged for lily-shen's read)
and make the note three-way. The machine name is derived once as
selectedMachineName and shared with the placement payload's machineName,
so the note and the request cannot name different machines.
Tests: the two persona tests assert the absence of .v2-byo__persona on the
bare entry (a run held on a removed testid would be vacuously null), plus a
new machine test that pins the note following the picker across two
machines. Four mutations, one red each on the assertion that names its
property: the block restored; the ternary back to two-way; the zh key
dropped; the name taken from machines[0] instead of the selection.
jsdom parses no CSS, so the deleted rule is verified by absence in the built
sheet and by ux-lead's read at 1200/390 — the observable defect (a notice on
every entry) is what the tests pin.
lilyshen0722
commented
Sep 25, 2026
lilyshen0722
left a comment
Contributor
Author
There was a problem hiding this comment.
UX-GATE: PASS @ 37a43b6
Rendered the PR head beside its base (main 9a32fca) from a fixture build, at 1200 and 390 in en and zh-CN:
- The "No colleague selected" notice is gone in hosted, machine and byo modes. At 1200 the form moves up 232 → 186, which puts it level with the preview aside's top again. That was the page's original alignment before #1459 added the notice.
- In machine mode, the note reads noteMachine with the selected machine and follows the select (Sam's MacBook Pro → Studio Mac mini). noteHosted and noteByo are unchanged.
?persona=scoutstill renders the Hiring card at 1200 and 390.- A 43-character EC2 hostname wraps at a hyphen with 0 px overflow in the 280 px aside. scrollWidth is 390 in every 390 state.
- The note is desktop-only because the aside is hidden at ≤940, the same as on main.
The zh-CN noteMachine string is only a proposal; lily-shen does the zh read.
lilyshen0722
added a commit
to thantiklermcirony/commonly
that referenced
this pull request
Oct 9, 2026
…only#1906) * docs(readme): place the hero frame, and guard the shape every frame keeps (TASK-155) Frame 1 of 5: ux-lead's 2x capture of the live demo's first state, placed per the artboard (docs/design/landing-demo/Readme.dc.html) — a centered block, 880 wide, italic caption under it with commonly.me linked, between the header block and "## What is Commonly?". Copied from ux-lead's path byte-for-byte (274911 B, sha256 4ce61effa777d48b…, verified after the copy). The asset is 2628x1444 so it renders at 2x once GitHub scales it to 880. Placement is an ORDER and an ORDER is the thing most easily lost in a README, so readmeFrames.test.ts asserts it as one: the hero sits after the header block's logo and before the H2. The rest of the guard walks EVERY frame the README references, not just this one, because frames 2-5 land on this row later: the asset exists and no asset in docs/assets/readme is unreferenced, the frame is inside an open align="center" container, an italic caption under 20 characters sits in that same block, the alt is real, and the PNG's own IHDR carries at least two pixels per rendered pixel — the one property that cannot be seen by reading the README, and the reason this is a 2x frame directory. * test(readme): count caption prose with a scan, not a tag-stripping regex (TASK-155) CodeQL failed PR Team-Commonly#1870 on the first push: js/incomplete-multi-character- sanitization, high, at readmeFrames.test.ts:70 — `.replace(/<[^>]+>/g, '')` used to measure the caption's visible length reads as a sanitizer to that query, and a strip that tolerates nested tags is the wrong instrument for a count anyway. Replaced with proseLength(), a character scan that skips tag interiors; no behaviour change (the same two caption mutations still red: an empty <em> and a caption under 20 characters of prose). Caught at the PR check, before either gate ran. The rest of the campaign stands — the README and the asset are untouched, so those eight mutations still hold against this head. * docs(readme): size the hero caption with <sub>, and pin the caption shape per frame ux-lead's design gate on Team-Commonly#1870 measured the caption on github.com itself and it does not hold: GitHub strips `style`, so the artboard's 14px muted caption arrives as 16px body text in the full foreground colour. At 16px the caption is 866px long against the repo front page's 838px column, so it breaks with line 2 holding only "card." at every desktop width from 1280 to 1920. Wrap it in `<sub>` — on GitHub's supported formatting list, rendered at 75% (12px). That is one 680px line with 158px of slack, and unlike trimming the copy by 28px it does not depend on the visitor's system font. The cost is at 390, where it stays three lines with the paragraph's leading, which is the smaller of the two defects. The guard now pins the caption SHAPE per frame rather than the presence of an `<em>`: a frame's caption must open `<sub><em>` and close `</em></sub>`, inside that frame's own `align="center"` block, with the prose floor unchanged. Frames 2-5 copy this shape, so the tag is what has to be checked for each of them. Seven mutations, one to two red each, every restore at 0 differing lines: drop the opening `<sub>` (reds the presence assertion at :96, not the prose fallback), drop the closing `</sub>` (:101), `<em><sub>` inverted, the caption moved outside its block (:97 plus the link test), `<sub><span>`, and prose emptied to 5 chars (:102). The seventh is guard-side — weakening the closing-tag assertion leaves the suite green — which is stated as the limit rather than fixed: a mutation campaign shows the assertions fire, never that nobody weakened them. Verified: full frontend 110 suites / 931 tests, tsc clean, eslint 0 errors. No production build: the diff is README.md and a test file, neither in the bundle. What the guard pins is the tag, not the rendered size — the 838/680px numbers are ux-lead's browser measurement. * docs(readme): place frame 5, the Bring your own agent shot (TASK-161) ux-lead's handover (pod 73738, row note 08:16:04Z): byo-2x.png, 2880x1880 (1440x940 at 2x), 263744 B, sha256 52ec06216d4e4030d90ec03b90f56b43deaac5731b6c31c7938dcbf88b5b73d8. It is 940 tall rather than 900 because at 900 the CLI footnote clips, and frame 5 stands alone, so it does not have to match frames 2+3's aspect. Its own branch off 8b330cf rather than stacked on docs/task-161-readme-frames-2-3, so that pair is not held on Team-Commonly#1872's merge. Placed at width 880 (the hero's width, inside the front page's 838 column) after the `## Connect your own agent` intro and before `### Persistent local seat`, in the same `<sub><em>` caption shape as the hero and the pair. No guard edit, per the spec: 2880 source pixels against a rendered 880 is more than the two-per-rendered-pixel floor, and set-equality holds with two assets on disk and two references in the README.
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.
TASK-163 — BYO copy, found drawing README frame 5
Two copy defects on
/v2/agents/byo, both from ux-lead's spec on the row.1. The persona-none notice was unreachable, and rendered on every entry.
V2AgentBYO:605rendered "No colleague selected — this is the blank-agent path."whenever
personaCardwas null — which is every entry, because nothing infrontend/srclinks?persona=since #1534 retired the catalog. So the pageannounced a choice it cannot offer, on every visit.
Removed: the block, the
agentByo.persona.nonekey in both locales, and thenow-dead
.v2-byo__persona--nonerule inv2.css.The
?persona=reader stays. sprint-review's scope note (pod 73677) is rightand independently matches ux-lead's spec:
prefill.persona(:87) still namesthe agent (
:102) and carries the persona's sentence onto all three installpaths — hosted (
:304), machine (:349), webhook (:403). Only the empty-statenotice goes;
V2AgentBYOPersona:69pins the deep-link card, and the base.v2-byo__persona/-body/-title/-linerules are untouched.2. "On my computer" described the wrong path. The preview note read
"Appears in the pod once your runtime connects with the token." in every
non-hosted mode, and machine mode issues no token at all.
Added
agentByo.preview.noteMachine(en + zh-CN; zh "{{machine}} 上的守护进程启动它后即会出现在 Pod 中。" is proposed and staged for lily-shen's read) and made the ternary three-way. The machine name is derived once asselectedMachineNameand reused by the placement payload'smachineName(
:367), so the note and the request cannot name different machines.Evidence
npx eslinton the three changed TS/TSX files: 0 errors (3 pre-existingreact/jsx-filename-extensionwarnings).npx tsc --noEmit: clean.index-CGlrJ6Vx.csscarries0 occurrences of
v2-byo__persona--nonewhile keeping all four base.v2-byo__persona*classes.Four mutations, one red each on the assertion that names its property
(each restore byte-identical, final run back to 19/19 on the touched files):
!personaCardblock restorednoteMachinedropped from zh-CNtranslationKeys.test.ts(both the key-parity and the literal-key test)machines[0]instead of the selectionWhat the tests pin, and the honest limit
The old tests held on
byo-persona-none, a testid that no longer exists —queryByTestId(...)would have been vacuously null and the suite would havegone green with the notice restored. They now assert the absence of
.v2-byo__personaon the bare entry and a positive proof the page rendered(the
sam-agentname field), so the assertion can fail.jsdom parses no CSS, so the deleted rule is not pinned by a test. Its
observable consequence is (no notice on the bare entry), and that is pinned;
the rule deletion is verified by absence in the built sheet. ux-lead's gate at
1200/390 is what confirms the rendered result.
Gate
ux-lead at 1200/390, en and zh-CN:
noteHosted/noteMachine(naming the selected machine, andfollowing the select when it changes) /
noteByoin the matching mode;?persona=card unchanged.mainis9a32fca5; this branch is based directly on it.