Skip to content

Handle command palette links for registered and NRM members#2086

Merged
DonKoko merged 4 commits intomainfrom
codex/fix-user-route-in-command-palette
Oct 3, 2025
Merged

Handle command palette links for registered and NRM members#2086
DonKoko merged 4 commits intomainfrom
codex/fix-user-route-in-command-palette

Conversation

@carlosvirreira
Copy link
Copy Markdown
Contributor

Summary

  • include the related userId in command palette team member search results so the client can differentiate registered users from NRMs
  • update the command palette helper to link registered members to /settings/team/users/:userId and NRMs to their edit modal, with safe fallbacks
  • extend the command palette tests to cover the registered, NRM, and fallback navigation branches

Testing

  • npm run test -- command-palette

https://chatgpt.com/codex/tasks/task_b_68de78fd7b348326983efa7f0337e497

@vercel
Copy link
Copy Markdown

vercel bot commented Oct 2, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
shelf-docs Ignored Ignored Preview Oct 3, 2025 9:47am

DonKoko
DonKoko previously approved these changes Oct 3, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 enhances the command palette's team member navigation by differentiating between registered users and Non-Registered Members (NRMs). The changes enable proper routing based on user type: registered users are directed to their user settings page while NRMs are routed to their edit modal.

Key changes:

  • Added userId field to team member search results to identify registered vs. NRM users
  • Implemented routing logic that directs registered users to /settings/team/users/:userId and NRMs to /settings/team/nrm/:id/edit
  • Added comprehensive test coverage for the new navigation logic including fallback scenarios

Reviewed Changes

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

File Description
app/routes/api+/command-palette.search.ts Added userId field to team member search results
app/components/layout/command-palette/command-palette.tsx Added getTeamMemberHref function and updated navigation logic
app/components/layout/command-palette/command-palette.test.tsx Added tests for the new routing function covering registered users, NRMs, and fallbacks

@DonKoko DonKoko merged commit bd92fc9 into main Oct 3, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants