Skip to content

feat(diffshub): add code font preference#854

Draft
NathanDrake2406 wants to merge 4 commits into
pierrecomputer:mainfrom
NathanDrake2406:diffshub-code-font-preference
Draft

feat(diffshub): add code font preference#854
NathanDrake2406 wants to merge 4 commits into
pierrecomputer:mainfrom
NathanDrake2406:diffshub-code-font-preference

Conversation

@NathanDrake2406

@NathanDrake2406 NathanDrake2406 commented Jun 19, 2026

Copy link
Copy Markdown

Overview

Add a code font preference to DiffsHub display settings. This is stacked on #853 so the font choice is saved with the rest of the local display preferences.

The UI offers Default and Custom. Default keeps the current bundled Berkeley Mono behavior. Custom accepts a local installed font name, supports common shorthand for editor fonts, and also accepts system-monospace terms like system or monospace without adding any new font assets or remote font loading.

Dependency

Depends on #853. Until #853 lands, this PR includes the display-preference persistence commit in its comparison.

Validation

  • AGENT=1 bun test apps/diffshub/lib/test/displayPreferences.test.ts apps/diffshub/lib/test/reviewDisplayPreferences.test.tsx
  • AGENT=1 ./node_modules/.bin/oxlint --type-aware --tsconfig tsconfig.oxlint.json apps/diffshub/components/DiffsHubHeader.tsx apps/diffshub/lib/displayPreferences.ts apps/diffshub/lib/test/displayPreferences.test.ts apps/diffshub/lib/test/reviewDisplayPreferences.test.tsx
  • AGENT=1 ./node_modules/.bin/moon run diffshub:typecheck
  • AGENT=1 ./node_modules/.bin/moon run diffshub:test
  • AGENT=1 ./node_modules/.bin/moon run diffshub:build

Closes #852.

DiffsHub display controls previously reset between visits, so repeat review sessions had to reapply the same view, wrap, line-number, background, indicator, and collapse preferences.

The display state lived only in ReviewUI component state. This stores a versioned, locally validated preference payload, reuses the existing browser storage boundary for theme persistence, and hydrates the viewer only after preferences are loaded.

Closes pierrecomputer#851.
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@NathanDrake2406 is attempting to deploy a commit to the Pierre Computer Company Team on Vercel.

A member of the Team first needs to authorize it.

@NathanDrake2406 NathanDrake2406 marked this pull request as draft June 19, 2026 08:04
@NathanDrake2406 NathanDrake2406 force-pushed the diffshub-code-font-preference branch from cb86d60 to 3e398fc Compare June 19, 2026 09:00
DiffsHub now has a persisted display preference payload, so the code font can live beside the other viewer settings instead of adding another storage boundary.

This adds Berkeley, Geist Mono, and system monospace choices, applies the selected family through the existing --diffs-font-family hook, and validates stored font values with the same per-field preference parser.

Closes pierrecomputer#852.
@NathanDrake2406 NathanDrake2406 force-pushed the diffshub-code-font-preference branch from 3e398fc to e1e2d38 Compare June 19, 2026 09:10
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.

Add a DiffsHub code font preference

1 participant