Skip to content

feat: Global Search across errors, events, sessions, releases, and users (#494) - #571

Merged
unjica merged 10 commits into
developfrom
feature/494-global-search
Jul 18, 2026
Merged

unjica merged 10 commits into
developfrom
feature/494-global-search

Conversation

@unjica

@unjica unjica commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds project-scoped Global Search at /dashboard/search (nav tab) backed by GET /api/search?q=…
  • Supports free-text terms plus structured key:value filters (environment, release, browser, country, device, platform, error, user, from/to/range)
  • Returns grouped results (Issues, Events, Sessions, Releases, Users) capped at 8 per group, with deep links, View all actions, keyboard ↑↓/Enter navigation, and ignored-key UX feedback

Closes #494

Behavior notes (PR docs)

  • Unrecognized filter keys are ignored (not free text) and listed in the UI (ignoredKeys in the API response)
  • device: mapping: mobile → ios/android/mobile/iphone/ipad; desktop → desktop/web/windows/mac/linux/chrome os; otherwise substring ILIKE on platform / device_os / device_browser
  • release:__unknown__ uses the existing Unknown sentinel from Dashboard: Releases Health page — adoption and regression across versions #453
  • Query filters override overlapping URL/nav scope for the search request and result deep links
  • Issues release/platform/time filters use ErrorOccurrence EXISTS (aligned with Issues list)
  • Events View all uses propertiesContains (Events list name is exact-match)

Test plan

  • Open /dashboard/search with a project selected; empty query shows empty state
  • Search free text (e.g. checkout) → grouped hits across entities within limits
  • Combine filters: checkout environment:production release:v1.4.0
  • Try unsupported key (foo:bar) → ignored filters notice; query still runs
  • Arrow keys + Enter open the highlighted result with scope preserved
  • View all on each group opens the corresponding list with useful filters
  • Confirm results stay within the current project (switch project → different set)
  • pnpm lint && pnpm test && pnpm build

Made with Cursor

unjica and others added 2 commits July 18, 2026 20:32
Add GET /api/search and /dashboard/search with free-text + key:value
filters, grouped limited results, and deep links into existing list views.

Co-authored-by: Cursor <[email protected]>
Merge query filters into result hrefs, forward events View all via
propertiesContains, fold device into sessions q, and scope Issues by
ErrorOccurrence for release/platform/time filters.

Co-authored-by: Cursor <[email protected]>
Comment thread apps/api/src/lib/global-search.ts Resolved
Comment thread apps/api/src/routes/api.ts Resolved
Comment thread apps/api/src/routes/api.ts Dismissed
Align session/user/event/issue scoping with list parity (effective release,
NULL-env fallback, metricsUntil windows, Issues last_seen for time-only),
and fix search keyboard Enter/pending + emptyQuery UX.

Co-authored-by: Cursor <[email protected]>
Comment thread apps/api/src/lib/global-search.ts Resolved
Release hits now require event/session/error activity in the same
nav/range/metricsUntil window as other groups (Release Health KPI sources).

Co-authored-by: Cursor <[email protected]>
Comment thread apps/api/src/lib/global-search.ts Resolved
Comment thread apps/api/src/lib/global-search.ts Resolved
Treat route-built session/event/error time windows as a valid search signal
so time-only queries stay consistent across groups, and rank user hits by
latest session activity instead of identity A–Z.

Co-authored-by: Cursor <[email protected]>
Comment thread apps/api/src/lib/global-search.ts Resolved
Time-only issue hits (no release/platform) now filter last_seen with
errorOccurrenceRange so all-time/open-ended nav matches events/sessions.

Co-authored-by: Cursor <[email protected]>
Comment thread apps/dashboard/lib/global-search.ts Resolved
Comment thread apps/api/src/lib/global-search-query.ts Resolved
Treat http(s):// tokens as free text instead of ignored filters, and forward API parsed.freeText into View all list links so colon-bearing terms match grouped hits.

Co-authored-by: Cursor <[email protected]>
Guard form submit on isPending and scope Enter→highlighted-hit to the search input so pending nav and focused result rows are not bypassed.

Co-authored-by: Cursor <[email protected]>
Comment thread apps/dashboard/lib/global-search.ts Resolved
Forward View all Events free text as list `q` (name OR properties, AND terms) instead of propertiesContains-only so name-only and multi-word hits stay consistent.

Co-authored-by: Cursor <[email protected]>

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ed758b8. Configure here.

Comment thread apps/dashboard/lib/global-search.ts Resolved
Comment thread apps/dashboard/lib/global-search.ts Resolved
…teardown

Issues and Sessions list `q` now AND whitespace terms like Global Search
(message/fingerprint; session identity/device fields). Also re-check
`window` inside captureClientException async callbacks so Vitest teardown
cannot throw ReferenceError.

Co-authored-by: Cursor <[email protected]>
@unjica
unjica merged commit 0d704e5 into develop Jul 18, 2026
9 of 11 checks passed
@unjica
unjica deleted the feature/494-global-search branch July 18, 2026 22:18
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.

Dashboard: Global Search across errors, events, sessions, releases, and users

2 participants