Skip to content

Workspace search dialog: scope dropdown (#570) - #468

Merged
danalvrz merged 2 commits into
mainfrom
kid/570/search-scope-dropdown
Aug 10, 2026
Merged

Workspace search dialog: scope dropdown (#570)#468
danalvrz merged 2 commits into
mainfrom
kid/570/search-scope-dropdown

Conversation

@reekitconcept

Copy link
Copy Markdown
Member

Implements the search-scope dropdown for the workspace search overlay, per the approved design on GitLab ticket #570.

What's in

  • Scope dropdown: the Workspace chip opens a real menu — "Everywhere" (globe icon + hint) plus every workspace the user can access, with deterministic letter avatars and a checkmark on the selection (keyed by path, so same-titled workspaces stay distinct)
  • In-place scope switching: livesearch, Ask AI and the Enter results page all follow the selected scope without leaving the dialog
  • Workspace list: reuses the navigation tree's workspace switcher data (shared redux subrequest, security-trimmed by the backend); useWorkspaceSwitcher gains an enabled option so the dialog only fetches once opened
  • Location labels: each result row shows its containing workspace title, or "Intranet Portal" outside the workspaces
  • Empty-state escape: a scoped search with no hits names the scope and offers one-click "Search everywhere"
  • i18n: German translations for the new messages
  • Cypress: second workspace in the spec — pick-other-workspace scoping (livesearch + Enter), location labels, widen link

Out of scope

The "Intranet Portal" (portal-without-workspaces) scope needs backend exclusion support in kitconcept.solr and is descoped to a follow-up per team decision (see ticket discussion).

Verification

  • Browser-verified on a dev stack with the kitconcept.io content snapshot (8 workspaces): dropdown per design, cross-workspace scoping, anonymous security trimming (only published workspaces listed)
  • Cypress spec passed locally against the acceptance stack (5/5)
  • Frontend-only change: no kitconcept.solr pin bump needed

The Workspace chip becomes a real scope dropdown per the approved
design: "Everywhere" (globe icon + hint) plus every workspace the
user can access, with deterministic letter avatars and a checkmark on
the selection (keyed by path, so same-titled workspaces stay
distinct). Livesearch, Ask AI and the Enter results page all follow
the selected scope, switching in place without leaving the dialog.

- Scope model: SearchScope grows from binary workspace|global to
  everywhere | current workspace | picked workspace {path, title}
- Workspace list: the navigation tree's workspace switcher data
  (shared redux subrequest, security-trimmed by the backend);
  useWorkspaceSwitcher gains an enabled option so the dialog only
  fetches once opened
- Result rows show a location label: containing workspace title, or
  "Intranet Portal" outside the workspaces
- Empty scoped search names the scope and offers a one-click
  "Search everywhere" escape
- i18n: German translations for the new messages
- Cypress: second workspace in the spec - pick-other-workspace
  scoping (livesearch + Enter), location labels, widen link

The "Intranet Portal" (portal-without-workspaces) scope needs backend
exclusion support in kitconcept.solr and is descoped to a follow-up
per team decision.
@reekitconcept
reekitconcept requested a review from a team as a code owner August 6, 2026 11:22
@reekitconcept

reekitconcept commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

Manual testing (local dev stack)

Environment: local backend + frontend in devmode, kitconcept.io content snapshot (8 workspaces: the 7 private ones from the snapshot under /workspaces plus a published test workspace), local Solr with hybrid RAG indexing, local Ollama (qwen3:8b) for the AI part — so both search paths ran against real content.

Traditional search (livesearch):

  • Typed Urlaub scoped to the current workspace (EU-Projekt GreenCat): exactly 1 hit — the workspace's own "Urlaubsregelung im GreenCat-Team", with its location label.
  • Opened the scope dropdown: "Everywhere" entry with hint line on top, then all 8 workspaces with letter avatars; the checkmark sat on the current workspace — correctly disambiguated by path even though two workspaces share the title "EU-Projekt GreenCat".
  • Picked SFB 1487 Quantensensorik from the dropdown: livesearch re-scoped in place — 1 hit ("Urlaubsplanung Quantensensorik-Team"), chip and location label updated.
  • Switched to "Everywhere": 4 hits with correct per-row labels ("Intranet Portal" for the portal documents, workspace titles for workspace content).
  • Empty state: Betriebsrat scoped to a workspace → "No results in …" with the "Search everywhere" button; one click widened and found the portal document.
  • Enter navigation: workspace scope lands on the scoped @@search results page, "Everywhere" on the global one.
  • Anonymous session: the dropdown correctly lists only the published workspace — the private ones are security-trimmed by the backend.

AI search (Ask AI):

  • Wie beantrage ich Urlaub? scoped to the workspace grounds the answer in the workspace's own Urlaubsregelung; the same question on "Everywhere" answers from the portal's HR-Portal document — the AI follows the selected scope.
  • Wie viele freie Tage bekomme ich?: livesearch finds nothing (no keyword match), while Ask AI still answers via semantic retrieval — the two paths complement each other as intended.
  • Switching scope after an AI answer clears it (no stale answer grounded in the previous scope).

Everything behaved as designed.

screenshot:

Screenshot 2026-08-06 at 1 43 31 PM

p.s. the two greencat entries are not a bug, I created an additional one locally to the one imported from kitconcept.io. So there are two in my testing - you won't have that.

@reekitconcept
reekitconcept requested a review from tisto August 6, 2026 11:44

@tisto tisto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@danalvrz danalvrz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested locally, LGTM!

@danalvrz
danalvrz merged commit c02da74 into main Aug 10, 2026
25 checks passed
@danalvrz
danalvrz deleted the kid/570/search-scope-dropdown branch August 10, 2026 20:45
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.

3 participants