Skip to content

feat(web): global search in the command palette (closes #271) - #410

Merged
samuelmbabhazi merged 2 commits into
mainfrom
feat/271-palette-search
Nov 21, 2026
Merged

samuelmbabhazi merged 2 commits into
mainfrom
feat/271-palette-search

Conversation

@samuelmbabhazi

@samuelmbabhazi samuelmbabhazi commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #271.

What changed

⌘K found only pages and projects. When it opens, it now also reads the organization's environments, applications, servers and members (PaletteIndex, dashboard/palette-index.ts).

  • Visibility. Everything comes from the lists the API already gives this account:

    • projects, then their environments;
    • the applications of each environment;
    • the servers;
    • the members.

    A list the account may not read (403 or 404), or one that fails, adds nothing. The palette therefore never offers a resource the account cannot read, and no new endpoint or permission is involved.

  • Results. Each one shows where it lives (Demo · qa for an application, the project for an environment). The search matches the name or that place, so typing an environment's name also finds its applications.

  • Links.

    • environments and applications open their page;
    • servers open the Servers page;
    • members open Members & access.
  • Loading. Resources are read on each opening and dropped on close, so nothing stale is kept. Pages and projects show at once, with a "Searching…" line until the rest arrives.

  • Bounds. At most 60 environments and 5 pages of members per opening.

  • The placeholder now says what can be found. French texts are added.

How it was tested

  • palette-index.spec.ts:
    • entries, details and links;
    • a project whose environments are refused adds nothing;
    • refused servers and members add nothing;
    • removed servers are left out.
  • command-palette.spec.ts: matching on the place, and the "Searching…" state.
  • Web lint and the full web suite pass (254).
  • Lab, with captures in English (desktop) and French (mobile), no console error:
    • "store" finds storefront in its four environments;
    • "qa" finds the environment and its three applications;
    • "node" finds the server.

Security considerations

Read-only. It makes no request beyond the list endpoints the account can already call, each enforced by the API, and refusals are dropped silently.

Summary by CodeRabbit

  • New Features
    • Expanded dashboard command-palette search to include environments, applications, servers, and members, with supplementary details included in matching.
    • Added a “Searching…” status while results load.
    • Updated the search prompt to list searchable resource types and added French translations for the prompt and status.
  • Tests
    • Added coverage for matching entry details, loading indicators, resource results, and unavailable lists.

When the palette opens it reads, from the lists this account may already
read, the organization's environments, applications, servers and
members. Each result says where it lives, and the search covers that
too; a list the account may not read adds nothing.

Signed-off-by: samuel mbabhazi <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The command palette now searches environments, applications, servers, and members alongside existing entries. It displays optional resource details and a loading status while the dashboard retrieves organization resources.

Changes: Global command-palette search

Layer / File(s) Summary
Searchable palette entries
apps/web/src/app/dashboard/command-palette.ts, apps/web/src/app/dashboard/command-palette.spec.ts, apps/web/src/app/ui/fr.ts
Palette entries can include searchable detail text. The palette displays a searching status, and French translations cover the expanded search prompt and status. Tests check detail matching and the searching status.
Organization resource index
apps/web/src/app/dashboard/palette-index.ts, apps/web/src/app/dashboard/palette-index.spec.ts
PaletteIndex loads environments, applications, non-removed servers, and members. It limits environment and member-page results, handles failed requests with empty results, and has tests for returned entries and 403 responses.
Dashboard loading and palette wiring
apps/web/src/app/dashboard/dashboard-layout.ts, apps/web/src/app/dashboard/dashboard-layout.html
DashboardLayout loads resource entries when the palette is open and an organization ID is available. It ignores stale loads and passes the combined entries and searching state to CommandPalette.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant CommandPalette
  participant DashboardLayout
  participant PaletteIndex
  User->>CommandPalette: Open palette
  DashboardLayout->>PaletteIndex: Load entries for organization
  PaletteIndex-->>DashboardLayout: Return resource entries
  DashboardLayout->>CommandPalette: Pass combined entries and searching state
Loading
Merge Risk: Minimal · up to f74b8

The command palette now searches environments, applications, servers and members. No actionable merge-blocking risk was identified, and the change is a reversible front-end change.

Security architecture risk: Minimal · up to f74b8

Search requests retain the selected organization’s scope and use existing read operations. Superseded results are ignored, and resource names are displayed as text. No material weakening of access controls, failure containment or ownership guarantees was identified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — The added display surface aggregates names and member emails returned for the selected organization in the browser palette. Its new operations are list reads and navigation; the loader adds no resource mutation or credential-management operation.

Trust Boundaries and Controls

  • observed — The list clients place organization identity in existing API paths; application reads additionally carry project and environment identity. Failed requests are omitted from the palette. These client controls do not independently prove server-side authorization, which was not verified.

Resilience and Maintainability Implications

  • observed — Stale-result rejection protects current component state without cancelling network work. Closing the palette or changing organization can leave earlier requests running, but their completions cannot replace entries after a newer effect generation has begun.
Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(web): global search in the command palette (closes #271)" matches the main change. The PR extends the command palette beyond pages and projects to environments, applications, servers, …
Linked Issues check Passed [#271] has one coding requirement: Cmd+K must list matching resources across projects, and never resources the account cannot read. Scope names environments, applications, servers, and members. At hea…
Out of Scope Changes check Passed All changed files support the #271 palette index. palette-index.ts and palette-index.spec.ts add the resource index and its tests. command-palette.ts and its spec add the detail field, location matchi…
Full details: Title check

Explanation

The title "feat(web): global search in the command palette (closes #271)" matches the main change. The PR extends the command palette beyond pages and projects to environments, applications, servers, and members, with a searching state and location-aware matching. The title names the feature and the scope (web command palette), and references the linked issue #271. It does not cover every detail, such as the placeholder text, French translations, or the per-opening limits, which is acceptable.

Full details: Linked Issues check

Explanation

[#271] has one coding requirement: Cmd+K must list matching resources across projects, and never resources the account cannot read. Scope names environments, applications, servers, and members. At head, apps/web/src/app/dashboard/palette-index.ts builds these entries. load() reads projects, then environments per project, then applications per environment, plus nodes and members. Each list passes through quietly(), which returns an empty fallback on refusal or failure, so unreadable resources add nothing. Nodes with status 'removed' are filtered out. Members follow cursors for at most MEMBER_PAGES = 5 pages. The command palette adds detail text (project and environment location) to its matching. palette-index.spec.ts and command-palette.spec.ts cover entries, links, refused lists, removed servers, location matching, and the 'Searching…' state. Limitation: the MAX_ENVIRONMENTS = 60 cap is applied before application lookup. In an organization with more than 60 environments, environments beyond the first 60 in project order, and their applications, cannot be found. The issue states no cap, so this does not fail the requirement for typical use. The code comment says the bounds limit requests, not what the search may find, which does not match this effect. Reviewers should weigh this limit against the 'across projects' wording. The incremental diff from the previous reviewed head could not be read (changed blobs missing from the checkout). The whole-PR summary and the current file content are consistent with the earlier conclusion.

Full details: Out of Scope Changes check

Explanation

All changed files support the #271 palette index. palette-index.ts and palette-index.spec.ts add the resource index and its tests. command-palette.ts and its spec add the detail field, location matching, and the searching state. dashboard-layout.ts and dashboard-layout.html load the index on open and pass the searching state. fr.ts adds French strings for the prompt and status. The index uses only existing list endpoints (projects, environments, applications, nodes, members), as the PR description states. No unrelated behavior change appears in the whole-PR summary. The incremental diff from the previous reviewed head was unreadable, so this verdict relies on the whole-PR summary and the current palette-index.ts content.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0252747 and f74b827.

Files selected for processing: 3

  • apps/web/src/app/dashboard/dashboard-layout.html
  • apps/web/src/app/dashboard/dashboard-layout.ts
  • apps/web/src/app/ui/fr.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@samuelmbabhazi
samuelmbabhazi merged commit 9ba2dff into main Nov 21, 2026
24 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the feat/271-palette-search branch November 21, 2026 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Global search in the command palette

1 participant