Repository navigation
fix(landing): drop OpenClaw from the hero rotator and match the self-host command to the README (TASK-152) - #1866
Merged
Conversation
…host command to the README (TASK-152) The hero still advertised OpenClaw after the wash removed it everywhere else, and the install one-liner was not runnable as written: no scheme on the clone URL, no directory change, and no setup step, so anyone who pasted it got a bare clone and no started stack. The guard derives both values instead of restating them. The rotator terms are checked for exact set parity against landing.hero.terms in en.json and zh-CN.json (dead copy and dangling references both fail), and SELF_HOST_COMMAND is compared against the README Quick Start block parsed at test time, so the published instructions and the shortcut cannot drift apart again. The rendered hero is also asserted to contain every shipped term and no OpenClaw, which is possible because the rotator renders the whole stack, not just the active term.
lilyshen0722
commented
Sep 25, 2026
lilyshen0722
left a comment
Contributor
Author
There was a problem hiding this comment.
GATE: PASS at b57f4ac2 — measured. No gap found.
BASE 3/3, RESTORED 3/3, tree clean after every mutation. Anchor count 1 each.
| mutation | result |
|---|---|
source drops cd commonly from SELF_HOST_COMMAND |
1 red |
| README changes, source does not | 1 red |
openClaw key restored in en.json only |
2 red |
| source references a key no locale ships | 1 red |
one term removed from zh-CN.json only |
1 red |
| README heading renamed so the block cannot be found | 1 red, with the explicit message |
A derived assertion is usually where I expect to find a gap, because both sides can move together and the test passes on anything. These don't, and three of the mutations are the ones that prove it rather than assume it:
- The README side is live. Editing
README.mdalone, leaving the component untouched, reds the test. That is the difference between parsing the README and decorating the test with the fact that you did. - The second locale is genuinely checked. Removing a term from
zh-CN.jsononly reds it. A guard that says "in both languages" and only ever exercisesenis the standard version of this bug; this one is not that. - It fails loud, not vacuous. Renaming the heading makes the helper throw
README.md no longer has a bash block under a "## Quick Start" heading. The alternative — a regex that quietly returns''and compares equal to nothing — is how this class of guard normally dies.
The two literal toContain('cd commonly') / toContain('./install.sh') anchors are worth keeping alongside the derivation: they are the floor if the README and the component ever drift together in the same wrong direction, which the equality check alone would accept.
lilyshen0722
added a commit
to thantiklermcirony/commonly
that referenced
this pull request
Oct 9, 2026
…m-Commonly#1868) * feat(landing): copy control for the self-host command (TASK-154) The command is 721px wide inside a 340px box at 390, so 37 of 86 characters showed and `cd commonly && ./install.sh` was entirely off-screen — the half that matters was unreachable on a phone. - The horizontal scroll moves off the box onto an inner wrapper, so Copy is a sibling of the scroll region and stays visible at every width and scroll position. - Copy writes SELF_HOST_COMMAND itself, never the rendered text (which carries the `$` and follows the truncation), so the copied string stays single-sourced with the README guard Team-Commonly#1866 added. - The label swaps Copy -> Copied for 1.5s and a polite live region announces it; a denied clipboard selects the command instead of silently doing nothing. - The pill is the BYO add-computer row's shape under this surface's own class; its height comes out of the box's padding so the line stays 46px, pinned with min-height, and at <=760 a transparent pseudo-element gives it a 44px thumb target without growing the visible pill. * docs(landing): correct the rationale on the copy click, and measure which guard holds (TASK-154) sprint-review's gate on Team-Commonly#1868 passed the code and corrected the reason given for it: the comment claimed the button avoids the rendered text "which carries the `$` and follows the truncation", but the ref is the <code>, whose textContent is currently identical to the constant. Measured, each in isolation, on top of ef7830b: - swapping the write to `installCmdRef.current.textContent` keeps 5/5 green — the write test cannot tell the two strings apart today; - moving the ref up one level to the scroll wrapper, which owns the `$`, reds exactly one test: "selects the command when the clipboard is unavailable, never a silent no-op", because the selection would then carry the prompt. (sprint-review's mutation moved the ref and the write together and saw two reds; this is which of the two does what.) So the comment now says what is actually pinned — the ref's POSITION, not the constant-vs-textContent choice — and warns the next reader that "simplifying" to read the node is unguarded. Comment-only: no code, test or CSS line changes, so both gates' objects are untouched. * fix(landing): write the copy pill in the button reset's tier (TASK-154) ux-lead's design gate failed Team-Commonly#1868 at ed89f0d, and the reason is the trap this whole surface sits on: `.v2-root button:not(.MuiButtonBase-root)` (v2.css:201) is (0,2,1) — one class, the :not() argument's class, and the element — and it clears padding, border, background and colour on every button. The pill was written as a bare `.v2-landing__install-copy` (0,1,0), so all four were erased and Copy computed as bare text: 27x18, and a 27x44 target at 760. Fixed the way .v2-byo__copy already is: qualified as `.v2-root button.`, on the rule and on its :hover (which at (0,2,0) also lost to the (0,2,1) reset). A tie then goes to sheet order, and the landing page is a lazy route, so its chunk's CSS follows the shell's v2.css. ux-lead's scratch build of this shape measured the pill at 49.1x28 (zh 46.5x28), the phone target at 47.1x44, and the box at 46px. The guard was the other half of the miss: nothing in landingInstallCopy.test.tsx read the pill's own declarations at all, so the sheet could lose them silently. The new case compares the pill selector's specificity against the reset's, read out of v2.css, rather than restating a number, and reads the declarations THROUGH the qualified selector so a bare-class rule cannot pass it.
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.
Two strings on the live landing hero, both wrong in a direction that no existing test could see (TASK-152, filed by lily-shen from the deployed build
9a32fca5).What was wrong
V2LandingPage.tsx:204pulledlanding.hero.terms.openClaw, with keys inen.json:634andzh-CN.json:633— after the wash had removed OpenClaw from the README and docs.SELF_HOST_COMMANDreadgit clone github.com/Team-Commonly/commonly && docker compose up: no scheme on the clone URL, no directory change, and no setup step. Anyone who pasted it got a bare clone and no started stack.What changed
SELF_HOST_COMMANDnow matches the README Quick Start block exactly:git clone https://github.com/Team-Commonly/commonly.git && cd commonly && ./install.sh.frontend/src/v2/landing/__tests__/landingHeroContent.test.tsx.The guard derives its expectations, it does not restate them
A restated list of terms would have gone stale in exactly the way these strings did, so each assertion is computed from the artifact it must agree with:
landing.hero.terms.*keys the component asks the translator for must equal the keys present underlanding.hero.termsin both locale files. Dead copy (a shipped key nothing references — what OpenClaw became) and a dangling reference (a key the visitor would see rendered raw) both fail.OpenClawis not. This is possible because the rotator renders the whole stack (.v2-landing__rotator-stack), not only the active term, so the assertion does not depend on where in the cycle a term sits.SELF_HOST_COMMANDis compared against the README's Quick Start bash block, parsed at test time and collapsed into one command. The published instruction and the shortcut cannot drift apart again — in either direction.Mutation campaign
Four mutations, each applied in isolation against the commit, restore verified by diffing the working tree against that commit (0 files differing after each run):
cd commonlyfrom the READMEThe guard also fails against the unfixed code, which is how I found the second defect in my own harness rather than in the product: the first draft of the mutation script restored from
git checkout -- <file>before the fix was committed, which discarded the working-tree change instead of the mutation. The fix is committed first now, and every restore is verified against the commit.Verification
npx tsc --noEmitclean;npx eslinton both files 0 errors (the tworeact/jsx-filename-extensionwarnings fire on untouched.tsxfiles too).scripts/generate-seo-pages.mjs) templates the hero'slede/eyebrow/ariaLabelinto the prerendered pages and does not emit either the rotator terms or the install command, so nothing in the built output had to move with these strings.Scope note
There is no copy button on the install block — the command renders in
overflow-x: autowithwhite-space: nowrap(.v2-landing__install), so the longer one-liner scrolls sideways exactly as the shorter one did. lily-shen's note made copy-whole-command a condition, so it is worth saying plainly: there is nothing to fix there because there is no such control; adding one would be a new design element and ux-lead's call, not this row's.Four terms instead of five in the rotator is a cadence change; lily-shen's note said ux-lead only if the rhythm needs a look. No layout change: the sizer follows the active term.