Skip to content

[backport core/1.55] fix(billing-web): ship the design-system Inter faces in the build - #18788

Merged
comfy-pr-bot merged 1 commit into
core/1.55from
backport-18685-to-core-1.55
Sep 25, 2026
Merged

comfy-pr-bot merged 1 commit into
core/1.55from
backport-18685-to-core-1.55

Conversation

@comfy-pr-bot

Copy link
Copy Markdown
Member

Backport of #18685 to core/1.55

Automatically created by backport workflow.

…8685)

## Summary

billing-web requested `/fonts/inter-latin-normal.woff2` (404/503 on
testbilling.comfy.org) because the design-system Inter `@font-face` URLs
were never resolved into its build; this bundles them.

## Changes

- **What**:
- Why: every billing-web page fired a failing font request, and the CSS
carried two competing Inter face sets.
- Root cause: `packages/design-system/src/css/fonts.css` declares
`url('/fonts/inter-latin-*.woff2')`, which only the root app serves
(from the repo-root `public/`). billing-web's `publicDir` has no
`fonts/`, so Vite left the URL unresolved ("didn't resolve at build
time") and the Vercel deploy returned an error for it.
`apps/billing-web/src/styles.css` papered over this with its own
duplicate faces pointing at `../../../public/fonts`, so the broken
design-system faces still shipped alongside.
- How: alias `/fonts/` to the repo-root `public/fonts/` in
`apps/billing-web/vite.config.ts` so Vite bundles the design-system
faces as hashed assets (dev serves them via `/@fs`), and delete the
duplicate faces from `styles.css`. The built CSS now has exactly two
Inter faces, both `/assets/inter-latin-*-<hash>.woff2`.
- Test: `src/fontAssets.test.ts` reads the design-system `fonts.css` and
asserts each `url()` resolves to a real file through billing-web's Vite
resolver. It fails on main (both URLs unresolved) and passes with the
alias.

## Review Focus

Alias vs. copying the fonts into `apps/billing-web/public/fonts`: the
alias keeps one copy of the binaries and gives them content hashes
(covered by the existing `/assets/*` immutable cache header). Other
design-system consumers are untouched.

## AS IS / TO BE

| AS IS | TO BE |
| --- | --- |
| <img width="780" alt="AS IS"
src="https://github.com/user-attachments/assets/7dbfd8df-bea5-4b1d-9935-7609daabc42a"
/> | <img width="780" alt="TO BE"
src="https://github.com/user-attachments/assets/baf1da1c-5aa0-4dcd-af0b-af6ec0e8cd0d"
/> |

The panel in each shot lists every `@font-face` `src` read from the
page's loaded stylesheets, fetched from the same origin, with its HTTP
status.

- AS IS: https://testbilling.comfy.org (main build). The shipped CSS has
four Inter faces. The two design-system faces point at
`/fonts/inter-latin-{normal,italic}.woff2` and return 404. Inter still
renders only because the duplicate faces in `styles.css` resolve to
`/assets/`.
- TO BE: this branch, `vite build` + `vite preview` on
http://localhost:5174 against testcloud. The CSS has exactly two faces,
both `/assets/inter-latin-*-<hash>.woff2` (200, `font/woff2`), and the
page renders in Inter.

<!-- m2-dep-graph:start -->
## Plan position: Milestone 2 payment-test fixes

Found in the live M2 run (testcloud → testbilling, Team per-credit
checkout). None of these PRs depends on another to merge. Solid arrows
gate a milestone step; dotted ones are nice-to-have.

| PR | Defect | Dependency |
|---|---|---|
| [D5 cloud#10518](Comfy-Org/cloud#10518) |
test-v2 billing-worker uses the wrong Stripe key; every confirm fails
`parameter_missing client_secret` | Blocker on test only (config).
Unblocks the live re-run. |
| [D4 cloud#10514](Comfy-Org/cloud#10514) |
preview-subscribe attaches `payment_method_configuration_id` only when
`embedded_checked_enabled` is on | Required before widening
`hosted_billing_destination` past the flag cohort. |
| [D3 FE
#18684](#18684) |
billing-web asks for a card on plan changes that need none |
Independent. Shares e2e fixtures with #18687. |
| [D6 FE
#18687](#18687) |
failed-payment UI ignores `recovery_action` / `retryable` | Independent.
Shares e2e fixtures with #18684. |
| [D8 FE
#18686](#18686) |
Stripe Element labels invisible in dark theme | Independent (cosmetic).
|
| **[D7 FE
#18685](#18685) (this
PR)** | billing-web font URL broken (`/fonts/inter-*.woff2`) |
Independent (cosmetic). |

```mermaid
flowchart LR
  c10518["D5 cloud#10518<br/>test-v2 Stripe key"]
  c10514["D4 cloud#10514<br/>always attach pmc id"]
  f18684["D3 #18684<br/>no card for plan change"]
  f18687["D6 #18687<br/>recovery_action UI"]
  f18686["D8 #18686<br/>dark-theme labels"]
  f18685["D7 #18685<br/>fonts"]
  RERUN(["M2 live payment re-run<br/>testcloud → testbilling"])
  ROLLOUT(["Widen hosted_billing_destination<br/>beyond flag cohort"])
  c10518 --> RERUN
  c10514 --> ROLLOUT
  f18684 --> ROLLOUT
  f18687 --> ROLLOUT
  f18686 -.-> ROLLOUT
  f18685 -.-> ROLLOUT
  RERUN --> ROLLOUT
  f18684 <-. "shared e2e fixtures:<br/>second to merge pulls main" .-> f18687
  style f18685 fill:#f9d71c,stroke:#333,stroke-width:3px,color:#000
```
<!-- m2-dep-graph:end -->
@comfy-pr-bot
comfy-pr-bot requested review from a team and dante01yoon as code owners September 25, 2026 04:17
@comfy-pr-bot comfy-pr-bot added the backport Backporting a PR onto a release candidate label Sep 25, 2026
@comfy-pr-bot
comfy-pr-bot enabled auto-merge (squash) September 25, 2026 04:17
@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since a98216aca69eceb499622ed009caa3faf2539f00

Full docs: ADR-DEVEX-LINT-0015

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

This candidate changes nothing the matrix measures, so every expensive stage was skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

📦 Bundle Size

⏳ Size data collection in progress…

@codecov

codecov Bot commented Sep 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@              Coverage Diff              @@
##           core/1.55   #18788      +/-   ##
=============================================
+ Coverage      84.59%   84.61%   +0.01%     
=============================================
  Files           2294     2328      +34     
  Lines         131267   131978     +711     
  Branches       35426    35600     +174     
=============================================
+ Hits          111044   111669     +625     
- Misses         19923    19962      +39     
- Partials         300      347      +47     
Flag Coverage Δ
billing-web-unit 87.90% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 34 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified rather than rubber-stamped: the changed-file list matches the original PR exactly, and the diff contains no conflict markers. Required checks on this branch are lint-and-format, test and e2e-status; any other red check here is advisory and does not gate the merge.

@comfy-pr-bot
comfy-pr-bot merged commit 526f469 into core/1.55 Sep 25, 2026
88 checks passed
@comfy-pr-bot
comfy-pr-bot deleted the backport-18685-to-core-1.55 branch September 25, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Backporting a PR onto a release candidate risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants