Tags: sohandotgit/Porthole
Tags
Add JSON tree view mode to body viewer Adds a collapsible tree view as a fourth body-viewer mode alongside Pretty/Raw/Hex, per the design handoff. JSON is parsed with a new order-preserving parser (AtlantisJSONValue/AtlantisJSONParser) since JSONSerialization discards key order and reformats numbers, which the tree needs to render faithfully.
fix: strip Accept-Encoding header and add --compressed in curlCommand() Replaying the captured Accept-Encoding header verbatim (without --compressed) made curl dump raw gzip/br response bytes to the terminal. Drop that header and let --compressed handle negotiation/decompression instead. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Add missing body viewer support types AtlantisBodyContent, AtlantisBodyPreviewCard, AtlantisFormat, and AtlantisHexDump were referenced by AtlantisBodyViewerView but never committed, breaking the build for any consumer of the package (AtlantisBodyMode, AtlantisBodyClassification, AtlantisBodyChip, AtlantisBodySide, AtlantisBodyClassifiedKind were all undefined).
Replace body viewer with syntax-highlighted code text view Adds AtlantisCodeTextView, AtlantisSyntaxHighlighter, and AtlantisSyntaxTheme to render request/response bodies with syntax highlighting, replacing the plain AtlantisSelectableText viewer. Rewires AtlantisTrafficDetailView and AtlantisBodySearch onto the new viewer, and adds example demo payloads and highlighter/view tests.
feat: JSON syntax highlighting and search match navigation for body v… …iewer Body text is now tokenized (best-effort, not a validating parser) and colored by JSON element type — keys, string values, numbers, and true/false/null literals — cached per body load so re-coloring doesn't happen on every keystroke. Search gets next/prev navigation: a match counter plus chevron buttons step through AtlantisBodySearch's ranges, the current match is colored distinctly from the rest, and the text view auto-scrolls to it via a token-driven scrollRangeToVisible so re-navigating to the same range still scrolls. Also adds a copy-body button and a word-wrap toggle (wrapped vs horizontal-scroll) to the body detail toolbar.
fix: eliminate janky scroll for large response bodies Text view now owns its own scroll (isScrollEnabled = true) instead of self-sizing inside a List, letting TextKit lazily lay out only the visible viewport instead of the entire body up front. Font is set once at view creation instead of reapplied over the full range on every update, and the highlighted AttributedString is cached in @State and recomputed off the render path (skipped entirely when the search query is empty) instead of rebuilt on every body re-eval. Body detail screens (AtlantisBodyDetailView, AtlantisMessageDetailView) swap List for a chromeless VStack so the now-self-scrolling text view isn't nested inside another scroll container.
PreviousNext