Skip to content

fix(json): stabilize tree filtering - #2204

Open
sophiathedev wants to merge 1 commit into
TableProApp:mainfrom
sophiathedev:fix/json-tree-filter-stability
Open

fix(json): stabilize tree filtering#2204
sophiathedev wants to merge 1 commit into
TableProApp:mainfrom
sophiathedev:fix/json-tree-filter-stability

Conversation

@sophiathedev

@sophiathedev sophiathedev commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

summary

  • preserve JSON tree node identity while filtering so disclosure state targets the rows that are actually rendered
  • build one filtered projection per search or root update instead of recursively rebuilding it during SwiftUI redraws
  • reveal matching ancestor paths during search, then restore the user's prior disclosure state when the search is cleared
  • reset cached projection state when result JSON changes and add accessible labels to the expand and collapse controls

root cause

Filtering rebuilt every matching node with a new UUID each time the view evaluated the projection. Expansion IDs therefore referred to discarded rows, which could leave nested matches hidden. The projection was also recomputed from multiple view properties, repeating traversal work on large JSON values.

verification

  • project generation
  • 234 focused regression tests across tree state, parsing, results JSON, number normalization, row conversion, reindent, content detection, and cell interaction
  • TablePro Debug build with code signing disabled
  • strict SwiftLint on all changed Swift files
  • native AppKit full-window render
  • near-limit regression with 4,900 nodes

A release-optimized local probe over a 4,900-node tree measured 8.19 to 8.34 ms per search update across 200 iterations.

preview

Searching for a nested value reveals only its matching path. The full-window screenshot below was rendered with the production tree view.

JSON tree filter preview

@sophiathedev
sophiathedev marked this pull request as ready for review August 18, 2026 16:29
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

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.

1 participant