Add file-backed appearance config for font overrides#464
Closed
nassimna wants to merge 2 commits intopingdotgg:mainfrom
Closed
Add file-backed appearance config for font overrides#464nassimna wants to merge 2 commits intopingdotgg:mainfrom
nassimna wants to merge 2 commits intopingdotgg:mainfrom
Conversation
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
appearance.jsonconfig in the server state directory so users can change UI and terminal font family / size now, before a dedicated settings UI exists.appearance.jsonautomatically on first run so existing users and fresh installs do not hit startup errors when the file is missing.server.getConfig, and push section-awareserver.configUpdatedevents on reload.appearance.jsonimmediately affects typography.remso UI font-size changes actually scale across the main surfaces.appearance.jsonpath plus an open-in-editor action, so users can find and edit the config file easily.Context
This is aimed at a real usability problem on high-resolution monitors, especially QHD and above, where the default typography can read too small.
This PR intentionally solves that immediately with a user-editable config file. Users can change the font values now by editing
appearance.json. A later PR can add a proper in-app settings UI for the same values.Testing
bun run test src/appearance.test.ts src/wsServer.test.tsinapps/serverbun run test src/appearance.test.ts src/wsNativeApi.test.tsinapps/webbun run test src/appearance.test.tsinpackages/contractsbun lintbun typecheckRefs #418
Refs #254
Note
Add file‑backed appearance config and apply terminal font overrides across web and server components
Introduce a server
Appearanceservice with file‑backedappearance.json, broadcast config updates withchangedSectionsand split issue arrays, load appearance inserverGetConfig, and wire the layer into runtime; on the web, add an in‑memory appearance store that applies CSS variables and auseResolvedAppearancehook, sync server appearance at app root, and updateTerminalViewportto useappearance.monoFontFamilyandappearance.terminalFontSizePxwith a sharedfitTerminalAndSyncSizeutil; convert fixed px font sizes to rem across UI. Key types and payloads in contracts are updated to include appearance and separate issue arrays. Core entry points: apps/server/src/appearance.ts, apps/server/src/wsServer.ts, packages/contracts/src/server.ts, and apps/web/src/appearance.ts.📍Where to Start
Start with the
makeAppearanceservice and change stream in apps/server/src/appearance.ts, then review the WebSocket wiring in apps/server/src/wsServer.ts and the web runtime application in apps/web/src/appearance.ts.Macroscope summarized 6bc6850.