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

+2 -2
View File
@@ -328,7 +328,7 @@ struct ElidedPathText: View {
/// The candidate ladder, longest first: the full path, then each
/// shorter variant with one more leading component kept whole.
static func candidates(_ path: String) -> [String] {
nonisolated static func candidates(_ path: String) -> [String] {
let comps = path.split(separator: "/").map(String.init)
guard comps.count > 2 else { return [path] }
var ladder = [path]
@@ -339,7 +339,7 @@ struct ElidedPathText: View {
}
/// The longest candidate whose glyph-measured width fits `width`.
static func elide(_ path: String, into width: CGFloat) -> String {
nonisolated static func elide(_ path: String, into width: CGFloat) -> String {
let font = NSFont.monospacedSystemFont(ofSize: 12, weight: .regular)
func fits(_ candidate: String) -> Bool {
(candidate as NSString).size(withAttributes: [.font: font]).width <= width