Skip to content

fix: bundle MiSans VF font (#24) + proxy modes & opt-in system CA (#20)#27

Merged
Dustella merged 3 commits into
mainfrom
feat/network-proxy-and-font-vf
Jul 12, 2026
Merged

fix: bundle MiSans VF font (#24) + proxy modes & opt-in system CA (#20)#27
Dustella merged 3 commits into
mainfrom
feat/network-proxy-and-font-vf

Conversation

@Dustella

Copy link
Copy Markdown
Member

Two related fixes to how the desktop client packages fonts and reaches GitHub.

#24 — MiSans VF variable font

The client shipped four fixed-weight MiSans subset files from the misans package, so any weight off those four steps — and font-weight interpolation — fell back to the OS font.

  • Bundle the full MiSans variable font (wght 100–900) as a single woff2, declared via @font-face in app.css.
  • Family name stays "MiSans", so --font-sans / DEFAULT_UI_FONT_FAMILY resolve unchanged.
  • Drop the now-unused misans dependency.

Note: the VF woff2 is ~11.6 MB. Fine for a desktop app that loads from local disk (no per-visit download); subsetting to a CJK-common range while keeping the wght axis is a possible follow-up.

#20 — Proxy modes + opt-in system CA

Reverse-proxy tools (e.g. steamcommunity302) install a local root CA that Node doesn't trust, so GitHub connections fail with unable to verify the first certificate.

  • Opt-in "Trust system certificates" toggle merges the OS trust store into undici's CA set for GitHub requests only. Off by default — follows Node's default TLS behaviour; at the user's own risk.
  • Explicit proxy selection. network.proxyMode (none | system | custom) replaces the implicit null-cascade, so users can force a direct connection or a custom URL.
    • Existing configs migrate transparently (a set proxyUrlcustom, otherwise → system) — no behaviour change, no schemaVersion bump.
  • Both surface through one shared network-settings component, mounted in:
    1. a new Settings → Network tab, and
    2. a labelled button on the login screen, so a user behind a proxy can connect before authenticating.

Transport threads a scoped ca through createGitHubApi for both the proxied (ProxyAgent) and direct (Agent) paths, covering device-flow login and all API calls.

Validation

  • pnpm typecheck (full workspace) ✅
  • pnpm --filter @oh-my-github/client build
  • locales.test.ts (en/zh message compile) ✅

UI uses only @oh-my-github/ui primitives + semantic tokens. The CA path is validated by types/build only — a real reverse-proxy + installed root CA still warrants a live check.

Closes #24
Closes #20

🤖 Generated with Claude Code

Dustella and others added 2 commits July 12, 2026 15:55
The client shipped four fixed-weight MiSans subset files from the misans
package, so any weight off those four steps — and font-weight interpolation —
fell back to the OS font. Replace them with the full MiSans variable font
(wght 100-900) as a single woff2, declared via @font-face in app.css. The
family name stays "MiSans" so --font-sans resolves unchanged. Drop the now
unused misans dependency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tings (#20)

Reverse-proxy tools (e.g. steamcommunity302) install a local root CA that
Node does not trust, so GitHub connections fail with "unable to verify the
first certificate". Add an opt-in "trust system certificates" toggle that
merges the OS trust store into undici's CA set for GitHub requests only; off
by default, following Node's default TLS behaviour.

Also make proxy selection explicit. network.proxyMode ('none' | 'system' |
'custom') replaces the implicit null-cascade so users can force a direct
connection or a custom URL; existing configs migrate (a set proxyUrl -> custom,
otherwise -> system) with no behaviour change and no schemaVersion bump.

Surface both through one shared network-settings component, mounted in a new
Settings > Network tab and behind a labelled button on the login screen so a
user behind a proxy can connect before authenticating.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Dustella Dustella merged commit 83dbe5d into main Jul 12, 2026
7 checks passed
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.

Windows 桌面端字体渲染边缘不平滑 [BUG] 使用steamcommunity302等类似程序反向代理Github时无法连接

1 participant