feat(ui): design-council polish overhaul
CI / ci (push) Canceled after 0s
CI / ci (pull_request) Canceled after 0s
CI / ci (push) Canceled after 0s
CI / ci (pull_request) Canceled after 0s
Eight arbitrated rounds over the workspace surface: piece-scoped Mentor hosting, conversation-voice system messages, glyph-measured roster truncation, bounded learnings/archive columns, symmetric trends grid, top-aligned settings forms, serif editor titles, outline rail rhythm, launch auto-focus root fix. New seams pinned by SessionScopeTests + WordBoundaryTruncationTests; full suite green.
This commit is contained in:
1 parent
b2db859887
commit
3a7d495b4b
21 files changed
+2287
-516
No files matched your search
@@ -0,0 +1,56 @@
|
||||
//
|
||||
// WordBoundaryTruncationTests.swift
|
||||
// Museion
|
||||
//
|
||||
// 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) →
|
||||
// Round-8 head-biased split (sol#3): the roster title's truncation
|
||||
// seam. The r7 split kept only the "Pass N ·" label and maximized the
|
||||
// suffix — the unique head (the topic) died at the same elision point
|
||||
// as before; the seam now grows the head into ~60% of the glyph budget
|
||||
// (label + leading words) and fits the longest suffix in what remains.
|
||||
// Pins: short-string passthrough, the mid-word head cut landing at a
|
||||
// word edge, and the exact strings for the two live Handoff roster
|
||||
// titles.
|
||||
//
|
||||
|
||||
import CoreGraphics
|
||||
import Foundation
|
||||
@testable import Museion
|
||||
import Testing
|
||||
|
||||
@Suite("WordBoundaryTruncationTests")
|
||||
struct WordBoundaryTruncationTests {
|
||||
@Test func `short string passes through`() {
|
||||
#expect(WordBoundaryTruncation.fit("Brainstorm", maxWidth: 192) == "Brainstorm")
|
||||
#expect(WordBoundaryTruncation.fit("Pass 1 · The expected value of showing up", maxWidth: 192)
|
||||
== "Pass 1 · The expected value of showing up")
|
||||
#expect(WordBoundaryTruncation.fit("", maxWidth: 192) == "")
|
||||
}
|
||||
|
||||
@Test func `mid word cut lands at word boundary`() {
|
||||
// The native cut rendered "Markdo…" — with no suffix fitting
|
||||
// beside the head, the head truncates at its word edge.
|
||||
let out = WordBoundaryTruncation.fit("Markdown Notes", maxWidth: 80, lines: 1)
|
||||
#expect(out == "Markdown…")
|
||||
#expect(!out.hasSuffix("Markdo…"))
|
||||
}
|
||||
|
||||
@Test func `handoff titles split head biased`() {
|
||||
// Round-7 (argon#14/sol#32/47): the two live Handoff roster
|
||||
// titles died at the shared "Reading-Mode Pivot:…" boilerplate —
|
||||
// the distinguishing tail never rendered. Round-8 (sol#3): the
|
||||
// split biases toward the TOPIC — the head keeps the label plus
|
||||
// the leading words ("Museion Handoff —", ~60% of the glyph
|
||||
// budget, measured serif-13 semibold against the roster's 192pt
|
||||
// two-line width); the shared tail shrinks to the longest suffix
|
||||
// that still fits ("apex) vs. Hand-rolled TextKit" — r7's was
|
||||
// the full "→ HTML (+ apex) vs. Hand-rolled TextKit").
|
||||
let pass2 = "Pass 2 · Museion Handoff — Reading-Mode Pivot: Markdown → HTML (+ apex) vs. Hand-rolled TextKit"
|
||||
let pass1 = "Pass 1 · Museion Handoff — Reading-Mode Pivot: Markdown → HTML (+ apex) vs. Hand-rolled TextKit"
|
||||
#expect(WordBoundaryTruncation.fit(pass2, maxWidth: 192, lines: 2)
|
||||
== "Pass 2 · Museion Handoff — … apex) vs. Hand-rolled TextKit")
|
||||
#expect(WordBoundaryTruncation.fit(pass1, maxWidth: 192, lines: 2)
|
||||
== "Pass 1 · Museion Handoff — … apex) vs. Hand-rolled TextKit")
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user