Add command palette search for tickets, members, and theme.#193
Merged
Conversation
Extend Cmd+K with ticket/member lookup, Shift+Enter to open DMs, theme commands, and fix MessagesPage so pending DM intent is not overridden by the default channel view. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Extends the global Cmd+K command palette with additional commands (ticket/member search, theme switching, and a DM shortcut) and updates MessagesPage deep-link/pending-thread handling to avoid DM intent being overridden by default channel selection.
Changes:
- Add command palette groups for Theme, Tickets, and Team Members, plus Shift+Enter to open a DM thread with the highlighted member.
- Fetch team tickets/members when the command palette opens to power in-palette search.
- Add a
pendingDmIntentRefguard in MessagesPage to prevent default channel view from overriding an intended DM view.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
src/ui/CommandPalette.tsx |
Adds theme commands, ticket/member search items, and Shift+Enter DM open behavior. |
src/features/messages/MessagesPage.tsx |
Introduces a ref flag to preserve DM intent during initial channel/default selection. |
Comments suppressed due to low confidence (1)
src/ui/CommandPalette.tsx:202
- Same pattern as tickets:
getMembersis kicked off on open without any cancellation/ignore in cleanup, so a late response can callsetMembersafter the palette closes or team changes. Add abort/ignore handling to avoid setting state from stale requests.
ticketApi
.getTickets(selectedTeamId)
.then(setTickets)
.catch(() => setTickets([]));
}, [open, selectedTeamId]);
useEffect(() => {
if (!open || !selectedTeamId) {
setMembers([]);
Comment on lines
292
to
+306
| ); | ||
|
|
||
| const openMessageToMember = useCallback( | ||
| (targetId: string) => { | ||
| if (!selectedTeamId || !user?.id || !selectedTeam) return; | ||
|
|
||
| const targetIsAdmin = selectedTeam.admins.includes(targetId); | ||
| const currentUserIsAdmin = selectedTeam.admins.includes(user.id); | ||
|
|
||
| let adminId: string; | ||
| let memberId: string; | ||
|
|
||
| if (currentUserIsAdmin && !targetIsAdmin) { | ||
| adminId = user.id; | ||
| memberId = targetId; |
Comment on lines
183
to
+191
| useEffect(() => { | ||
| if (!open) { | ||
| resetState(); | ||
| } | ||
| }, [open, resetState]); | ||
|
|
||
| useEffect(() => { | ||
| if (!open || !selectedTeamId) { | ||
| setTickets([]); |
Comment on lines
+136
to
+140
| pendingDmIntentRef.current = false; | ||
| } else if (selectedTeam.members.includes(userId) && selectedTeam.admins.includes(peer)) { | ||
| setSelectedAdminId(peer); | ||
| setActiveView('dm'); | ||
| pendingDmIntentRef.current = false; |
Comment on lines
218
to
226
| .then((cs) => { | ||
| setChannels(cs); | ||
| const def = cs.find((c) => c.isDefault) ?? cs[0]; | ||
| if (def) { | ||
| setSelectedChannelId(def.id); | ||
| setActiveView('channel'); | ||
| if (!pendingDmIntentRef.current) { | ||
| setActiveView('channel'); | ||
| } | ||
| } else { |
Comment on lines
170
to
181
| const handler = (e: Event) => { | ||
| const { | ||
| teamId: tId, | ||
| adminId: aId, | ||
| memberId: mId, | ||
| } = (e as CustomEvent<{ teamId: string; adminId: string; memberId: string }>).detail; | ||
| if (tId) setSelectedTeamId(tId); | ||
| if (aId && mId && userId) { | ||
| pendingDmIntentRef.current = true; | ||
| if (userId === aId) setSelectedMemberId(mId); | ||
| else if (userId === mId) setSelectedAdminId(aId); | ||
| setActiveView('dm'); |
Restores the icon import dropped during conflict resolution so the Org Chart nav item compiles again. Co-authored-by: Cursor <cursoragent@cursor.com>
mfisher31
approved these changes
May 20, 2026
Collaborator
mfisher31
left a comment
There was a problem hiding this comment.
Pulled, checked, works! Thanks @SarkarShubhdeep
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.
Extend Cmd+K with ticket/member lookup, Shift+Enter to open DMs, theme commands, and fix MessagesPage so pending DM intent is not overridden by the default channel view.
Screen.Recording.2026-05-19.at.10.15.27.AM.mov