Files
yaak-mountain-loop/apps/yaak-client/components
Gregory Schier 4a3af02eb6 Collapse very long lines in response viewers
A response body on one enormous line, typically base64 image data in JSON,
stalls the UI. Cost tracks the longest line rather than the document size,
because soft wrap has to measure a line end to end to find its break points.

Read-only editors now collapse over-long lines to a placeholder that opens the
full value in a paged dialog. Tokens over 5k chars collapse individually where
there is a grammar, so a minified body keeps its keys visible; anything still
past column 10k is collapsed too, which needs no grammar. The document is
untouched, so copy, filter and save still see the full text.

Also replaces the whole-document md5 behind the editor state cache with a
sampled fingerprint. It ran on every editor update and again on restore.

Measured in WKWebView, per render pass:

  1MB single line   221ms -> 51ms
  3MB single line   968ms -> 138ms
  3MB switch away and back   265ms -> 37ms
2026-08-12 14:50:04 -07:00
..
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-07-02 09:53:22 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-07-02 09:53:22 -07:00
2026-07-02 09:53:22 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-07-02 09:53:22 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-07-02 09:53:22 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-07-02 09:53:22 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-07-02 09:53:22 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-07-02 09:53:22 -07:00
2026-07-02 09:53:22 -07:00
2026-07-02 09:53:22 -07:00
2026-07-02 09:53:22 -07:00
2026-05-07 15:50:10 -07:00
2026-05-07 15:50:10 -07:00
2026-07-02 09:53:22 -07:00
2026-07-02 09:53:22 -07:00
2026-05-07 15:50:10 -07:00