16 Commits
Author SHA1 Message Date
Alex Grebenyuk 1b645d3c6f Update RichTextView to extend beyond navigation bar 2026-05-17 10:33:07 -04:00
Alex Grebenyuk f706b0c2d5 Update search toolbar to use glass 2026-05-17 10:24:26 -04:00
Ruslan Kavetsky 6e8de88911 Remove forced contiguous layout when navigating to a search match
`prepare()` was setting `layoutManager.allowsNonContiguousLayout = false`
before calling `scrollRangeToVisible`. With it off, TextKit has to build
layout contiguously from the start of the document to the target range,
so jumping into a match deep inside a large response body (multi-MB
JSON) stalls noticeably.

The code already carried a `// Remove this workaround` comment, but I
don't know the original reason it was added — so this is a best-effort
cleanup. On large responses scrolling into a match feels visibly faster
with no glitches observed (jumping to the first / middle / last match,
opening with a pre-filled search term via TextViewSearchContext). If
there's a specific scenario where the workaround was needed, happy to
restore it or scope it differently.
2026-05-15 15:48:53 +08:00
Ruslan Kavetsky 00d2f16118 Speed up text search in NetworkInspector for large response bodies
Searching inside a large response (megabytes of JSON, tens of thousands of
matches) made the search field unresponsive — typing froze the UI for
seconds at a time, and stepping between matches stalled.

The hot paths were:

- Every keystroke triggered a full search pass. `isSearchingInBackground`
  serialized them but didn't drop intermediate inputs.
- After ranges came back, `didUpdateMatches` filtered and decorated each
  one on the main thread by calling `textStorage.attributes(at:)` twice
  per match to snapshot foreground / background colors. For thousands of
  matches this alone blocked the run loop.
- The "extend scroll range by 8 newlines" loop walked the text one UTF-16
  unit at a time with Character boxing, which is much slower than a
  native substring search.

This change:

- Debounces searchTerm / searchOptions updates by 200 ms so typing
  doesn't kick off a search per keystroke.
- Builds SearchMatch (technical-attribute filter + original color
  snapshots) on the background queue against the immutable originalText
  instead of touching textStorage on the main thread.
- Replaces the per-character newline scan in
  didUpdateCurrentSelectedMatch with NSString.range(of: "\n", ...).

No public API change. The "extremely slow on iOS 16" TextKit 1 path in
WrappedTextView is untouched.
2026-05-15 15:48:27 +08:00
Alex Grebenyuk 8fbce32126 Pulse 5.2 initial integration commit 2026-04-19 14:15:46 -04:00
lsh424 3adb144672 fix: Resolve log scrolling issue & Prevent app freezing on tvOS (issue kean#308) 2024-12-10 19:15:21 +09:00
kean fc36675ed1 Version 5.1 2024-09-15 17:58:17 -04:00
kean 26e16afe07 Fix PulseUI build on macOS 2024-09-04 22:02:00 -04:00
kean 093fd84983 Add visionOS to package 2024-09-03 18:52:03 -04:00
kean e92b905506 Decomission macOS (5) 2024-09-03 18:49:17 -04:00
kean dda4d92df9 Decomission macOS (3) 2024-09-03 18:23:43 -04:00
kean 973a1f248c Run swiftlint --fix 2024-07-14 15:55:18 -04:00
kean 575b345d48 Remove more conditional compilation 2024-07-14 14:31:18 -04:00
kean 8f2f52f00f Optimize searching in RichTextView 2024-07-14 13:40:50 -04:00
kean 0c0be9ecbb Remove unused isLineNumberRulerEnabled 2024-07-14 13:14:00 -04:00
kean f098d6e2f9 Move FileViewer to Features and remove conditional compilation 2024-07-14 13:12:02 -04:00