[panel].sections is validated but never read — control panel body is hardcoded #13
Labels
No labels
bug
ci
enhancement
feature
privacy
security
theme-system
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Breadway/breadbar#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What's broken
docs/shell-themes.md(bread-ecosystem) documents[panel]as a live theme.toml table:bread-theme'sresolve_panel()(bread-ecosystem/bread-theme/src/shell/manifest.rs:835) fully parses and validates[panel]— unknown section names are a hard error,min_widthandsectionsboth land onShellTheme::panel().But
ShellTheme::panel()/.sectionsis never called anywhere in breadbar (confirmed: zero matches for.panel()outsidebread-theme/srcitself). The control panel body —CONTROLheader, volume slider,OUTPUTsection, brightness slider,SYSTEMheader + stats, power row (lock/sleep/off), tray sections — is fully hardcoded insrc/main.rsaround lines 1011–1099, built unconditionally in that exact order regardless of whattheme.tomlsays.breadbar/src/theme.rs::needs_restart()also only compares.modules()and.launcher().mode— it doesn't checkpanel().sections, consistent with the value never being read at all (there's nothing to restart for).Impact
A theme author can write
[panel] sections = ["volume", "power"]intheme.toml,bread-theme diagnosewill report success, and nothing will change — the popover still renders all six sections in the default order. This is a silent no-op: the config is documented, validated, and completely inert.Fix
Wire
theme::shell_theme().panel().sectionsinto the control-panel body assembly inmain.rs(build/show each named section, in the given order, drop ones not listed) and add the missingsectionscomparison toneeds_restart()so a live change without a restart doesn't leave the panel stale.Repro
[panel] sections = ["power"]in an activetheme.toml.False alarm — filed against a stale local clone of
mainthat hadn't fetched origin. This was already fixed by PR #12 (feature/theme-ui-control, merged 2026-09-04 asbd3d5b4):src/main.rs:1134now builds panel sections fromtheme::shell_theme().panel().sections, andtheme.rs::needs_restartcomparespanel().sections. Verified againstorigin/main(083ae51) withcargo test --release— 44/44 passing. Closing.