fix(ui): finish-audit fixes — blank search glyph, quadratic truncation, scope-rail refusal leak
CI / ci (push) Canceled after 0s
CI / ci (pull_request) Canceled after 0s

Three-reviewer audit of the polish overhaul:
- magnifyinglass -> magnifyingglass (blank SF Symbol, all 3 seats)
- WordBoundaryTruncation.fit measures each word once (O(n^2) -> O(n)
  on pathological imported titles; live-title pins unchanged)
- scopeHostedSession defers behind an in-flight replay instead of
  refusing (automatic actions never leak a 'Resume refused' row);
  replay completion re-fires the pending scope — pinned over the real
  client path with loadReplayHold, flip-verified
- transcript ForEach on stable row ids, not indices
- delete dead softBorder param; fold caretPastLeadingBlanks onto
  firstContentLocation; native TextField prompt for the search field
- ElidedPathText.candidates/elide nonisolated (off-actor first(where:)
  trapped the host); new pins: degenerate truncation shapes,
  firstContentLocation, elide ladder
This commit is contained in:
AlexKucera committed 2026-11-07 21:13:31 +01:00
1 parent 3a7d495b4b
commit efad422e03
13 files changed
+163 -65

No files matched your search

+1 -11
View File
@@ -424,17 +424,7 @@ struct ProseTextView: NSViewRepresentable {
/// over leading blanks to the first content line; interactive
/// placements (click, drag, typing) never route through here.
static func caretPastLeadingBlanks(_ location: Int, in text: String) -> Int {
let buffer = text as NSString
var lineStart = 0
while lineStart < buffer.length {
let line = buffer.lineRange(for: NSRange(location: lineStart, length: 0))
let lineText = buffer.substring(with: line)
if !lineText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
return location < line.location ? line.location : location
}
lineStart = NSMaxRange(line)
}
return location
max(location, ProsePresenter.firstContentLocation(text as NSString) ?? location)
}
func makeNSView(context: Context) -> NSScrollView {