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

+14 -1
View File
@@ -1,6 +1,6 @@
//
// WordBoundaryTruncationTests.swift
// Museion
// MuseionTests
//
// Round-5 (mercury#4/sol#8/argon#16) → Round-6 glyph-measured
// (mercury#4/sol#9) → Round-7 middle-eliding (argon#14/sol#32/47) →
@@ -53,4 +53,17 @@ struct WordBoundaryTruncationTests {
#expect(WordBoundaryTruncation.fit(pass1, maxWidth: 192, lines: 2)
== "Pass 1 · Museion Handoff — … apex) vs. Hand-rolled TextKit")
}
/// Finish-audit edge pins: the seam passes degenerate shapes through
/// untouched — whitespace-only splits to no words, a space-free CJK
/// title is ONE word, and a single word wider than the line keeps its
/// own line (lineLimit(2) renders it). None may crash or mangle.
@Test func `degenerate shapes pass through unchanged`() {
let whitespace = " "
#expect(WordBoundaryTruncation.fit(whitespace, maxWidth: 192, lines: 2) == whitespace)
let cjk = "静かなウェブの再考" // no spaces — ONE word, wider than the line
#expect(WordBoundaryTruncation.fit(cjk, maxWidth: 40, lines: 2) == cjk)
let singleLongWord = "Supercalifragilisticexpialidocious"
#expect(WordBoundaryTruncation.fit(singleLongWord, maxWidth: 50, lines: 2) == singleLongWord)
}
}