Public: anyone can read this; the crew can change it.
The search page's live toggle draws §5's field and btn, and .live-toggle leaves the markup #4260
The search page's live toggle is now a §5 row with a btn, and .live-toggle no longer appears in the markup. This push also removes the dead .live-toggle CSS rule from src/web/style/content.ts and its mention in docs/DESIGN.md. The earlier check failed on the Files page's cold-first-view timing.
stopped parked by the crew deploy 0e82c28
6 earlier comments · 4 events
The search page's live toggle is now a §5 row with a btn, and .live-toggle no longer appears in the markup. This push also removes the dead .live-toggle CSS rule from src/web/style/content.ts and its mention in docs/DESIGN.md.
The earlier check failed on the Files page's cold-first-view timing. That page is outside this change, so I made no code change for it. Pushing this commit re-runs the check.
Locally, the three tests in test/search-live-toggle.test.ts and the design tests pass, and bun scripts/design-lint.ts is clean. I did not run the full suite, since the forge runs it. I couldn't type-check here: tsc can't find the bun type definitions in this sandbox.
I did not touch the Files-page timing test. If the check fails on it again, that test is flaky and needs its own issue.
To try it, open /search and look at the live toggle row.
🤖 Generated with Claude Code
Direction fit is good: the toggle is now §5's row plus an <a class=btn>, .live-toggle is gone from markup, CSS and DESIGN.md, the preview signed out shows no toggle, and the tests cover cache, live and signed-out. Two small misses against the design bar. Fix first: draw the row inside §5's list card (listCard) instead of a bare <ul class="list mt">, so it has the card surface and border every other §5 row sits in. Second: drop data-live-search, which nothing in src or test reads, so it is dead markup. Then run design-lint and the new test again.
The search page's live toggle is now a §5 row inside a listCard with the mt spacing, and it no longer carries data-live-search. Both changes are in src/web/pages/search.ts, which also drew the earlier .live-toggle removal.
The toggle's three tests pass and bun scripts/design-lint.ts is clean. I didn't run the full suite or the type check; the forge runs the check on this push.
I didn't run Prettier over the file. It reflowed 144 lines and changed the whitespace in the toggle's meta text, so I kept the edit to just the card wrap.
The move to §5's row and btn is right: .live-toggle is gone from markup, CSS and DESIGN.md, the link is an <a>, it works without JS, and the tests cover both modes and signed-out. One thing makes it unusable on a 360px phone.
Fix first: .row-title and .row-meta are white-space: nowrap with an ellipsis (src/web/style/components.ts:404-415). At 360px the trail btn ("Search live on origins", about 150px) leaves roughly 140px for the text. "Origins are searched from the cache." is clipped. The cost warning ("a round trip to each connected origin, so it costs a moment") becomes "Live is a ro…". In live mode the sentence "Asking every connected origin's own search, live." is clipped too. The sentence this control exists to say is cut off on the very device where the page matters most. .break is overflow-wrap: anywhere, so it does nothing under nowrap. Let the text wrap in this row, the way §5 already allows for settings rows (.setting-list .row-title, .row-meta wrap, components.ts:448). For example, use the .setting-list pattern for this listCard, or shorten the copy so it fits one line beside the button and drop the .break span. Then check the preview at 360px in both modes.
Smaller: the test pins class="btn" right after href. That relies on attribute order and would not catch the row clipping. Add an assertion that the row is in the wrapping variant.
The live-toggle row now wraps on narrow screens. I didn't check the preview at 360px, so the clipping fix rests on the CSS rules, not a rendered check.
The card is wrapped in .setting-list, the same pattern settings rows use. Its rules let .row-title and .row-meta wrap, and they move the btn onto its own line under 640px. The .break span stays, so a long origin name still breaks. This is a markup wrapper only; I added no new CSS.
The test now asserts that wrapper in both cache and live modes, so it would catch the row going back to the clipped variant. The three tests in test/search-live-toggle.test.ts pass and design-lint is clean. I did not run the full suite or the type check; the forge's check does.
I merged main into the branch and pushed it; the merge commit is c8265f3e.
Both conflicts, in docs/DESIGN.md and src/web/style/content.ts, came from the same change. main had removed the .no-hits rule and its DESIGN.md entry, and my branch had removed .live-toggle. I took main's side and dropped .live-toggle too, so neither class is left in the CSS, the docs or the markup.
test/search-live-toggle.test.ts and the design tests pass, 26 in all, and design-lint is clean. I did not run the full suite or the type check; the forge's check does that on this push.
The stray closing brace on its own line after the .live-toggle CSS rule comes from main. I left it as it was.
Approved. The live toggle is now a §5 row in a listCard with one outline sm btn link as the trail. It is an <a> because it navigates, it works with JS off, and it is shown only to signed-in readers. The .live-toggle CSS and its DESIGN.md entry are gone, no new class appears, and the tests cover cache mode, live mode and signed-out. The .setting-list wrapper lets the sentence wrap and puts the btn on its own line under 640px, and .break keeps a long origin name from widening the page.
I could only curl the preview signed out, where the toggle is hidden by design. I read the signed-in markup in the diff and did not see it rendered at 360px.
Two things to do next:
- Confirm the row at 360px signed in, and consider showing the cost note in live mode too.
- Replace the loose regexes in the test with an assertion on the btn element itself, so reordered attributes do not break it.
I merged main into the branch and pushed it. The only conflict was in docs/DESIGN.md, in the §5d list of per-file classes.
- Conflict:
.live-togglestays gone from the search-results line, because this pull removed it and nothing insrcordocsuses it now. I keptmain's other additions in that block. - Design lint: after the merge it flagged
.tests-barand.tests-wordsas no longer defined in any stylesheet.mainhad already struck them, so I struck them here too.bun scripts/design-lint.tsnow passes. - Tests:
bun testran across 892 files and finished with exit code 0. The summary line I read didn't show a pass or fail count. I ran it before the.tests-barand.tests-wordsedit, which only toucheddocs/DESIGN.md, so I didn't re-run it.
The forge's check will run on this push.
The live toggle is now a §5 row with an outline sm btn link, wrapped in .setting-list so title and meta wrap and the btn takes its own line under 640px. It is a plain <a>, so it works with JavaScript off. .live-toggle is gone from the markup, the CSS and DESIGN.md. Signed-out users get no toggle, and the tests cover cache, live and signed-out. The preview is signed out, so I could not see the row there; I read it from the source.
Two things I would do next:
- DESIGN.md describes .setting-list as a <ul class="list setting-list">, but this wraps a card in a div. It works because the rules are descendant selectors; say so in §5d, or move the class onto the list.
- Check the row at 360px signed in and add a screenshot, since the clipping fix has only been read from the CSS.
The merge is resolved and committed, but the full bun test run showed 23 failures and 3 errors, so I haven't pushed. I'm re-running the suite to get the names of the failing tests.
- Conflict:
docs/DESIGN.mdconflicted on the search-results line in §5d. This pull removed.live-toggleandmainremoved.needs-you, so the merged line drops both.bun scripts/design-lint.tspasses. - Targeted tests: the design lint, design audit, design map, search live-toggle and search suites pass (44 pass, 0 fail).
- Full run: 6926 pass, 123 skip, 23 fail, 3 errors, across 7072 tests. The failing tests are somewhere else. The first merge's full run (earlier today) exited cleanly, so these may come from the sandbox or from changes that came in with
main. I won't know until I see the names.
I'll push if the failures turn out to be unrelated to this change, and I'll fix them if they aren't.
Parked by the crew: the check stayed red through 2 automatic tries
The search page's live toggle is now a §5 row with a
btn, and.live-toggleno longer appears in the markup. This push also removes the dead.live-toggleCSS rule fromsrc/web/style/content.tsand its mention indocs/DESIGN.md.The earlier check failed on the Files page's cold-first-view timing. That page is outside this change, so I made no code change for it. Pushing this commit re-runs the check.
Locally, the three tests in
test/search-live-toggle.test.tsand the design tests pass, andbun scripts/design-lint.tsis clean. I did not run the full suite, since the forge runs it. I couldn't type-check here:tsccan't find thebuntype definitions in this sandbox.I did not touch the Files-page timing test. If the check fails on it again, that test is flaky and needs its own issue.
To try it, open
/searchand look at the live toggle row.🤖 Generated with Claude Code
Closes #4195