Skip to content

Fix/2048#300

Open
conradmugabe wants to merge 7 commits into
mainfrom
fix/2048
Open

Fix/2048#300
conradmugabe wants to merge 7 commits into
mainfrom
fix/2048

Conversation

@conradmugabe

Copy link
Copy Markdown
Contributor

Checklist

  • Tests were added/updated according to the feature/bugfix/change made
  • Version was rolled according to semver requirements
  • API endpoints openapi schema was updated if applicable

Changes

Screenshots

Screencast.from.2026-07-02.18-47-00.mp4
Screencast.from.2026-07-02.18-46-33.mp4

conradmugabe and others added 7 commits July 2, 2026 18:34
…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
@conradmugabe conradmugabe requested a review from sonegillis1 July 2, 2026 15:49
@conradmugabe conradmugabe self-assigned this Jul 2, 2026
@conradmugabe conradmugabe requested a review from mamigot as a code owner July 2, 2026 15:49
@mamigot

mamigot commented Jul 2, 2026

Copy link
Copy Markdown
Member

Claude finished @conradmugabe's task —— View job


E2E Coverage Bot

  • Dismiss stale REQUEST_CHANGES reviews (none found)
  • Identify changed files — no new page.tsx routes; new e2e spec + coverage files updated
  • Run mechanical coverage check — PASSED (499 → 503 checkpoints, +4)
  • Read coverage state — Journey 56 added with 4 checkpoints, all covered
  • Applied decision logic — CASE E (no new routes, coverage intact); posted ✅ approval

@conradmugabe conradmugabe added the run-tests Trigger PR validation pipeline label Jul 2, 2026

@mamigot mamigot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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-01 Admin mode shows full admin segment list
  • nmv-02 Switching to User mode collapses dropdown to only "New Chat"
  • nmv-03 Regression guard: switching back to Admin mode restores full list
  • nmv-04 Switching to User mode a second time collapses the list again

Coverage files (e2e/coverage.json, e2e/COVERAGE.md) are correctly updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Trigger PR validation pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants