Conversation
… and render user info in dropdown
Reviewer's GuideUpdates the shelter-operator navigation to show the selected shelter’s organization and richer account context, extends the shared dropdown to support that presentation, and adjusts shelter menu expansion and dashboard navigation defaults. Sequence diagram for shelter organization navigationsequenceDiagram
participant Operator
participant NavBar
participant useActiveOrg
participant useUser
participant ShelterData
Operator->>NavBar: Open shelter route
NavBar->>ShelterData: Read selected shelter
ShelterData-->>NavBar: operatorShelter.organization.name
NavBar->>useActiveOrg: Read activeOrg
useActiveOrg-->>NavBar: activeOrg
NavBar->>useUser: Read user
useUser-->>NavBar: user name and email
NavBar-->>Operator: Render shelter organization in navbar
Operator->>NavBar: Open account dropdown
NavBar-->>Operator: Render user name, email, and active organization
State diagram for shelter sidebar expansionstateDiagram-v2
[*] --> ShelterRoute
ShelterRoute --> ProfileExpanded: isShelterProfileRoute(pathname)
ShelterRoute --> ManagementExpanded: isShelterMgmtRoute(pathname)
ShelterRoute --> ProfileCollapsed: route does not match profile
ShelterRoute --> ManagementCollapsed: route does not match management
Flow diagram for shelter dashboard navigation defaultflowchart TD
A["Select shelter and click Continue"] --> B[shelterProfileRoute]
B --> C["Shelter Profile / Basic Info"]
C --> D["Shelter Profile submenu expanded"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="libs/react/shelter-operator/src/lib/components/NavBar.tsx" line_range="72-75" />
<code_context>
const { canCreateShelter } = useShelterPermissions();
const showCreateButton = isDashboardPage && canCreateShelter;
- const orgName =
+ // assumes user belongs to 1 organization only
+ const currentUserOrgName =
</code_context>
<issue_to_address>
**issue (bug_risk):** On every non-shelter page for a user belonging to multiple organizations, the navbar displays the literal `Admin Dashboard` instead of the currently selected organization name, even though `activeOrg` is available and can change through the organization selector.
**Triggers:** When the current user belongs to more than one organization and selects an organization outside a shelter view.
**Suggested fix:** Use `activeOrg?.name` for the non-shelter navbar label, with `Admin Dashboard` only as an explicit fallback when no organization is active.
</issue_to_address>| const orgName = | ||
| // assumes user belongs to 1 organization only | ||
| const currentUserOrgName = | ||
| organizations.length === 1 ? organizations[0].name : 'Admin Dashboard'; | ||
|
|
||
| // ── Shelter name ───────────────────────────────────────────────────────── |
There was a problem hiding this comment.
issue (bug_risk): On every non-shelter page for a user belonging to multiple organizations, the navbar displays the literal Admin Dashboard instead of the currently selected organization name, even though activeOrg is available and can change through the organization selector.
Triggers: When the current user belongs to more than one organization and selects an organization outside a shelter view.
Suggested fix: Use activeOrg?.name for the non-shelter navbar label, with Admin Dashboard only as an explicit fallback when no organization is active.
|
🚀 Expo continuous deployment is ready for betterangels!
iOS Simulator Build: Simulator Build Link |
|
🔍 [betterangels-admin] Preview available at: https://admin.dev.betterangels.la/branches/SDB-280-so-nav-and-sidebar-updates Last updated: 2026-09-16T00:03:09.505Z |
|
🔍 [shelter-web] Preview available at: https://shelter.dev.betterangels.la/branches/SDB-280-so-nav-and-sidebar-updates Last updated: 2026-09-16T00:03:09.499Z |
|
🔍 [storybook-react] Preview available at: https://storybook.dev.betterangels.la/branches/SDB-280-so-nav-and-sidebar-updates Last updated: 2026-09-16T00:03:09.486Z |
Update SO navBar to render selected shelter org
SDB-280
Summary by Sourcery
Update the shelter-operator navigation and shelter selection flow to reflect the active shelter organization and user context.
New Features:
Bug Fixes:
Enhancements:
Tests: