feat(oc-docs): migrate response formatter + preview from bruno-app - #82
Closed
vasharma05-bruno wants to merge 1 commit into
Closed
Conversation
vasharma05-bruno
force-pushed
the
bru-3764-response-formatter
branch
2 times, most recently
from
July 13, 2026 13:02
ce398bc to
9ec56df
Compare
Adds a response-body format selector and preview to the playground response pane: an interactive JSON tree plus XML, HTML, and text previews, with format auto-detection from the content-type header. Ported onto main's restructured Playground: MenuDropdown is reused from main (no longer vendored in this change), and the preview components live under Playground/QueryResult. react-json-view is loaded lazily and rendered only in the browser so it does not crash SSR (server bundle / renderToStaticMarkup).
vasharma05-bruno
force-pushed
the
bru-3764-response-formatter
branch
from
July 21, 2026 12:48
e85abc2 to
df5e459
Compare
Contributor
Author
|
Rebased onto
Validation: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the response-formatter UI from bruno-app into
oc-docsand wires it into the playground response pane.itemToText-driven default trigger so it can display the selected item without achildrentrigger.<iframe>, replacing the Electron<webview>), JSON (@microlink/react-json-view), XML tree, and text. Binary previews (image/pdf/audio/video) are omitted because the docs response has no data buffer.MenuDropdownwith grouped formats and a Preview toggle in the dropdown header;useResponseFormattersplit into its own module.Notable decisions
@microlink/react-json-viewinstead of bruno'sreact-json-view(peerreact <= 17), which silently downgraded oc-docs to React 17 in this monorepo; a global override isn't viable sinceoc-spec-siteis on React 19. The fork is API-identical with peerreact >= 15.tsconfigpathsentry so@tabler/iconstype declarations resolve (itsexportsmap has notypescondition).Follow-ups
Deferred work is tracked in
packages/oc-docs/improvements.md(binary previews, dropping tippy/tabler, reusable Toggle, etc.).Verification
tsc --noEmit: 0 errorseslint --max-warnings 0: cleanvitest: passing (MenuDropdown + QueryResultPreview)🤖 Generated with Claude Code