Fix/2048#300
Open
conradmugabe wants to merge 7 commits into
Open
Conversation
…dent An admin who toggles the navbar User/Admin switch to User mode is classified as STUDENT. Add an early return in useUserType.isUserTypeAllowed that hides any resource whose userTypes does not include STUDENT, but only when the user is an admin in student mode (userIsAdmin && userType === STUDENT). Genuine non-admin users still flow through the RBAC branch, so RBAC-granted access is preserved. Also expose the resolved userType for consumers that must react to mode changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hXc4fUwkG7VCDPbCMyA6R
…anges filterContext read isUserTypeAllowed through a ref to stay stable, so toggling User/Admin mode never invalidated the filteredSegments memo — the navbar dropdown and modal sidebar kept a stale segment list. Add the resolved userType to the filterContext dependency array so the list recomputes on every mode change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hXc4fUwkG7VCDPbCMyA6R
Gate showForkButton on !userIsStudent so an admin previewing as a student sees neither the admin settings nor the fork/Modify action in the navbar agent dropdown. The New Chat quick action still renders. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hXc4fUwkG7VCDPbCMyA6R
Consumers that mock useUserType now also return userType so the mock shape matches the hook after exposing the resolved user type. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hXc4fUwkG7VCDPbCMyA6R
Journey 56 creates its own agent, then asserts: admin mode shows the full settings list; user mode collapses the agent dropdown to only New Chat with the fork action hidden; and toggling back and forth rebuilds the list each time (regression guard for the segment-list memoization fix). Adds navbar page-object helpers for the agent dropdown and the user/admin switch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hXc4fUwkG7VCDPbCMyA6R
Append the navbar-user-mode-dropdown-visibility journey and its checkpoints to the e2e coverage manifest and summary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hXc4fUwkG7VCDPbCMyA6R
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hXc4fUwkG7VCDPbCMyA6R
Member
|
Claude finished @conradmugabe's task —— View job E2E Coverage Bot
|
mamigot
approved these changes
Jul 2, 2026
mamigot
left a comment
Member
There was a problem hiding this comment.
✅ E2E Coverage — All Good
No new app routes were introduced. All existing coverage is intact.
Coverage improved: 499 → 503 checkpoints (+4)
Journey 56 (Navbar User Mode Dropdown Visibility) was added with 4 checkpoints, all covered:
nmv-01Admin mode shows full admin segment listnmv-02Switching to User mode collapses dropdown to only "New Chat"nmv-03Regression guard: switching back to Admin mode restores full listnmv-04Switching to User mode a second time collapses the list again
Coverage files (e2e/coverage.json, e2e/COVERAGE.md) are correctly updated.
sonegillis1
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Changes
Screenshots
Screencast.from.2026-07-02.18-47-00.mp4
Screencast.from.2026-07-02.18-46-33.mp4