feat: add persistent word-wrap setting for chat code blocks and tables#3480
feat: add persistent word-wrap setting for chat code blocks and tables#3480imabdulazeez wants to merge 3 commits into
Conversation
- adds `chatCodeBlockWordWrap` client setting (default: true) - uses persisted setting as default wrap state in code blocks - adds toggle in general settings panel with reset support
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review Unable to check for correctness in b5275c6. You can customize Macroscope's approvability policy. Learn more. |
- extends wrap setting to cover table cells as well as code blocks - updates setting key, UI labels, and reset logic
What Changed
Added a Wrap code blocks and tables client setting that controls whether long content in chat messages wraps by default — covering both code blocks and tables.
chatWordWrapboolean in the client settings schema (ClientSettingsSchema+ClientSettingsPatch), defaulting totrue. (Renamed from the earlierchatCodeBlockWordWrapnow that it governs more than code blocks.)MarkdownCodeBlockseeds its per-blockwrappedstate from this setting instead of always starting unwrapped.MarkdownTablenow seeds itsexpanded(wrap) state from the same setting, so wide tables render with wrapped cells by default instead of truncating. The footer expand/collapse toggle still works for ad-hoc overrides.data-wraptable CSS; tables wrap via the existing[data-expanded="true"]styling.ClientSettingstest fixture to the renamed field.Why
Long, unwrapped lines in chat code blocks and wide table cells force horizontal scrolling, which is awkward to read. Previously each block/table started in its non-wrapped state with users having to toggle every one individually. This adds a single, persisted preference so users can make wrapping the default across both content types, while keeping the per-element toggle for exceptions. Default is
trueso the more readable behavior is on out of the box.Screenshots
Settings → General — new "Wrap code blocks and tables" toggle
Chat code block + table with wrap default applied
Checklist