Stop the audit capability probe from scanning the whole store - #3109
Open
ramonsmits wants to merge 2 commits into
Open
Stop the audit capability probe from scanning the whole store#3109ramonsmits wants to merge 2 commits into
ramonsmits wants to merge 2 commits into
Conversation
ramonsmits
force-pushed
the
ramon/audit-capability-probe
branch
from
September 7, 2026 12:40
24281e9 to
9a216ca
Compare
The very-long query on first view access was not the message list (which is bounded by the default time range) but the hasSuccessfulMessages capability probe: an UNBOUNDED sorted query over the whole audit index, re-fired every 5 seconds by the platform-capabilities poll. It now probes the last 7 days first, falls back to unbounded only when that window is empty, and stops querying entirely once successful messages have been seen — they don't un-exist.
The 'no successful audit messages' onboarding banner and dashboard card assumed 'no messages' by default (the flag started false) and un-rendered once the probe proved otherwise — on large stores that meant minutes of a wrong onboarding prompt, and on every fresh session a flicker. hasSuccessfulMessages is now tri-state: null (not yet determined), false (a completed probe found nothing), true. While unknown the auditing capability reports a new Checking status: the All Messages banner renders nothing and the dashboard card shows its loading overlay. A failed probe proves nothing about the data, so it leaves the state unknown and the next tick retries instead of claiming 'no messages'.
ramonsmits
force-pushed
the
ramon/audit-capability-probe
branch
from
September 7, 2026 15:46
9a216ca to
b34c47b
Compare
johnsimons
approved these changes
Sep 8, 2026
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.
Stacked on:
Two bug fixes for the
hasSuccessfulMessagescapability probe, found while profiling the slow first load of All Messages on a large store.false, so the Messages indicator claimed "not configured" until the (minutes-long) probe proved otherwise. The flag is now tri-state and the indicator only renders after a completed probe; a failed probe proves nothing and leaves the state unknown for the next tick.Depends on the picker PR only for the bounded default range the probe's tests assume.