Skip to content

fix(observability): refresh button feedback (v0.11.3)#18

Merged
mguptahub merged 1 commit into
mainfrom
fix/observability-refresh-feedback-v0.11.3
Apr 27, 2026
Merged

fix(observability): refresh button feedback (v0.11.3)#18
mguptahub merged 1 commit into
mainfrom
fix/observability-refresh-feedback-v0.11.3

Conversation

@eyriehq-bot
Copy link
Copy Markdown
Contributor

@eyriehq-bot eyriehq-bot Bot commented Apr 27, 2026

Summary

Toolbar Refresh button used to give zero visible feedback — MGupta couldn't tell if the click registered. This wires up two ambient signals matching the v0.11.2 loader-message vibe:

  1. In-flight: button disables + re-labels to Refreshing… (aria-busy, cursor: progress, muted background).
  2. On completion: an Updated HH:MM:SS caption appears under the button in --text-secondary at 11px — quiet receipt, not banner.

DetailHeader gains two new props (isRefreshing, lastUpdatedAt). ObservabilityPage hoists per-tab fetch state via an onFetchStateChange callback passed to MetricsTab / LogsTab / TracesTab. Each tab reports loading/completion at its main fetch boundary.

Manual click + auto-refresh tick share the same path — both bump refreshKey, which propagates through each tab's fetch effect, so the Refreshing… → Updated 14:23:15 cycle fires identically whether the user clicked the button or the 5s/10s/30s/1m/5m interval ticked.

Per-tab state survives tab switches — flipping back to Logs still shows its prior Updated … stamp instead of a blank header.

Files touched

  • metrics/components/DetailHeader.jsx — new props + UI; formatRefreshTimestamp exported helper
  • metrics/ObservabilityPage.jsx — per-tab fetch-state map + handleTabFetchStateChange
  • metrics/components/MetricsTab.jsx, LogsTab.jsx, TracesTab.jsx — call onFetchStateChange({loading, lastUpdatedAt}) at fetch boundaries
  • metrics/observability.css.iw-obs-refresh-wrap, .iw-obs-refresh-stamp, disabled-button styling
  • metrics/components/ux.test.js — 6 new tests for formatRefreshTimestamp (default + full form, error inputs, race-tick scenario)

Test plan

  • npx react-scripts test --watchAll=false --testPathPattern="metrics" — 153 passed (was 147)
  • npx react-scripts build — compiled successfully (+667B JS, +107B CSS)
  • Manual smoke once released: click Refresh → button disables, label reads "Refreshing…", caption appears post-fetch
  • Manual smoke: set Auto-refresh to 5s → same feedback fires on each tick
  • Manual smoke: switch tab while busy → no console error; tab switch is clean

Clicking the toolbar Refresh button used to give zero visible response —
no spinner, no label change, no acknowledgement that the click registered.
This wires up two ambient signals that match the v0.11.2 loader-message
vibe:

(1) While a fetch is in flight, the button disables itself and re-labels
    to "Refreshing…" (`aria-busy` + cursor: progress + muted background).
(2) On every fetch completion (success OR error), an "Updated HH:MM:SS"
    caption appears under the button in --text-secondary at 11px so it
    reads as a quiet receipt, not a banner.

DetailHeader gains two new props (`isRefreshing`, `lastUpdatedAt`) and
ObservabilityPage hoists per-tab fetch state via an `onFetchStateChange`
callback passed to MetricsTab / LogsTab / TracesTab. Each tab reports
loading/completion at its main fetch boundary.

Manual clicks AND auto-refresh ticks share the same path: both bump
`refreshKey`, which propagates through each tab's fetch effect, so the
"Refreshing… → Updated 14:23:15" cycle fires identically whether the
user clicked the button or the 5s/10s/30s/1m/5m interval ticked.

Per-tab state survives tab switches — flipping back to Logs still shows
its prior "Updated …" stamp instead of a blank header.

Co-Authored-By: arun <arun@infrawatchlabs.com>
@mguptahub mguptahub merged commit f55e251 into main Apr 27, 2026
1 check failed
@mguptahub mguptahub deleted the fix/observability-refresh-feedback-v0.11.3 branch April 27, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant