Skip to content

fix: keep the webview profile in the cache folder and the Preferences categories on the left in the phone layout - #49

Merged
MotherSphere merged 6 commits into
mainfrom
chore/conformance-follow-ups-1
Oct 12, 2026
Merged

MotherSphere merged 6 commits into
mainfrom
chore/conformance-follow-ups-1

Conversation

@MotherSphere

@MotherSphere MotherSphere commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Closes the conformance gaps the last audit left open (DEP-1, LAY-7, FS-1, FS-5, ORG-9, SET-1, SET-2, SET-3, SET-11).

Folders and privacy

  • Webview profile is cache now (FS-5). Once the theme from the old localStorage has been imported (legacy_storage_imported), the profile goes to <cache>/Colony/orCAL/webview on Linux and Windows instead of the data folder. orCAL keeps nothing of its own there, so it can be rebuilt. paths::cache_dir() is new and creates the folder. paths::data_dir() lost its last caller and is removed; locate::data_dir stays for the About page.
  • Nothing outside Colony/orCAL on macOS (FS-1). WKWebView cannot be given a folder, so after the import the window is built with .incognito(true). wry 0.57 then uses WKWebsiteDataStore::nonPersistentDataStore, and nothing is written to ~/Library/WebKit. The branch is a runtime cfg!, so no code is dead under clippy on any OS.
  • The 0.4.0 <data>/webview folder is not deleted in the release that moves it (filesystem.md). The README says it can be deleted by hand.
  • README folder table. The Data row stays, marked not used, so the table matches the three folders Preferences > About lists. The macOS cache folder is listed and marked not used too.
  • README Privacy (ORG-9). A new row for the .migrated marker in the settings folder, which records where older settings were looked for. The webview row and the folder table now say cache folder on Linux and Windows, and in memory on macOS.

Layout

  • LAY-7. open_main_window moves from src/main.rs to src/window_state.rs, which already owns the main window. main.rs keeps main(), the --version check and the Builder wiring. The legacy copy and the legacy_storage_imported decision move from the setup closure to migrate::open_store, with a test, so setup only wires the store, the window and the handlers.

Preferences page

  • SET-1. The phone layout keeps the category list as a narrow left column, calc(112px * var(--font-scale)) wide and capped at 40% of the window by the shared rule. Long names break across lines (hyphens: auto) instead of squeezing the content.
  • SET-2. The phone override of the title size (20px) is gone: the title is 22px times the text scale in both layouts.
  • SET-3. The phone override of the category padding (6px 10px) is gone: category buttons are full width with 8px 14px padding in both layouts.
  • SET-11. The near-black and near-white label colours (colony-ui's contrast_on() ends) were literal colours in base.css and theme.js. They are now generated tokens in Project-Colony-Resources (refactor(tokens): generate the contrast_on label colours and export them as --colony-ink and --colony-paper Project-Colony-Resources#25): --colony-ink and --colony-paper in colony-accents.css. The vendored files are re-synced at c19a39d with scripts/sync-colony-tokens.sh. base.css maps --ink and --paper onto them, and theme.js reads them from the computed style. No literal colour is left in src/ui outside the vendored files. The values are the old floats rounded to 8 bits (#14141a, #f7faff).

Dependencies

  • DEP-1. cargo update: cc 1.8.0, smallvec 1.16.3, syn 3.0.9, unicode-ident 1.0.27, uuid 1.28.0.

Verification

  • cargo fmt --check: clean.
  • cargo clippy --locked --all-targets -- -D warnings on Linux: clean.
  • cargo test --locked for paths::, window_state::, migrate:: and tests::: 49 passed. After the review fixes: cargo test --locked migrate::, 5 passed, and clippy clean again.
  • node --check on the changed module, and the vendored themes.json parses (src/i18n.rs embeds it).
  • git grep finds no hex, rgb() or color(srgb ...) colour in src/ui outside vendor/.
  • CI covers macOS, Windows and MSRV.
  • Not checked by an agent: the phone-layout Preferences page itself (EN and FR, text scales 0.7225 and 1.68, OpenDyslexic). It needs a visual check.

… wiring

main.rs setup now only wires the store, the window and the handlers; the
legacy copy and the legacy_storage_imported decision live in
migrate::open_store, with a test. The README folder table keeps the Data
row, marked not used, so it matches the folders the About page lists.
@MotherSphere
MotherSphere merged commit a92468f into main Oct 12, 2026
8 checks passed
@MotherSphere
MotherSphere deleted the chore/conformance-follow-ups-1 branch October 12, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant