Skip to content

Open notifications on click, faster wheel scroll, and xdg-open for links - #9

Closed
AnthonyPoschen wants to merge 5 commits into
robzolkos:mainfrom
AnthonyPoschen:fix/mark-notification-read-on-open
Closed

Open notifications on click, faster wheel scroll, and xdg-open for links#9
AnthonyPoschen wants to merge 5 commits into
robzolkos:mainfrom
AnthonyPoschen:fix/mark-notification-read-on-open

Conversation

@AnthonyPoschen

Copy link
Copy Markdown
Contributor

What

Three UX fixes, tested on a live Omarchy bar against this fork:

  1. Clicking a notification opens it and marks it read. Opening a row used to leave the Octocat lit until the next poll. Mark-as-read is queued if a refresh is already running, the row hides immediately, and in-flight fetches cannot restore it. The URL is snapshotted before the row is removed so the browser still launches. The check button and m still mark without opening.
  2. Mouse wheel moves about one row per notch. Flickable on Wayland was applying a 1–2px pixelDelta, and a WheelHandler only steals that event if it is a direct child of the Flickable.
  3. Links open with xdg-open. omarchy-launch-browser starts a new uwsm unit on every click, which Brave/Chromium often turn into a window. Inbox links only need a tab in the existing browser. Super+Shift+B is unchanged.

Why

Clicking a notification felt like GitHub’s inbox should: see it, open it, clear the alert. Wheel travel and new windows were the other daily papercuts.

Notes

  • Check button / m: mark only.
  • Row click / Enter: open, then mark (notifications only for the mark).
  • Source tests in tests/panel-source-test.sh and tests/service-source-test.sh cover the new paths.

Opening a notification only launched the browser. Mark-as-read was
also ignored while a refresh was running, so the bar stayed alarming
until the next poll.

Hide the thread immediately, queue the GitHub PATCH if a fetch is in
flight, and keep an in-flight refresh from restoring it.

Validation:
- tests/panel-source-test.sh
- tests/service-source-test.sh
- tests/helper-test.sh

Assisted-by: Grok/Grok 4.6
Wayland mice often report a fake 1–2px pixelDelta alongside a real
notch. Flickable preferred the pixel value, so the panel crawled.

Use pixel scrolling only when it looks like a touchpad, and move about
one row per accumulated 120° notch otherwise.

Validation:
- tests/panel-source-test.sh
- tests/service-source-test.sh
- tests/helper-test.sh

Assisted-by: Grok/Grok 4.6
The handler lived on PanelKeyCatcher, so Flickable kept Qt's default
1–2px Wayland wheel distance and the faster step never ran. Handle
wheel as a direct Flickable child, move one row per mouse notch, and
scale touchpad pixel deltas.

Validation:
- tests/panel-source-test.sh

Assisted-by: Grok/Grok 4.6
hideNotification destroyed the row immediately, so the click handler
read an empty URL and skipped the browser launch. Snapshot the target,
open it, then mark the thread.

Validation:
- tests/panel-source-test.sh
- tests/service-source-test.sh
- tests/helper-test.sh

Assisted-by: Grok/Grok 4.6
omarchy-launch-browser starts a new uwsm unit on every click, which
Brave often turns into a window. Hand the URL to the existing browser
so it opens as a tab. Private-window and Hyprland focus helpers are
not needed for these links.

Validation:
- tests/panel-source-test.sh

Assisted-by: Grok/Grok 4.6
@robzolkos

Copy link
Copy Markdown
Owner

Thanks for this — the notification behaviour here is exactly right, and the diagnosis on both the mark-as-read race and the Wayland wheel delta was sharper than the reports that prompted them.

I've combined this with #7 and merged it in #10. Four of your five commits are in main unchanged, with your authorship intact:

  • f142623 mark notifications read when opened
  • 4f171d9 open a notification before marking it read
  • 1f17008 scroll the dashboard one row per wheel notch
  • 1af291e steal wheel events from the dashboard Flickable

I merged rather than squashed specifically so those stayed yours.

The one I dropped is open GitHub links with xdg-open. Your reasoning about omarchy-launch-browser spawning a uwsm unit per click is correct — that's a real problem, and you and #7 hit it independently. But #7 solved it in the opposite direction, opening links in a dedicated Chromium app window via omarchy-launch-webapp, and having run both on my own bar that's the behaviour I want: GitHub in its own window rather than another tab in an already-crowded browser. That's a preference call on my part, not a defect in your patch. If you feel strongly about the tab behaviour, open an issue and let's talk about it — it'd want to be a setting rather than a swap.

One thing worth flagging since it came out of your branch: the assert_not_contains helper in tests/panel-source-test.sh was defined in the xdg-open commit, so dropping that commit took the helper with it — and the suite still passed, because the only assertions using it went at the same time. I've added it back with assertions for the launcher the panel actually calls.

Closing as merged via #10.

@AnthonyPoschen

AnthonyPoschen commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

the reason i wanted xdg-open is because i have the habbit of closing the tab once it is done and never build up the list of tab's, i can see the appeal of your way ill give it a go by changing my habbits. Maybe launch web-app will feel good who knows.

Would definetly be good if you get time to make a right click settings panel with a bunch of relevant config where this could be one of the toggle items.

@robzolkos

robzolkos commented Aug 24, 2026

Copy link
Copy Markdown
Owner

hey @AnthonyPoschen will do. Expect it shortly.

robzolkos added a commit that referenced this pull request Aug 24, 2026
A gear button in the panel header flips the card to a settings page
carrying the open-links behaviour, repository scope, refresh interval,
and the archived, forked, and unlit-icon toggles.

Open links returns as a setting rather than a hardcoded launcher, so
machines without a Chromium-based browser can go back to a browser tab.

Settings are written to the widget's entry in shell.json through
updateEntryInline, which replaces the entry whole, so every persist
merges the current settings forward first.

Asked for in #9.
@robzolkos

Copy link
Copy Markdown
Owner

@AnthonyPoschen this is done and on main#11.

There's a gear button in the panel header now that flips to a settings page with Open links, Repository scope, Refresh interval, and toggles for keeping the bar icon unlit and including archived and forked repositories. So if the web app window doesn't win you over, you can put it back on a browser tab without touching the CLI — which was the outcome your xdg-open commit was after in the first place.

One difference from what you described: you asked for right-click, and I went with a header button. Right and middle click on the Octocat are already Refresh, and moving a binding people have in their fingers seemed the worse trade. It also keeps this widget consistent with the settings view in the Omarchy HEY plugin. If the gear proves hard to find, right-click is easy to add as a second route — say the word.

Thanks again for both the fixes and the suggestion.

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