Skip to content

chore(settings): remove deprecated freshAgent.fontScale setting#512

Merged
danshapiro merged 1 commit into
mainfrom
chore/remove-freshagent-fontscale
Jul 8, 2026
Merged

chore(settings): remove deprecated freshAgent.fontScale setting#512
danshapiro merged 1 commit into
mainfrom
chore/remove-freshagent-fontscale

Conversation

@danshapiro

Copy link
Copy Markdown
Owner

What

Remove the inert freshAgent.fontScale setting entirely from shared/settings.ts (constants, local-key registration, type field, normalizers, default, sanitize branch). Legacy localStorage records/seeds containing fontScale are 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 at docs/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 outside shared/settings.ts.

Verification

  • TDD
  • npm run check full coordinated suite green (8,692 tests)
  • Lint 0 errors
  • Post-removal grep for fontScale in production code returns zero

Generated with Amplifier

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>
@danshapiro
danshapiro merged commit 92b3246 into main Jul 8, 2026
1 check passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread shared/settings.ts
Comment on lines 87 to 90
'showThinking',
'showTools',
'showTimecodes',
'fontScale',
] as const

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant