plans: phases 1-4 (first build, verify, gaps, UI redesign)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-11 17:18:46 -06:00
commit 97f3013484
25 changed files with 696 additions and 2 deletions

View file

@ -9,9 +9,11 @@ About 19k lines written across storage, networking, ad blocker, media, importer,
## Phases
1. **First build** — make it compile (`nice cargo build --release -j 2`), fix errors in place, get the binary to start.
2. **Verify** — run the unit tests, smoke test offscreen (page renders, tabs, settings), check the shared-GL painter question; fix what breaks.
3. **Gaps** — work through `docs/REVIEW.md`, then candidates: reader mode, translate, split view, MPRIS media keys, gamepad rumble.
3. **Gaps** — work through `docs/REVIEW.md`, fix the user's review items, add MPRIS media keys (other candidates deferred, D-002).
4. **UI redesign** — Material You (tonal-spot schemes, spring motion, expressive shapes) and the animated new tab page per `docs/UI-BRIEF.md`, using the `app-taste` skill. Starts only after the framework works.
5. Packaging and release (Linux AppImage/tar.gz, Windows installer and zip) when the user asks.
Each of phases 1–4 ends with a user review plan (D-003).
## Out of scope
Chrome extensions, Widevine/DRM, printing, per-WebView private mode, third-party cookie blocking (Servo 0.7 limits, shown as unavailable); anything copied from the older `Nacre-rust` repo.

View file

@ -0,0 +1,39 @@
# S001 — Compile to a binary
> Category 01 First build · Model: Opus · Effort: medium · Depends on: — · Size: L · Human: no
> Files touched: `src/**`, `Cargo.toml`, `Cargo.lock`
## Goal
Make the never-compiled ~19.5k lines build: `nice cargo build --release -j 2` produces `target/release/nacre`. Fix compile errors in place without restructuring (CLAUDE.md §2, §3). A previous run already built Servo (`target/release/deps/libservo-*.rlib` exists), so only the `nacre` crate should need rebuilding. Also commit the uncommitted self-test work (`src/selftest.rs`, hooks in `app.rs`/`window.rs`/`main.rs`, Discord client id in `settings.rs`) and `docs/UI-BRIEF.md` + `docs/ui-reference/`.
## Read
- `docs/DESIGN.md` (whole; it is the Servo 0.7 API cheat sheet)
- `docs/REVIEW.md`
- Only the source files that compile errors point at; for Servo API questions read the crate sources in `~/.cargo/registry/src/*/servo-0.7.0/` and friends rather than guessing.
## Steps
- [ ] Commit the pending work as is (`S001: commit self-test WIP and UI brief`) so fixes start from a clean tree
- [ ] Check toolchain: `rustc --version` ≥ 1.88, `clang --version`; run `nice cargo build --release -j 2 --message-format short 2>&1 | tail -150` and save the full log to the scratchpad
- [ ] Fix name-resolution / import / missing-item errors (`E0432`, `E0433`, `E0425`, `E0412`, `E0599` on wrong paths) across all modules; rebuild
- [ ] Fix type and trait errors (mismatched types, missing trait impls, wrong Servo/egui/winit signatures) module by module; rebuild after each module group
- [ ] Fix borrow-checker and lifetime errors (`E0499`, `E0502`, `E0505`, `E0597`) with the smallest local change (clone, scope, split borrow); rebuild
- [ ] Build is clean of errors; then fix warnings that point at real bugs (unused results, unreachable code); leave style warnings
- [ ] `target/release/nacre --help` (or `--version`) runs and exits 0 without opening a window; if it has no such flag, check `ldd target/release/nacre` resolves everything
- [ ] Update `docs/HANDOFF.md` "State" (compiles now) and add anything surprising about Servo's API to `docs/DESIGN.md` cheat sheet
- [ ] PROGRESS entry, INDEX line, commit `S001: …` and push
## End criteria
- `nice cargo build --release -j 2` exits 0.
- `test -x target/release/nacre`.
- `git status --short` is empty after the commit.
## Pitfalls
- Never run two cargo commands at once on `target/`; never `cargo clean` (rebuilding Servo takes hours).
- Pipe build output through `tail`/`grep -E '^(error|warning: unused)'`; full logs eat context. Use `--message-format short`.
- rustc stops at some phases: fixing resolve errors reveals type errors, which reveal borrow errors. Expect several rounds.
- Don't restructure modules or change behaviour to make an error go away; if an API truly doesn't exist in Servo 0.7, keep the feature, mark it as an engine limit (DESIGN.md) and record it in PROGRESS.
- If `Cargo.lock` drift breaks Servo deps (rsa/pkcs1 pre-releases), pin to Servo 0.7's own lock versions.
- If the session gets long, commit what compiles so far (`S001: wip …`); the plan resumes at the first unchecked box.
## Handoff (→ PROGRESS.md)
Binary path, build time of the nacre crate alone, any feature degraded to make it compile (with file:line).

View file

@ -0,0 +1,31 @@
# S002 — Unit tests green
> Category 01 First build · Model: Sonnet · Effort: high · Depends on: S001 · Size: M · Human: no
> Files touched: `src/**` (test modules and the code they expose bugs in)
## Goal
Run the unit test suite for the first time and make it pass (CLAUDE.md §5 lists the tested modules). Test failures that show real bugs get fixed in the code, not in the test.
## Read
- `docs/DESIGN.md` § Layout only
- The test modules that fail, and the functions they test
## Steps
- [ ] Make sure no other cargo process runs (`pgrep -a cargo`); run `nice cargo test --release -j 2 --no-run 2>&1 | grep -E '^error' -A5 | head -150` and fix test-only compile errors
- [ ] Run `nice cargo test --release -j 2 2>&1 | grep -E 'test result|FAILED|panicked' ` and list failures
- [ ] For each failing test decide: bug in code (fix code) or wrong expectation (fix test, say why in the commit); fix them one module at a time
- [ ] Make sure no test touches the network beyond loopback, Tor, a proxy or the user's profile (grep tests for `http`, `tor`, `dirs::`); fix any that do
- [ ] Full suite green twice in a row (flaky check)
- [ ] Update CLAUDE.md §5 `cargo test` row with the real command and run time
- [ ] PROGRESS entry, INDEX line, commit `S002: …` and push
## End criteria
- `nice cargo test --release -j 2` exits 0, twice in a row.
- No test reads `~/.config/nacre` or `~/.local/share/nacre` (grep).
## Pitfalls
- `--release` shares the Servo build from S001; a debug-profile test build would recompile Servo for hours.
- Never run tests while a build is running.
## Handoff (→ PROGRESS.md)
Test count, run time, which code bugs the tests found.

View file

@ -0,0 +1,34 @@
# S003 — First launch and smoke harness
> Category 01 First build · Model: Opus · Effort: medium · Depends on: S002 · Size: M · Human: no
> Files touched: `tools/smoke.sh` (new), `tests/smoke/*.txt` (new), `src/selftest.rs`, `src/app.rs`/`src/window.rs` only for launch bugs, `CLAUDE.md` §5
## Goal
Get the binary to start, render a real page and quit cleanly, offscreen, and turn `src/selftest.rs` (`NACRE_SCRIPT`) into a reusable smoke tool for the Verify plans.
## Read
- `src/selftest.rs` (whole)
- `docs/DESIGN.md` § Layout and the GL/painter section
- User's global CLAUDE.md "Building" (offscreen runs, software GL)
## Steps
- [ ] Find an offscreen display that works here: `kwin_wayland --virtual` (preferred, nested and hidden) or Xvfb/`weston --backend=headless`; note which
- [ ] Write `tools/smoke.sh <script> [outdir]`: throwaway `XDG_CONFIG_HOME`/`XDG_DATA_HOME`/`XDG_CACHE_HOME`, `NACRE_SCRIPT`, timeout, starts the offscreen display, runs `target/release/nacre`, copies log/status/screenshots to outdir, exits non-zero on crash or missing `done` status
- [ ] Write `tests/smoke/launch.txt`: wait, `page nacre://newtab`, shot, `open` a local `file://` test page (bundled in `tests/smoke/pages/`), waitload, shot, status, quit
- [ ] Run it; fix startup crashes and panics in place until it reaches `quit`; look at both screenshots (Read the PNGs) and check the page content is visible
- [ ] Run once with `https://example.org` (plain HTTPS, no proxy, `NACRE_NO_BRIDGE` unset) to check networking through the bridge; screenshot shows the page
- [ ] Check a clean exit: no panic in the log, profile files written in the throwaway dirs, second launch restores the session
- [ ] Add the `tools/smoke.sh` row to CLAUDE.md §5 (usage, where outputs go) and document script commands in its header
- [ ] PROGRESS entry, INDEX line, commit `S003: …` and push
## End criteria
- `tools/smoke.sh tests/smoke/launch.txt <dir>` exits 0 and `<dir>` has two non-blank PNGs.
- `grep -c panicked <dir>/nacre.log` is 0.
## Pitfalls
- Never use the user's profile; never connect to Tor/proxies (keep Tor settings off in the throwaway profile).
- No GPU offscreen: set `LIBGL_ALWAYS_SOFTWARE=1` / Mesa llvmpipe.
- If the per-tab painter design breaks rendering here, note it and continue with one tab; S005 owns that question.
## Handoff (→ PROGRESS.md)
Which offscreen backend works, smoke harness usage, any startup bug fixed and where.

View file

@ -0,0 +1,29 @@
# S004 — Phase 1 review with the user
> Category 01 First build · Model: Sonnet · Effort: medium · Depends on: S003 · Size: S · Human: 🧑 tries the first build and reports
> Files touched: `docs/review/phase1.md` (new), trivial fixes only
## Goal
Let the user see the first working build and collect their problems as a numbered list that S012 fixes. Per D-003 the user reviews at the end of every phase.
## Read
- `docs/PROGRESS.md` last 3 entries
- `tools/smoke.sh` header
## Steps
- [ ] Build is current: `nice cargo build --release -j 2` succeeds on HEAD (skip if the binary is newer than HEAD)
- [ ] Write `docs/review/phase1.md`: what to try (launch, open sites, tabs, settings), the launch command with the user's real profile or a throwaway one (ask which), and known limits
- [ ] 🧑 Ask the user to try it and report; wait for their answer
- [ ] Record every reported problem in `docs/review/phase1.md` as a numbered list (`R1-NN`: what, where, how to reproduce, severity, and a state tag `[open]`, `[fixed <commit>]` or `[wontfix: reason]`)
- [ ] Fix only trivial items (≤ 5 lines, obvious); mark them fixed with the commit; everything else stays open for the fix plan
- [ ] PROGRESS entry, INDEX line, commit `S004: …` and push
## End criteria
- `docs/review/phase1.md` exists with the user's items, each numbered and marked open/fixed.
## Pitfalls
- Don't start fixing non-trivial items here; that's S012.
- Ask the user before using their real profile.
## Handoff (→ PROGRESS.md)
Count of open items and the most severe ones.

View file

@ -0,0 +1,31 @@
# S005 — Per-tab painters on one GL context
> Category 02 Verify · Model: Opus · Effort: high · Depends on: S004 · Size: M · Human: no
> Files touched: `src/window.rs`, `src/hub.rs`, `src/tabs.rs`, `src/app.rs` (painter parts), `tests/smoke/painters.txt`, `docs/DESIGN.md`, `docs/REVIEW.md`
## Goal
Settle the riskiest design question (REVIEW.md: several painters on one GL context, one per tab). Prove it works or switch to the fallback in DESIGN.md (one painter per window).
## Read
- `docs/DESIGN.md` GL/painter section and fallback
- `src/window.rs`, the painter/offscreen parts of `src/hub.rs` and `src/tabs.rs`
## Steps
- [ ] Write `tests/smoke/painters.txt`: 5 tabs with distinct local test pages (colours/text), switch through them taking a shot each, resize window, PiP one tab, close tabs, shot
- [ ] Run it under software GL; check every screenshot shows the right tab with no garbage, black frames or stale content
- [ ] Check GL state isolation: egui chrome still draws right after page blits (scissor, blend, bound framebuffer); fix by saving/restoring state around `render_to_parent_callback` if needed
- [ ] Measure memory and frame time with 5 and 15 tabs (log `perf.rs` numbers); check idle tabs release painters per the perf settings
- [ ] Decision: keep per-tab painters, or implement the one-painter-per-window fallback (PiP then reuses a dedicated painter); implement it if needed
- [ ] Run `painters.txt` and `launch.txt` green; record the decision in `docs/DECISIONS.md` and remove the item from `docs/REVIEW.md`
- [ ] PROGRESS entry, INDEX line, commit `S005: …` and push
## End criteria
- `tools/smoke.sh tests/smoke/painters.txt <dir>` exits 0; screenshots checked by eye (list them in PROGRESS).
- `docs/DECISIONS.md` has the painter decision.
## Pitfalls
- Software GL hides some driver bugs; note that real-hardware testing happens in the phase 2 review (S010).
- Don't rewrite tab management; change only the painter ownership.
## Handoff (→ PROGRESS.md)
Painter model chosen, memory per tab, anything later plans (split view, PiP) must respect.

View file

@ -0,0 +1,32 @@
# S006 — Browser basics pass
> Category 02 Verify · Model: Opus · Effort: medium · Depends on: S005 · Size: M · Human: no
> Files touched: `tests/smoke/basics*.txt`, fixes in `src/actions.rs`, `src/tabs.rs`, `src/ui/chrome.rs`, `src/ui/menus.rs`, `src/ui/dialogs.rs`, `src/store/session.rs`, `src/keys.rs`, `docs/FEATURES.md`
## Goal
Check every row of FEATURES.md "Browser basics" works in the real app, fix what doesn't, and mark the row "verified".
## Read
- `docs/FEATURES.md` § Browser basics
- `tools/smoke.sh` header, `src/selftest.rs` command list
- Source files only where a check fails
## Steps
- [ ] Write smoke scripts covering: open/close/pin/mute/duplicate/reorder tabs, reopen closed, back/forward/reload/home, address bar URL vs search, find in page, zoom per site, full screen, new window
- [ ] Add scripts for context menu, page dialogs (alert/confirm/prompt/select/file via local test pages), pop-ups/target=_blank, session restore across restart, single instance link forwarding
- [ ] Run them; for each failure fix the code in place and add a regression unit test where the logic is pure
- [ ] Check keyboard shortcuts from `keys.rs` with `do <action>` lines
- [ ] Mark each row in FEATURES.md `verified` or `broken: <why>` (with a PROGRESS 'Later' line for broken ones)
- [ ] All basics scripts green together
- [ ] PROGRESS entry, INDEX line, commit `S006: …` and push
## End criteria
- Every basics script under `tests/smoke/` passes via `tools/smoke.sh`.
- `grep -c 'written' ` in FEATURES.md § Browser basics is 0 (all verified or explained).
## Pitfalls
- Local test pages only (`tests/smoke/pages/`), except one real HTTPS site already used in S003.
- Servo has no stop API: don't try to add one.
## Handoff (→ PROGRESS.md)
Broken rows left and why.

View file

@ -0,0 +1,33 @@
# S007 — Network pass
> Category 02 Verify · Model: Opus · Effort: medium · Depends on: S005 · Size: M · Human: no
> Files touched: `tests/smoke/net*.txt`, fixes in `src/net/**`, `src/adblock.rs`, `src/inject.rs` (redirect pages), `docs/FEATURES.md`
## Goal
Verify the networking features: bridge proxy (secure DNS, VPN routing) on loopback, HTTPS-only, tracking parameter stripping, ad blocker, downloads and download managers. Never Tor or real proxies.
## Read
- `docs/FEATURES.md` § Privacy, Ad blocker, Downloads
- `docs/REVIEW.md` items on interception and redirects
- `src/net/bridge.rs`, `src/net/dns.rs`, `src/net/download.rs` as needed
## Steps
- [ ] Start a local HTTP(S) test server (Python `http.server` on loopback, self-signed cert for HTTPS) serving test pages, an ad/tracker URL list and downloadable files
- [ ] Check HTTPS-only upgrade and the `location.replace()` redirect page; check tracking parameter stripping
- [ ] Check the ad blocker blocks listed requests and cosmetic filters on the local page; check list update works offline-safe (local list file)
- [ ] Check downloads: start, pause/resume, cancel, save-to folder, external download manager hand-off with a dummy command
- [ ] Check the bridge with secure DNS pointed at a local stub (no public resolver in tests) and VPN routing disabled; never start Tor
- [ ] Mark FEATURES rows verified/broken; fix failures in place with regression tests
- [ ] PROGRESS entry, INDEX line, commit `S007: …` and push
## End criteria
- `tools/smoke.sh tests/smoke/net*.txt` pass.
- `nice cargo test --release -j 2 net` green.
- `grep -ri 'tor' ` in the test scripts shows no Tor enabling.
## Pitfalls
- Never connect to Tor or proxies (user rule). `NACRE_NO_BRIDGE=1` only for isolating a bug.
- `load_web_resource` must answer synchronously.
## Handoff (→ PROGRESS.md)
What works only partially and why.

View file

@ -0,0 +1,31 @@
# S008 — Stores and pages pass
> Category 02 Verify · Model: Sonnet · Effort: high · Depends on: S005 · Size: M · Human: no
> Files touched: `tests/smoke/stores*.txt`, fixes in `src/store/**`, `src/importer.rs`, `src/ui/pages/**`, `docs/FEATURES.md`
## Goal
Verify passwords/vault and autofill, permissions prompts, history/bookmarks/downloads pages, user scripts and styles, installed apps, the importer, and that every nacre:// page opens and its controls change the stored settings.
## Read
- `docs/FEATURES.md` § General, Appearance, Toolbar, Performance, Passwords and autofill, Apps
- `src/ui/pages/mod.rs` (list of pages)
## Steps
- [ ] Script: open every nacre:// page and take a shot; check none panics or renders empty
- [ ] Vault: create, lock/unlock, save a login from a local form page, autofill it, export/import; check the vault file is encrypted
- [ ] Permissions: a local page asking for notifications/geolocation/camera; allow/deny/remember; check `permissions` store
- [ ] History, bookmarks (add, folder, bookmarks bar, import/export HTML), downloads page lists entries
- [ ] User scripts/styles apply on matching pages; install a site as an app and launch it
- [ ] Importer: build a fake old-Nacre profile from `~/Documents/Apps/Nacre` config format in a temp dir (never the user's real profile) and import it
- [ ] Change a sample of settings via `set` and via clicks; check `settings.json` and the effect; mark FEATURES rows
- [ ] PROGRESS entry, INDEX line, commit `S008: …` and push
## End criteria
- Every nacre:// page has a non-blank screenshot in the run dir.
- Stores scripts pass via `tools/smoke.sh`.
## Pitfalls
- Throwaway XDG dirs only; never read the user's real Nacre or browser profiles.
## Handoff (→ PROGRESS.md)
Pages or settings that don't take effect.

View file

@ -0,0 +1,30 @@
# S009 — Integrations pass
> Category 02 Verify · Model: Sonnet · Effort: high · Depends on: S005 · Size: M · Human: no
> Files touched: `tests/smoke/integ*.txt`, fixes in `src/discord.rs`, `src/media.rs`, `src/spell.rs`, `src/updates.rs`, `src/instance.rs`, `src/perf.rs`, gamepad code in `src/app.rs`, `docs/FEATURES.md`
## Goal
Verify Discord Rich Presence, media session and visualizer, spell check, update checks, gamepad input, single instance and the performance settings.
## Read
- `docs/FEATURES.md` § Media, Performance, About
- the module of each feature as needed
## Steps
- [ ] Discord: fake IPC server on a temp socket (`XDG_RUNTIME_DIR` throwaway) that logs frames; check handshake and activity updates from a local media page
- [ ] Media: a local page with `<audio>`/`<video>` (bundled test file); check now-playing data, mute, PiP, visualizer levels (simulated if no cava)
- [ ] Spell check: misspelled word in a textarea gets suggestions in the context menu
- [ ] Updates: point the update URL at a local JSON file; check the notice and that nothing downloads automatically
- [ ] Gamepad: check it enumerates without a device and doesn't spin the CPU; single instance: second launch forwards a URL
- [ ] Performance: freeze/discard idle tabs and memory saver numbers; mark FEATURES rows verified/broken
- [ ] PROGRESS entry, INDEX line, commit `S009: …` and push
## End criteria
- Integration scripts pass via `tools/smoke.sh`.
- The fake Discord server log shows a `SET_ACTIVITY` frame.
## Pitfalls
- No real Discord, no real update server, no network beyond loopback.
## Handoff (→ PROGRESS.md)
Anything that needs real hardware to check (gamepad, real Discord) goes to the S010 review list.

View file

@ -0,0 +1,28 @@
# S010 — Phase 2 review with the user
> Category 02 Verify · Model: Sonnet · Effort: medium · Depends on: S006, S007, S008, S009 · Size: S · Human: 🧑 uses it as the daily browser and reports
> Files touched: `docs/review/phase2.md` (new), trivial fixes only
## Goal
The user runs the verified browser on real hardware (real GPU, real sites, Discord, gamepad) and reports problems. Items feed S012.
## Read
- `docs/PROGRESS.md` last 3 entries
- `docs/FEATURES.md` rows marked broken or partial
## Steps
- [ ] Build is current: `nice cargo build --release -j 2` succeeds on HEAD (skip if the binary is newer than HEAD)
- [ ] Write `docs/review/phase2.md`: what to try (daily browsing, real GPU, Discord, media keys, gamepad, many tabs, the items S006–S009 couldn't check offscreen), the launch command with the user's real profile or a throwaway one (ask which), and known limits
- [ ] 🧑 Ask the user to try it and report; wait for their answer
- [ ] Record every reported problem in `docs/review/phase2.md` as a numbered list (`R2-NN`: what, where, how to reproduce, severity, and a state tag `[open]`, `[fixed <commit>]` or `[wontfix: reason]`)
- [ ] Fix only trivial items (≤ 5 lines, obvious); mark them fixed with the commit; everything else stays open for the fix plan
- [ ] PROGRESS entry, INDEX line, commit `S010: …` and push
## End criteria
- `docs/review/phase2.md` exists with numbered items marked open/fixed.
## Pitfalls
- Don't fix non-trivial items here.
## Handoff (→ PROGRESS.md)
Count of open items, the worst ones, real-hardware findings.

View file

@ -0,0 +1,30 @@
# S011 — Open REVIEW.md items
> Category 03 Gaps · Model: Opus · Effort: medium · Depends on: S010 · Size: M · Human: no
> Files touched: `src/discord.rs`, `src/ui/pages/settings.rs` (labels, dialogs), `src/ui/pages/newtab.rs` (image picker only), `src/app.rs` (`spawn`), `src/inject.rs` (autofill), `src/hub.rs` (UA), `docs/REVIEW.md`
## Goal
Close every item still listed in `docs/REVIEW.md` (except the GL item, done in S005).
## Read
- `docs/REVIEW.md` (whole)
- the code each item names
## Steps
- [ ] Discord on Windows: move named-pipe reads to a reader thread (or read only during handshake); keep the Linux socket path unchanged; unit test the framing
- [ ] Settings: "Send Do Not Track & GPC" shows "partial", "Block third-party cookies" shows "not available with this engine" (and every other DESIGN.md engine limit is labelled)
- [ ] Move the Downloads "Save to" and new-tab image pickers to `App::spawn` like the other rfd dialogs; check rendering continues while open
- [ ] Autofill in iframes: fill through the frame's own injected script (message from the frame script, answer with credentials) instead of top-document `evaluate_javascript`; test with a local iframe login page
- [ ] Google sign-in UA quirk: limit the window where the UA pref is switched (switch back after the navigation starts) and document the remaining race
- [ ] Remove each finished item from `docs/REVIEW.md`; check `cargo build`, unit tests and the related smoke scripts
- [ ] PROGRESS entry, INDEX line, commit `S011: …` and push
## End criteria
- `docs/REVIEW.md` lists no open item, or each left one says why.
- Build, `cargo test` and related smoke scripts green.
## Pitfalls
- Windows-only code: check it compiles with `cargo check --target x86_64-pc-windows-msvc` only if the target is installed; otherwise note it is unchecked.
## Handoff (→ PROGRESS.md)
Items left open and why.

View file

@ -0,0 +1,31 @@
# S012 — Fixes from the user's reviews
> Category 03 Gaps · Model: Opus · Effort: medium · Depends on: S010 · Size: M–L · Human: no
> Files touched: depends on the items; list the files in the commit messages
## Goal
Fix every open item in `docs/review/phase1.md` and `docs/review/phase2.md`. If there are more than ~12 non-trivial items, do the most severe ones and split the rest into `S012a`, `S012b` plans (write them from `_TEMPLATE.md`, add INDEX lines) instead of overrunning.
## Read
- `docs/review/phase1.md`, `docs/review/phase2.md`
- the code each item points at
## Steps
- [ ] Sort open items by severity; group the ones touching the same file
- [ ] Fix crashes and data-loss items first; each with a regression test or smoke script where feasible
- [ ] Fix broken features next, then annoyances
- [ ] Items that hit a Servo limit: label them in the UI as unavailable (DESIGN.md "Engine limits") and mark them so in the review file
- [ ] Mark each item fixed (commit hash) or won't-fix (reason) in its review file; create follow-up plans if items remain
- [ ] Full check: build, `cargo test`, all smoke scripts green
- [ ] PROGRESS entry, INDEX line, commit `S012: …` and push
## End criteria
- `grep -c '\[open\]' docs/review/phase1.md docs/review/phase2.md` is 0 (or each open item has a follow-up plan in INDEX).
- Build, tests, smoke scripts green.
## Pitfalls
- Don't touch the S011 or S013 files at the same time if those plans run in parallel; coordinate through the orchestrator.
- Don't restructure; fix in place.
## Handoff (→ PROGRESS.md)
What remains for the user to recheck in S014.

View file

@ -0,0 +1,32 @@
# S013 — MPRIS media keys
> Category 03 Gaps · Model: Opus · Effort: medium · Depends on: S010 · Size: M · Human: no
> Files touched: `Cargo.toml`, `src/mpris.rs` (new, Linux only), `src/media.rs`, `src/app.rs` (wiring), `docs/FEATURES.md`, `docs/DECISIONS.md`
## Goal
Expose page media on D-Bus via MPRIS so media keys, the KDE/GNOME media widgets and `playerctl` control it (D-002: only this phase-3 candidate is planned). Linux only; Windows builds compile without it.
## Read
- `src/media.rs` (whole)
- the media parts of `src/app.rs` (now-playing, play/pause commands)
- `docs/DESIGN.md` § Layout
## Steps
- [ ] Pick the crate (`mpris-server` on `zbus`, or `zbus` directly); check its async runtime fits the app (no tokio if the app has none; a thread is fine); record in DECISIONS
- [ ] Add `src/mpris.rs` behind `cfg(target_os = "linux")`: register `org.mpris.MediaPlayer2.nacre`, publish metadata (title, artist, art URL, length, position), playback status
- [ ] Wire commands back: Play, Pause, PlayPause, Next, Previous, Seek, SetPosition → the existing media commands on the right tab (main thread via the app's channel)
- [ ] Update metadata on now-playing changes; unregister when nothing plays; a setting to turn it off if the original Nacre had one (check `config.py`), otherwise always on
- [ ] Test with the session bus in a throwaway `dbus-run-session`: `playerctl -p nacre metadata` and `playerctl play-pause` against a local media page in a smoke run
- [ ] Unit test the metadata mapping; mark FEATURES row; check `cargo check` for Windows target if installed
- [ ] PROGRESS entry, INDEX line, commit `S013: …` and push
## End criteria
- In `dbus-run-session`, `playerctl -l` lists nacre while the test page plays and `playerctl play-pause` pauses it (status file shows paused).
- Build and tests green.
## Pitfalls
- Callbacks into Servo must run on the main thread.
- Don't block the event loop on D-Bus calls.
## Handoff (→ PROGRESS.md)
MPRIS bus name, which commands work, anything the user should try on real media keys in S014.

View file

@ -0,0 +1,29 @@
# S014 — Phase 3 review with the user
> Category 03 Gaps · Model: Sonnet · Effort: medium · Depends on: S011, S012, S013 · Size: S · Human: 🧑 rechecks fixes and media keys; approves starting the redesign
> Files touched: `docs/review/phase3.md` (new), trivial fixes only
## Goal
The user rechecks the fixed items and MPRIS and approves the functional browser before the redesign (the user's rule: redesign only after the framework works).
## Read
- `docs/PROGRESS.md` last 3 entries
- `docs/review/phase1.md`, `phase2.md` fixed items
## Steps
- [ ] Build is current: `nice cargo build --release -j 2` succeeds on HEAD (skip if the binary is newer than HEAD)
- [ ] Write `docs/review/phase3.md`: what to try (fixed review items, media keys/desktop media widget, REVIEW.md items), the launch command with the user's real profile or a throwaway one (ask which), and known limits
- [ ] 🧑 Ask the user to try it and report; wait for their answer
- [ ] Record every reported problem in `docs/review/phase3.md` as a numbered list (`R3-NN`: what, where, how to reproduce, severity, and a state tag `[open]`, `[fixed <commit>]` or `[wontfix: reason]`)
- [ ] Fix only trivial items (≤ 5 lines, obvious); mark them fixed with the commit; everything else stays open for the fix plan
- [ ] Record the user's go/no-go for the redesign in `docs/DECISIONS.md`; if no-go, list the blocking items as new `S014a…` fix plans
- [ ] PROGRESS entry, INDEX line, commit `S014: …` and push
## End criteria
- `docs/review/phase3.md` exists; DECISIONS has the go/no-go.
## Pitfalls
- No redesign work here.
## Handoff (→ PROGRESS.md)
Go/no-go and blocking items.

View file

@ -0,0 +1,36 @@
# S015 — Material You foundation
> Category 04 UI redesign · Model: Opus · Effort: high · Depends on: S014 · Size: L · Human: no
> Files touched: `src/theme.rs`, `src/ui/widgets.rs`, `src/ui/mod.rs` (fonts, style setup), `assets/fonts/` (new), `Cargo.toml` (only if a colour crate is added), `docs/DESIGN.md`
## Goal
Build the design system every later UI plan uses: Material 3 tonal-spot palettes from a seed (HCT), bundled Outfit font, spring motion scaled by the Motion setting, shape tokens, and restyled base widgets (switch, segmented control with check, pill buttons, cards, wavy progress, cookie shape). Keep `Palette` roles so existing UI keeps working (UI-BRIEF "What already exists").
## Read
- `docs/UI-BRIEF.md` (whole) and the frames in `docs/ui-reference/` it names
- the `app-taste` skill (load it with the Skill tool)
- `src/theme.rs`, `src/ui/widgets.rs`, `src/ui/mod.rs` (whole)
## Steps
- [ ] Implement HCT + tonal palettes + tonal-spot scheme (own code ported from Material Color Utilities, or the `material-colors` crate; record choice in DECISIONS); unit tests against known reference colours for a few seeds, light and dark
- [ ] Map the scheme to `Palette` roles and add the missing M3 roles (surface containers, on-*, outline-variant); seeds from website / system / palette / custom still work
- [ ] Download Outfit (OFL, Google Fonts) into `assets/fonts/` with its licence file; register it in egui for UI text, with thin weights for the clock
- [ ] Add motion helpers: spring animation (stiffness/damping tokens) driven by egui animation time, scaled or off by the Motion setting
- [ ] Add shape tokens (corner sizes, pill) and drawing helpers: cookie/scalloped shape, wavy line and wavy progress
- [ ] Restyle `widgets.rs`: switch (with thumb icon), segmented buttons with check mark, pill buttons (filled/tonal/outlined/text), cards, rows; every control has hover/press/focus/disabled states
- [ ] Add a hidden `nacre://gallery` (or selftest page) that shows every widget and token in light and dark; smoke shot of it and check by eye
- [ ] Document tokens and helpers in `docs/DESIGN.md` § UI system so later plans only read that section
- [ ] PROGRESS entry, INDEX line, commit `S015: …` and push
## End criteria
- Theme unit tests green (reference colours match).
- `tools/smoke.sh` gallery script gives light and dark screenshots, checked by eye.
- Build green; existing pages still render (launch smoke).
## Pitfalls
- Don't restyle chrome/pages here; that's S016–S020.
- egui text has no real blur: fake soft shadows with layered shapes.
- Keep performance: no per-frame allocation storms in shape helpers.
## Handoff (→ PROGRESS.md)
Token names and helper APIs (DESIGN.md § UI system); anything egui couldn't do.

View file

@ -0,0 +1,35 @@
# S016 — Chrome and menus redesign
> Category 04 UI redesign · Model: Opus · Effort: medium · Depends on: S015 · Size: L · Human: no
> Files touched: `src/ui/chrome.rs`, `src/ui/menus.rs`, `src/window.rs` (page card margin only)
## Goal
Redesign the browser chrome per UI-BRIEF "Chrome seen in the video": one rounded window card, pill tabs with close, round +, toolbar icons, pill address field with star, the right-side buttons, bookmarks bar with empty hint, page in a floating rounded card; flyouts and menus in the new system with spring motion.
## Read
- `docs/UI-BRIEF.md` (whole) and the frames in `docs/ui-reference/` it names
- the `app-taste` skill (load it with the Skill tool)
- `docs/DESIGN.md` § UI system (from S015)
- `src/ui/chrome.rs`, `src/ui/menus.rs`
## Steps
- [ ] Toolbar and tab strip: pill tabs (active/hover/drag states, pinned, audio icon), + button, window card
- [ ] Address field: pill, suggestions dropdown restyled, star, site-info button, security state
- [ ] Right-side buttons and icon set (one consistent icon source; record it)
- [ ] Bookmarks bar with empty-state hint
- [ ] Page as a floating rounded card with margin; check the page blit honours the rounded corners or masks them
- [ ] Flyouts (main, downloads, shield, VPN, media, site info, profiles, apps, QR) and context menus in the new style with spring open/close
- [ ] Smoke shots of chrome and every flyout in light and dark; check by eye against the reference frames; fix
- [ ] Basics smoke scripts from S006 still pass
- [ ] PROGRESS entry, INDEX line, commit `S016: …` and push
## End criteria
- Basics smoke scripts green.
- Screenshots of the chrome and each flyout listed in PROGRESS.
## Pitfalls
- Don't drop any button or feature to fit the design (UI-BRIEF).
- Coordinate with `window.rs` changes from other plans; this plan only touches the page-card margin there.
## Handoff (→ PROGRESS.md)
Chrome measurements and any egui limit hit.

View file

@ -0,0 +1,33 @@
# S017 — New tab page: elements
> Category 04 UI redesign · Model: Opus · Effort: medium · Depends on: S015 · Size: M · Human: no
> Files touched: `src/ui/pages/newtab.rs`, `src/store/settings.rs` (`ntp` only)
## Goal
Rebuild the new tab page layout and elements to match the video (UI-BRIEF "The new tab page in the video" items 1–6): greeting, big thin clock with seconds and AM, date, shortcuts with dashed Add, Now playing card (artwork in a spinning cookie with a dotted visualizer ring, seek line, shuffle/prev/play/next/repeat, source chip), Weather card, pill search, Notes / Reading list / Top sites cards.
## Read
- `docs/UI-BRIEF.md` (whole) and the frames in `docs/ui-reference/` it names
- the `app-taste` skill (load it with the Skill tool)
- `docs/DESIGN.md` § UI system
- `src/ui/pages/newtab.rs` (whole), `src/media.rs` (visualizer API only)
## Steps
- [ ] Layout grid and spacing matching the frames, responsive to window width
- [ ] Greeting, clock (thin Outfit digits, accent tint, seconds, AM baseline) and date
- [ ] Shortcuts row with round icons, labels and dashed Add shortcut
- [ ] Now playing card: cookie artwork spinning while playing, dotted visualizer ring from `media.rs` levels, seek line, buttons including the missing shuffle/repeat, source chip
- [ ] Weather card with all fields from the brief (Open-Meteo data already exists)
- [ ] Pill search with accent button; Notes, Reading list and Top sites as three cards (Top sites becomes its own card)
- [ ] Smoke shots light/dark, with and without media playing; compare with `docs/ui-reference/` frames and fix
- [ ] PROGRESS entry, INDEX line, commit `S017: …` and push
## End criteria
- NTP screenshots light/dark listed in PROGRESS and checked against the frames.
- Build and NTP-related unit tests green.
## Pitfalls
- Backgrounds and the Customize panel are S018; don't touch them here.
## Handoff (→ PROGRESS.md)
Element structure S018's Customize panel must reorder/toggle.

View file

@ -0,0 +1,32 @@
# S018 — New tab page: backgrounds and Customize
> Category 04 UI redesign · Model: Opus · Effort: medium · Depends on: S017 · Size: M · Human: no
> Files touched: `src/ui/pages/newtab.rs`, `src/store/settings.rs` (`ntp` only), `src/ui/pages/settings.rs` (remove the old NTP sub-page link only)
## Goal
Animated, cursor-reactive backgrounds (None, Shapes, Blobs, Constellation with lines, Waves bending near the cursor, Dot grid swelling around the cursor), Amount/Speed/React-to-cursor, image or GIF with Dim/Blur under the animated layer, and the slide-in Customize panel over the live page (UI-BRIEF).
## Read
- `docs/UI-BRIEF.md` (whole) and the frames in `docs/ui-reference/` it names
- the `app-taste` skill (load it with the Skill tool)
- `docs/DESIGN.md` § UI system
- `src/ui/pages/newtab.rs` (background and settings parts)
## Steps
- [ ] Constellation: add lines between near particles (the setting calls it "particles"; keep the key, rename the label)
- [ ] Cursor reaction for every background; Amount and Speed; Motion setting scales or freezes them
- [ ] Image/GIF layer with Dim and Blur sliders under the animated layer; GIF frames animate
- [ ] Customize panel sliding in from the right over the live page: BACKGROUND, IMAGE OR GIF, ELEMENTS (up/down + switch per element), DETAILS (24-hour, seconds, name, weather place with suggestions, units)
- [ ] Check CPU use with each background at Lots/Fast stays reasonable (log frame time); idle when the tab is hidden
- [ ] Smoke shots of each background and the open panel; check by eye
- [ ] PROGRESS entry, INDEX line, commit `S018: …` and push
## End criteria
- Screenshot per background + panel listed in PROGRESS.
- Frame time logged per background in PROGRESS.
## Pitfalls
- Repaint only while visible; animated backgrounds must stop when the tab is hidden.
## Handoff (→ PROGRESS.md)
Background CPU numbers.

View file

@ -0,0 +1,31 @@
# S019 — Settings pages redesign
> Category 04 UI redesign · Model: Opus · Effort: medium · Depends on: S015 · Size: M · Human: no
> Files touched: `src/ui/pages/settings.rs`
## Goal
Redo every settings section in the new system: navigation rail, large rounded cards, rows with switches/segmented buttons, partial and engine-limit labels kept visible.
## Read
- `docs/UI-BRIEF.md` (whole) and the frames in `docs/ui-reference/` it names
- the `app-taste` skill (load it with the Skill tool)
- `docs/DESIGN.md` § UI system
- `src/ui/pages/settings.rs` (whole)
## Steps
- [ ] Navigation rail/sidebar with section icons and the selected-pill indicator; search box
- [ ] Sections as cards of rows; consistent row anatomy (title, subtitle, control)
- [ ] Colour/theme section: seed source, palette swatches, custom colour, live preview using S015's scheme
- [ ] Partial and engine-limit settings keep their label/reason, styled consistently
- [ ] Every settings section screenshot light/dark; check by eye; check a sample of controls still writes settings (stores smoke script from S008)
- [ ] PROGRESS entry, INDEX line, commit `S019: …` and push
## End criteria
- Stores smoke scripts green.
- Screenshot per section listed in PROGRESS.
## Pitfalls
- Don't drop or merge settings; every setting stays reachable.
## Handoff (→ PROGRESS.md)
Row/section helpers others can reuse (should already be in widgets.rs).

Some files were not shown because too many files have changed in this diff Show more