Repository navigation
Close one notification per click on the ✕, and hold it to keep closing - #21149
Open
TripleU613 wants to merge 3 commits into
Open
TripleU613 wants to merge 3 commits into
TripleU613 wants to merge 3 commits into
Conversation
Clicking the close mark several times in a row opened notifications instead of closing them. A closing card stops taking clicks while it animates out, and the card behind slides up under the still pointer. Its close mark only took clicks once the card counted as hovered, and cards of different heights put it somewhere else, so the next click landed on the card's body and ran its default action: a crash report's "diagnose with AI", a chat, a browser tab. The deck now takes presses on a close mark itself, so they never depend on which card has caught up with the pointer. Closing a card by hand also starts a short run, 1.5 seconds from the last close, in which any press on the deck closes the card under it and none opens one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H3rUWsUNFG2yjZkawc3k6X
Clearing a pile of notifications took a click each. Held down, the close mark now keeps closing cards, the first after a pause so a click stays a single close, then a little faster each time until the button comes up. The mark also grows under the pointer, so it is an easier target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H3rUWsUNFG2yjZkawc3k6X
Contributor
[Medium impact] The PR appears safe to merge, with a non-blocking gap in automated hold/release coverage. Findings
SummaryThe PR moves close presses to the notification deck, adds hold-to-close, and enlarges the close mark on hover.
|
Greptile asked for regression coverage of the close routing and the hold repeat. The decisions move out of the deck's MouseArea into service functions, closeTargetFor and nextHoldInterval, which the notification logic suite now runs: a body press opens outside a run and closes inside one, a press between cards mid-run closes the newest live card, cards on their way out are skipped, and a held mark speeds up to 25 ms. With the run check removed, the suite fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01H3rUWsUNFG2yjZkawc3k6X
1 task done
Contributor
Contributor
Author
|
Close what? |
Contributor
Author
|
@chessing234 #21235 was closed without merging (the maintainers asked for each change on its own instead of in a bundle), so this PR stays open as the individual change for the close mark. It's mergeable on |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changes
Bug: clicking a notification's ✕ several times in a row opens notifications instead of closing them. It's at its worst with a pile of crash reports: each stray click runs "diagnose with AI" and opens an agent window.
Here's why:
Fix (first commit): the deck now takes presses on a ✕ itself, so a close never depends on which card has caught up with the pointer. Closing a card by hand also starts a short run, 1.5 s from the last close, in which any press on the deck closes the card under it and none opens one. Outside a run, a click on a card's body opens it as before.
Enhancement (second commit):
The 1.5 s run is the one behaviour change outside the ✕: right after a close, a click on a card closes it rather than opening it. That's deliberate, because those clicks are almost always a burst of closes. The two commits are independent, and I'm happy to split the enhancement into its own PR.
Verification
test/shell.d/notifications-test.shpasses.quattro: a scratch copy of the shell ran in a private nested Hyprland, parked off-screen, with its own D-Bus session. A virtual pointer (zwlr_virtual_pointer_v1) clicked in it.notify-send -A default --wait, and invoking the default action opened a terminal window. Both runs got the same input: six clicks on the top card's ✕, 140 ms apart, then a 2.6 s press-and-hold.quattro): 5 of 10 opened a window, and 5 closed.quattro, verified only by the headless runs above.Screenshots
Same input in both. Click a card's body and it opens a terminal titled after the notification.
Before (
quattro): the clicks meant for ✕ open five windows.After: six clicks close six cards, then the hold clears the rest. Nothing opens.
MP4s: before · after
🤖 Generated with Claude Code
https://claude.ai/code/session_01H3rUWsUNFG2yjZkawc3k6X