Skip to content

Keep pinned filters above map groups - #2850

Draft
MikeShi42 wants to merge 10 commits into
mainfrom
cursor/fix-pinned-filter-order-704b
Draft

Keep pinned filters above map groups#2850
MikeShi42 wants to merge 10 commits into
mainfrom
cursor/fix-pinned-filter-order-704b

Conversation

@MikeShi42

@MikeShi42 MikeShi42 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Keep pinned filters above active fields and preserve the existing facet sort when map fields are grouped for display.

A sort-only change is insufficient because the renderer previously emitted every grouped map field before every scalar field. The implementation now adds only an ordered key list to the existing grouping result and reorders the already-rendered elements by those keys.

Screenshots or video

minimized_pinned_filter_fix_demo.mp4

How to test on Vercel preview

Preview routes: /search

Steps:

  1. Open a log source containing both a scalar field such as ServiceName and a map field such as LogAttributes.
  2. Select a value under the map field, then pin the scalar field using Pin for me.
  3. Verify the pinned scalar field moves above the active map group and the map selection remains active.

Testing

  • yarn jest src/components/__tests__/DBSearchPageFilters.test.tsx src/components/DBSearchPageFilters/utils.test.ts --runInBand --coverage=false — 87 passed
  • yarn app:lint — passed
  • Manual browser validation — pinning ServiceName moves it above active LogAttributes.test.case without clearing the selection

References

  • Linear Issue: N/A
  • Related PRs: N/A

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Co-authored-by: Mike Shi <mike@hyperdx.io>
@changeset-bot

changeset-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a0a5be4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@hyperdx/app Patch
@hyperdx/api Patch
@hyperdx/otel-collector Patch

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

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperdx-oss Ready Ready Preview Aug 10, 2026 7:00am
hyperdx-storybook Ready Ready Preview Aug 10, 2026 7:00am

Request Review

Co-authored-by: Mike Shi <mike@hyperdx.io>
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

E2E Test Results

All tests passed • 276 passed • 1 skipped • 886s

Status Count
✅ Passed 276
❌ Failed 0
⚠️ Flaky 1
⏭️ Skipped 1

Tests ran across 4 shards in parallel.

View full report →

@greptile-apps

greptile-apps Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR preserves the sorted priority of filter facets when scalar fields and grouped map fields are rendered together.

  • Records each scalar or map group’s first position while grouping facets.
  • Reorders the rendered elements according to that preserved sequence.
  • Applies pin priority after checked-value and range ordering.
  • Adds a regression test covering a pinned scalar field above an active map group.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
packages/app/src/components/DBSearchPageFilters.tsx Reorders grouped and scalar filter elements using the priority sequence produced from the sorted facets.
packages/app/src/components/DBSearchPageFilters/utils.ts Extends facet grouping to retain the first-seen order of scalar facets and map groups.
packages/app/src/components/tests/DBSearchPageFilters.test.tsx Adds a focused component regression test confirming that a pinned scalar facet renders above an active map group.
.changeset/calm-facets-order.md Documents the filter-order correction as an application patch.

Reviews (5): Last reviewed commit: "refactor: minimize filter ordering imple..." | Re-trigger Greptile

Comment thread packages/app/src/components/__tests__/DBSearchPageFilters.test.tsx
Comment thread packages/app/src/components/DBSearchPageFilters.tsx Outdated
cursoragent and others added 3 commits August 10, 2026 04:22
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
cursoragent and others added 2 commits August 10, 2026 04:28
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
cursoragent and others added 2 commits August 10, 2026 05:14
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
Co-authored-by: Mike Shi <mike@hyperdx.io>
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.

2 participants