diff --git a/Plans/02 Verify/S008-verify-stores.md b/Plans/02 Verify/S008-verify-stores.md index bd0fe56..95f7ec6 100644 --- a/Plans/02 Verify/S008-verify-stores.md +++ b/Plans/02 Verify/S008-verify-stores.md @@ -18,8 +18,8 @@ Verify passwords/vault and autofill, permissions prompts, history/bookmarks/down - [x] User scripts/styles apply on matching pages; install a site as an app and launch it - [x] 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 - [x] R1-20 per-site memory and enforcement: set per-site zoom, ad blocker on/off, privacy-mode flag (flag persistence only; internals are D-011) and other per-site choices; set per-site permissions (camera, mic, location, notifications, pop-ups, autoplay, …); quit, relaunch with `SMOKE_HOME=/home`, check values are in the stores and apply again on reopening the site; check each permission is enforced (blocked/allowed/asked per its stored value), not only stored; fix what is not -- [ ] 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 +- [x] Change a sample of settings via `set` and via clicks; check `settings.json` and the effect; mark FEATURES rows +- [x] PROGRESS entry, INDEX line, commit `S008: …` and push ## End criteria - Every nacre:// page has a non-blank screenshot in the run dir. diff --git a/Plans/INDEX.md b/Plans/INDEX.md index 2ec6d95..ec2cb96 100644 --- a/Plans/INDEX.md +++ b/Plans/INDEX.md @@ -14,7 +14,7 @@ Tracker: https://claude.ai/artifact/9AD7fPfwJ4ASFzVTJGKU4h - [x] [S005 — Per-tab painters on one GL context](02%20Verify/S005-gl-painters.md) · Opus high - [x] [S006 — Browser basics pass](02%20Verify/S006-verify-basics.md) · Opus medium - [x] [S007 — Network pass](02%20Verify/S007-verify-network.md) · Opus medium -- [ ] [S008 — Stores and pages pass](02%20Verify/S008-verify-stores.md) · Sonnet high +- [x] [S008 — Stores and pages pass](02%20Verify/S008-verify-stores.md) · Sonnet high - [ ] [S009 — Integrations pass](02%20Verify/S009-verify-integrations.md) · Sonnet high - [ ] [S010 — Phase 2 review with the user](02%20Verify/S010-phase2-review.md) · Sonnet medium · 🧑 diff --git a/docs/FEATURES.md b/docs/FEATURES.md index 5acffa4..d34e47f 100644 --- a/docs/FEATURES.md +++ b/docs/FEATURES.md @@ -12,7 +12,7 @@ Every item of the settings screenshot and of the original Nacre's `config.py`, w | Address bar: URL or search, suggestions (history, bookmarks, tabs, pages, engine), Alt+Enter new tab | `ui/chrome.rs`, `util::address_to_url` | verified S006 (URL, search: basics.txt; suggestions: chrome.txt); Alt+Enter not checked | | Back/forward (with history list), reload, hard reload, home | `actions.rs` | verified S006 (back, forward, reload, hard reload, home: basics.txt, keys.txt); history list not checked; "stop" has no Servo API | | Find in page (count, next/previous, match case) | `inject.rs` FIND_JS, `ui/dialogs.rs` | verified S006 (count, next, previous: basics.txt, keys.txt); match case not checked | -| Zoom per site, Ctrl+wheel | `actions.rs`, settings `web.zoom_sites` | verified S006 (in, out, reset: basics.txt, keys.txt); per site and Ctrl+wheel not checked | +| Zoom per site, Ctrl+wheel | `actions.rs`, settings `web.zoom_sites` | verified S006 (in, out, reset: basics.txt, keys.txt), S008 (per site: saved, back after a restart, applied to a new tab: site-memory*.txt; the tab's zoom now follows the site's value, was stale on new tabs); Ctrl+wheel not checked | | Full screen (F11 and page fullscreen) | `app.rs` | verified S006 (basics.txt: F11, page request, Escape leaves) | | Context menu (links, images, media, selection, spelling, page) | `ui/menus.rs` | verified S006 (page menu: input.txt rclick); link/image/media/selection/spelling menus not checked | | Page dialogs: alert/confirm/prompt, HTTP sign-in, select, colour, file picker, leave page | `ui/dialogs.rs`, `app.rs` | verified S006 (alert, confirm, prompt, select, colour: dialogs.txt); HTTP sign-in, file picker, leave page not checked | @@ -26,7 +26,7 @@ Every item of the settings screenshot and of the original Nacre's `config.py`, w | Task manager, free up memory | `ui/pages/misc.rs` | verified S006 (task manager opens: keys.txt); free memory not checked | | Keyboard shortcuts, rebindable | `keys.rs`, settings | verified S006 (every action by `do` in basics.txt + keys.txt except save page, print, incognito, quit; key parsing unit test); rebinding not checked | | Gamepads (W3C standard mapping), Web Bluetooth device picker | `app.rs poll_gamepads`, `ui/dialogs.rs` | not checked in S006 (no device in tests); rumble reports unsupported | -| Notifications (notify-send or in-app) | `app.rs` | not checked in S006 | +| Notifications (notify-send or in-app) | `app.rs` | permission asked, remembered, denied/granted to the page verified S008 (site-memory*.txt); showing the notification itself (notify-send) not checked | ## General (screenshot) | Setting | State | @@ -38,11 +38,18 @@ Every item of the settings screenshot and of the original Nacre's `config.py`, w | Profiles (list, add, delete, open) | written | | Spell check (languages, dictionaries downloaded, suggestions, add word) | written (`spell.rs`, SPELL_JS) | | Keyboard shortcuts | written | -| Import from another browser (Chromium/Firefox families; bookmarks file; passwords CSV) | written (`importer.rs`) | +| Import from another browser (Chromium/Firefox families; bookmarks file; passwords CSV) | verified S008 (stores-import.txt on fake Chrome + Firefox profiles in a throwaway home: bookmarks, folders, history, home page, search engine; bookmarks HTML and passwords CSV: stores-lists.txt, stores-vault.txt through the store, not the file dialog); no importer for the old Python Nacre's JSON stores; Windows paths not checked | | New tab shortcuts and page elements, backgrounds, weather, notes | written (`ui/pages/newtab.rs`) | | Custom title bar | written (restart) | | Floating content card | written | +**Stores and pages (S008):** every nacre:// page opens with a non-blank shot (stores-pages.txt + tools/check-shots.py). History +(visits recorded, page lists them, back after a restart), bookmarks (add, folder, bar, Netscape HTML export/import through the +store, page, back after a restart), downloads page lists a finished file (stores-lists*.txt). Settings changed with `set` apply +and reach settings.json (stores-settings.txt: default zoom, vault off/on, theme, search engine, home page, bookmarks bar) and +tapped controls write settings (settings-write.txt, tap position fixed after the privacy page grew). Not checked: the native +file dialogs behind Import/Export, history delete/search from the page, bookmark drag and edit, downloads clear. + ## Appearance Colour source (website/system/palette/custom), fallback, palette swatches, mode, scheme style and contrast, motion, roundness, websites light/dark, force dark, interface size: written (`theme.rs`, settings page). The Material You look @@ -75,13 +82,13 @@ written. | Privacy mode (+ in incognito) | written (PRIVACY_JS) | | Secure DNS (Cloudflare, Quad9, Google, Mullvad, AdGuard, custom) | verified S007 with a custom endpoint on a local stub (net-privacy.txt: names only the stub knows load); the public providers not contacted in tests | | HTTPS-only mode with fallback prompt and exceptions | verified S007 (net-privacy.txt: upgrade via the `location.replace()` page, certificate warning "Open anyway" (fixed: servo-net patch), fallback prompt + Open anyway, site stays http this session, local addresses never upgraded); "Always for this site" not tapped | -| Site settings (defaults and per-site) | written | +| Site settings (defaults and per-site) | verified S008 (site-memory*.txt, restart): stored per site, applied again after a restart. Enforced: pop-ups, notifications, images (hub blocks image requests), sound (tab muted on load), Servo's own requests, open-other-apps. Shown as "Not available" (Servo 0.7): location (navigator.geolocation never answers), camera, microphone, device list (no navigator.mediaDevices), persistent storage (no navigator.storage), clipboard, JavaScript. Per-site privacy-mode flag does not exist (privacy mode is global; S024) | | Delete browsing data (+ on exit) | written | | Send Do Not Track and GPC | partial: JS only (no headers in Servo 0.7) | | Remove tracking parameters | verified S007 (net-privacy.txt: utm_*/fbclid removed, other parameters kept, off keeps all) | | Block third-party cookies | engine limit, shown as unavailable | | Google sign-in quirk | written (UA switch + JS) | -| Sites where ad blocking is paused | written | +| Sites where ad blocking is paused | verified S007 (net-adblock.txt), persisted S008 (site-memory*.txt) | | Remote debugging, user agent | written | ## Ad blocker @@ -114,11 +121,11 @@ limit, shown as unavailable. ## Passwords and autofill Encrypted vault (device key or master password, auto-lock, re-ask before showing), save prompt, autofill, strong password suggestion, addresses and cards, CSV import/export, generator, weak/reused check: written -(`store/vault.rs`, AUTOFILL_JS, `ui/pages/passwords.rs`). +(`store/vault.rs`, AUTOFILL_JS, `ui/pages/passwords.rs`). Verified S008 (stores-vault.txt + stores-vault-check.sh): save prompt from a local form, autofill of the one saved login, master password (key file removed, wrong password refused, lock empties the vault, no autofill while locked), unlock, CSV export, CSV import (own and Chrome format, duplicates and bad rows skipped), vault.json holds no plain text and is mode 600. Not checked: addresses, cards, generator, weak/reused list, auto-lock timer, re-ask before reveal, the strong password suggestion dropdown. ## Apps Install site as app (own window, launcher entry), desktop shortcut, user scripts and styles (stand-in for extensions): -written. +verified S008 (stores-apps.txt): .user.js and .user.css installed by address run on matching pages and not on others; install as app writes the launcher entry and the app opens its own window. Not checked: desktop shortcut, uninstall, editing a script, disable toggle, @exclude, run-at start/idle. ## About Version, engine, colour, profile paths, update repository, automatic and manual update check: written diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md index 7121117..182c3b5 100644 --- a/docs/PROGRESS.md +++ b/docs/PROGRESS.md @@ -265,6 +265,14 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done, - Not done: Windows runtime not tried in the VM (sizes from the release index only); seeking and quality switches untested. - Later: Servo refuses fetch/XHR of file:// from file:// pages (smoke clips are base64 scripts); the selftest `js` probe can hang when the script thread blocks (seen once on YouTube). +## S008 — Stores and pages pass (2026-11-12) +- New (offline; `python3 -m http.server 8768 --bind 127.0.0.1 --directory tests/smoke/pages &` and `python3 tests/smoke/net/server.py &` first): `stores-pages.txt` + `tools/check-shots.py` (17 pages, none blank), `stores-vault.txt` + `-check.sh`, `stores-lists.txt` + `-restart.txt`, `stores-apps.txt`, `stores-import.txt` (+ `make-import-home.py`), `stores-settings.txt` + `-check.sh`, `site-memory.txt` + `-restart.txt` (R1-20). Selftest: `perm`, `prompt`, `vault`, `bookmarks`, `cmd import|install_script|open_app`, status `permissions`, `site_state`, `scripts`, `vault_mode`, `bookmark_folders`. +- Fixed (R1-20): Images permission did nothing (hub now blocks image requests per site); Sound block did nothing (tab muted on load); menu/page permission edits reached permissions.json only at exit (now saved at once and the hub refreshed); a new tab showed 100 % zoom for a site with saved zoom (tab.zoom stale); settings-write.txt privacy tap moved with the page layout. +- Shown "Not available" (Servo 0.7, `Kind::engine_limit`): location, camera, microphone, device list, persistent storage, clipboard, JavaScript. +- Green: all new scripts, launch, restore, 61 unit tests. site-memory restart failed 3 times in a row once under heavy machine load (image still loaded at the first check), passed 8 times after; cause not found. +- Not done: per-site privacy-mode flag (privacy mode is global, S024); importer for the old Python Nacre's JSON stores (none exists); native file dialogs behind Import/Export; addresses, cards, generator, auto-lock timer; notification display; user-script disable/edit/exclude. +- Later: tab titles of nacre:// pages show a generic icon; selftest `set` with a bad value only logs (does not fail the run). + ## Later - Turnstile widget paints as a black half-disc (Servo painting of its iframe/shadow DOM, S006 site doctor). - Google sign-in past the email step: press Next with a real account, by the user (S006). diff --git a/docs/review/phase1.md b/docs/review/phase1.md index 857b227..14ad50b 100644 --- a/docs/review/phase1.md +++ b/docs/review/phase1.md @@ -47,5 +47,5 @@ State tags: `[open]`, `[fixed ]`, `[wontfix: reason]`. Severity: high / - R1-17 [fixed 7e6c701] QR flyout looks broken: the code sits at the top of a tall, empty panel (`docs/ui-reference/bug-qr-flyout.png`). Size the panel to its content. Severity: medium. (user) → chrome follow-up. - R1-18 [fixed 7e6c701] Flyouts must be friendly and polished like the old browser's passwords, downloads and history flyouts the user likes (`docs/ui-reference/old-flyout-*.png`: title + action icons, sections with accent labels, rows with icon/title/subtitle/time, search pill, clear empty states). Review every flyout and page with the `app-taste` and `unslop` skills; "everything should be user friendly". Severity: medium. (user) → chrome follow-up + S021 review. - R1-19 [open] Protect cookies against theft (infostealers copying the profile to hijack sessions). Idea to verify: Servo's `Opts.config_dir` persists cookies as plain files, and `site_data_manager()` has `cookies_for_url` / `set_cookie_for_url` / `clear_cookies` (DESIGN.md). So Nacre could run Servo with temporary storage and keep cookies itself, encrypted at rest with a key held in the OS keyring (Secret Service/KWallet on Linux, DPAPI on Windows), restoring them at start; plus "clear cookies on close" (setting exists) and, in privacy mode, best-effort removal of third-party cookies through the site data manager. General rule from the user: where Servo can't do something properly, Nacre may add its own layer (inject.rs scripts, site data manager, bridge) instead of only showing an engine limit; record each in DESIGN.md. Severity: high. (user) → with R1-16 (privacy plan). -- R1-20 [open] Per-site memory must persist and work: zoom/page size, ad blocker on/off per site, privacy mode and other per-site choices are saved, survive a restart, and apply again when the site is opened; site permissions (camera, microphone, location, notifications, pop-ups, autoplay, ...) are really enforced per site, not just stored. Verify with a restart test in a smoke script (set per-site values, quit, relaunch with SMOKE_HOME, check they apply). Severity: high. (user) → S008 (stores and pages pass). +- R1-20 [fixed S008] Per-site memory must persist and work: zoom/page size, ad blocker on/off per site, privacy mode and other per-site choices are saved, survive a restart, and apply again when the site is opened; site permissions (camera, microphone, location, notifications, pop-ups, autoplay, ...) are really enforced per site, not just stored. Verify with a restart test in a smoke script (set per-site values, quit, relaunch with SMOKE_HOME, check they apply). Severity: high. (user) → S008 (stores and pages pass). - R1-21 [fixed 8049f6a] Interacting with nacre:// pages feels buggy and not clean. Example: a size (zoom/scale) slider applies its value while you drag, which re-lays out the page under the pointer, so the slider jumps and is hard to set. Sliders that change layout should preview without moving the control and commit on release; check every page's controls for this kind of jitter. Recording: `~/Videos/Recordings/recording_20261112_01-00-39.mp4` (watch it first). Severity: high. (user) → chrome/pages follow-up before S021. diff --git a/tests/smoke/settings-write.txt b/tests/smoke/settings-write.txt index 182183d..02a137e 100644 --- a/tests/smoke/settings-write.txt +++ b/tests/smoke/settings-write.txt @@ -12,7 +12,7 @@ wait 0.5 shot write-general page nacre://settings/privacy wait 1 -tap 1110 592 +tap 1110 636 wait 0.5 shot write-privacy page nacre://settings/passwords diff --git a/tests/smoke/stores-settings-check.sh b/tests/smoke/stores-settings-check.sh new file mode 100755 index 0000000..5116ce8 --- /dev/null +++ b/tests/smoke/stores-settings-check.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# After tests/smoke/stores-settings.txt: the values are in settings.json. Usage: tests/smoke/stores-settings-check.sh +set -eu +file=$(ls "$1"/home/.config/nacre*/*/settings.json | head -1) +python3 - "$file" <<'PY' +import json, sys +d = json.load(open(sys.argv[1])) +want = [(d["theme"]["mode"], "light"), (d["startup"]["search_engine"], "bing"), (d["startup"]["home_url"], "http://127.0.0.1:8768/hello.html"), + (d["ui"]["bookmarks_bar"], "never"), (d["vault"]["enabled"], True), (d["web"]["zoom"], 1.0)] +bad = [(got, exp) for got, exp in want if got != exp] +print("settings.json ok" if not bad else f"FAIL: {bad}") +sys.exit(1 if bad else 0) +PY diff --git a/tests/smoke/stores-settings.txt b/tests/smoke/stores-settings.txt new file mode 100644 index 0000000..7a91fbf --- /dev/null +++ b/tests/smoke/stores-settings.txt @@ -0,0 +1,62 @@ +# Stores pass (S008): settings changed with `set` take effect and reach settings.json (see stores-settings-check.sh). +# python3 -m http.server 8768 --bind 127.0.0.1 --directory tests/smoke/pages & +# tools/smoke.sh tests/smoke/stores-settings.txt then tests/smoke/stores-settings-check.sh +wait 3 +# Default page zoom applies to a site with no zoom of its own. +set /web/zoom 1.5 +open http://127.0.0.1:8768/hello.html +waitload +wait 1 +status zoom +expect /active/zoom 1.5 +set /web/zoom 1.0 +# Password vault off: submitting a login form asks nothing; on again: it asks. +set /vault/enabled false +open http://127.0.0.1:8768/login.html +waitload +waitfor 10 document.getElementById('pass') !== null +locate #user +wait 1 +click @ +pagetype zoe +locate #pass +wait 1 +click @ +pagetype pw-for-zoe-1 +locate #go +wait 1 +click @ +wait 2 +status vault-off +expect /active/prompts 0 +set /vault/enabled true +open http://127.0.0.1:8768/login.html +waitload +waitfor 10 document.getElementById('pass') !== null +locate #user +wait 1 +click @ +pagetype zoe +locate #pass +wait 1 +click @ +pagetype pw-for-zoe-1 +locate #go +wait 1 +click @ +wait 2 +status vault-on +expect /active/prompts 1 +# Theme, search engine, home page: stored and applied. +set /theme/mode "dark" +set /startup/search_engine "bing" +set /startup/home_url "http://127.0.0.1:8768/hello.html" +set /ui/bookmarks_bar "never" +page nacre://settings/appearance +wait 1 +shot appearance-dark +set /theme/mode "light" +wait 1 +shot appearance-light +status done +quit