In JSON Preview counting the content in collapsed root property is missing
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
### Expected Behavior
This is about the JSON preview for API responses.
If you collapse a property, Insomnia shows the number of properties or array items, which are inside. This is a great feature.

It is expected, that this count number shows up for the root node as well, if I collapse it.
### Actual Behavior
Counting the content is not working for root node, only for the others:

### Reproduction Steps
1. Do a request on API, which returns a complex JSON object
2. Go to response Preview
3. Collapse the root node
Actually, it is the same for JSON Bodies in the HTTP request
### Is there an existing issue for this?
- [x] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.
### Which sync method do you use?
- [ ] Git sync.
- [ ] Insomnia Cloud sync.
- [ ] Local only
### Additional Information
_No response_
### Insomnia Version
11.0.2
### What operating system are you using?
Windows
### Operating System Version
Windows 10 Enterprise 22H2
### Installation method
Implicit updates
### Last Known Working Insomnia version
_No response_
Contributor guide
Research direction
Start by reproducing the issue in the JSON Preview after making a request that returns a complex JSON object, then compare collapsing the root node with collapsing nested properties. Check the corresponding JSON body view in HTTP requests as well; done means the root node displays its property or array-item count in both contexts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100