Skip to content

feat(badges): smart media, privacy, and progress badges with dual stacked layout - #71

Merged
thepathless merged 1 commit into
thepathless:experimentalfrom
NothingManTR:feat/smart-badges
Oct 17, 2026
Merged

thepathless merged 1 commit into
thepathless:experimentalfrom
NothingManTR:feat/smart-badges

Conversation

@NothingManTR

Copy link
Copy Markdown
Contributor

Hi @thepathless! Hope you're doing well.

Following up on the Task HUD introduced in #67, this PR extends OmaDock's badging system with three new real-time contextual badges, along with a dual stacked badge layout for tiles that have multiple active states.

What's New:

  1. Media Playback Badge (󰎆 in Catppuccin Mauve #cba6f7):

    • Directly listens to active MPRIS player states via Quickshell.Services.Mpris.
    • Appears only while playback is active (isPlaying: true), and automatically disappears when paused or stopped.
    • WebApp / PWA Resolution: Media playing inside WebApps (e.g. YouTube, Spotify Web, WhatsApp Web) matches the track title against the WebApp's window and is attributed directly to the dedicated dock tile, while the host browser (helium, chromium, etc.) cleanly yields.
  2. Microphone / Privacy Badge (󰍬 in Catppuccin Peach #fab387):

    • Detects active recording / audio capture input streams via Quickshell.Services.Pipewire (e.g. Discord, Zoom, OBS, Audacity).
    • Also supported via ./scripts/omadock-task.sh mic <appId>.
    • Carries high priority (rank 9) to ensure privacy awareness is never buried.
  3. Progress / Download Badge (↓ or % in Catppuccin Blue #89b4fa):

    • Extended task reporting for long downloads, package updates, or builds via ./scripts/omadock-task.sh progress <appId> <percent> [title].
    • Shows the percentage badge directly on the tile (e.g. 85%) with progress tracking in the hover chip.
  4. Dual Stacked Badges (Semi-overlapping Pill Layout):

    • When an application has multiple active states (e.g. media playing + task completed, or microphone recording + unread notifications):
      • The higher-priority badge sits in front as the primary badge (z: 3).
      • The secondary badge peeks out neatly from behind on the same horizontal plane (z: 2, stackShiftX: 9px, stackShiftY: 0) with the dock background rim separating them.
    • Priority hierarchy:
      Error (10) > Privacy (9) > Notification (8) > Running/Progress (7) > Media (6) > Success (5)
    • Hover chip combines multiple active states with a middle dot (·) delimiter (e.g., Task completed (4s) · 🎵 Song — Artist).

Performance & Architectural Integrity:

  • 0.00% Idle CPU: Entirely event-driven through reactive Quickshell services (Mpris, Pipewire) and property bindings; no polling timers or background loops.
  • Single Owner of Status: All colors, glyphs, and stacking priorities are strictly owned by DockTasks.js.
  • Ratchet Ceilings: Dock.qml remains at exactly 2382 lines (under the ratchet ceiling); module sizes are well within limits.
  • Tests: All 254 Node.js unit tests, 116 Python unit tests, tasks.sh, ipc-roundtrip.sh, teardown.sh, shaders-in-sync.sh, manifest-check.sh, and structure-check.py pass cleanly.

@github-actions
github-actions Bot changed the base branch from main to experimental October 15, 2026 18:04
@github-actions

Copy link
Copy Markdown

Hi! This repository routes every pull request to experimental — main only receives verified release batches — so I changed this PR base to experimental automatically. CI re-runs against the new base. Thank you for contributing!

@thepathless
thepathless merged commit ffb3f88 into thepathless:experimental Oct 17, 2026
4 checks passed
@thepathless

Copy link
Copy Markdown
Owner

Thank you @NothingManTR — merged into v4.7.0! Extending the Task HUD ownership (resolveBadgeView kept as the .primary wrapper, statusColor unknown still transparent) with the priority-ranked candidate stack, plus WebApp track-title attribution that lets the dedicated tile claim playback while the host browser yields, is a thoughtful continuation of #67. Verified Pipewire exists on Quickshell 0.3.1, and on experimental: 254 Node + 116 Python tests, qmllint 0 errors, structure-check PASSED.

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.

2 participants