Commit a36b350
authored
[HDX-3732] Fix AppNav crash for blank user names (#1934)
## 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
- Linear Issue: https://linear.app/clickhouse/issue/HDX-3732/bug-app-crashed-at-the-appnav-component
- Related PRs: None1 parent a03cecc commit a36b350
File tree
2 files changed
+41
-5
lines changed- packages/app/src/components
- __tests__
2 files changed
+41
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
68 | 78 | | |
69 | 79 | | |
70 | 80 | | |
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
74 | 84 | | |
| 85 | + | |
75 | 86 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 87 | + | |
80 | 88 | | |
81 | | - | |
| 89 | + | |
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments