Skip to content

fix(radar): show activation before opt-in - #10487

Merged
diegosouzapw merged 1 commit into
release/v3.8.50from
fix/radar-optin-not-found
Aug 15, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.50from
fix/radar-optin-not-found

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

  • keep RADAR_ENABLED availability separate from the independent Radar sync opt-in
  • render the activation screen when /api/radar/settings returns 200 { optIn: false }
  • preserve the true flag-off 404 behavior when the endpoint returns 404

Root cause

The dashboard overloaded optIn === false to mean both “feature flag off” and “feature available but owner has not opted in”. A fresh installation therefore called notFound() immediately after the settings API correctly returned 200 { optIn: false }.

TDD / live reproduction

  • RED: tests/unit/radar-optin-page.test.tsx reproduced settings 200 + optIn false -> notFound() (2 calls)
  • GREEN: the same response renders the activation screen and never calls notFound()
  • regression: a real settings 404 still calls notFound()
  • live pre-fix Playwright on VPS .15: /api/radar/settings returned 200, followed by the rendered dashboard 404

Validation

  • npx vitest run tests/unit/radar-optin-page.test.tsx — 2/2
  • focused Node Radar tests — green
  • npm run typecheck:core — green
  • scoped ESLint + Prettier — green
  • git diff --check — green

@diegosouzapw
diegosouzapw merged commit 282c087 into release/v3.8.50 Aug 15, 2026
22 checks passed
@diegosouzapw
diegosouzapw deleted the fix/radar-optin-not-found branch August 15, 2026 17:13
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
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.

2 participants