Repository navigation
feat(console): rank search results in one list and say where each is - #2968
Conversation
Once something is typed, the palette lists the best matches of every kind in one list of at most eight rows instead of a group per kind: ranked by how the name matches (whole, start, a word's start, inside), the selected project's rows first among equals. Beneath each row is where it is: the project (after a hit's own second line), a project's host or else its ID, Settings for its pages, or "Choose a project" for a project's page while none is selected. When nothing matches it names the project it searched, or says one is needed. Before anything is typed its Projects open on the selected and recent ones, as the switcher does. - `closeness` and `ranked` in features/search/model.ts - `CommandItemText`, the two-line row text, shared with the combobox - `openingList` moved to features/projects/recent-projects.ts - Decision D36; the unreleased search changeset extended Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🦋 Changeset detectedLatest commit: c38f86f The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟡 Changes recommended
A moderate active issue remains in apps/console/src/app-shell/search.tsx where the results list can exceed the documented MAX_RESULTS limit after pushing the “See all users…” row, contradicting the stated eight-row cap.
1 open issue
What changed in this PR
Updates the Console command palette search to show a single, ranked mixed-results list after typing, with a consistent “where it is” description under each row, while reusing shared UI and project ordering logic to match existing switcher/combobox behavior.
Changes:
- Replace per-kind grouped typed results with one ranked list capped to a small set of best matches.
- Add per-row context (“where it is”) to disambiguate similarly named items and improve empty-state messaging.
- Extract and reuse shared components/helpers (
CommandItemText,openingList) and update tests, decision log, and changeset.
| File | Description |
|---|---|
| docs/design/decisions.md | Adds a decision log entry documenting the updated search palette ranking and contextual “where it is” row descriptions. |
| apps/console/src/features/search/model.ts | Implements ranking utilities (e.g., closeness tiers and deterministic ordering) for mixed-kind search results. |
| apps/console/src/features/search/model.spec.ts | Adds unit tests covering ranking behavior, tie-breaks, and match-tier handling. |
| apps/console/src/features/projects/recent-projects.ts | Moves/exports shared project “opening list” logic to order selected and recent projects before the rest. |
| apps/console/src/components/ui/command.tsx | Introduces CommandItemText to render a consistent label + optional description layout for command items. |
| apps/console/src/components/ui/combobox.tsx | Reuses CommandItemText to align combobox option rendering with the command palette row layout. |
| apps/console/src/app-shell/search.tsx | Refactors the palette to keep grouped navigation before typing and show a ranked single list after typing, including per-item context lines and updated empty/overflow behavior. |
| apps/console/src/app-shell/context-switcher.tsx | Switches to the shared openingList helper so project ordering matches the palette and other entry points. |
| apps/console/src/app-shell/app-shell.tsx | Passes userId through to search-related components to support per-user recent-project behavior. |
| apps/console/src/app-shell/app-shell.spec.tsx | Updates existing tests and adds coverage for ranking, disambiguation text, project ordering, and empty-state messaging in the palette. |
| .changeset/search.md | Updates the unreleased changeset to describe the new ranked mixed-results palette behavior and contextual row descriptions. |
Review effort: Balanced
The row that opens Users took a ninth place past the cap; it now takes the list's last place. The palette's field, debounce and searches lived on the always-mounted dialog, so closing it let a reset timer and in-flight answers update state after a test's last assertion, which CI's slower runner hit as an act() warning. They now live in a body the dialog mounts only while open: each opening starts empty, and closing drops pending work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve two conflicts with #2977: the combobox keeps main's chip rows and ruled groups and draws a plain row with the shared `CommandItemText`; the palette keeps its restructure and copies the project id through main's `copyText`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ew found - An empty list reads "Searching…" until every search has answered the text in the field, not "Nothing matches". - Before typing, Projects falls back to the first page when the person has more than one page and none selected or recent, instead of vanishing. - A row also ranks on its second line, so a user found by the start of their identifier no longer sorts last. - Each opening mounts a fresh palette, also when reopened while the dialog animates out. - The account's rows say "Account" beneath them once typed; with no project selected, a project's pages rank after projects. - `useProjectSearch` reads nothing until something is typed: both fields open on `useMyProjects`. - The decision is D37: main already cites D36 for keeping the selected project on Projects and Settings. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
No conflicts. Picked up for the stack: main's invitations migration takes the numbers #2972's search_entries migration used. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
main released (#2887), which consumed `.changeset/search.md`, the pending changeset this branch had extended. Take the deletion and give this change its own changeset, `console-search-ranked-list.md`. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
main renamed Logs to Events (#3004, D38) and made search one ranked list (#2968, D37). The project's Settings list keeps its place beside Events' in the shell, its pages join the ranked list marked "Settings · <project>", and its decision is renumbered D39 and logged in docs/design/decisions.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Context
Logs · cloudaboveLogs · zitadel), and says beneath every row where it is.my_shoplooked the same. "admin" answered "Nothing matches" without saying it had searched one project, or none.Summary
closeness/rankedinfeatures/search/model.ts).grace@example.com · console-dev);Settings;Choose a project(D22).CommandItemTextincomponents/ui/command.tsx, the label-over-description row text, now used by the combobox too;openingListmoved from the switcher intofeatures/projects/recent-projects.ts.mainalready cites D36 for keeping the selected project on Projects and Settings (fix(console): keep the selected project on Projects and Settings, and tidy Logs' search and filters #2977).useProjectSearchreads nothing until something is typed.Validation
moon run console:typecheck console:lint console:test console:build: all pass, 907 tests.closenessandranked;moon run console:dev-real(local instance, seeded data):default-loginflow, each withconsole-devbeneath;Release notes / changeset
.changeset/console-search-ranked-list.md, listing@zitadel/server(minor). The Console's search now shows the best matches of every kind in one list, the selected project's first, each saying beneath its name where it is. It replaces the extension of.changeset/search.md, which the release in build: version packages #2887 consumed.Notes
project_idas later work. Each type's text match needs an index before a search may span projects (no database scans for search), and the team name match still reads every team of a project.🤖 Generated with Claude Code