chore(settings): remove deprecated freshAgent.fontScale setting#512
Conversation
freshAgent.fontScale has been inert for some time: no UI control, no runtime consumer (fresh-agent transcripts follow terminal.fontSize via --fresh-transcript-font-size), and deliberately excluded from persistence writes. Remove it entirely from shared/settings.ts: constants, local-key registration, type field, normalizers, default, and sanitize branch. Legacy inputs (old localStorage records, settings seeds) containing fontScale are now passively dropped by the existing allow-list sanitizers; regression tests pin that old records rehydrate cleanly with fontScale absent. The agentChat legacy migration path is kept -- it migrates the surviving fresh-agent keys and has no fontScale- specific code. Verified with npm run check (full coordinated suite green); zero fontScale references remain in production code. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f6bedc8f2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 'showThinking', | ||
| 'showTools', | ||
| 'showTimecodes', | ||
| 'fontScale', | ||
| ] as const |
There was a problem hiding this comment.
Drop fontScale when stripping freshAgent-only patches
With fontScale removed from this local-key list, stripLocalSettings({ freshAgent: { fontScale: 1.25 } }, { migrateLegacyFreshAgentAlias: false }) no longer enters the migratedFreshAgent branch because the sanitizer returns undefined, so the shallow-copied freshAgent object remains in next. That lets stale/deprecated patches sent through normalizeServerSettingsPatchForApi reach /api/settings as freshAgent.fontScale, which the strict server schema rejects instead of silently dropping as intended; delete/overwrite next.freshAgent whenever a raw freshAgent block exists but sanitizes to empty.
Useful? React with 👍 / 👎.
What
Remove the inert
freshAgent.fontScalesetting entirely fromshared/settings.ts(constants, local-key registration, type field, normalizers, default, sanitize branch). Legacy localStorage records/seeds containingfontScaleare passively dropped by the existing allow-list sanitizers; regression tests pin clean rehydration. The agentChat legacy migration is kept (no fontScale-specific code). Spec doc included atdocs/plans/2026-07-08-remove-freshagent-fontscale-spec.md.Why
Dead weight — no UI control, no runtime consumer (fresh-agent transcripts follow
terminal.fontSize), already excluded from persistence writes; confirmed zero production references outsideshared/settings.ts.Verification
npm run checkfull coordinated suite green (8,692 tests)fontScalein production code returns zeroGenerated with Amplifier