Skip to content

dev -> master: config-owned widgets, notification stack fixes, media dedupe, and css-check polish#14

Merged
locainin merged 18 commits into
masterfrom
dev
May 14, 2026
Merged

dev -> master: config-owned widgets, notification stack fixes, media dedupe, and css-check polish#14
locainin merged 18 commits into
masterfrom
dev

Conversation

@locainin
Copy link
Copy Markdown
Owner

Summary

This PR brings dev into master with focused panel, widget config, media, and tooling improvements.

Key outcomes:

  • widget actions are now owned by config instead of hidden source defaults
  • default Night behavior is shipped through editable config-local helper scripts
  • grouped notification stacks update and render consistently as new matching notifications arrive
  • browser media sessions are deduplicated more reliably
  • css-check now catches more real panel sizing and selector issues before runtime

Main Changes

1) Config-owned widgets and helper scripts

  • added editable Night helper scripts under the active config directory
  • made relative widget commands resolve from the active config root, including custom config paths
  • preserved user-edited helper scripts while still restoring executable permissions when needed
  • kept custom toggle commands, state commands, and watcher behavior owned by the user config
  • avoided source-level hardcoding for widget actions that should belong in config

2) Notification stack rendering

  • fixed grouped notification bookkeeping so dirty groups keep valid row ranges after incremental updates
  • moved collapsed stack depth into the notification row so GTK updates the card and stack visuals together
  • fixed cached row setup so reused rows keep their real GTK root attached
  • adjusted stacked card styling so active and critical states do not hide stack shadows
  • removed the older standalone ghost-row stack path that caused delayed or inconsistent visuals

3) Media behavior

  • fixed duplicate browser media entries by preferring stronger source identity when available
  • improved fallback matching when PID metadata is missing
  • kept browser remote artwork opt-in through media config policy
  • cleaned up media snapshot/cache/runtime behavior around the dedupe path

4) css-check and preset tooling

  • expanded css-check sizing rules for stock widget rows, fixed grids, media cards, and generated selectors
  • added panel width pressure checks so oversized widget layouts are caught earlier
  • improved preset command review output for command-bearing config fields
  • made exec review output stable even when terminal color detection is active

5) Code organization and maintainability

  • renamed config, model, media, and daemon module files to match their actual responsibility
  • kept module entry files focused on declaring and exposing submodules
  • moved related coverage closer to the code paths it validates
  • added comments where the behavior depends on ownership, path resolution, GTK row reuse, or non-obvious runtime state

locainin added 18 commits May 12, 2026 22:17
Move the widget config surface out of the oversized config_widgets file and into focused modules.

Toggle, slider, stat, card, plugin, runtime sanitize, and layout logic now live in files that match the behavior they own. The runtime cleanup also removes the hardcoded Night toggle backend path so generated config remains the source of truth.
Add config-local helper scripts for the default Night toggle and have the installer provision them with executable permissions.

The helper keeps backend selection in editable files, prefers a currently running Night backend before choosing an installed one, and clears stale runtime state when turning the effect off. Template tests cover script paths, executable writes, and generated config output.
Move panel setup into smaller sections and keep hook class generation out of large module roots.

This keeps UiState initialization focused on wiring, gives panel sections clearer ownership, and adds CSS hook coverage so themes can target the new panel and widget states without relying on fragile selectors.
Preserve user-defined toggle and widget commands instead of treating stock controls as special runtime behavior.

Toggle cards now prefer toggle_cmd when it is configured, fall back to on/off commands for binary controls, and refresh state without pretending a command succeeded when no state command exists. Icon fallback handling and widget comments were cleaned up around that behavior.
Make grouped notifications update their collapsed stack shape as soon as another notification joins the same app group.

Incremental list updates now keep rebuilt group ranges recorded, and the in-place row update path refuses to run when the visible span does not match the desired stacked shape. That prevents the header count from updating while the iOS-style ghost cards remain missing until a manual expand and collapse.
Improve css-check coverage for stock widget sizing and generated selectors.

The checker now models fixed widget size rules more directly, catches panel width pressure from stock rows, and keeps preset command rewriting aware of the newer command-bearing config fields.
- fixed an issue where grouped notification stacks could appear delayed or inconsistent after a matching notification was received

- moved collapsed stack depth into the notification row so GTK updates the visible card and stack shadows in the same bind pass

- fixed the list factory setup so cached row widgets always attach their real GTK root instead of leaving an empty placeholder child

- added a stable notification row wrapper hook so the real card keeps a valid layout container after the old ghost rows were removed

- kept active and critical card styling from hiding stacked shadows

- removed the old standalone ghost-row path now that stack depth is owned by the notification row
- fixed an issue where Brave and Plasma browser integration could both show the same browser-backed playback as separate media cards
- browser media entries now prefer the source PID exposed by bridge metadata before falling back to the bus owner PID
- duplicate browser bridges now collapse when they mirror the same browser process even if their title metadata differs
- kept metadata-based browser dedupe for cases where no source PID is available
- added direct coverage for KDE PID metadata and mismatched browser bridge metadata
- fixed an issue where the built-in Night toggle could point at missing helper scripts when center started before the installer created them
- moved default script provisioning into core config startup so center and installer share the same guarantee
- preserved user-edited helper scripts while restoring execute permissions needed by relative script commands
- kept installer reset behavior able to rewrite shipped helper scripts through the shared core path
- moved sidecar config media and media widget tests into organized tests directories
- moved center tests into focused module test folders so implementation files stay easier to read
- kept media, dbus, ui, and widget coverage attached to the code paths they exercise
- preserved existing behavior while making edge case tests easier to extend
- moved core tests into module-owned test folders instead of leaving large inline test blocks in implementation files
- moved media effective behavior and runtime sanitization pipeline out of mod.rs so facades stay small
- added stronger config coverage for media defaults, custom toggle commands, default script references, and runtime sanitization edge cases
- kept control, css, model, and util tests close to the code they validate without adding empty facade test modules
- fixed the executable preset review test so terminal color detection cannot hide the expected command text
- tightened collapsed notification stack ghosts so depth renders as tucked shadows instead of empty cards
- removed default Quick Actions and System Status headings while keeping those labels configurable
- added a Python panel regression probe for stack CSS, default labels, and exec review stability
- fixed an issue where relative widget script commands used the default config directory instead of the active config path
- captured the active config directory before widget construction so custom config launches resolve scripts from the same root that startup provisions
- kept the existing guard that blocks path-like commands from escaping the UnixNotis config directory
- added regression coverage for resolving relative helper scripts from a custom config root
- renamed config module files and directories to remove repeated config prefixes
- updated module declarations and internal use paths to match the new names
- kept widget_config as the facade name because widgets is already the real widget config module directory
- made no behavior changes beyond the mechanical module path updates
- renamed model implementation files to remove repeated model prefixes
- updated the model facade and internal imports to point at image, notification, and types
- kept the public unixnotis_core::model re-exports unchanged
- made no behavior changes beyond the mechanical module path updates
- renamed media implementation files to remove repeated media prefixes
- updated media module declarations and sibling imports to use the shorter names
- used event_loop for the runtime loop module instead of a Rust keyword filename
- made no behavior changes beyond the mechanical module path updates
- renamed daemon control and notification module files to remove repeated daemon prefixes
- renamed their submodule directories to control and notifications
- updated path attributes and daemon re-exports to match the new names
- made no behavior changes beyond the mechanical module path updates
- documented config sanitization boundaries for panel labels, widget order, column counts, theme alpha values, and history limits
- clarified why media defaults, player filtering, and cache transitions behave the way they do
- added notes around notification burst throttling so the direct, snapshot, and suppressed paths are easier to review
- documented the stock-only volume migration and notification urgency fallback behavior
@locainin locainin merged commit de2c3dd into master May 14, 2026
3 checks passed
locainin added a commit that referenced this pull request May 14, 2026
see pull request #14 for details
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