NexFlow 1.5.0 — 看得見執行中,修好兩個安靜的失敗 - #9
Merged
Merged
Conversation
Three user reports, one theme: the app was doing the right thing without saying so, or failing without saying so. Running flows are now visible wherever the user looks. The card badge was a three-second timer armed by the Run button alone, so a swipe, an alarm, a geofence or a widget tap lit nothing, while a run blocked by a missing permission lit anyway. Its source is now the engine's own set — the same state that drops overlapping runs, so it cannot drift from what is really executing. The ongoing notification names the flow instead of saying "automation is active", and long-pressing the master switch lists everything in flight. A flow that finishes in 30ms is held on screen for 900ms, because an indicator that appears and vanishes inside one frame is indistinguishable from nothing having happened. Scheduled flows ran late because SCHEDULE_EXACT_ALARM was declared in the manifest and never requested. For a targetSdk 33+ app it is denied by default on a fresh install, so the scheduler fell back to an inexact alarm the system batches into a Doze maintenance window — the documented guarantee there is "within one hour". Devices upgraded from an older version keep the permission, which is why the same build was fine for some users and ten minutes late for others. TIME triggers now report it like any other missing permission, and a receiver re-schedules on grant: precision is fixed when an alarm is set, so without that step the alarms already in flight stay late. NFC was hijacked device-wide whenever the app was open. enableReaderMode is exclusive and FLAG_READER_SKIP_NDEF_CHECK disables NDEF dispatch outright, and onResume enabled it unconditionally — so a URL tag opened nothing and a transit card did nothing, even for users with no NFC flow at all. Reader mode now has one owner and is held only while an enabled NFC flow could use it or a config screen is waiting for a tap. The manifest TAG_DISCOVERED filter goes with it: it is the dispatch system's last resort, which made NexFlow the catch-all for every tag no other app claimed, and it is deprecated as of API 37. Also fixes the volume action summary, which still read the pre-1.4.0 `level` key and rendered every volume action — new ones included — as "Media: ?". Verified on device (XQ-AT52): reader mode off with the app foregrounded and on only during a scan, the card badge lighting from a swipe-triggered run, and the notification naming the flow. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
三則使用者回報,同一個主題:App 做對了事卻沒說,或是失敗了也沒說。
執行中的流程看得見了
卡片右下角的指示器原本是「按下執行鈕才亮三秒」的計時器。所以側滑執行、時間到、地理圍欄、小工具啟動的流程一律不亮;而被權限擋下、根本沒開始的執行反而亮著。
現在它讀的是引擎自己用來擋重複執行的那份狀態——同一份,不是複本,所以不會和真正在跑的東西走樣。常駐通知會說出流程名稱,長按右上角的閃電會列出全部執行中的流程。
執行極快的流程會至少顯示 0.9 秒:三十毫秒跑完的流程是使用者真的要求過的一次執行,但指示器在一個影格內閃掉,和什麼都沒發生分不出來。
排程晚十分鐘
SCHEDULE_EXACT_ALARM在 manifest 裡宣告了,但沒有任何一處程式碼向使用者要過它。targetSdk 33+ 的 App 全新安裝時這個權限預設是拒絕的,於是排程器安靜地退回不精確鬧鐘,被批次進 Doze 維護視窗——官方對不精確鬧鐘的保證是「一小時內」。從舊版升級上來的裝置會保留已授予的權限,這是為什麼同一版有人正常、有人遲到。
TIME 觸發器現在會像其他權限一樣回報缺少,並在使用者授權時重排鬧鐘——精度是排定當下決定的,沒有這一步,已經排好的鬧鐘會繼續遲到。
NFC 被整支手機獨占
enableReaderMode是獨占且全裝置生效的,FLAG_READER_SKIP_NDEF_CHECK更直接關掉 NDEF 分派,而onResume無條件開啟它。結果是只要 NexFlow 開著,感應網址標籤不會開瀏覽器、感應交通卡沒反應——即使使用者一個 NFC 流程都沒有。reader mode 現在只有一個持有者,且只在「有啟用中的 NFC 流程可能會用到」或「設定頁正在等使用者感應」時才佔用。manifest 的
TAG_DISCOVERED攔截一併移除:它是分派的最後手段,等於讓 NexFlow 成為所有其他 App 都不處理的標籤的萬用接收者,而且在 API 37 已被標為 deprecated。順帶
音量動作的摘要仍在讀 1.4.0 之前的
level鍵,所有音量動作(包括新版存的)都顯示成「媒體:?」。驗證
lintGithubDebug+lintPlayDebug全數通過mEnableReader: false、掃描時true、關閉後回到false;側滑執行點亮卡片指示器;通知顯示「正在執行:<流程名稱>」實機驗證只用了既有的暫時測試流程,沒有啟用、執行或儲存任何既有流程。
🤖 Generated with Claude Code