Skip to content

omamobile-shell: handle failed notification dismissal - #468

Open
marselnenaj wants to merge 1 commit into
derekross:mainfrom
marselnenaj:fix/notification-dismiss-acknowledgment
Open

marselnenaj wants to merge 1 commit into
derekross:mainfrom
marselnenaj:fix/notification-dismiss-acknowledgment

Conversation

@marselnenaj

@marselnenaj marselnenaj commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

When a per-row dismissal IPC fails, immediately restore that notification and
show an error instead of leaving it hidden until the 15-second grace expires.
Keep each queued row identity through completion and continue processing later
rows after a failure. Clear the error when the shade closes.

ok means that the service accepted the request, not that its asynchronous
file write has completed. Accepted requests remain hidden during the existing
grace period. One concrete failure is an Omarchy update where mobile patch0019
was not applied: the missing forget method exits nonzero and the row now
returns immediately with an explanation.

Validation: eight actual-function/callback cases, including queue order,
failed/missing acceptance and closing the shade while a request is pending.
The offscreen render uses the actual QuickSettings component with the error
set, inert backends and an isolated home; it is not a phone screenshot.

Device evidence: Pixel9ProXL (komodo), kernel
7.3.0-rc6-omamobile-komodo-gnss-km4. A read-only smoke test on the existing
4.5 installation passes all required checks; Bluetooth retains a prior failed
unit/no-controller state. The phone has related private fixes, so this is not
an exact revised-head package test. Real multi-notification swipe acceptance
and an isolated package-head smoke report remain outstanding.

Package version remains a proposal for the maintainer to set at merge.

Current mixed-installation smoke report.

Offscreen notification error header

Protocol compatibility: the 4.5 service in #471 accepts a well-formed already-absent key as an idempotent ok. An already-gone row therefore does not trigger a false dismissal error; malformed keys remain rejected.

The remaining physical acceptance is a Pixel 7 Pro on Omarchy 4.0.6 with this head installed as a package and several notifications swiped away consecutively. The current mixed 4.5 smoke report cannot exercise that legacy reader path. The maintainer has offered to perform the 4.0.6 phone run.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @marselnenaj. This is a good catch. Main throws away both the exit status and the reply, and keeping the row's identity through the request is the right fix. Your test runs the real functions out of QuickSettings.qml, and it passes here and fails against main, as you say.

One thing about the wording: Omarchy's forget (our patch 0019) queues the file delete and answers ok right away, so ok means "request accepted", not "deleted". Your code already handles that well, because it keeps the row hidden after ok and the 15-second grace still covers a delete that never lands. Could the description and commit message say "accepted"? It would also help to say when this actually fails. The realistic case is an Omarchy where patch 0019 didn't apply after an update. qs ipc then has no forget and exits non-zero, and with your change the row comes back at once, with a reason, instead of after 15 seconds.

A few things before I can merge:

  • A human author. The commit is authored as Codex <codex@local.invalid>. Please put your own name and email on it and credit the tool with a Co-Authored-By: trailer (CONTRIBUTING §6).
  • A smoke report from a phone running this head as a package, with a few notifications swiped away in a row, per CONTRIBUTING §6.5.
  • A screenshot of the new header. An offscreen shot from test/quicksettings-render with notificationDeleteError set is fine, since the failure is hard to cause on a working phone.

A suggestion: right now the message stays until the next successful dismissal, so it can sit in the header for the rest of the session. Clearing it when the shade closes, or after a few seconds, would feel more natural.

I'll approve the CI run, and I'll set the shell version myself at merge, since several PRs are open at 0.2.101.

Keep the row identity until the service accepts each forget request.
A missing IPC method after an update restores the row immediately and
reports the failure; acceptance still uses the existing grace while the
file delete is pending. Continue queued rows after a failure and clear
presentation errors when the shade closes.

Eight actual-function/callback cases cover acceptance, failures, queue
order and close behavior. The offscreen error header fits its bounds.

Co-Authored-By: Codex <codex@openai.com>
@derekross

Copy link
Copy Markdown
Owner

Thank you, @marselnenaj. The rework reads well. "Accepted" is the right word now, the row keeps its key through the request, a failure no longer stops the queue, and clearing the message when the shade closes is a nice touch. The offscreen shot shows the header fitting, too.

What's left is the phone run. Your report is honest about it: it's your 4.5 install with private changes, and main's shade can't even see 4.5's notifications, so that phone can't exercise this path. Phones ship Omarchy 4.0.6, so the run that counts is a 7 Pro on 4.0.6 with this head installed as a package and a few notifications swiped away in a row. I'm travelling this week, so I'll do it when I'm back, unless you have a 4.0.6 phone to hand before then.

One thing to settle while you're in both PRs: on 4.0.6, forget answers ok for any well-formed name, but your 4.5 port in #471 answers none for a key it doesn't know. So on 4.5, a row that disappeared between the shade's last read and the swipe would bring up "Couldn't dismiss notification" though nothing went wrong. Treating none as "already gone" here, or having the 4.5 forget answer ok for a key that's already gone, would fix it. Use whichever you prefer.

I'll approve the CI run, and I'll set the shell version at merge.

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