Repository navigation
omamobile-shell: wait for notification deletion acknowledgments - #533
marselnenaj wants to merge 3 commits into
Conversation
…ification store The review of derekross#471 found that the bar's unread count and the quick-settings shade read Omarchy 4.0's notification files (one <timestamp>-<id>.json per notification under ~/.local/state/omarchy/notifications/ and history/), which Omarchy 4.5 no longer writes: its Store.js keeps live.json (toasts on screen) and history.json (closed rows, newest first, 100 over 24 hours), one JSON array each, rows named by a key with `ts` in seconds, and its migration 1792648436 deletes the 4.0 files. On 4.5 the shade would show nothing, the badge would never count, and Clear all would call a `clear` that 4.5 lacks. Both layouts are now read, chosen by what exists, not by version: where history.json exists the shade reads live.json and history.json, and Clear all is dismissAll followed by `forget <key>` for every notification read (the 4.5 version of patch 0019 in derekross#471 takes the key); the bar counts history.json rows newer than the shade's mark, watching the file and re-reading it every 30 s, since the service replaces it with rename(2). Without history.json, every command and count is the one 0.2.101 runs. Tested: test/all (the offscreen touch tests included); new rows in test/notifications-model.js and test/status-model.js in 4.5.0-3's format, made by its own Store.js; test/notifications-store.sh runs the shade's read and Clear all commands from QuickSettings.qml on both layouts with a fake qs; test/quicksettings-render now draws the light theme over 4.5 files and checks that all three rows show (run in a sandbox like the OWL container, with Omarchy 4.0.6's shell: 3 rows on both layouts; main's plugin shows 0 on 4.5). Mutations of each new branch fail a test. Not run on a phone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you, @marselnenaj. Waiting for the service to confirm before a row disappears is the right behaviour, and the details are careful: the strict reply format, one I have to hold it for now, for three reasons:
A question: on 4.0.6 a successful Two small things: |
Keep notification rows until the daemon acknowledges logical deletion. Use its keyed snapshot on 4.5 and hide only the pre-call visible snapshot on a successful legacy clear, retaining arrivals and every failure. Disable swipes during Clear all and restore interrupted or refused rows without waiting for a store refresh. Keep the two-tap clear confirmation and fixed single-forget argv. Require the separate provider capability. The actual source/IPC model and both-layout tests pass. Eleven offscreen Qt entries exercise the real row, including rejected/interrupted swipes; the published parent fails the same refused-forget assertion. Package version allocation and physical tests remain for the maintainer. Co-Authored-By: Codex <codex@openai.com>
cf2b53b to
bd78620
Compare
|
Thank you for the precise review. I prepared the provider as its own six-file follow-up on the corrected #471 head, with 0.1.40 provisional after its 0.1.39 parent. Both complete provider suites pass against the genuine 4.0.6-1 and 4.5.0-3 packages. The separate provider PR is #585: #585. The legacy path now captures the visible keys before Clear all starts and hides only that snapshot after a successful legacy reply. An arrival during the call stays visible; failure retains all rows. Clear all disables row swipes and restores an interrupted fly-off, and a late refusal restores the row without waiting for a refresh. A direct busy request also reports an error. The two EOF blank lines are removed. Eleven source/IPC cases and eleven real Qt entries pass, including the refused/interrupted swipe cases. The published parent fails the same Qt refusal assertion and legacy-snapshot assertion. The existing model and both-layout tests, QML parse, policy and consumer whitespace checks pass. Understood on the order: #471, #585, #482, then this consumer retargeted to main and rebased after #482's squash. I left final shell version allocation for merge; main is now at 0.2.108. These changes have not been installed on a phone, so the requested public-provider device tests remain outstanding. |
|
Thank you, @marselnenaj. The legacy Clear all now does what I asked: it remembers the rows that were up, hides exactly those on success and keeps a late arrival. The provider is open as #585, the blank lines are gone, and a refused swipe no longer leaves an invisible row. I ran your eleven source cases and the eleven Qt entries, and the whole shell suite on main plus #482 plus this commit: 307 ok, nothing failed or skipped. One problem came in with the new restore, and I'd like it fixed before this goes further. In
Could you separate the two reasons? For example a The order hasn't changed: #471, #585, #482, then this one. #482 lands as a squash, so afterwards please retarget to main and The phone runs are still to come, and the 4.0.6 one is mine: on my Pixel 7 Pro I'll try a swipe, a swipe followed by a scroll, three quick swipes, a swipe while the shade refreshes, Clear all, and Clear all with a notification arriving. The 4.5 path needs a phone on 4.5 with #585 installed; I've asked on #585. |
Separate Clear all cancellation from the gate that inhibits new swipes during a scroll. A row already flying off or awaiting its deletion reply stays folded when the list moves. Restore only the matching accepted row when the actual asynchronous forget IPC is refused. Keep other queued rows folded and continue their requests. Exercise the production callbacks and actual Qt row for immediate scrolling, pending replies and keyed refusal; the old implementations fail the new regressions. Co-Authored-By: Codex <codex@openai.com>
|
Thank you for reproducing both scrolling cases. I separated I also reproduced an existing asynchronous refusal problem: a locally accepted row stayed folded after the service IPC failed if the next read retained the same delegate. The actual failure callback now emits the rejected key, and only its matching accepted row restores. A second queued row stays folded and proceeds normally. The real Qt harness covers immediate scrolling, dragging while a reply is pending, and both refusal cases using the actual production queue/completion/read callbacks. The old implementations genuinely fail the regressions. The new source callback suite passes 12 cases, and the combined Qt harness passes 17 entries without skips. I have kept #482 as the parent and left package version allocation to you. The exact revised-head phone acceptance is still outstanding. The complete shell package suite also passes on this exact revised source (374.77 seconds, no resource stop). Independent source review and the commit-range policy gate pass. |
|
Thank you, @marselnenaj. The scrolling problem is fixed the way I hoped: I found one more thing with a probe, and I'd like it fixed before I take this to my phone. I used your refusal fixture with the production callbacks, swiped row 0 and then row 1, and answered
Two small things: the error line is only cleared by a later success, so "Wait for Clear all to finish" can sit there after it has finished; clearing it when the shade opens would be enough. The order is unchanged: #585 (waiting for its run on a 4.5 phone), then #482, which I need to rebase onto main first, since it conflicts now. That one is on me. Then this, retargeted to main with |
9783a78 to
e6a2020
Compare
Keep notification rows until the daemon accepts their deletion requests. Keyed Clear all uses one provider-owned snapshot and hides only acknowledged keys; legacy Clear all hides only the rows captured before its call. Notifications arriving afterwards remain visible.
Scrolling now only inhibits new swipes. A row already flying off or awaiting its reply stays folded when the list moves. Clear all cancels only a swipe whose request has not yet been accepted. If the asynchronous single-forget IPC fails, its keyed refusal signal restores only the matching accepted row, while other queued rows remain folded and continue normally. The existing two-tap confirmation and fixed IPC argv remain.
This remains stacked on #482 and requires provider #585. #471 is merged; the remaining order is #585, #482, then this consumer. After #482 is squash-merged, retarget to main and rebase only this consumer contribution. Package version allocation remains with the maintainer.
Validation: 12 actual-production callback cases and 17 real offscreen Qt entries pass without skips. The Qt fixtures cover swipe then immediate scroll, dragging while a reply is pending, Clear-all cancellation, and asynchronous refusal with the same delegate retained and another request queued. The prior implementations genuinely fail the regression assertions. Independent review and the complete shell package suite pass on the revised source (374.77 seconds), as do policy and whitespace checks.
The exact revised-head 4.0.6 and 4.5 phone acceptance remains outstanding. The maintainer is handling the legacy phone run; the 4.5 path requires the provider from #585.
Policy,
tests/alland every package suite pass in GitHub Actions.