Skip to content

All Messages view no longer disabled during slow queries - #3105

Merged
ramonsmits merged 5 commits into
masterfrom
ramon/audit-query-ux
Sep 10, 2026
Merged

ramonsmits merged 5 commits into
masterfrom
ramon/audit-query-ux

Conversation

@ramonsmits

@ramonsmits ramonsmits commented Sep 3, 2026 •

Copy link
Copy Markdown
Member

Stacked on:

Five fixes that make the All Messages view behave when queries are slow (large audit stores):

  • Actionable feedback on failure: a failed or timed-out query showed a silent empty list (the error died as an unhandled watcher rejection). It now shows an alert explaining the instance might be too busy, with concrete suggestions. Pairs with the server-side query time limit in Terminate message queries that exceed a configurable time limit ServiceControl#5848.
  • Controls never lock: the filter inputs were disabled while a query ran — causing the type-one-character-lose-focus bug and locking users out for the duration of a slow query. Entering a new query is now always possible.
  • New queries supersede in-flight ones: starting a query aborts the one still running (the abort propagates through ServiceControl and terminates the database-side query) instead of silently dropping the new request; a superseded response can no longer overwrite newer results.
  • Auto-refresh cooperates with slow queries: a tick landing mid-query no longer disappears and does not cancel the running query — it refreshes as soon as the results are in. A countdown bar shows when the next refresh is due.
  • Typed searches always start: a search entered while the initial query was still running was silently ignored.
  • Existing results stay visible and usable while a re-fetch runs: since Messages view does not indicate that it is waiting for a response from ServiceControl #3047 every re-fetch covered the list with a white overlay, which flashed on every auto-refresh tick and made the rows unreachable while waiting. That overlay existed because nothing could cancel a running query at the time; with cancel and supersede in place the refresh button is the only activity indicator, and the plain spinner remains only when there is nothing to show yet.
  • Leaving the view stops its activity: navigating away aborts the in-flight query and releases the auto-refresh registration. It also clears the results: the rows live in the store, which outlives the view, so re-entering it used to show the previous visit's rows under the first-load spinner. A refresh in place keeps stale rows; coming back with possibly different inputs starts from a clean list.

Related:

@ramonsmits ramonsmits added the Improvement Improvement label Sep 3, 2026
@ramonsmits ramonsmits added this to the 2.11.0 milestone Sep 3, 2026
Base automatically changed from ramon/audit-single-refresh to master September 4, 2026 12:08
@jpalac jpalac modified the milestones: 2.11.0, 2.12.0 Sep 6, 2026

@johnsimons johnsimons left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramonsmits I noticed that there is some extra repainting going on. It seems to redraw the whole screen.
Here is a comparison of the before (left) and after (right), using both Chrome and Safari.

Sep-07-2026.17-26-35.mp4

But overall looks good, although I am not sure about the countdown progress bar. I think I would prefer a text, and quite possible that would also be better for screen reader if we do efven support them!

@ramonsmits

Copy link
Copy Markdown
Member Author

@ramonsmits I noticed that there is some extra repainting going on. It seems to redraw the whole screen. Here is a comparison of the before (left) and after (right), using both Chrome and Safari.

Good find ♥️! Interesting.. that needs a bit of digging :-)

although I am not sure about the countdown progress bar. I think I would prefer a text, and quite possible that would also be better for screen reader if we do even support them!

True, that bar isn't there anymore. It is now an animation within the refresh button.

However, due to the stacked PRs that isn't visible here.

@johnsimons johnsimons left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am approving this becasue I know quite a few other changes have been done in the next PRs

… out

ServiceControl now terminates audit queries that exceed the configured
query time limit. Previously any failed query left the view silently
empty (the error became an unhandled watcher rejection). The store now
records the failure and the view shows an alert explaining that the
instance might be too busy, with concrete suggestions: retry off-peak,
reduce the maximum results, or narrow the date range.
The filter inputs were disabled while a query ran, which lost the
focus after one typed character and locked users out for the duration
of a slow query; every re-fetch also covered the list with a white
overlay (#3047), so on every auto-refresh tick the rows flashed and
became unreachable.

The controls now stay enabled; starting a query aborts the one still
in flight (the abort propagates through ServiceControl and terminates
the database-side query) instead of silently dropping the new request,
and a superseded response can no longer overwrite newer results. A
re-fetch over existing rows leaves them visible and usable until the
new results replace them; the plain spinner remains only when there is
nothing to show yet.
…tdown

When the auto-refresh period is shorter than the query duration, a tick
that lands mid-query no longer disappears: the running query is left
undisturbed (not cancelled) and the refresh runs as soon as its results
are in.

A thin countdown bar under the refresh controls now depletes towards
the next auto refresh, and pulses while a due refresh is waiting on a
running query, so it is always visible when the view will update.
The controls watcher bailed out during the first load, so a search typed
while the initial (possibly minutes-long) query was still running was
silently ignored: nothing was pushed to the route, the running query was
not superseded, and no new query started.

The first-load bail-out is replaced with an idempotence check: the
watcher only pushes when the controls differ from the state the route
last applied, which both suppresses the mount-time watcher replay the
old guard was protecting against and lets a real user change through at
any time.
Navigating away aborts the in-flight query (server-side included) and
releases the auto-refresh registration, so a backgrounded view keeps no
load on the server. The rows live in the store, which outlives the
view, so coming back showed the previous visit's rows under the
first-load spinner; the store now forgets the results, the total and
any failure when the view is left, and the next visit starts from a
clean list.
@ramonsmits
ramonsmits merged commit ca79186 into master Sep 10, 2026
5 checks passed
@ramonsmits
ramonsmits deleted the ramon/audit-query-ux branch September 10, 2026 09:55
@ramonsmits ramonsmits changed the title Keep All Messages usable during slow queries All Messages view no longer disabled during slow queries Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Improvement Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants