Commit Graph
2 Commits
Author SHA1 Message Date
Aditya Tripathi a618e4c85e fix(teams): guard current_team_id clear against concurrent writes
Make clearStoredTeamIfMatches perform an atomic conditional UPDATE
so a concurrent team switch isn't clobbered, and call it for the
deleting owner in DeleteTeam so their stored team id doesn't point
at a deleted team. refreshSession now falls back to
resolveStoredTeam() instead of an arbitrary first team. Add a
return type to SelectTeam::render() and tests covering owner
deletion and concurrent-selection preservation.
2026-08-25 17:25:32 +00:00
Aditya Tripathi e99c6d0f30 feat(teams): persist active team and add team selection screen
Add current_team_id to users so the last active team is restored on
login instead of always defaulting to the personal team. When a user
belongs to multiple teams and has no valid stored choice, redirect
them to a new team.select screen (SelectTeam Livewire component) to
pick one, rather than silently choosing the first team. Update
Fortify and OAuth login flows to use the new resolveStoredTeam()
logic.
2026-08-25 12:45:47 +00:00