37 lines
18 KiB
Markdown
37 lines
18 KiB
Markdown
# Decisions
|
||
|
||
`D-NNN — date — decision — why — plans affected`. Never rewrite an entry; supersede it with a new one.
|
||
|
||
- D-001 — 2026-11-11 — Plans cover phases 1–4 (first build, verify, gaps, UI redesign); packaging and release get planned when the user asks for a release. — The user chose it; release targets depend on how the build turns out. — all
|
||
- D-002 — 2026-11-11 — Of the phase-3 candidates only MPRIS media keys is planned; reader mode, split view, translate and gamepad rumble go to PROGRESS "Later". — User's choice. — S013
|
||
- D-003 — 2026-11-11 — The user reviews at the end of every phase in a separate 🧑 plan (S004, S010, S014, S021); review findings go to `docs/review/phaseN.md` as numbered items with `[open]`/`[fixed <commit>]`/`[wontfix: reason]` tags. — Keeps agent plans from blocking on the user. — S004, S010, S012, S014, S021
|
||
- D-004 — 2026-11-11 — The redesign keeps egui (custom painting) and bundles the Outfit font (OFL) from Google Fonts; agents may download it. — Answers UI-BRIEF's open questions. — S015–S020
|
||
- D-005 — 2026-11-11 — The hidden display for smoke runs is Xvfb (X11, `xorg-server-xvfb`), started by `tools/smoke.sh`. — No kwin_wayland/weston here; a nested niri shows on the user's screen and stops drawing while hidden; the orchestrator chose Xvfb. — S003 and every Verify plan
|
||
- D-006 — 2026-11-11 — egui's epaint is vendored (`vendor/epaint`, 0.37.0 + a patch rendering glyphs single-threaded) via `[patch.crates-io]`. — Servo's canvas enables vello_cpu/multithreading, which makes stock epaint 0.37.0 panic on every glyph; no fixed release exists. — any plan that upgrades egui: drop the patch once epaint fixes it, keep `theme::tests::egui_draws_text`
|
||
- D-007 — 2026-11-11 — Run order changed: after S005 the UI redesign (S015–S021) runs next, then the rest of Verify and Gaps (S006–S014). S015's dependency on S014 is replaced by S005. Phase 1 review items R1-01 (icons), R1-02 (clock), R1-05 and R1-06 (old-Nacre feel, animations, "unslop" look) are redesign input; R1-03 (YouTube) and R1-04 (captchas, caching) go to S006/S007. — The user chose it after the phase 1 review. — S006–S021
|
||
- D-008 — 2026-11-11 — One painter per window, shared by all its tabs (not one per tab). Picture-in-picture reloads the page in a dedicated web view and seeks the video (page state is lost). — Per-tab painters cost ~56 MB + 6 threads each (15 tabs: 1128 MB vs 341 MB) with equal frame time; the 4 GB target PC. The user chose it (option B in S005). — S005, any plan touching painters or PiP
|
||
- D-009 — 2026-11-11 — Material You colours come from the `material-colors` crate pinned at `=0.4.2` (MCU port: HCT, tonal palettes, all scheme variants), not an own port. Icons are Material Symbols Outlined, cut to the names in `tools/icons.txt` by `tools/icons.py` (55 KB, FILL and wght axes kept). — 0.5.0 needs Rust 1.97 and the project allows 1.88; the crate matches MCU's reference colours (theme tests). The user's old Nacre used Material Symbols too. — S015–S020: add an icon by editing tools/icons.txt and running the tool
|
||
- D-009 — 2026-11-11 — Smoke runs open visibly on the user's screen (`SMOKE_VISIBLE=1 tools/smoke.sh …`, niri monitor DP-1, real GPU) while the user wants to watch; hidden Xvfb (D-005) stays the default and the fallback when no Wayland session is there. Visible runs still use a throwaway home/runtime dir and share only the Wayland socket. — The user asked to see what the sessions test. Bonus: real-GPU coverage. Shots are narrower (niri tiling), so don't compare pixel sizes with Xvfb shots. — every plan that runs smoke scripts
|
||
- D-010 — 2026-11-11 — egui's delayed repaints are honoured (repaint observer → `BrowserWindow::redraw_at` → `about_to_wait`) instead of every request redrawing at once; animations that want frames ask with `request_repaint` (every frame) or `request_repaint_after` (paced). The new tab page's settings sub-page is no longer linked from General; Customize on the page replaces it (the sub-page stays for editing shortcuts, opened by "Add shortcut"). — The NTP clock alone kept the window at the display rate; the user's reference has Customize on the page. — S019–S021 and anything that animates
|
||
- D-011 — 2026-11-12 — Privacy mode (R1-16: anti-fingerprinting, strict cookies, tracker blocking, Cover Your Tracks check, auto-on in incognito) and cookie theft protection (R1-19: Nacre-held cookies encrypted at rest with an OS-keyring key) get their own privacy plan, generated after S021 with /plan-generate; not part of S007. — The user chose it; both are large and touch hub, inject and store. — S007, the new privacy plan
|
||
- D-012 — 2026-11-12 — servo-net is vendored (`vendor/servo-net`, 0.7.0 + `http2_max_header_list_size(256 KiB)` in `connector.rs` `create_http_client`) via `[patch.crates-io]`. — hyper's 16 KiB HTTP/2 default rejects YouTube's ~19 KiB response headers; Servo can't configure it from the embedder. — any plan that upgrades Servo: drop the patch when servo-net sets the limit, re-run `tests/smoke/heavy-web.txt`
|
||
- D-013 — 2026-11-12 — New plans: S022 MSE spike (05 Engine) runs right after S006; privacy plans S023 (request headers + third-party cookies in the vendored servo-net), S024 (privacy mode, R1-16), S025 (encrypted cookies, R1-19) run after S009, before the S010 review. — The user wants real YouTube playback in the page (no yt-dlp workaround) and asked whether missing Servo features can be added from reference engines; the spike sizes MSE before committing weeks to it. — S006–S025 run order
|
||
- D-014 — 2026-11-12 — Two more Nacre patches in the vendored servo-net (D-012), marked "Nacre patch": `fetch/methods.rs` lets the certificate warning's `chrome:allowcert` request through (it ended as UnsupportedScheme, so "Open anyway" never worked); `http_cache.rs` `flush_to_disk` + `resource_thread.rs` Exit write the memory HTTP cache to the disk cache at quit (Servo only wrote evicted entries, so a session's cache was lost). — Both are Servo 0.7 bugs the embedder can't work around. — any plan that upgrades Servo: re-check both, re-run `tests/smoke/net-privacy.txt` and `cache.txt` + `cache-restart.txt`
|
||
- D-015 — 2026-11-12 — MSE: go, option A (S022). Keep GStreamer's gst_mse library for parsing and coded frame processing; Nacre fixes its three 1.28.9 defects (early update-end, idle ticks, split A/V init segments) in its own copy of the library and plugin, plus a thin MSE DOM in the vendored `servo-script`/`servo-script-bindings`/`servo-media*` crates (`[patch.crates-io]`, like D-012). Option B (an own MSE core in Rust feeding appsrc) is the fallback only if bug 3 can't be fixed in msesrc. Plans S026–S030 run after S009 and before S023–S025. The prototype branch `s022-mse-proto` carries S026–S027 and merges into main in S028. — Decided by the orchestrator overnight on the user's standing OK; the user wants engine fixes, not workarounds (no yt-dlp). The spike showed gst_mse does the hard parts, and the blockers are concrete (docs/engine/mse-spike.md). — S026–S030, any Servo upgrade (drop the patches when Servo ships MSE)
|
||
- D-016 — 2026-11-12 — Patched gst_mse loading (S026). Nacre ships its own `libgstmse-1.0.so.0` and `mse` plugin built from `vendor/gst-mse` (`tools/gst-mse.sh`). Release layout: library in `<exe dir>/lib/`, plugin in `<exe dir>/lib/gstreamer-1.0/`; a dev build uses `target/gst-mse/{lib,gstreamer-1.0}`. The binary's RUNPATH (`$ORIGIN/lib:$ORIGIN/../gst-mse/lib`, from `build.rs`) finds the library ahead of the system copy (same soname), and `main.rs` prepends the plugin dir to `GST_PLUGIN_PATH` before GStreamer starts (paths in GST_PLUGIN_PATH beat the system plugin of the same name). Windows: the DLLs sit next to `nacre.exe` / in `lib\gstreamer-1.0` (unverified). — RUNPATH needs no wrapper script or re-exec; LD_LIBRARY_PATH would have to be set before the process starts. — S030 packaging (AppImage, tarball, Windows), S028 merge
|
||
- D-017 — 2026-11-12 — Request headers and third-party cookie blocking are Nacre patches in the vendored servo-net (S023): new module `nacre.rs` holds embedder-set state (extra headers, block switch, top-level site per webview); `http_loader.rs` and `websocket_loader.rs` read it. A request is third-party when its host's registrable domain differs from its webview's top-level site; blocking is on when the setting or privacy mode is on (`App::refresh_hub_config`). — Servo 0.7 has neither; the user wants engine fixes. `document.cookie` in cross-site frames stays uncovered (script isn't vendored). — S024 (privacy mode only needs `privacy_mode_on`), any Servo upgrade (re-apply from DESIGN.md "Vendored servo-net patches", re-run `privacy-net.txt`)
|
||
- D-017 — 2026-11-12 — MSE DOM design (S027). (1) `dom_media_source_enabled` is not a servo-config pref: adding a field to `Preferences` means vendoring servo-config, which rebuilds nearly every Servo crate. Instead the three interfaces carry `[Func="MediaSource::enabled"]`, which reads `NACRE_DOM_MEDIA_SOURCE_ENABLED` once (`0`/`false` = off, default on; `servo_media_player::mse::enabled`). A settings switch, if wanted, sets that variable before Servo starts. (2) The DOM owns the spec state (readyState, updating, both lists, events, always queued as media element tasks); gst_mse owns parsing, buffering and removal. Only `sourceopen` after attaching, update-end/error, duration and active-list changes come from the backend. (3) The backend's event sink names its MediaSource by id through a thread-local map of weak references (no `Trusted`, so a dropped MediaSource is collected). (4) MediaSource object URLs live in a per-global map (`GlobalScope::media_source_urls`), revoked one task later (pages revoke right after setting `src`), cleared on unload. (5) gst_mse defects found here are fixed in vendor/gst-mse like D-016 (patches 5–9 in docs/engine/gst-mse-patches.md). — Keeps rebuilds to servo-script and the media crates; matches Servo's own direction (#22416). — S028 (player integration, merge), S029, any Servo upgrade
|
||
- D-018 — 2026-11-12 — Privacy mode looks like desktop Firefox (S024): values that can't be hidden are made consistent with the Firefox user agent (platform, oscpu, appVersion, WebGL "Mozilla", no touch points, Firefox's language list in both `navigator.languages` and Accept-Language); canvas/WebGL/audio/fonts get noise seeded per run and top-level site; time zone and locale stay real; the TouchEvent globals stay (removing them broke Wikipedia). Engine gaps that stop fingerprint or site scripts get a small always-on JS layer (`FONTS_CHECK_JS`, `COMPRESSOR_JS`). — Inconsistent spoofing is itself a fingerprint; Firefox is the UA Nacre sends. — S025 and later privacy or UA work: keep the navigator values in step with any user agent change (`inject::firefox_navigator`).
|
||
- D-019 — 2026-11-12 — Cookies at rest (S025, R1-19): servo-net hands its public cookie jar to Nacre (patch in `resource_thread.rs` + `nacre.rs`, no more plain `cookie_jar.json`); Nacre seals it like the vault (XChaCha20-Poly1305) in `cookies.bin` with a key in the OS keyring through the `keyring` 3.6 crate (`sync-secret-service` over the libdbus Servo already links, `crypto-rust`, `windows-native` = Credential Manager, itself DPAPI-protected). No keyring: cookies live for the run only, never written plain, Settings says so (no key-file fallback: a key next to the file stops nothing an infostealer does). An undecryptable file is moved aside, never deleted. — Whole-jar persistence keeps Servo's own cookie metadata (host-only, expiry, session flag) that the site data manager API drops; keyring 4.x splits into per-platform store crates, 3.6 is one dependency. — any Servo upgrade (re-apply the patch), Windows packaging (Credential Manager entry per profile), a later move of auth_cache.json/hsts_list.json into Nacre
|
||
- D-020 — 2026-11-12 — Phase 5 polish pass = `Plans/07 Polish pass` S031–S042, ordered crash (S031) → performance (S032, after S031: same ad-block path) → SVG/masks → small fixes → flyouts + context menu → custom DLM → DevTools (2 plans) → motion (after flyouts) → little-things sweep → site passes (after S028 MSE merge) → user review. R4-04/R4-06/R4-08 and the PROGRESS "Later" items Turnstile, Bookmark flyout, mask-image squares, YouTube result list folded in. — phase5.md order (crash first); flyouts and motion share menus.rs so motion goes after. — S031–S042
|
||
- D-021 — 2026-11-12 — DevTools is a separate egui window (dock/undock) fed by Servo's own devtools server (Firefox Remote Debugging Protocol) on loopback with a per-open token; Nacre has its own RDP client. Data Servo's actors lack is added by patching the vendored devtools crate, not by injecting page JS. — The user wants engine fixes over workarounds; RDP already has DOM walker, styles, console, network actors. — S037, S038
|
||
- D-022 — 2026-11-12 — Custom download manager contract: user-set endpoint URL, loopback only (`127.0.0.1`, `localhost`, `[::1]`). Hand-over = `POST <url>` with `Content-Type: application/json` body `{"url","filename","referrer","cookies" (Cookie header string for that URL),"user_agent","headers" (object),"size" (bytes or null),"mime" (or null)}` and, when a token is set, header `Authorization: Bearer <token>`; any 2xx = taken, else Nacre downloads itself and says why. Status ping = `GET <url>` (same token header), any 2xx = reachable. — Same shape as the other managers in `dlm.rs`; loopback-only keeps cookies on the machine. — S036
|
||
- D-023 — 2026-11-12 — Motion rules for the egui UI (translated from the web "animate" skill, full text in S039 and then DESIGN.md "UI system"): gate by frequency (no motion on keyboard/100+-a-day actions), one named purpose, only `theme::spring`, opacity + paint offset/scale (never scale from 0, flyouts from their anchor), critically damped for UI with settle 150–300 ms, bounce only for drag release, interruptible + exit mirrors entry, Motion Off = nothing moves or fades. — The user asked for more motion done well; reduced-motion in the skill maps to the existing Motion setting. — S039, S040 and every later UI plan
|
||
- D-024 — 2026-11-12 — S031 (SIGSEGV, critical) runs before S010–S014 and before S028: main's `target/` was free while S027 finishes in its worktree, and a crash outranks the remaining review/gap plans. S028 GOes after S031 and S027 are validated. — orchestrator call (user: make recommended calls) — S028, S031, S010–S014
|
||
- D-025 — 2026-11-12 — S027 accepted at WPT 239/407 (target 293 not met): the failing groups need the player side (metadata after the init segment, duration boundary conditions, play/seek, changeType across containers, errors before init, buffered after removeSourceBuffer, Opus/fLaC in MP4) and move to S028's scope, with the one-off script-thread hang at WPT file 19. S028's end report states the new WPT count. — the DOM work is done and smoke-verified; the rest is player integration — S028
|
||
- D-026 — 2026-11-12 — User priority: Nacre must first work as a full daily browser (sites load and render, video plays, sign-ins, downloads, tabs/session solid) before broad bug-fix and polish sweeps. Run order after the in-flight work (S031 crash, S028 MSE merge): S029 YouTube/Reddit → S041 site passes → S032 load speed → S033 SVG/masks → S030 media packaging → S010 🧑 review → S011–S013 gaps → S034–S038 → S039/S040 polish last; S014/S042 reviews close their phases. — user, 2026-11-12: "patch it up until it works like a full fledged browser" before aggressive bug fixing — every remaining plan
|
||
- D-027 — 2026-11-12 — Supersedes D-026's order: motion and visual quality move up (user: things look basic, not fluent; example the Protection flyout). Order after the in-flight work (S031, S028): S029 → S039 motion (no longer waits for S035) → S043 UI refine pass (new) → S041 → S032 → S033 → S030 → S010 🧑 → S011–S013 → S034–S038 → S040; reviews S014/S042 close their phases. — user, 2026-11-12 — every remaining plan
|
||
- D-028 — 2026-11-12 — Supersedes D-027's order: S035 (history/passwords/bookmarks flyouts like shield and downloads) joins the UI block. Order after S031 finish + S028: S029 → S035 → S039 motion → S043 UI refine → S041 → S032 → S033 → S030 → S010 🧑 → S011–S013 → S034, S036–S038 → S040. Style reference for all UI plans: the user's Damson app (`~/Projects/Damson`, read-only), a reference only: not perfect everywhere, but fluent; take its feel (lively motion, Material You like the user's own apps), not its flaws. — user, 2026-11-12 — S035, S039, S043, S040
|
||
- D-029 — 2026-11-12 — Orchestrator 3 lets the old sessions finish their in-flight plans (S031 in Spare A, S028 in its own session); every later plan runs in a fresh session started and linked from the current orchestrator, never in old prepared sessions (old S029/S030/Spare B waiting sessions are not used). — user, 2026-11-12 — orchestration from S029 on
|
||
- D-030 — 2026-11-12 — "Looks right" is judged against a reference, not against "no crash". Every site check (S029, S041, S032, S033 and later) shoots the same page at the same size in a Chromium reference (QtWebEngine, `tools/refshot.py`, built by S029 as its first step) and puts Nacre's shot next to it; the session Reads both PNGs and lists every visible difference (layout, missing images/icons, unfilled skeletons, doubled inputs, black areas). A difference is fixed or written down in PROGRESS with the pair of shots; a pass with unlisted differences is not a pass. UI plans (S035, S039, S043) compare their shots with `docs/ui-reference/` and the Damson app the same way. — user, 2026-11-12, YouTube watch page screenshot: doubled search box, grey skeletons never filled, black player — S029 onward
|
||
- D-031 — 2026-11-12 — Reference browser for D-030: the Claude desktop app's built-in browser pane (Chromium; `mcp__Claude_Browser__*` tools: navigate, resize_window to Nacre's window size, screenshot) is the first reference for live sites; `tools/refshot.py` (S029) is for scripted/offline runs. Nacre's shot and the pane's shot of the same URL at the same width go side by side. — user, 2026-11-12 — S029, S041, S032, S033 and every site check
|