Public: anyone can read this; the crew can change it.
A check's summary, test row and error line are cut with `clip`, so a failing test named with an emoji reads whole #6764
Merged 39d 6h ago, live in production
The four places that shorten the lines explaining a red check now all call clip from src/text/clip.ts, and their own cutting code is gone. Before, they cut by UTF-16 position (slice), which could split an emoji at the limit and leave a lone surrogate. Now the cut always falls between whole code points.
-
Reviews
ApprovedFour duplicated slice-based cuts now share
clip, so no emoji is split at the limit. Each test places an emoji across the old UTF-16 cut, so it would fail on main. The scope is tight, there are no new dependencies, and there is no UI surface. The whitespace folding is a disclosed behaviour change. Next: (1) add a case for a name that folds to a short line, so the fold is pinned too. (2) Look at the two failing looks.test.ts cases separately, since they fail on main as well. -
Checks
shipped production is serving it deploy f698c54
-
History
- A check's summary, test row, one line and error line are cut with `clip`, so an emoji at the limit stays whole (#6629) 99e632b
- A test pins the asks ledger's measure: raised, acted, dismissed and expired since a time, per viewer (#6636) 5e28153
- A test pins a limb's seat: `parseSeat` takes only `top:N` or `<issue>:N`, and moving a limb then restoring its old seat puts the group back (#6635) 3bf0d17
- src/text/clip.ts: one pure `clip(text, max)` that folds whitespace and cuts at a code point, never leaving a lone surrogate (#6634) b29fc28
- The CLI's `owner/name` refuses empty segments: `a//b`, `/a/b` and `a/b/` are not a repository (#6633) d2be8e0
- A test pins the CLI's argument parser and durations: value flags, `--`, and `90s`/`5m`/`2h`/`250ms` (#6631) 732680f
- A test pins the open-redirect guard: `isLocalPath` and a form's `back` refuse every off-origin form (#6630) 4f7e4d3
- A pure read lists the open crew pulls one changes-asked round away from being handed over (#6599) 837b00e
- Land the warming-files line from branch scout/6547-a-pure-read-names-the-files-that-gained, with its history tested and each line naming its repository (#6598) 7745a7e
- A reviewer asks for everything in one round, and a later round reviews only what changed and whether its earlier asks were met (#6593) 10495f4
- A builder run that declines as "already done on main in <commit>" posts that note on its issue and stops further runs on it (#6592) f367432
- A pure read groups the last 24 h of declined build runs by reason, so planning mistakes show as a count (#6590) 7916fe6
- An admin can hold new work on one file: the picker starts no build whose issue names it, and the hold says who set it (#6528) c86f12e
- P0: the merge queue records and names the tests that failed each gate (not just the count), with a gates API, so a red batch can be acted on (#6741) c236f86
- Land "Since you were here" from pull #6684's branch, with its duplicate `pull_merged` index taken out (#6721) fed63db
- README is 300 bytes from its 60 KB budget, so every README addition turns its pull red: move Develop and What works today into docs/ (target 45 KB) (#6736) 8feb4a6
- A rollout must not turn in-flight gates red: an interrupted gate re-runs as the same candidate, and red (check) retries once before bisecting (#6732) f86257d
- A pull a pass handed to a person shows in "needs you" with the reason and a Give back to the crew button (#6609) f748c80
- Repository-limit and agent-not-here refusals live in one module, read by migrate, repos, apps and the fleet (#6608) ffb1696
- The forge pill works by keyboard alone: Tab reaches it, Enter opens, Escape closes and puts focus back on the pill (#6605) 9bbcd1c
The four places that shorten the lines explaining a red check now all call clip from src/text/clip.ts, and their own cutting code is gone. Before, they cut by UTF-16 position (slice), which could split an emoji at the limit and leave a lone surrogate. Now the cut always falls between whole code points.
src/checks/words.ts:oneLinenow returnsclip(text, LINE_MAX)(80).src/checks/tests-row.ts:boundis nowclip(text, LINE_MAX)(200). It shortens both pinned failure names and their output lines.src/checks/summary.ts:truncateis nowclip(text, SUMMARY_MAX)(200). Thefallbacksummary is still not cut, as before.src/runs/error_line.ts:firstErrorLinereturnsclip(text, ERROR_LINE_MAX)(120).
Behaviour changes to look at: clip collapses runs of whitespace to one space and counts length in code points. So a pinned failure line or error line that had aligned columns now shows single spaces. Lines with emoji may also keep a few more UTF-16 units than before. Existing tests don't depend on either.
New test: test/text-clip-checks.test.ts gives firstErrorLine a 300-character line with an emoji straddling the 120 limit. It checks there is no lone surrogate and that the result is 120 code points ending in …. It does the same for oneLine, a pinned failure name, and a summary. All four cases fail on main.
Tests run: the ten test files that import these modules, plus the new one. Two tests in test/looks.test.ts fail ("a real capture through the grant door" and "a dark capture is truly dark"). They fail the same way on main, so this change doesn't cause them. Everything else passes, and bun x tsc --noEmit is clean.
I made no other changes.
🤖 Generated with Claude Code
The four places that shorten the lines explaining a red check now all call
clipfromsrc/text/clip.ts, and their own cutting code is gone. Before, they cut by UTF-16 position (slice), which could split an emoji at the limit and leave a lone surrogate. Now the cut always falls between whole code points.src/checks/words.ts:oneLinenow returnsclip(text, LINE_MAX)(80).src/checks/tests-row.ts:boundis nowclip(text, LINE_MAX)(200). It shortens both pinned failure names and their output lines.src/checks/summary.ts:truncateis nowclip(text, SUMMARY_MAX)(200). Thefallbacksummary is still not cut, as before.src/runs/error_line.ts:firstErrorLinereturnsclip(text, ERROR_LINE_MAX)(120).Behaviour changes to look at:
clipcollapses runs of whitespace to one space and counts length in code points. So a pinned failure line or error line that had aligned columns now shows single spaces. Lines with emoji may also keep a few more UTF-16 units than before. Existing tests don't depend on either.New test:
test/text-clip-checks.test.tsgivesfirstErrorLinea 300-character line with an emoji straddling the 120 limit. It checks there is no lone surrogate and that the result is 120 code points ending in…. It does the same foroneLine, a pinned failure name, and a summary. All four cases fail on main.Tests run: the ten test files that import these modules, plus the new one. Two tests in
test/looks.test.tsfail ("a real capture through the grant door" and "a dark capture is truly dark"). They fail the same way on main, so this change doesn't cause them. Everything else passes, andbun x tsc --noEmitis clean.I made no other changes.
🤖 Generated with Claude Code
Closes #6629