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

+10 -19
View File
@@ -409,32 +409,23 @@ struct PostsLibraryColumn: View {
/// #144 + mercury#54 (r4): a real field surface — surface fill + hairline
/// border on the column's chrome, taller than a text row; the placeholder
/// renders in the palette's muted ink via the under-Text trick (stronger
/// than the system's faint default — it reads as an input, not sidebar
/// text). r5 (argon#44, mercury#52, sol#37): the insertion caret tints
/// r5 (argon#44, mercury#52, sol#37): the insertion caret tints
/// terracotta (.tint on the field), and the small magnifier glyph sits at
/// the field's leading edge (icon→text spacing rides the HStack's 6pt).
/// the field's leading edge (icon→text spacing rides the HStack's 6pt);
/// the placeholder is the native prompt wearing the palette's muted ink
/// (the composer's pattern).
/// r8 (argon#6, mercury#12): focus draws a QUIET 1pt ring — accent at 0.6,
/// present but never the strongest saturation on screen.
private var searchField: some View {
HStack(spacing: 6) {
Image(systemName: "magnifyinglass")
Image(systemName: "magnifyingglass")
.font(.system(size: 11))
.foregroundStyle(DesignTokens.muted)
ZStack(alignment: .leading) {
if query.isEmpty {
Text("Search posts")
.font(.system(size: 12))
.foregroundStyle(DesignTokens.muted)
.allowsHitTesting(false)
}
TextField("", text: $query)
.textFieldStyle(.plain)
.font(.system(size: 12))
.focused($searchFocused)
.tint(DesignTokens.accent)
.accessibilityLabel("Search posts")
}
TextField("Search posts", text: $query, prompt: Text("Search posts").foregroundStyle(DesignTokens.muted))
.textFieldStyle(.plain)
.font(.system(size: 12))
.focused($searchFocused)
.tint(DesignTokens.accent)
if isSearching {
Button {
query = ""