Skip to content

Preserve JSON expansion state while documents load#192

Merged
vkarpov15 merged 1 commit intomainfrom
codex/fix-json-view-collapse-issue-during-loading
Mar 28, 2026
Merged

Preserve JSON expansion state while documents load#192
vkarpov15 merged 1 commit intomainfrom
codex/fix-json-view-collapse-issue-during-loading

Conversation

@vkarpov15
Copy link
Copy Markdown
Member

Motivation

  • When new documents are loaded the JSON viewer was being reinitialized and collapsing any user-expanded nodes, likely caused by a watcher that reset collapse state on every value prop change.

Description

  • Remove the value watcher from list-json so collapse state is no longer reset on each prop update, preserving expanded JSON nodes during incremental loads and rerenders (file: frontend/src/list-json/list-json.js).

Testing

  • Ran linter: npx eslint frontend/src/list-json/list-json.js and it completed successfully.

Codex Task

Copilot AI review requested due to automatic review settings March 27, 2026 23:41
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 27, 2026

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

Project Deployment Actions Updated (UTC)
studio Ready Ready Preview, Comment Mar 27, 2026 11:41pm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts the JSON viewer component so user-expanded/collapsed nodes persist while the underlying JSON value prop updates during incremental loads/rerenders.

Changes:

  • Removed the value watcher in list-json that called resetCollapse() on every prop update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vkarpov15 vkarpov15 merged commit a33498c into main Mar 28, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants