Skip to content

[HDX-3732] Fix AppNav crash for blank user names#1934

Merged
kodiakhq[bot] merged 3 commits intomainfrom
warren/HDX-3732-appnav-user-menu-crash
Mar 18, 2026
Merged

[HDX-3732] Fix AppNav crash for blank user names#1934
kodiakhq[bot] merged 3 commits intomainfrom
warren/HDX-3732-appnav-user-menu-crash

Conversation

@wrn14897
Copy link
Member

@wrn14897 wrn14897 commented Mar 18, 2026

Summary

Fixes an AppNav crash caused by blank or whitespace-only user names. The user menu now normalizes the display name before generating avatar initials and includes a regression test for both whitespace-heavy and blank inputs.

How to test locally or on Vercel

  1. Open the app with a user whose name is blank or contains only whitespace and confirm the AppNav renders instead of crashing.
  2. Run cd packages/app && yarn ci:unit src/components/__tests__/AppNavUserMenu.test.tsx.
  3. Optionally run make ci-lint and make ci-unit to compare against current repo-wide CI status.

References

@vercel
Copy link

vercel bot commented Mar 18, 2026

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

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview, Comment Mar 18, 2026 11:02pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Mar 18, 2026

⚠️ No Changeset found

Latest commit: 296b981

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 18, 2026

PR Review

✅ No critical issues found.

The fix is clean and well-targeted:

  • getUserInitials() correctly handles blank/whitespace-only names with proper trim + split + filter pattern
  • resolvedUserName normalization prevents blank display names
  • Tests cover both whitespace-heavy and blank name cases
  • renderWithMantine is a global in setupTests.tsx — the missing import in the test file is intentional and correct

@wrn14897 wrn14897 added the ai-generated AI-generated content; review carefully before merging. label Mar 18, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 18, 2026

E2E Test Results

1 test failed • 91 passed • 3 skipped • 961s

Status Count
✅ Passed 91
❌ Failed 1
⚠️ Flaky 1
⏭️ Skipped 3

Tests ran across 4 shards in parallel.

View full report →

@kodiakhq kodiakhq bot merged commit a36b350 into main Mar 18, 2026
17 of 20 checks passed
@kodiakhq kodiakhq bot deleted the warren/HDX-3732-appnav-user-menu-crash branch March 18, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated AI-generated content; review carefully before merging. automerge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants