Commit 0b40e8c
authored
fix(auth): token() soft-refresh also carries pendingRequests (#4436)
token() refreshed user/abilities/nav but, unlike refreshAbilities(), never
reassigned pendingRequests. After the refreshAbilities()->token() onboarding
swap, the org-required wall's "request pending" banner and its duplicate-request
guard (Request-to-join disabled while pendingRequests) went stale in-session on
the join path. /token already returns pendingRequests; token() just dropped it.
Add `this.pendingRequests = res.data.pendingRequests || []` so token() is a true
soft-refresh superset — fixes proceedToApp, the wall refresh()/requestToJoin(),
and every other token() site, and clears a stale banner too.
Tests: token() populates + clears pendingRequests.
Claude-Session: https://claude.ai/code/session_01XioM62H2iEMLsr686minjn1 parent b3c4000 commit 0b40e8c
2 files changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
338 | 342 | | |
339 | 343 | | |
340 | 344 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
473 | 495 | | |
474 | 496 | | |
475 | 497 | | |
| |||
0 commit comments