Skip to content

feat: Add support for filter by parsed JSON string - #1213

Merged
kodiakhq[bot] merged 4 commits into
mainfrom
mikeshi/add-support-for-filtering-by-parsed-json-string
Sep 27, 2025
Merged

kodiakhq[bot] merged 4 commits into
mainfrom
mikeshi/add-support-for-filtering-by-parsed-json-string

Conversation

@MikeShi42

Copy link
Copy Markdown
Contributor

Resolves HDX-1983

image

@changeset-bot

changeset-bot Bot commented Sep 27, 2025 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9cfc42e

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

This PR includes changesets to release 2 packages
Name Type
@hyperdx/app Minor
@hyperdx/api Minor

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

@MikeShi42
MikeShi42 requested a review from Copilot September 27, 2025 07:09
@vercel

vercel Bot commented Sep 27, 2025 •

Copy link
Copy Markdown

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

Project Deployment Preview Comments Updated (UTC)
hyperdx-v2-oss-app Ready Ready Preview Comment Sep 27, 2025 7:39am

@MikeShi42
MikeShi42 requested review from a team and dhable and removed request for a team September 27, 2025 07:09

Copilot AI 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.

Pull Request Overview

This PR adds support for filtering by parsed JSON string values in the database row JSON viewer. The enhancement allows users to interact with nested properties within JSON strings that have been parsed for display, enabling filtering, searching, and charting operations on these nested values.

Key changes:

  • Extended the HyperJson component to track parsed JSON context and root paths
  • Modified line action handlers to generate appropriate JSONExtractString queries for parsed JSON properties
  • Added new optional parameters to track when content is within parsed JSON and its root path

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
packages/app/src/components/HyperJson.tsx Added isInParsedJson and parsedJsonRootPath parameters to track parsed JSON context throughout the component hierarchy
packages/app/src/components/DBRowJsonViewer.tsx Updated line action handlers to generate JSONExtractString queries for parsed JSON properties in filters, search, chart, and column operations
.changeset/young-tools-sneeze.md Added changeset entry documenting the new feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

// Build JSONExtractString query for the nested path
const baseColumn =
parsedJsonRootPath[parsedJsonRootPath.length - 1];
const jsonPathArgs = nestedPath.map(p => `'${p}'`).join(', ');

Copilot AI Sep 27, 2025

Copy link

Choose a reason for hiding this comment

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

The JSON path argument construction logic is duplicated in multiple places. Consider extracting this into a helper function to reduce code duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
if (nestedPath.length > 0) {
const baseColumn =
parsedJsonRootPath[parsedJsonRootPath.length - 1];
const jsonPathArgs = nestedPath.map(p => `'${p}'`).join(', ');

Copilot AI Sep 27, 2025

Copy link

Choose a reason for hiding this comment

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

The JSON path argument construction logic is duplicated in multiple places. Consider extracting this into a helper function to reduce code duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
if (nestedPath.length > 0) {
const baseColumn =
parsedJsonRootPath[parsedJsonRootPath.length - 1];
const jsonPathArgs = nestedPath.map(p => `'${p}'`).join(', ');

Copilot AI Sep 27, 2025

Copy link

Choose a reason for hiding this comment

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

The JSON path argument construction logic is duplicated in multiple places. Consider extracting this into a helper function to reduce code duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
if (nestedPath.length > 0) {
const baseColumn =
parsedJsonRootPath[parsedJsonRootPath.length - 1];
const jsonPathArgs = nestedPath.map(p => `'${p}'`).join(', ');

Copilot AI Sep 27, 2025

Copy link

Choose a reason for hiding this comment

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

The JSON path argument construction logic is duplicated in multiple places. Consider extracting this into a helper function to reduce code duplication and improve maintainability.

Copilot uses AI. Check for mistakes.
@github-actions

github-actions Bot commented Sep 27, 2025 •

Copy link
Copy Markdown
Contributor

E2E Test Results

✅ All tests passed • 21 passed • 3 skipped • 156s

Status Count
✅ Passed 21
❌ Failed 0
⚠️ Flaky 0
⏭️ Skipped 3

View full report →

@dhable dhable 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.

LGTM

@kodiakhq
kodiakhq Bot merged commit 54d30b9 into main Sep 27, 2025
@kodiakhq
kodiakhq Bot deleted the mikeshi/add-support-for-filtering-by-parsed-json-string branch September 27, 2025 16:14
knudtty pushed a commit that referenced this pull request Apr 16, 2026

This branch was successfully deployed

1 active deployment
Preview — 9cfc42e4 Deployed Sep 27, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants