Skip to content

feat(experiments): wire up results refresh with a shared RefreshControl#7857

Open
Zaimwa9 wants to merge 4 commits into
mainfrom
feat/experiment-results-refresh
Open

feat(experiments): wire up results refresh with a shared RefreshControl#7857
Zaimwa9 wants to merge 4 commits into
mainfrom
feat/experiment-results-refresh

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

The "Refresh results" action was never wired up. This adds it as a primary button below the status button, at parity with exposures refresh.

  • Extracts the exposures-only AsOfRefreshControl into a shared base/forms/RefreshControl (button + message slot + theme); adds a Storybook story.
  • New ExperimentResultsRefreshControl: 429/Retry-After throttling, polling until recompute lands, view-state + final/availability gating. Converts the Bayesian refresh mutation to a queryFn for Retry-After.
  • Token hygiene: phantom --font-*-size → literals; #e53e3ecolorIconDanger.

How did you test this code?

  • resultsViewState unit tests + existing results suites: 37/37 pass; lint + tsc clean.
  • Manual: refresh on a running experiment updates scorecards; rapid click → countdown; completed → disabled.
image image

Zaimwa9 added 2 commits June 23, 2026 15:56
- Extract generic RefreshControl (button + message slot + theme prop) into base/forms, replacing the exposures-only AsOfRefreshControl
- Add ExperimentResultsRefreshControl with the full throttle/poll/view-state machine, surfaced as a primary button below the status button on the detail header
- Convert refreshExperimentBayesianResults to a queryFn that reads Retry-After for 429 throttling parity with exposures
- Add a RefreshControl Storybook story and resultsViewState unit tests
- SCSS token hygiene: replace phantom --font-*-size custom properties in results.scss with literals (font-size is not tokenised); use the colorIconDanger token instead of a hardcoded #e53e3e
@Zaimwa9 Zaimwa9 requested a review from a team as a code owner June 23, 2026 15:36
@Zaimwa9 Zaimwa9 requested review from talissoncosta and removed request for a team June 23, 2026 15:36
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Jun 23, 2026 4:06pm
flagsmith-frontend-staging Ready Ready Preview, Comment Jun 23, 2026 4:06pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jun 23, 2026 4:06pm

Request Review

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-7857 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-7857 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-7857 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7857 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-7857 Finished ✅ Results

@github-actions github-actions Bot added the feature New feature or request label Jun 23, 2026
@Zaimwa9 Zaimwa9 marked this pull request as draft June 23, 2026 15:38
@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  36.8 seconds
commit  1f093fa
info  🔄 Run: #17748 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.7 seconds
commit  1f093fa
info  🔄 Run: #17748 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 4 suites
duration  1 minute, 2 seconds
commit  1f093fa
info  🔄 Run: #17748 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  38.1 seconds
commit  1f093fa
info  🔄 Run: #17748 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  35.6 seconds
commit  10fe499
info  🔄 Run: #17751 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  56 seconds
commit  10fe499
info  🔄 Run: #17751 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  1 minute, 3 seconds
commit  10fe499
info  🔄 Run: #17751 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  11 seconds
commit  10fe499
info  🔄 Run: #17751 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.9 seconds
commit  b89f2f7
info  🔄 Run: #17752 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  44 seconds
commit  b89f2f7
info  🔄 Run: #17752 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  11.9 seconds
commit  b89f2f7
info  🔄 Run: #17752 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  1 minute, 1 second
commit  b89f2f7
info  🔄 Run: #17752 (attempt 1)

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

…p the load flash

- Move the refresh control out of the detail header onto the Results heading line; use the default secondary (gray) theme instead of primary
- Drop refetchOnMountOrArgChange from the control's bayesian-results query: the page already loads it, so the forced second fetch on mount re-animated the scorecards
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Jun 23, 2026
@Zaimwa9 Zaimwa9 marked this pull request as ready for review June 23, 2026 15:55
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Jun 23, 2026
…e lands

Derive the button's refreshing state from the refreshRequested intent (set on click, cleared on completion or error) instead of the transient isSubmitting, so it no longer flickers out of the loading state in the gap between the 202 and the refetch confirming the refreshing view-state. Applies to both the results and exposures refresh controls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants