Skip to content

fix(errors): render the error banners that were being swallowed - #8453

Open
talissoncosta wants to merge 2 commits into
mainfrom
fix/error-message-swallowed
Open

fix(errors): render the error banners that were being swallowed#8453
talissoncosta wants to merge 2 commits into
mainfrom
fix/error-message-swallowed

Conversation

@talissoncosta

Copy link
Copy Markdown
Contributor

Changes

ErrorMessage reads an error prop and returns null without one. Eight places passed the error as children instead, so nothing rendered at all: a failed password reset, a failed feature import, an identity edit, an audit log item, a feature history page, the admin dashboard and two spots in account settings all failed silently.

A ninth passed className where the component takes errorMessageClass, so the error showed but unstyled.

Found by typechecking those call sites: npm run typecheck went from 10 ErrorMessage misuse errors to 0.

No change to ErrorMessage itself.

How did you test this code?

npm run typecheck, comparing the ErrorMessage errors before and after.

Worth exercising one by hand: submit the forgot-password form with an address that does not exist, and confirm the error now appears.

talissoncosta and others added 2 commits September 3, 2026 10:29
ErrorMessage takes an `error` prop and never renders children, but eight
call sites passed children, so each returned null and the message never
appeared. Failing to save your account details or change your password
showed nothing at all.

TypeScript had been reporting every one of these; they were buried in
the existing error baseline.
ErrorMessage takes errorMessageClass, not className, so the margin was
being dropped. Same misuse as the call sites above, caught by the same
typecheck.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@talissoncosta
talissoncosta requested a review from a team as a code owner September 3, 2026 13:30
@talissoncosta
talissoncosta requested review from kyle-ssg and removed request for a team September 3, 2026 13:30
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
flagsmith-frontend-preview Ready Ready Preview Sep 3, 2026 1:31pm UTC
flagsmith-frontend-staging Ready Ready Preview Sep 3, 2026 1:31pm UTC
1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Sep 3, 2026 1:31pm UTC

Request Review

@github-actions github-actions Bot added the front-end Issue related to the React Front End Dashboard label Sep 3, 2026
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

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

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: e10cbf8f-4a20-4b6f-a451-42ae0004ad07

📥 Commits

Reviewing files that changed from the base of the PR and between 4a8a84a and a7dbe57.

📒 Files selected for processing (8)
  • frontend/web/components/EditIdentity.tsx
  • frontend/web/components/import-export/FeatureImport.tsx
  • frontend/web/components/modals/ForgotPasswordModal.tsx
  • frontend/web/components/mv/VariationOptions.tsx
  • frontend/web/components/pages/AccountSettingsPage.tsx
  • frontend/web/components/pages/AuditLogItemPage.tsx
  • frontend/web/components/pages/FeatureHistoryDetailPage.tsx
  • frontend/web/components/pages/admin-dashboard/AdminDashboardPage.tsx

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The frontend updates ErrorMessage usage across identity editing, feature import, password recovery, variation options, account settings, audit logs, feature history, and the admin dashboard. Error values now use the error prop instead of child content. The variation split message now uses errorMessageClass for its top margin. No public declarations changed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to a7dbe

The error banner fixes are mergeable based on current evidence; no concrete regression or exploitable path was confirmed.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #20114 (attempt 1)

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

passed  6 passed

Details

stats  6 tests across 5 suites
duration  43.7 seconds
commit  a7dbe57
info  🔄 Run: #20114 (attempt 1)

🗂️ Previous results
✅ private-cloud · depot-ubuntu-latest-16 — run #20114 (attempt 1)

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  32 seconds
commit  a7dbe57
info  🔄 Run: #20114 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #20114 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.4 seconds
commit  a7dbe57
info  🔄 Run: #20114 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #20114 (attempt 1)

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  48.5 seconds
commit  a7dbe57
info  🔄 Run: #20114 (attempt 1)

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant