From 8bc7e4244f6e35e683074110399be70ae6d56b36 Mon Sep 17 00:00:00 2001 From: astar76 Date: Sat, 14 Nov 2026 00:35:04 -0600 Subject: [PATCH] orchestrator: S057 adds site colour from the favicon (user) Co-Authored-By: Claude Opus 5.5 --- Plans/08 WebKit engine/S057-small-ui-bugs.md | 13 +++++++++++-- Plans/INDEX.md | 2 +- docs/HANDOFF.md | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Plans/08 WebKit engine/S057-small-ui-bugs.md b/Plans/08 WebKit engine/S057-small-ui-bugs.md index 84c0ef8..2387d31 100644 --- a/Plans/08 WebKit engine/S057-small-ui-bugs.md +++ b/Plans/08 WebKit engine/S057-small-ui-bugs.md @@ -1,7 +1,7 @@ -# S057 — Small UI bugs from daily use +# S057 — Small UI bugs from daily use (+ site colour from the favicon) > Category 08 WebKit engine · Model: Sonnet · Effort: high · Depends on: S053 · Size: S · Human: no · **cargo** (main target/) -> Files touched: src/ui/pages/customize.rs, src/ui/ (scroll areas over the page), src/egui_area.rs (wheel routing), src/ui/widgets.rs (colour picker), src/app.rs (quit), tests/smoke/* +> Files touched: src/ui/pages/customize.rs, src/ui/ (scroll areas over the page), src/egui_area.rs (wheel routing), src/ui/widgets.rs (colour picker), src/app.rs (quit), src/actions.rs ("meta"), src/inject.rs (meta script), src/theme.rs, src/engine/view.rs (favicon), tests/smoke/* ## Goal Bugs the user and S048/S056 found that are small but visible every day. @@ -11,6 +11,14 @@ Bugs the user and S048/S056 found that are small but visible every day. `egui_area` `contains()`/pick for Areas over the page rect and the sheet's `ScrollArea`. 2. egui colour picker shows broken glyph chips (missing emoji in Nacre's fonts, S048 Later). 3. Closing a window / quitting doesn't run the page's beforeunload ("Leave site?") (S048 Later). +4. **Colour source "Website" doesn't seem to work, and its idea is wrong** (user, 2026-11-14). Today the site + colour is `` or else the page's background colour (`inject.rs` ~297, `actions.rs` "meta" + ~1603), so most sites give black or white. User's rule: keep it simple and **take the colour from the favicon**. + Use WebKit's favicon (`WebView` `favicon` texture, the same one the tab strip shows): pick the most common vivid + colour (skip near-transparent, near-white, near-black and grey pixels; small histogram of hue buckets, average + the winning bucket). No vivid colour → treat as "no colour" (the "When a site has no colour" setting applies). + Drop the page-background fallback; `theme-color` only if the favicon has no vivid colour. First check why + nothing changes today on WebKit (meta message, favicon signal, repaint). ## Read - `src/egui_area.rs` (contains/pick, scroll events), `src/ui/pages/customize.rs`, the S048 and S056 PROGRESS entries. @@ -19,6 +27,7 @@ Bugs the user and S048/S056 found that are small but visible every day. - [ ] Wheel over floating egui surfaces scrolls them, never the page; Customize sheet scrolls to its last row; regression smoke (wheel over the sheet, assert scroll offset; page scroll unchanged). - [ ] Colour picker chips render (font fallback or no emoji). - [ ] beforeunload on window close / quit through Nacre's dialog; smoke with a page that sets it. +- [ ] Site colour from the favicon (dominant vivid colour, unit-tested on a few icons: red, blue, monochrome → none), applied when Colour source = Website; works on WebKit; `colours.txt` smoke updated; shots of two coloured sites and one monochrome site read. - [ ] Hidden smokes launch, basics, input, chrome, newtab green; shots read. - [ ] PROGRESS entry, INDEX line, tracker, commit `S057: …`, push. diff --git a/Plans/INDEX.md b/Plans/INDEX.md index 1f857ea..6b440bd 100644 --- a/Plans/INDEX.md +++ b/Plans/INDEX.md @@ -9,7 +9,7 @@ Dropped with Servo (D-032): S011, S029, S030, S032, S033, S037, S038. ## 08 WebKit engine (in this order) - [ ] [S053 — Remove Servo: vendor crates, gst-mse, Servo-only tests/tools, docs and texts](08%20WebKit%20engine/S053-servo-removal.md) · Sonnet high -- [ ] [S057 — Small UI bugs: Customize panel scroll, colour picker glyphs, beforeunload on quit](08%20WebKit%20engine/S057-small-ui-bugs.md) · Sonnet high +- [ ] [S057 — Small UI bugs: Customize panel scroll, site colour from the favicon, colour picker glyphs, beforeunload on quit](08%20WebKit%20engine/S057-small-ui-bugs.md) · Sonnet high - [ ] [S051 — Profile folder, sealed cookies, site data, incognito, media source](08%20WebKit%20engine/S051-profile-cookies-media.md) · Opus medium - [ ] [S052 — WebKit tuning defaults, background tabs, memory check](08%20WebKit%20engine/S052-tuning-defaults.md) · Sonnet high - [ ] [S054 — Site pass on WebKit vs Chromium reference](08%20WebKit%20engine/S054-site-pass.md) · Opus high diff --git a/docs/HANDOFF.md b/docs/HANDOFF.md index 45053bd..efa3f2a 100644 --- a/docs/HANDOFF.md +++ b/docs/HANDOFF.md @@ -23,7 +23,7 @@ Next: finish 08 → user reviews and gaps → UI polish and motion. Order = `Pla ## Next three steps 1. S053 box 7–8 (fresh session; nothing else uses cargo meanwhile). -2. S057 small UI bugs: Customize panel doesn't scroll (wheel goes to the page), colour picker glyphs, beforeunload on quit. +2. S057 small UI bugs: Customize panel doesn't scroll (wheel goes to the page), site colour from the favicon (user: page colours are mostly black/white), colour picker glyphs, beforeunload on quit. 3. S051 profile/cookies/media, then S052 tuning (incl. the slow-connection pass the user asked for), S054 site pass. ## Known bugs / watch