Skip to content

fix: identify user before sending warehouse test event - #8356

Merged
Zaimwa9 merged 2 commits into
mainfrom
fix/warehouse-test-event-identifier
Aug 25, 2026
Merged

fix: identify user before sending warehouse test event#8356
Zaimwa9 merged 2 commits into
mainfrom
fix/warehouse-test-event-identifier

Conversation

@Zaimwa9

@Zaimwa9 Zaimwa9 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor
  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

The warehouse test event ("Send your first event" button) was sending events with identifier: null because the SDK instance never identified a user. The ingestion pipeline now requires an identifier, so the event was silently dropped.

Added instance.identify('test_warehouse_user') after init and before trackEvent, so the event payload includes a non-null identifier.

How did you test this code?

Unit tests updated and passing (npm run test:unit -- --testPathPatterns='sendWarehouseTestEvent'). Verified the identify call is made with 'test_warehouse_user' before the event is tracked.

@Zaimwa9
Zaimwa9 requested a review from a team as a code owner August 25, 2026 12:12
@Zaimwa9
Zaimwa9 requested review from kyle-ssg and removed request for a team August 25, 2026 12:12
@vercel

vercel Bot commented Aug 25, 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 Aug 25, 2026 1:10pm
flagsmith-frontend-staging Ready Ready Preview Aug 25, 2026 1:10pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Aug 25, 2026 1:10pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 25, 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: Pro Plus

Run ID: 52623577-ef6b-4e94-b182-1d8a0bd1a86f

📥 Commits

Reviewing files that changed from the base of the PR and between 78d20b3 and cf7c963.

📒 Files selected for processing (2)
  • frontend/web/components/pages/environment-settings/tabs/warehouse-tab/__tests__/sendWarehouseTestEvent.test.ts
  • frontend/web/components/pages/environment-settings/tabs/warehouse-tab/sendWarehouseTestEvent.ts

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


📝 Walkthrough

Walkthrough

sendWarehouseTestEvent now initialises the Flagsmith instance with the identity test_warehouse_user. The test now verifies this identity.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: 🔵 Low · up to cf7c9

The warehouse test event now identifies a user before tracking, preventing events with null identifiers from being dropped. The remaining bounded risk is that the unit test does not enforce this call ordering, so the PR is mergeable with owner awareness and a follow-up test improvement.


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 Aug 25, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

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

@github-actions github-actions Bot added the fix label Aug 25, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 003afed4-4408-46ed-93cf-7bc63a764782

📥 Commits

Reviewing files that changed from the base of the PR and between 763938b and 78d20b3.

📒 Files selected for processing (2)
  • frontend/web/components/pages/environment-settings/tabs/warehouse-tab/__tests__/sendWarehouseTestEvent.test.ts
  • frontend/web/components/pages/environment-settings/tabs/warehouse-tab/sendWarehouseTestEvent.ts

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

@github-actions

github-actions Bot commented Aug 25, 2026

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

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

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 6 seconds
commit  cf7c963
info  🔄 Run: #19735 (attempt 1)

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

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

passed  4 passed

Details

stats  4 tests across 4 suites
duration  38.8 seconds
commit  cf7c963
info  🔄 Run: #19735 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  35.2 seconds
commit  cf7c963
info  🔄 Run: #19735 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.2 seconds
commit  cf7c963
info  🔄 Run: #19735 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19723 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  37.1 seconds
commit  78d20b3
info  🔄 Run: #19723 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #19723 (attempt 1)

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

passed  3 passed

Details

stats  3 tests across 3 suites
duration  40.8 seconds
commit  78d20b3
info  🔄 Run: #19723 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  42.9 seconds
commit  78d20b3
info  🔄 Run: #19723 (attempt 1)

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

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

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.9 seconds
commit  78d20b3
info  🔄 Run: #19723 (attempt 1)

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

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

talissoncosta
talissoncosta previously approved these changes Aug 25, 2026

@talissoncosta talissoncosta left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just curious about the comment code rabbit raised.

@Zaimwa9
Zaimwa9 merged commit 3ff27da into main Aug 25, 2026
31 checks passed
@Zaimwa9
Zaimwa9 deleted the fix/warehouse-test-event-identifier branch August 25, 2026 13:49
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.

2 participants