Skip to content

feat(t101): electron notification channel mutes#13

Merged
duongdev merged 1 commit into
mainfrom
feat/t101-electron-notification-channel-mutes
Jul 7, 2026
Merged

feat(t101): electron notification channel mutes#13
duongdev merged 1 commit into
mainfrom
feat/t101-electron-notification-channel-mutes

Conversation

@duongdev

@duongdev duongdev commented Jul 7, 2026

Copy link
Copy Markdown
Owner

What

The Electron app gains per-source notification mute channels at parity with the PWA — silence a noisy service (Teams/Outlook) or a Slack workspace so it stops firing the OS notification, the dock badge, and the sidebar unread counts, while still listing (dimmed) in the Inbox.

Spec: docs/tasks/done/101-electron-notification-channel-mutes.md.

How

  • Shared, not duplicated (per review): the caps.web ? bigCard : smallCard split in settings-dialog.tsx collapses into ONE Notifications card used by both builds. Master + the mute list ([...ADAPTER_MUTE_ROWS, ...slackRows]) render identically; only the push row (web-only) and the Slack-row source differ inline.
  • core/notifications.js shouldNotifyOs gains a mutes param (gates via core/notif-mutes.js isMuted); main.js passes settings.notifMutes and mute-excludes the dock badge via unreadExcluding.
  • core/settings-store.js makes notifMutes a settable global (Electron is single-device; web still uses the device-keyed notifMutes_<deviceId> slot — the transport deletes the plain key before POST, so the global never leaks on web).
  • src/lib/notif-mutes.ts adds slackMuteRows(notifications) — derives per-workspace mute rows from captured hijack entries (label = the workspace name the entry carries in source), the Electron mute-list source since it has no sweep/health.
  • src/app.tsx ungates the mute-aware badges (muteOpts/unreadExcluding) for both builds; toolbar.tsx forwards a notifications prop.

Web rendering is unchanged by construction (same components + adapters-then-Slack row order).

Housekeeping

Also closes two shipped-but-open task files (t096, t098 → done/; both shipped in PR #10 / f0a456a).

Tests

typecheck · 1024 unit (+shouldNotifyOs mutes ×4, slackMuteRows ×5, settings-store ×1) · 49 e2e · build · node --check main.js + server.mjs · Biome clean. The Electron mute UI + dock-badge + persist-across-restart smoke is verified on the packaged app (pnpm install:local).

https://claude.ai/code/session_01USyifc9ZK6Cy5hAmKKy2ok

@dokploy-2026-03-01-6ei3s7

dokploy-2026-03-01-6ei3s7 Bot commented Jul 7, 2026

Copy link
Copy Markdown

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
cdp-browser-app ✅ Done Preview URL 2026-07-07T11:28:17.671Z

@duongdev duongdev merged commit f47a92f into main Jul 7, 2026
3 checks passed
@duongdev duongdev deleted the feat/t101-electron-notification-channel-mutes branch July 7, 2026 11:31
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