Repository navigation
fix(cli): keep note text with Windows and Unicode line endings - #139512
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 9:14 PM ET / September 6, 2026, 01:14 UTC. ClawSweeper reviewWhat this changesNormalize Windows and Unicode line breaks before wrapping CLI notes so paragraphs, blank lines, and bullets remain visible. Merge readiness✅ Ready for maintainer review This PR remains useful: fetched main and the latest release retain the faulty line splitting. The focused repair has no actionable correctness findings, and the changed files are unchanged since the previous review. Priority: P2 Review scores
Verification
How this fits togetherCLI setup and diagnostic flows send informational text through the shared terminal note renderer. It wraps that text and passes it to Clack for output on the selected terminal stream. flowchart LR
A[Setup and diagnostic text] --> B[Normalize logical line breaks]
B --> C[Wrap paragraphs and bullets]
C --> D[Clack note renderer]
D --> E[Selected terminal stream]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +25. Total +25 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep logical-line normalization in the shared note wrapper, preserving existing wrapping, copy-sensitive tokens, and selected-stream output. Do we have a high-confidence way to reproduce the issue? Yes, source establishes a focused reproduction: pass paragraphs separated by CRLF, CR, U+2028, or U+2029 through the current-main note wrapper. No tests or target code were executed during this read-only review. Is this the best way to solve the issue? Yes, normalizing logical breaks before the existing per-line parser repairs the owning boundary without adding competing caller logic or changing public interfaces. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1d9ce1ac9ffa. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Native preparation passed for head The regression first failed for CRLF, CR, U+2028, and U+2029 while the LF control passed. After the repair, all 118 terminal/wizard tests pass; five actual wizard-to-Clack-to-Writable cases preserve identical complete output, including blank lines and bullets. Production LOC remains +1/-1 (net zero), with 25 test lines added. The current main baseline still has the faulty LF-only splitter. The fix is ready for native merge; broad build/type/check validation is provided by the green hosted run, not an unrun local full gate. |
|
Merged via squash.
|
* origin/main: fix(cli): keep note text with Windows and Unicode line endings (#139512) fix(agents): keep isolated completion context on its admitted generation (#139607) fix: avoid declaration builds during source-server updates (#139392) fix(models): keep discovered models after catalog refresh failures (#139357) fix(gateway): record a transcript notice when a run fails before replying (#139439) refactor(ios): reuse shared integer conversion (#139581) fix(sessions): prevent database lock failures during reclamation (#139469) perf(test): reuse transforms within owned scheduler slots (#139553) test(agents): share sparse transcript input fixtures (#139589) chore(ui): refresh control ui locales (#139481) fix(slack): keep prototype-named emoji shortcodes intact (#136374) fix(gateway): deliver upgrade rejection responses under Bun (#139516) refactor(test): simplify catalog guards and fix native report fixture (#139496) fix(macos): prevent dashboard fixture loopback timeouts (#139556) fix(matrix): preserve selected reply targets inside threads (#139479)
* commit '6c55a99226ed0611ca088004c81b00fb296f1f71': (182 commits) test(ui): scope dashboard settings setup to the top frame (openclaw#139618) refactor(skills): share pending proposal creation (openclaw#139617) fix(release): accept frozen targets before worker bundles (openclaw#136699) fix(gateway): preserve percent sequences in media filenames (openclaw#139508) fix: preserve current update availability alongside update history (openclaw#139501) feat(diagnostics): expose garbage collection duration metrics (openclaw#139592) fix(ui): keep Logbook timestamps clear of the activity stripe (openclaw#139539) fix(ui): keep Swarm outcomes visible after completion (openclaw#139490) test: check file accessibility without runtime-specific return values (openclaw#139590) refactor(sdk): keep helper types private (openclaw#139601) fix(cron): preserve current-session delivery intent (openclaw#139491) fix: prevent browser profile permission hangs in Doctor (openclaw#139612) fix(agents): repair storage-failure test fixture after failover owner move (openclaw#139531) fix(cli): keep note text with Windows and Unicode line endings (openclaw#139512) fix(agents): keep isolated completion context on its admitted generation (openclaw#139607) fix: avoid declaration builds during source-server updates (openclaw#139392) fix(models): keep discovered models after catalog refresh failures (openclaw#139357) fix(gateway): record a transcript notice when a run fails before replying (openclaw#139439) refactor(ios): reuse shared integer conversion (openclaw#139581) fix(sessions): prevent database lock failures during reclamation (openclaw#139469) ...
* commit 'refs/openclaw/tasks/pr-135167-main-latest': test(ui): scope dashboard settings setup to the top frame (#139618) refactor(skills): share pending proposal creation (#139617) fix(release): accept frozen targets before worker bundles (#136699) fix(gateway): preserve percent sequences in media filenames (#139508) fix: preserve current update availability alongside update history (#139501) feat(diagnostics): expose garbage collection duration metrics (#139592) fix(ui): keep Logbook timestamps clear of the activity stripe (#139539) fix(ui): keep Swarm outcomes visible after completion (#139490) test: check file accessibility without runtime-specific return values (#139590) refactor(sdk): keep helper types private (#139601) fix(cron): preserve current-session delivery intent (#139491) fix: prevent browser profile permission hangs in Doctor (#139612) fix(agents): repair storage-failure test fixture after failover owner move (#139531) fix(cli): keep note text with Windows and Unicode line endings (#139512) fix(agents): keep isolated completion context on its admitted generation (#139607) fix: avoid declaration builds during source-server updates (#139392) fix(models): keep discovered models after catalog refresh failures (#139357) fix(gateway): record a transcript notice when a run fails before replying (#139439)
Additional instructions
MUST: Keep Allow edits from maintainers enabled for this PR so maintainers can help update the branch when needed.
What Problem This Solves
Fixes an issue where users reading CLI setup or diagnostic notes would see missing lines or an empty note when its text contained Windows CRLF, bare CR, or Unicode line/paragraph separators. For example,
First paragraph.\r\nSecond paragraph.displayed only the second paragraph.Why This Change Was Made
The note wrapper split only on LF, leaving other line terminators inside a single line that its wrapping expression could not parse. Normalize logical line breaks at that existing boundary before wrapping, treating CRLF as one break and preserving blank lines, bullets, copyable paths, width handling, and Clack output routing.
User Impact
CLI notes retain all paragraphs across LF, CRLF, CR, U+2028, and U+2029 inputs. The repair changes one production line with no new configuration, dependency, or public API surface. Production LOC: +1/−1 (net 0); tests: +25.
Evidence
The regression exercises actual
noteToStream/Clack output with a first paragraph, a blank line, and a bullet. Before the production change, CRLF, CR, U+2028, and U+2029 failed because the first paragraph disappeared; the LF control passed. After the change, all five variants preserve the text.createClackPrompter.note → noteToStream → Clack 1.7.0 → Writable. Every line-ending variant produced identical complete output, including the blank line and bullet.v2026.9.1source reproduced the same loss using immutable Git objects and the installed Clack renderer; this was source-level historical proof, not a published historical binary test.git diff --checkpassed. Managed independent review through P2 returned scoped-clean with no findings.Focused verification:
The tested candidate is based on
7c4904e32e2b5dae23bb9e268d671fdb6cb5c7f1. The base renderer, adjacent helpers, wizard caller, and test paths are byte-identical in checked main8bdeb2f9bc85f9d2c9e654b4c52c49b269e62ee9. Broad checks/build were not rerun locally; required hosted CI must pass on the published head before landing.