Skip to content

fix: preserve copy-safe doctor paths in note boxes#94744

Closed
arkyu2077 wants to merge 1 commit into
openclaw:mainfrom
arkyu2077:fix/issue-94730
Closed

fix: preserve copy-safe doctor paths in note boxes#94744
arkyu2077 wants to merge 1 commit into
openclaw:mainfrom
arkyu2077:fix/issue-94730

Conversation

@arkyu2077

Copy link
Copy Markdown
Contributor

Summary

  • widen note output columns to fit already-wrapped copy-sensitive lines before handing them to clack
  • keep long doctor/session-lock paths intact instead of letting the note box split .jsonl.lock mid-token
  • add a regression test that renders the clack note with the adjusted output width

Testing

  • node scripts/run-vitest.mjs packages/terminal-core/src/table.test.ts

Fixes #94730

@openclaw-barnacle openclaw-barnacle Bot added size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close: this PR is superseded by an open, clean, proof-sufficient sibling PR with the same terminal-core diff and maintainer automerge signal; this branch adds no unique implementation and still lacks its own real behavior proof.

Canonical path: Land #94746 if maintainers accept the fix, and keep only one implementation path for #94730.

So I’m closing this here and keeping the remaining discussion on #94746 and #94730.

Review details

Best possible solution:

Land #94746 if maintainers accept the fix, and keep only one implementation path for #94730.

Do we have a high-confidence way to reproduce the issue?

Yes for source-level reproduction: current main routes session-lock paths through note(), and pinned Clack 1.4.0 hard-wraps final note content from getColumns(output) - 6. I did not run a live openclaw doctor scenario in this read-only review.

Is this the best way to solve the issue?

The code shape is acceptable, but this PR is not the best landing path because #94746 has the same diff plus sufficient proof and maintainer automerge signal. A session-lock-only workaround would be worse than the shared terminal-core fix both branches propose.

Security review:

Security review cleared: Cleared: the diff only changes terminal note width calculation and a Vitest regression test, with no dependency, workflow, secret, network, package, or install-script change.

AGENTS.md: found and applied where relevant.

What I checked:

  • Current main note handoff: Current main still passes wrapNoteMessage output to clackNote with only resolved terminal columns, so the affected behavior is in packages/terminal-core/src/note.ts and the PR touches the right helper. (packages/terminal-core/src/note.ts:210, ca6d52e0e8c1)
  • Affected doctor caller: Session lock diagnostics format the lock path and emit the lines through the shared note helper, matching the linked bug report's doctor surface. (src/commands/doctor-session-locks.ts:97, ca6d52e0e8c1)
  • Pinned dependency contract: terminal-core pins @clack/prompts to 1.4.0, and the upstream tag's note renderer wraps with getColumns(output) - 6 using hard wrapping, so widening output.columns controls Clack's second wrap. (packages/terminal-core/package.json:104, f4818cd9aa2a)
  • Duplicate diff proof: The diff for fix(note): prevent clack from re-breaking copy-sensitive tokens #94746 is the same note.ts helper plus the same table.test.ts rendered-output regression as this PR. (packages/terminal-core/src/note.ts:186, b17a4ff5711c)
  • Canonical sibling viability: The live sibling PR is open, mergeable, CLEAN, labeled proof:sufficient, and has a maintainer automerge comment, making it a viable canonical landing path rather than an unsafe supersession. (b17a4ff5711c)
  • This PR proof gap: This PR body lists a targeted Vitest command but does not include after-fix terminal output, screenshot, recording, linked artifact, or logs showing the rendered path remains copy-safe. (4379ba43921f)

Likely related people:

  • steipete: GitHub path history shows steipete moved terminal note code into packages/terminal-core and later touched package source docs. (role: terminal-core package history contributor; confidence: medium; commits: de1dfab03ef0, 4df95d3c3fd6; files: packages/terminal-core/src/note.ts, packages/terminal-core/src/table.test.ts)
  • amknight: GitHub path history shows amknight recently touched session write-lock behavior that feeds the affected doctor session-lock output. (role: recent session-lock contributor; confidence: medium; commits: 8a060b2904d4; files: src/commands/doctor-session-locks.ts)
  • jbetala7: GitHub path history shows jbetala7 recently changed adjacent terminal-core table tests where this PR adds note-rendering regression coverage. (role: adjacent terminal-core test contributor; confidence: medium; commits: 29dd7847fd96; files: packages/terminal-core/src/table.test.ts)

Codex review notes: model internal, reasoning high; reviewed against ca6d52e0e8c1.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 19, 2026
@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

doctor: copy-sensitive paths get re-wrapped by clack note box, splitting file extensions

1 participant