Skip to content

Web UI has no service worker, no font preload, and missing font-display: swap #27933

@BYK

Description

@BYK

Describe the bug

The web UI lacks three front-end performance optimizations:

  1. No service worker — Every page load and refresh fetches all assets from the server. A service worker with appropriate caching strategies would make repeat visits near-instant.
  2. No font preload — The JetBrainsMono font is only discovered after CSS evaluation, causing a late download. A preload link in the HTML head would start the download during HTML parse.
  3. Missing font-display: swap — The @font-face declaration lacks font-display: swap, which can cause invisible text (FOIT) while the font loads.

Steps to reproduce

  1. Open the web UI on a slow connection
  2. Observe the font flash and slow initial load
  3. Refresh the page — assets are re-fetched from the server

Expected behavior

  • Service worker caches assets for instant repeat visits
  • Font preload starts download early
  • font-display: swap prevents invisible text

System info

  • OpenCode version: v1.15.3
  • OS: Linux

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions