-
Notifications
You must be signed in to change notification settings - Fork 18
feat(desktop): dock bounce, mark-as-read toggle, and bulk mark-all-read #753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wpfleger96
merged 9 commits into
main
from
worktree-wpfleger+notification-ux-improvements
May 27, 2026
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
88632a8
feat(desktop): add dock bounce, mark-as-read toggle, and bulk mark-al…
wpfleger96 b8808e9
fix(desktop): address code review findings for notification UX
wpfleger96 6f27cf3
fix(desktop): use document.hasFocus() for bounce gate, add unread cha…
wpfleger96 d0b9fe0
test(desktop): update badge count expectation for combined unread signal
wpfleger96 228cb7f
fix(desktop): scope unread tracking and bounce to member channels only
wpfleger96 97ab089
test(desktop): capture badge baseline to isolate home-badge assertions
wpfleger96 86739fa
fix(test): correct badge offset — mock feed item doesn't create chann…
wpfleger96 b372339
fix(desktop): respect desktop-alert toggle before requesting dock bounce
wpfleger96 df6d1d5
Merge branch 'main' into worktree-wpfleger+notification-ux-improvements
wpfleger96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| import * as React from "react"; | ||
|
|
||
| import { hasPrimaryShortcutModifier } from "@/shared/lib/platform"; | ||
|
|
||
| export function useMarkAsReadShortcuts({ | ||
| activeChannelId, | ||
| activeChannelLastMessageAt, | ||
| markAllChannelsRead, | ||
| markChannelRead, | ||
| selectedView, | ||
| }: { | ||
| activeChannelId: string | null; | ||
| activeChannelLastMessageAt: string | null | undefined; | ||
| markAllChannelsRead: () => void; | ||
| markChannelRead: ( | ||
| channelId: string, | ||
| lastMessageAt: string | null | undefined, | ||
| ) => void; | ||
| selectedView: string; | ||
| }) { | ||
| React.useEffect(() => { | ||
| function handleKeyDown(event: KeyboardEvent) { | ||
| if (event.key !== "Escape") return; | ||
| if (event.defaultPrevented) return; | ||
| if (hasPrimaryShortcutModifier(event) || event.altKey) return; | ||
|
|
||
| if (event.shiftKey) { | ||
| event.preventDefault(); | ||
| markAllChannelsRead(); | ||
| return; | ||
| } | ||
|
|
||
| if (selectedView === "channel" && activeChannelId) { | ||
| event.preventDefault(); | ||
| markChannelRead(activeChannelId, activeChannelLastMessageAt ?? null); | ||
| } | ||
| } | ||
|
|
||
| window.addEventListener("keydown", handleKeyDown); | ||
| return () => { | ||
| window.removeEventListener("keydown", handleKeyDown); | ||
| }; | ||
| }, [ | ||
| activeChannelId, | ||
| activeChannelLastMessageAt, | ||
| markAllChannelsRead, | ||
| markChannelRead, | ||
| selectedView, | ||
| ]); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.