feat(search): global search that shows only what you can open

Open
#138 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust, typescript

Research direction

Start with shell/command-palette.tsx, then read the search rows in plans/261202-0003-client-bootstrap/design-feature-matrix.md and the plan in plans/261202-0806-keep-all-design-features/plan.md. Check the dependencies on #111, #135, and #122, plus the proposed search_query route. Done requires a real ACL-filtered route wired through the web BFF and desktop host, gated by the search capability, with the listed states, keyboard behavior, and tests verified on staging.

Written by the indexing model from the issue text.

Description

enhancement

Design: board 06 Search and commands; rows C36 (global search with scopes and highlighted snippets) and C37 ("only shows what you can open"); compact bottom bar search (S12).

The palette (Cmd/Ctrl+K) exists for commands. This issue adds server-backed search scopes: messages, tasks, files, people and agents, mini-app content.

Invariant: results and snippets come only from the server's ACL-filtered read. The client never builds an index of content and never shows a cached result after the person loses access.

Acceptance criteria

  • Search updates as typed (debounced), with scope chips All, Messages, Tasks, Files, People and agents, Mini-apps, Commands. Enter opens the result; Cmd/Ctrl+Enter opens it in the side panel; Esc closes.
  • Highlights match Vietnamese text with and without diacritics and are safe with IME input.
  • States: empty query (recent searches, kept per workspace and never containing secrets), no results, index lag ("results may be a little behind", from indexed_at), loading skeleton, and a removed result ("you no longer have access").
  • Results are cleared on workspace switch and sign-out.
  • Tests. A member never sees a result from a room they left, a cross-workspace probe returns nothing, and keyboard-only use.
  • Wired, not fixtures. This issue closes only on a slice wired to the real route it depends on, behind its dark capability id (or its local switch for a client-only feature), and verified on staging once the route exists. A fixture-backed screen satisfies none of the boxes above.

Capability

Client id search; server group search from an upstream item (tracked privately) (proposal).

Denied, pending and recovery states

Denied: the scope is not granted, so the palette keeps commands only and explains it. Pending: skeleton rows. Recovery: retry on reconnect; stale results are cleared.

Parity

Surface Evidence
Gateway API/RPC search_query (proposal)
CLI dewee search (proposal in an upstream item (tracked privately))
MCP Workspace read tool with the same ACL (upstream, tracked privately)
CCP / RGD / ACP N/A or per an upstream item (tracked privately)
Dewee client Palette and compact search on web/PWA and desktop
Conversation N/A: search is UI; an agent's search uses the person's authority
Docs docs/UX.md search section
Traces Query metadata only (no query text in traces)

Dependencies

An upstream item (tracked privately), #111, #135. Composer and palette lane (shell/command-palette.tsx), after #122 releases the palette.

Rules for this issue

  • The owner kept this feature on 2026-12-02 (DECISIONS.md D23, recorded by the keep-all docs PR #132). Design rows and states are in plans/261202-0003-client-bootstrap/design-feature-matrix.md. The plan is plans/261202-0806-keep-all-design-features/plan.md.
  • Done means wired. This issue closes only with a slice wired to the real route it depends on: the relay route through the web BFF and the desktop host command, or, for a client-only feature, the real native or browser path. The slice runs behind its dark capability id and is verified on staging once the route exists. Fixtures are for tests only. A fixture-backed screen never closes this issue and is never listed in plans/EVIDENCE.md. Until the route merges, the feature renders its gated or dark state.
  • One relay integrator. Only the relay-integrator lane adds ClientMethod entries to CLIENT_METHODS in packages/core/src/protocol.ts, one route at a time in merge order, together with the BFF allowlist entry and the desktop host command. A feature lane does not edit protocol.ts or capabilities.ts. The desktop host's shared files (lib.rs, capabilities/default.json, Cargo.toml, Cargo.lock, build.rs, apps/desktop/src/desktop-session.ts) have one owner at a time, in the order the plan names; a lane puts its commands in its own module and adds only a registration line.
  • Ships dark. The client id below resolves from the server's capability read through the capability map (#135). A feature without both renders its gated or dark state, never sample data presented as real. Where the route belongs to a domain that still awaits server-side relay parity, its relay child flag stays off until that domain's upstream parity work lands (tracked privately).
  • Both hosts. Web/PWA and desktop, en/vi, light/dark, 390/768/1024/1440, keyboard-only.
  • Checks. Typecheck, Biome and focused tests. Tests cover flag off, denied, pending, revocation and recovery.
  • Review. An independent review runs before the PR leaves draft. No auto-merge.
Dominant language
No language data
Stars
1
Forks
2
Avg merge
1h 51m
Merged PRs (30d)
103

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nextlevelbuilder/dewee-desktop-app

All issues in nextlevelbuilder/dewee-desktop-app

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.