@GearHead87 is attempting to deploy a commit to the Ping Labs Team on Vercel.
A member of the Team first needs to authorize it.
This makes terminal panes easier to read and lets users match the terminal to their preferred coding setup without requiring any manual app configuration. I just want to use my Nerd Fonts from my system.
Note
AppSettingsSchema fields and wiring them to ThreadTerminalDrawer and TerminalViewportAdd terminalFontFamily, terminalFontSize (clamped to min/max and rounded), and terminalLineHeight (clamped and rounded to 2 decimals) to settings; normalize via resolveTerminalFontFamily, clampTerminalFontSize, and resolveTerminalLineHeight; export parsePersistedSettings; pass settings into the terminal and update live; expose inputs in the chat settings UI.
Start with normalizeAppSettings and new terminal typography utils in apps/web/src/appSettings.ts, then review their use in ThreadTerminalDrawer and TerminalViewport in apps/web/src/components/ThreadTerminalDrawer.tsx.
Macroscope summarized db68d11.
Added 1 commit
@GearHead87 is attempting to deploy a commit to the Ping Labs Team on Vercel.
A member of the Team first needs to authorize it.
Important
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 25a1931a-5422-41b8-b9c6-141bd08c5391
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
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 @coderabbitai help to get the list of available commands and usage tips.
| β¦ | β¦ | @@ -45,6 +51,15 @@ const AppSettingsSchema = Schema.Struct({ | |
| 60 | + | maximum: MAX_TERMINAL_FONT_SIZE, | |
| 61 | + | }), | |
| 62 | + | ).pipe(Schema.withConstructorDefault(() => Option.some(DEFAULT_TERMINAL_FONT_SIZE))), | |
| 48 | 63 | }); | |
π High src/appSettings.ts:57
The terminalFontSize schema uses Schema.Int with Schema.isBetween, so Schema.decodeSync throws on values outside [8,32] or non-integers before normalizeAppSettings can run. This causes updateSettings to crash on raw input that needs clamping, and parsePersistedSettings to discard all user settings if localStorage contains an out-of-bounds font size. Consider relaxing the schema to Schema.Number so clampTerminalFontSize can handle rounding and clamping after decode succeeds.
apps/web/src/routes/_chat.settings.tsx:347
The
terminalFontSizeinput field is unusable for typing most values due to aggressive clamping in theonChangehandler. When a user types a number,clampTerminalFontSizeis called immediately on the incomplete value. SinceMIN_TERMINAL_FONT_SIZEis 8, typing a starting digit like "1" (intending to type "12" or "14") results in the value being immediately clamped to 8 and the input updating to display "8". Appending a digit then results in a number like "84", which gets clamped to the maximum of 32. Additionally, the!Number.isFinite(next)check prevents the user from clearing the input field, as the state update is skipped while the component re-renders with the old valid value.
β Resolved in db68d1145a1c263d907c58e097d36cffca34a8be
Added 2 commits
| β¦ | β¦ | @@ -45,6 +54,15 @@ const AppSettingsSchema = Schema.Struct({ | |
| 62 | + | ), | |
| 63 | + | terminalLineHeight: Schema.Number.pipe( | |
| 64 | + | Schema.withConstructorDefault(() => Option.some(DEFAULT_TERMINAL_LINE_HEIGHT)), | |
| 65 | + | ), | |
π High src/appSettings.ts:57
Adding terminalFontFamily, terminalFontSize, and terminalLineHeight as required fields causes Schema.decodeSync in parsePersistedSettings to throw for existing users whose stored settings lack these fields. The catch block then returns DEFAULT_APP_SETTINGS, silently discarding all previously saved user data including customCodexModels and paths. Consider defining these fields as optional so decoding succeeds and defaults are applied only to missing fields, preventing data loss on the next load.
| 1 | - terminalFontFamily: Schema.String.check(Schema.isMaxLength(MAX_TERMINAL_FONT_FAMILY_LENGTH)).pipe( |
| 2 | - Schema.withConstructorDefault(() => Option.some(DEFAULT_TERMINAL_FONT_FAMILY)), |
| 3 | - ), |
| 4 | - terminalFontSize: Schema.Number.pipe( |
| 5 | - Schema.withConstructorDefault(() => Option.some(DEFAULT_TERMINAL_FONT_SIZE)), |
| 6 | - ), |
| 7 | - terminalLineHeight: Schema.Number.pipe( |
| 8 | - Schema.withConstructorDefault(() => Option.some(DEFAULT_TERMINAL_LINE_HEIGHT)), |
| 9 | - ), |
| 1 | In file apps/web/src/appSettings.ts around lines 57-65: |
| 2 | |
| 3 | Adding `terminalFontFamily`, `terminalFontSize`, and `terminalLineHeight` as required fields causes `Schema.decodeSync` in `parsePersistedSettings` to throw for existing users whose stored settings lack these fields. The catch block then returns `DEFAULT_APP_SETTINGS`, silently discarding all previously saved user data including `customCodexModels` and paths. Consider defining these fields as optional so decoding succeeds and defaults are applied only to missing fields, preventing data loss on the next load. |
| 4 | |
| 5 | Evidence trail: |
| 6 | apps/web/src/appSettings.ts lines 54-64 (new fields with withConstructorDefault); apps/web/src/appSettings.ts lines 253-264 (parsePersistedSettings function); git_diff base=MERGE_BASE head=REVIEWED_COMMIT path=apps/web/src/appSettings.ts; Effect Schema documentation at https://github.com/xstelea/radix-context/blob/main/context/effect-Schema.md (section 'Defaults (Constructor and Decoding)' explains withConstructorDefault vs optionalWith behavior) |
There are no existing users yet since the app is in alpha. While this is a valid concern, we can disregard it for now.
No