Skip to content

Enable code folding in the console response panel - #431

Merged
KShivendu merged 1 commit into
masterfrom
enable-folding-in-response-panel
Aug 4, 2026
Merged

Enable code folding in the console response panel#431
KShivendu merged 1 commit into
masterfrom
enable-folding-in-response-panel

Conversation

@KShivendu

@KShivendu KShivendu commented Aug 4, 2026

Copy link
Copy Markdown
Member

What

Turns on Monaco's code folding in the response (right-hand) pane of the Console, so long JSON responses can be collapsed block by block the way they can in a code editor.

Folding was explicitly disabled (folding: false) in the result editor, so the only way to navigate a large response was scrolling which can become very annoying if your collection/cluster/telemetry data is huge.

-        folding: false,
+        folding: true,

Notes

  • No new dependency and no other options needed: language="json" already gives Monaco a folding-range provider (the JSON worker is wired up in EditorCommon), so the default auto strategy produces bracket-accurate fold ranges.
  • Every other folding default is left alone, so the response pane now behaves exactly like the request pane: controls appear on gutter mouseover, and folded ranges are highlighted.
  • The request editor is untouched — it never disabled folding, so it already had this.

Test plan

  • Ran a points/scroll query in the Console against a local Qdrant and confirmed the fold arrows appear in the response gutter on hover and collapse/expand nested objects and arrays.
  • prettier --check and eslint pass on the changed file.

🤖 Generated with Claude Code

The result editor had folding explicitly disabled, so long JSON responses
could only be navigated by scrolling. Monaco's JSON folding provider gives
us collapsible blocks for free, and the remaining folding defaults
(mouseover controls, highlighted folded ranges) already match the request
editor's behaviour.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@KShivendu
KShivendu force-pushed the enable-folding-in-response-panel branch from 4db68a9 to 742f3e1 Compare August 4, 2026 15:48
@KShivendu

Copy link
Copy Markdown
Member Author

Before:

before

After:

Collapsible toggle button is shown only when the user brings cursor near line number. Also collapsed sections are highlighted.

after

@KShivendu
KShivendu merged commit 8799709 into master Aug 4, 2026
4 checks passed
@KShivendu
KShivendu deleted the enable-folding-in-response-panel branch August 4, 2026 18:25
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