Skip to content

perf: accelerate login and theme background loading - #251

Merged
bifrost0x merged 1 commit into
mainfrom
dev/faster-theme-backgrounds
Oct 4, 2026
Merged

bifrost0x merged 1 commit into
mainfrom
dev/faster-theme-backgrounds

Conversation

@bifrost0x

Copy link
Copy Markdown
Owner

Problem and outcome

Login backgrounds appeared noticeably after the rest of the page, and the first theme switch downloaded a 1.2-2.2 MB PNG. Serve full-resolution WebP backgrounds and start the selected authentication background immediately after resolving the saved theme, instead of waiting for window load and an idle callback.

The ten served images total 857 KB instead of 16.88 MB (94.9% less). Original PNGs are retained. WebP encoding is lossy at quality 90 (89 for Arctic), with unchanged 1672 x 941 dimensions.

Cold-cache Chromium measurements at 5 Mbit/s and 40 ms latency, median of three runs:

Background response completed Before After
Login, Glass, from navigation 3.172 s 0.483 s
Login, Paper, from navigation 3.780 s 0.774 s
First Glass-to-Paper switch 3.242 s 0.296 s

These measure background downloads, not whole-app responsiveness. The switch measurement isolates the CSS theme assignment; normal settings persistence is covered by browser tests.

Scope and links

  • Change ten CSS asset URLs and content hashes; preserve layout, colors and effects.
  • Keep the initial CSS guard so the saved theme is resolved before requesting an image.
  • Register image/webp explicitly for hosts without a correct MIME mapping.
  • Add image-size, decode, early-loading, storage-fallback and HTTP delivery regression coverage.
  • No authentication, SSH/SFTP, terminal-input, permission, database, dependency or deployment configuration changes.

Validation

Head: 635be4228a5d8e865926ff653bf9ead45c34e466; base: c0f83a85c3e8ddd3114c528bb57f14c2a6eb764f.

  • 677 JavaScript tests passed; ESLint, vendor integrity and diff checks passed.
  • 20 static reference/delivery tests passed, including all ten WebP MIME types, bytes, immutable versions, ETag/HEAD, cookie isolation and a deliberately incorrect host MIME mapping.
  • 11 focused Chromium tests passed, including decoding all backgrounds and usable login when storage and image loading fail. Screenshots inspected for Glass and Paper.
  • Full Python 3.12 run: 3400 passed, 53 skipped, 6 failed. All six failures reproduced on the unchanged base: three test_entrypoint.py cases, the oversized-command shrink case, the Linux PTY directory probe and the Linux Tailscale route lookup. The additional host-MIME regression passed in the focused run.
  • Full Chromium run: 183 passed, 1 failed. product-captures.spec.js expects the Settings content bottom within 1080 px; both unchanged base and candidate report 1141 px. The two additional asset/fallback tests passed separately.

Local suites are not entirely green due to these reproduced baseline failures. Cross-browser and live remote-server integration were not revalidated. Hosted checks remain authoritative for this head.

Delivery

Prepared as a draft for review. No merge, deployment or versioned release is included.

@bifrost0x
bifrost0x marked this pull request as ready for review October 4, 2026 11:09
@bifrost0x
bifrost0x merged commit 2c10d6e into main Oct 4, 2026
26 checks passed
@bifrost0x
bifrost0x deleted the dev/faster-theme-backgrounds branch October 4, 2026 11:09
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T11:10:13.902608Z 635be42 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@bifrost0x bifrost0x added this to the v2.5.0 milestone Oct 5, 2026 — with ChatGPT Codex Connector
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant