Skip to content

Clarify navbar user identity and read-only access state - #430

Merged
conorheffron merged 4 commits into
mainfrom
copilot/update-frontend-visual-cue
Jun 6, 2026
Merged

Clarify navbar user identity and read-only access state#430
conorheffron merged 4 commits into
mainfrom
copilot/update-frontend-visual-cue

Conversation

Copilot AI commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

The frontend now makes the current access state explicit in the navbar: authenticated users see their user ID, while unauthenticated users are shown as unknown and clearly marked read-only with a direct path to login.

  • Navbar user state

    • Renames the navbar identity cue from a generic user label to User ID
    • Shows the resolved user ID for authenticated sessions
    • Falls back to unknown for unauthenticated sessions instead of implying edit access
  • Read-only guidance

    • Adds a read-only indicator for unauthenticated users directly in the navbar control
    • Surfaces access state in the dropdown (logged in, read only, checking access)
    • Adds a dropdown action to route unauthenticated users to /login
  • Focused frontend coverage

    • Updates navbar tests to assert:
      • authenticated user ID display
      • read-only unknown state
      • presence of the login prompt in the dropdown for unauthenticated users
<button className="btn btn-sm dropdown-toggle">
  User ID: {userLabel}{isReadOnlyUser ? ' (read only)' : ''}
</button>

{isReadOnlyUser && (
  <Link className="dropdown-item" to="/login">
    Login to edit bookings
  </Link>
)}

Copilot AI changed the title [WIP] Update frontend to include visual cue for logged in users Clarify navbar user identity and read-only access state Jun 5, 2026
Copilot AI requested a review from conorheffron June 5, 2026 22:31
@conorheffron
conorheffron marked this pull request as ready for review June 5, 2026 23:11
@conorheffron
conorheffron requested a review from Copilot June 5, 2026 23:11
@conorheffron conorheffron added the frontend UI / UX related tasks label Jun 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the frontend navbar to make the user identity and access state explicit: authenticated sessions show a “User ID”, unauthenticated sessions are labeled unknown and marked as read-only, with a direct login call-to-action in the dropdown.

Changes:

  • Introduces a tri-state auth UI (logged in / read only / checking access) and renames the navbar identity label to “User ID”.
  • Adds a read-only visual cue (button color + “(read only)” suffix) and a “Login to edit bookings” dropdown action when unauthenticated.
  • Updates navbar tests to assert the new label/status strings and the login prompt.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
frontend/src/components/Navbar.tsx Adds explicit auth/read-only/checking state and updates the user dropdown label + actions.
frontend/src/components/tests/Navbar.test.tsx Updates/extends tests to validate the new navbar identity and access-state UX.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/src/components/Navbar.tsx Outdated
Comment thread frontend/src/components/__tests__/Navbar.test.tsx Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@conorheffron conorheffron moved this from In progress to In review in @conorheffron's booking-sys Jun 6, 2026
Copilot AI requested a review from conorheffron June 6, 2026 07:18
@conorheffron
conorheffron merged commit 726ced4 into main Jun 6, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in @conorheffron's booking-sys Jun 6, 2026
@conorheffron
conorheffron deleted the copilot/update-frontend-visual-cue branch June 6, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend UI / UX related tasks TypeScript

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

UI: update frontend to include visual cue for logged in users with ID

3 participants