Shell theming + launcher (Daylight), clippy 1.97, deepseek audit #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/theme-spotlight"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rebased onto
origin/main. 27 commits: 23 shell-theme/launcher, 1 clippy-1.97 cleanup, 3 fromfix/deepseek-audit.Shell theming + launcher (the theme-spotlight work)
bread_theme::shellmanifest system (phases 1–6c), Hyprland layer-rule generation,bread-launcher(headless core + GTK4 results widget, query modes + result sections),bread-capturecapsule views, and three new builtin themes culminating in Daylight (bottom-anchored, segmented, light).surfaces.*.anchoris now hard-validated;spring_toclamps to[from,to]; hot-reload re-arms on theme switch.Sub-branches
feature/{compositor-rules,launcher-core,shell-theme-manifest,theme-glass-workbench}are all folded in — prune after merge.Backward compatibility
bread-theme's public API delta is purely additive (pub mod anim,pub mod shell,layerrules_*exports) — no removals or renames. v0.7.4 consumers (bos-settings, breadpaper, breadpad, breadsearch) keep compiling. The one behavioural tightening: atheme.tomlwith a missing/unknownsurfaces.*.anchoris now a hard error instead of a silent default — the builtins all pass, and user theme.tomls are rare. NoDEPRECATIONS.mdneeded (nothing deprecated).Clippy 1.97 cleanup (
a86c312)origin/mainitself failscargo clippy --workspace -- -D warningsunder clippy 0.1.97 (toolchain drift). Mechanical, behaviour-preserving:type AppCssBuilderalias,sort_by_key,io::Error::other, explicit.truncate(false)on the singleton lock file, elided lifetimes. (bread-ecosystem CI does not run clippy.)fix/deepseek-audit (3 commits)
unix-useridentities polkit actually offered are accepted. Also: exit(1) when the single-instance lock can't be taken (a second agent wouldserve_atthe same object path).NamedTempFilethat reachedtar tvfand aborted the whole install with a misleading error. Gate extraction on non-empty.XDG_CONFIG_HOME/XDG_RUNTIME_DIRhonoured only when absolute;atomic_writepid-suffixes its temp file (concurrentgenerate-outputrace);hypr::socket_pathderives/run/user/<uid>from the real uid, not a hardcoded 1000;bread-theme --help→ stdout.Checks
cargo build --workspaceclean ·cargo test --workspaceall pass (~323) ·cargo clippy --workspace --all-targets -- -D warningsclean.After merge
Tag v0.7.5 on
main→ then breadbox (feature/launcher-core+ foldfeature/launcher-theming) → then breadbar (feature/theme-spotlight+fix/osd-pactl-watcher-cleanup), both bumping ecosystem pins to v0.7.5.Phase 5 of the shell theme system (THEME_SYSTEM_PLAN.md §11): a second builtin, demo 02's flush edge-to-edge bar with pill workspaces, a plain date+time clock, and cpu/ram chips instead of the media widget. - bread-theme/assets/shell/glass-workbench/: theme.toml + CSS template, faithful to bos-ui-demos/02-glass-workbench.html. Accent maps to the `green` palette token (flat, not a gradient) rather than a hex literal, so pywal theming still works. - builtin.rs: generalized from a single hardcoded liquid-motion constant pair to a small BuiltinTheme registry (builtin::ALL / builtin::find), so mod.rs's discovery/list()/resolve_builtin no longer special-case one id. liquid-motion stays the pinned fallback in resolve_builtin(). - manifest.rs: KNOWN_MODULES gains "cpu"/"ram". - types.rs: new Tokens::bar_border() ("full" default vs "bottom") so a flush bar can ask for a single hairline instead of an island's full border. - Tests: builtin loads, appears in list() alongside liquid-motion, and its window spec is the flush/edge shape (36px, zero margin, radius 0). cargo test -p bread-theme --lib: 63 passing (59 prior + 4 new).- bread-theme:🐚 WorkspacesModule.dot_widths and ClockModule.placeholder_clock, resolved/validated in manifest.rs and modeled in types.rs, so a theme can actually configure dot-pill widths and an entry-as-clock placeholder instead of those staying schema-only. - New compiled-in builtin "spotlight" (assets/shell/spotlight/), registered in builtin.rs so list() returns three themes: centred capsule window spec (anchors=[top] only, width=480, exclusive=none, keyboard=on_demand), workspaces.style=dots, clock.style=none+placeholder_clock, launcher.mode= embedded, drawer=[launcher_results]. Colours are palette token names (pink), never hex. - bread-theme::anim::spring_to: a reusable TickCallback size-interpolation helper (GTK4 has no CSS width/height transition on a widget or layer-shell surface), generalized from WorkspaceTrail's existing ease/tick pattern, for breadbar's capsule-drawer expand/collapse. - bread_launcher::LAUNCHER_APP: the launcher's one shared on-disk identity (cache/config/history), so breadbar's embedded capsule and breadbox's overlay window read and write the SAME cache and launch history rather than forking into two rankings of a user's apps. Tests: +6 spotlight builtin tests (loads/in list/capsule window shape/ embedded mode/dots widths/flat-pink-not-hex), bread-theme --lib 63->69, bread-launcher --lib unchanged at 18.matches_term advanced its scan with start = i + 1 — one byte past the START of a failed match rather than past the whole match. Both i and i + tlen are guaranteed char boundaries; i + 1 is not, so a multi-byte term that failed the word-boundary check left start inside a character and the following field[start..] slice panicked. matches_term("café", "é") reproduces it: byte index 4 is not a char boundary. The path is reached from priority_rank over real .desktop Name= values, so any non-ASCII application name could crash the launcher's sort — never hit locally because every installed app here happens to be ASCII.LaunchHistory::save silently swallowed write errors; now shared by two hosts (breadbox + breadbar's capsule), a broken cache dir silently stopped recording launches for both. Log on failure instead. do_launch/emit_launched's app_id parameter is the caller's bread event-namespace id (breadbox passes "box"), not LAUNCHER_APP ("breadbox", scoped to cache/history paths only) - two similarly named but distinct identities. Make the doc comments say so explicitly and add tests pinning the exact namespace-check relationship, since confusing them silently drops the emitted event.watch() panicked (.expect) if monitor_directory failed (e.g. fs.inotify.max_user_watches exhaustion), contradicting the crate's own 'the shell must never fail to start because a theme file is malformed' stance. Now logs and continues without a watch, same posture as bread_theme::gtk::watch_theme_file's existing .ok()? handling. watch() also resolved the active theme's directory once and pinned a monitor there forever: switching shell.toml's active key while a host was running left edits to the newly-active theme unobserved until restart. Now also watches shell.toml's own directory and re-arms the theme-directory monitor when active changes. Public API change: shell::watch now returns ThemeWatch instead of a bare gio::FileMonitor (still opaque, still just needs to be kept alive). breadbar's theme.rs:525-531 stores the return value in a RefCell<Option<gio::FileMonitor>> and wraps it in Some(monitor) - both need updating to RefCell<Option<bread_theme:🐚:ThemeWatch>> and *cell.borrow_mut() = monitor (no Some(..)), left to the breadbar-side agent since this repo doesn't touch breadbar's files. 's role is now documented explicitly on watch() as a single-process testing override, not the coordination mechanism - shell.toml's active key is.