feat(ui): add line wrap toggle to markdown code blocks#599
Conversation
Render Markdown code blocks with a header-level word wrap control alongside the existing copy action, with wrapping enabled by default for both plain and Shiki-highlighted blocks. Track per-block wrap overrides in the Markdown component so user choices survive async Markdown and syntax-highlight re-renders for the same message part. The toggle updates aria labels, pressed state, and virtual-list measurements after layout changes. Add localized wrap labels for all existing Markdown message bundles and style the new control with the existing code block header patterns. Validation: npm run typecheck --workspace @codenomad/ui
|
I want you to perform the gatekeeper checks for latest PR state check for regressions |
|
Gatekeeper review for latest PR state: I would not merge as-is. Findings:
Implementation quality notes:
Validation attempted:
Recommendation: fix the output-wrap regression before merge. The positional key issue should also be addressed if the intended guarantee is truly per-block persistence through content updates, not only through the Shiki language-load re-render of identical content. -- |
Plumb the default code block wrap state through the Markdown component and renderer so tool output Markdown can render code fences unwrapped when the existing output wrap toggle is disabled. Use stable renderer-emitted code block keys based on language, decoded code, and occurrence count so per-block wrap overrides survive async re-renders without drifting across unrelated inserted or removed code fences. Centralize Markdown code block wrapper creation and keep the wrap/copy controls square to match the UI styling guidelines. Validation: npm run typecheck --workspace @codenomad/ui
|
And now? |
|
PR builds are available as GitHub Actions artifacts: https://github.com/NeuralNomadsAI/CodeNomad/actions/runs/29403464440 Artifacts expire in 7 days.
|
|
Re-review after Findings:
What changed relative to the previous gatekeeper review:
Residual risks / non-blocking notes:
Validation attempted:
Recommendation: acceptable to merge from the code-review perspective once CI’s real typecheck/build is green. -- |
Summary
Validation
Notes