Repository navigation
feat: add persistent word-wrap setting for chat code blocks and tables #3480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
5a94761
b5275c6
4c284ad
6684c33
cf71bb9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,6 +41,7 @@ export const DEFAULT_SIDEBAR_THREAD_PREVIEW_COUNT: SidebarThreadPreviewCount = 6 | |
|
|
||
| export const ClientSettingsSchema = Schema.Struct({ | ||
| autoOpenPlanSidebar: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))), | ||
| chatWordWrap: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually this should probalby just be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense. let me look into it
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @juliusmarminge this is done, please check :)
|
||
| confirmThreadArchive: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))), | ||
| confirmThreadDelete: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))), | ||
| dismissedProviderUpdateNotificationKeys: Schema.Array(TrimmedNonEmptyString).pipe( | ||
|
|
@@ -535,6 +536,7 @@ export type ServerSettingsPatch = typeof ServerSettingsPatch.Type; | |
|
|
||
| export const ClientSettingsPatch = Schema.Struct({ | ||
| autoOpenPlanSidebar: Schema.optionalKey(Schema.Boolean), | ||
| chatWordWrap: Schema.optionalKey(Schema.Boolean), | ||
| confirmThreadArchive: Schema.optionalKey(Schema.Boolean), | ||
| confirmThreadDelete: Schema.optionalKey(Schema.Boolean), | ||
| diffIgnoreWhitespace: Schema.optionalKey(Schema.Boolean), | ||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chat wrap ignores updated settings
Medium Severity
The
MarkdownTableandMarkdownCodeBlockcomponents initialize theirexpandedandwrappedstates from thechatWordWrapsetting usinguseState. This causes them to only read the setting once on mount. As a result, changes to thechatWordWrapsetting (e.g., after async hydration or user toggling) don't update the component's wrap/expand state, leading to an incorrect display until the component remounts.Reviewed by Cursor Bugbot for commit 6684c33. Configure here.