From ff14381a4495ab3be85a7a8e23404cbb47410459 Mon Sep 17 00:00:00 2001 From: herley Date: Sun, 29 Mar 2026 09:27:31 +0700 Subject: [PATCH] fix: prevent audit log view from shaking on periodic refresh (#5134) The audit log view visually "shakes" on the right side every 5 seconds when the periodic refresh triggers. This happens because fetchAuditevents() unconditionally sets isLoading=true on every poll cycle, which causes the loading spinner overlay (an absolutely positioned element with h-screen height) to be added and removed from the DOM. This DOM insertion can trigger a brief scrollbar appearance/disappearance, resulting in a horizontal layout shift perceived as shaking. The fix only sets isLoading=true when there are no events loaded yet (initial load or after a filter change clears the list). Subsequent periodic refreshes with existing data skip the loading state entirely, eliminating the DOM churn that causes the layout shift. This is consistent with the user experience expectation: a loading indicator is useful when there is no data to show, but unnecessary when silently polling for updates behind already-visible content. --- .../src/main/frontend/views/instances/auditevents/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-admin-server-ui/src/main/frontend/views/instances/auditevents/index.vue b/spring-boot-admin-server-ui/src/main/frontend/views/instances/auditevents/index.vue index 08374eda73a..8e38208ced4 100644 --- a/spring-boot-admin-server-ui/src/main/frontend/views/instances/auditevents/index.vue +++ b/spring-boot-admin-server-ui/src/main/frontend/views/instances/auditevents/index.vue @@ -148,7 +148,7 @@ export default { return moment(value, moment.HTML5_FMT.DATETIME_LOCAL, true).toDate(); }, async fetchAuditevents() { - this.isLoading = true; + this.isLoading = this.events.length === 0; const response = await this.instance.fetchAuditevents(this.filter); const converted = response.data.events.map( (event) => new Auditevent(event),