feat(chat): apply the editor's typefaces to the conversation surface

Per the 2026-11-05 owner ruling, the chat wears ProseTypography's
faces: Valkyrie OT B for agent prose/thinking, Concourse OT Book for
the user capsule and composer, UbuntuMono NFM for the mono voice.
DesignTokens gains valkyrie/concourse/ubuntuMono constructors
(Font.custom falls back to system faces when absent), and
SessionTranscriptView's lineSpacings are recalibrated to each face's
natural line box to hold the CSS leading ratios. AGENTS.md updated to
match.
This commit is contained in:
AlexKucera committed 2026-11-05 14:29:45 +01:00
1 parent 44978a4d4f
commit 7ed9b41256
3 files changed
+40 -22

No files matched your search

+2 -2
View File
@@ -20,8 +20,8 @@ Owned by the root AGENTS.md contract. The `.xcodeproj` uses **filesystem-synchro
## Workspace shell (M1, #17 + #18 / S1.1)
- `DesignTokens.swift` — palette/geometry from the design contract (`ref/Web-Prototype/museion-workspace.html` `:root` + grid): background/surface/foreground/muted/border/accent colors, radius 10, column widths (rail 56, library 232, mentor 356; the export's editor min 420 lands with #19's editor column), serif/mono font designs. **#89 (2026-10-09):** two-color world, calibrated live — `background` #FAF9F3 (chrome + focus ground), `surface` #FFFEFB (one page color for edit AND read); deliberate departure from the export palette, values live-calibrated not contract-fixed. Light-only — one palette, with the single semantic exception `readyGreen` (#153/#156: the mentor header's ready dot; a meaning, never a style color).
- `WorkspaceView.swift` — the first-frame main surface (#151: gateless — rendered unconditionally by ContentView; the engine check runs async beside it): nav rail (Posts/Sessions/Learnings/Trends + the #151 engine-status pill + Settings at bottom) + active pane. `RailButton` per the export (44×44, muted icon, hover wash, surface card + 2px edge bar when current). **#32 (S5.2):** the rail's fourth destination — Trends (`chart.xyaxis.line`, after Learnings — measurement beside memory) → `TrendsPaneView` (own file). **#28 (S2.3):** Sessions is real — `SessionsPaneView` (own file) over the engine-owned session model: `PaneHeader("Sessions")` carries the New Session control (**#30: always a Menu** — "New Session" / "New Session on \<title\>" when Posts has an open piece / "New Brainstorm" → `beginBrainstormSession`; the plain-button branch died with the second action; association stays by name/convention, `pieceTitle` on the roster entry; disabled on `!canStartSession`), two-column body — roster list at `libraryWidth` (rows in `LibraryPostRow`'s exact 2px-strip language: serif-13 name + mono-11 meta `pieceTitle · yyyy-MM-dd HH:mm`; row click = `resumeSession`, the engine replays the transcript, an engine-unknown id lands the model's honest refusal row and the entry stays) | transcript via the shared `SessionTranscriptView` (home passed through — #29 research candidates curate in either pane; **#30: the shared surface carries the freeform composer + liveness + Stop too — the pane is a conversation, not a read-only transcript**; the pane-local liveness row died with the move). Detail column: idle/starting → "Starting the mentor engine…" progress; crashed → a plain "Restart it in the Mentor pane" pointer (never a second restart flow); ready → actions row (active session name serif + engine version mono, **#30: New Post · Fork · Compact** bordered mono-11 — Fork · Compact disabled on `!canStartSession`, New Post never engine-gated (it reads in-memory transcript rows; a crashed engine must not strand the draft); New Post stages the pane-local ask — `sessionDraft` @State seeded from `draftCandidateText()`, the private `NewPostFromSessionSheet` prefills the editable candidate (origin: ai stated in-UI, Create disabled on blank), Create → `PostsModel.newPostFromSession`, dismissal is the cancel; a FAILED write keeps the sheet up with the reason inline (ApplyAskSheet posture — the edited draft is never destroyed); empty transcript = empty prefill, the sheet still works) + transcript. The pane's `.task` runs the same idempotent `openSession()` (XCTest-guarded) and seeds `model.binaryPath` from the gate when nil, so the pane can be the first to spawn the engine. Empty state names how sessions arrive (a pass, or New Session). The transcript renderer + freeform input rail live in `SessionTranscriptView` (own file) — MentorPaneView's transcript views moved there verbatim (#24's `defaultScrollAnchor(.bottom)` preserved); `isWritingRow` moved with it and MentorPaneView delegates; **#30: the composer (input 1…4 lines + send + liveness + Stop) moved there too — one conversation surface, two panes** (the Mentor pane keeps the crash card). **#155 (map #153, contract `ref/prototypes/wf154-mentor-pane-prototype.html`):** the surface wears the editorial chat voice — `speaker(of:)` (static, test-pinned) maps the model's `"Mentor: "`/`"You: "` prefixes onto agent serif-15/1.6 prose (markdown at flush, verbatim while streaming — Vivarium #97; **interpreted markdown opens http(s) ONLY — `linkVerdict` gates the surface's `openURL` environment, every other scheme discards: engine prose echoes imported content, #34 gate-at-sink doctrine**) / right-aligned terracotta-wash-14% capsule (radius 12/12/2/12, 85% of live column width — `onGeometryChange`, both panes' columns) / mono-11 status box on the fg-wash-6% card (refusals, pass kick-off labels, reveals — the system voice); ThinkingBlock port (mono-11 toggle, serif-13 muted on the wash card, open while live, collapsed when flushed, per-instance expansion state); research-note cards inherit the wash family; the composer restyles per contract — surface-fill input, ONE accent Send flipping to terracotta-outlined Stop (default-action shortcut rides Send only), floating `.thinMaterial` liveness chip above the composer (streaming only, hit-through), plain Return sends / Shift+Return breaks the line (Vivarium owner-report fix; `send()` gained the empty-trim guard), and the debug toggle seats at the composer's trailing edge via `debugBinding: Binding<Bool>?` (nil = no toggle). **#26:** Learnings is real — `LearningsPaneView` (own file), a list-only pane (Archive posture) over `<home>/learnings/`: `LearningsIndex` (nonisolated) scans type dirs → groups (dir name lowercased, library section-head voice) → entries newest-first (`YYYYMMDD-` filename prefix desc, undated last), pattern/problem/promoted read leniently via `Post.frontmatter` Line truncated
- `DesignTokens.swift` — palette/geometry from the design contract (`ref/Web-Prototype/museion-workspace.html` `:root` + grid): background/surface/foreground/muted/border/accent colors, radius 10, column widths (rail 56, library 232, mentor 356; the export's editor min 420 lands with #19's editor column), serif/mono font designs, and — 2026-11-05 owner ruling — the chat's three face constructors `valkyrie`/`concourse`/`ubuntuMono` (Valkyrie OT B / Concourse OT Book / UbuntuMono NFM, PostScript names mirroring ProseTypography; Font.custom falls back to system when absent). **#89 (2026-10-09):** two-color world, calibrated live — `background` #FAF9F3 (chrome + focus ground), `surface` #FFFEFB (one page color for edit AND read); deliberate departure from the export palette, values live-calibrated not contract-fixed. Light-only — one palette, with the single semantic exception `readyGreen` (#153/#156: the mentor header's ready dot; a meaning, never a style color).
- `WorkspaceView.swift` — the first-frame main surface (#151: gateless — rendered unconditionally by ContentView; the engine check runs async beside it): nav rail (Posts/Sessions/Learnings/Trends + the #151 engine-status pill + Settings at bottom) + active pane. `RailButton` per the export (44×44, muted icon, hover wash, surface card + 2px edge bar when current). **#32 (S5.2):** the rail's fourth destination — Trends (`chart.xyaxis.line`, after Learnings — measurement beside memory) → `TrendsPaneView` (own file). **#28 (S2.3):** Sessions is real — `SessionsPaneView` (own file) over the engine-owned session model: `PaneHeader("Sessions")` carries the New Session control (**#30: always a Menu** — "New Session" / "New Session on \<title\>" when Posts has an open piece / "New Brainstorm" → `beginBrainstormSession`; the plain-button branch died with the second action; association stays by name/convention, `pieceTitle` on the roster entry; disabled on `!canStartSession`), two-column body — roster list at `libraryWidth` (rows in `LibraryPostRow`'s exact 2px-strip language: serif-13 name + mono-11 meta `pieceTitle · yyyy-MM-dd HH:mm`; row click = `resumeSession`, the engine replays the transcript, an engine-unknown id lands the model's honest refusal row and the entry stays) | transcript via the shared `SessionTranscriptView` (home passed through — #29 research candidates curate in either pane; **#30: the shared surface carries the freeform composer + liveness + Stop too — the pane is a conversation, not a read-only transcript**; the pane-local liveness row died with the move). Detail column: idle/starting → "Starting the mentor engine…" progress; crashed → a plain "Restart it in the Mentor pane" pointer (never a second restart flow); ready → actions row (active session name serif + engine version mono, **#30: New Post · Fork · Compact** bordered mono-11 — Fork · Compact disabled on `!canStartSession`, New Post never engine-gated (it reads in-memory transcript rows; a crashed engine must not strand the draft); New Post stages the pane-local ask — `sessionDraft` @State seeded from `draftCandidateText()`, the private `NewPostFromSessionSheet` prefills the editable candidate (origin: ai stated in-UI, Create disabled on blank), Create → `PostsModel.newPostFromSession`, dismissal is the cancel; a FAILED write keeps the sheet up with the reason inline (ApplyAskSheet posture — the edited draft is never destroyed); empty transcript = empty prefill, the sheet still works) + transcript. The pane's `.task` runs the same idempotent `openSession()` (XCTest-guarded) and seeds `model.binaryPath` from the gate when nil, so the pane can be the first to spawn the engine. Empty state names how sessions arrive (a pass, or New Session). The transcript renderer + freeform input rail live in `SessionTranscriptView` (own file) — MentorPaneView's transcript views moved there verbatim (#24's `defaultScrollAnchor(.bottom)` preserved); `isWritingRow` moved with it and MentorPaneView delegates; **#30: the composer (input 1…4 lines + send + liveness + Stop) moved there too — one conversation surface, two panes** (the Mentor pane keeps the crash card). **#155 (map #153, contract `ref/prototypes/wf154-mentor-pane-prototype.html`):** the surface wears the editorial chat voice — `speaker(of:)` (static, test-pinned) maps the model's `"Mentor: "`/`"You: "` prefixes onto agent serif-15/1.6 prose (2026-11-05: the three voices wear the editor's faces — Valkyrie OT B prose/thinking, Concourse OT Book the user capsule + composer, UbuntuMono the mono voice; lineSpacings recalibrated to the faces' natural line boxes) (markdown at flush, verbatim while streaming — Vivarium #97; **interpreted markdown opens http(s) ONLY — `linkVerdict` gates the surface's `openURL` environment, every other scheme discards: engine prose echoes imported content, #34 gate-at-sink doctrine**) / right-aligned terracotta-wash-14% capsule (radius 12/12/2/12, 85% of live column width — `onGeometryChange`, both panes' columns) / mono-11 status box on the fg-wash-6% card (refusals, pass kick-off labels, reveals — the system voice); ThinkingBlock port (mono-11 toggle, serif-13 muted on the wash card, open while live, collapsed when flushed, per-instance expansion state); research-note cards inherit the wash family; the composer restyles per contract — surface-fill input, ONE accent Send flipping to terracotta-outlined Stop (default-action shortcut rides Send only), floating `.thinMaterial` liveness chip above the composer (streaming only, hit-through), plain Return sends / Shift+Return breaks the line (Vivarium owner-report fix; `send()` gained the empty-trim guard), and the debug toggle seats at the composer's trailing edge via `debugBinding: Binding<Bool>?` (nil = no toggle). **#26:** Learnings is real — `LearningsPaneView` (own file), a list-only pane (Archive posture) over `<home>/learnings/`: `LearningsIndex` (nonisoLine truncated
- `PostsPaneView.swift` — Posts destination: library column (Pass State groups in mono-11 uppercase labels, post rows with title + passState/origin meta), empty state, editor column (`PostEditorView`), mentor column (`MentorPaneView`, fixed 356). Selecting a post opens an editing session; `PaneHeader` carries the New Post button (export `.pane-head .icon-btn`). **#92:** the editor column renders the external guest (`model.externalSession`) ahead of the post session — one guest at a time, mentor column stays. **#108 (variant B, `ref/prototypes/wf104-library-ui-prototype.html`):** `PostsLibraryColumn` regroups — serif-15 semibold project section heads (lowercased in display — #108 live verdict; small caps rejected as a UI treatment for project names) + mono-11 `· N` count, Pass-State groups inside (10px mono, 0.8 opacity, leading-22 indent), collapse restored per the prototype's toggle (click the head — chevron rotates; per-view state, not persisted); `LibraryPostRow` (extracted, internal — Archive reuses it): always-2px leading strip (accent when selected — no layout shift; `UnevenRoundedRectangle` 0/8/8/0 per `.vB .post-row`), ✳ suffix on outline pieces (row-level help — a Text span isn't individually hoverable); row menu = Rename… · Convert to Post… (outline pieces only, #114 — stages the ask) · Move to Project… (`MoveToProjectSheet`, radio list of non-archived projects, Move disabled when unchanged) · Move to Archive · Move to Trash; `RenamePostSheet` internal for the Archive pane's reuse. **#144:** the library search — a plain-text field under the Posts header (debounced 250 ms, title+body filter over non-archived pieces; body scan runs off-main through `PostStore.readBody`, so frontmatter is never searched), flat results with title matches first (Finder order preserved in both halves, count line above, same `LibraryPostRow`); state is view-local (`query`/`matches`, nil = sections render), so both render sites (unfocused layout + focus-mode reveal) get the field; clearing returns the project sections. **#33 (S6.1):** the editor column's session branch passes `publish:` to PostEditorView (a mono-11 Publish toolbar button, nil = hidden — drafts/guests/previews carry none); the pane hosts the `MicropubPublishSheet` (`.sheet(isPresented:)` beside `.task(id: home)`). **#162:** the focused branch mounts the Cold Turkey chrome as overlays (`ColdTurkeySeat` bottom-center, `ColdTurkeyDot` bottom-right) and suppresses the mentor hover reveal while a block holds; leaving focus drops a stale arm-bar (`onDisappear`).
- `PostLibrary.swift` — `Post` (nonisolated: id/title/passState/origin + #107 type/project/isArchived + #32 `firstDraftStats: FirstDraftStats?`; `ContentType` post|outline) + `Post.scan(home:) -> [Post]`: **#107/ADR-0012 two-level scan** — enumerates `projects/<name>/<id>/post.md` AND `archive/<name>/<id>/post.md` (archive → isArchived), same skip guards at both levels (no post.md = lazy folder, loose files, hidden dirs, symlinked dirs), `type` read leniently (absent/unknown → post), title-sorted; Title = first non-empty line after frontmatter (`untitled` on blank, marker-only, or unterminated-frontmatter bodies); `pass_state`/`origin` frontmatter keys read leniently (First Draft/writer defaults, quoted YAML values unquoted, leading blank line before `---` tolerated). Scan runs off-main (bind/rescan in PostsModel). **#32 (S5.2):** scan also reads the five `stats_*` keys into `firstDraftStats` — `Post.FirstDraftStats` (captured Date parsed from the `yyyy-MM-dd'T'HH:mm:ss` stamp, per-access POSIX formatter — the repo's no-static convention; + `DraftStats`), nil unless EVERY key parses to a FINITE Double (`Double("nan")`/`"inf"` parse — a non-finite peak would trap the chart's y-domain; finish-audit #32). The read-back re-gates on the capture gate's immutable pair (origin writer, type post — NOT pass_state, which legitimately advances): app-internal edit paths never grow the keys, and `stats_*` arriving by import (external YAML rides verbatim) on an ai or outline piece still never renders — a migrated writer piece keeps its real arc. **#143 (OPT-F3):** `scan(home:cache:)` takes an optional `PostScanCache` (path+mtime+size-keyed parse memo — an unchanged post.md is never re-read, a moved piece re-parses at its new path, project/isArchived re-derive from the walk; nil default = the old read-everything behavior, so every other caller is unchanged). The stamp is taken BEFORE the read and keys the store — a mid-scan rewrite can never be pinned as fresh (a late overlapping store keys its own pre-read stamp; the next scan mismatches and re-reads). **#33 (S6.1):** `Post` gains `micropubURL: String?` (frontmatter `micropub_url`, read leniently but gated on `Micropub.trustworthyURL` — imported frontmatter rides verbatim, so a hostile value scans nil and never pre-arms the publish sheet; defaulted so every hand-constructed `Post(id:…)` site keeps compiling).
- `PostStore.swift` — #18 write side (nonisolated), **#107/ADR-0012 re-root**: the shared slug function (#60: lowercase, diacritic-fold, strip punctuation, whitespace→hyphens, keep CJK, 80-char cap, `untitled` fallback), `availableSlug(for:home:)` collision suffixes `-2`/`-3`… over the GLOBAL slug space (all entries under `projects/*/` AND `archive/*/` — an archived slug is never reused, restore can't collide; all comparisons through private `folded(_:)` = NFC + lowercase — the canonical compare key: APFS is case-insensitive and normalization-insensitive, and NFC-vs-NFD names (Hangul jamo, Finder-made folders) are one folder to the FS; Swift `==`/Set hashing already fold canonical equivalence, so `folded` is the explicit, tested contract with the lowercase load-bearing; `createProject`'s duplicate check uses the same fold), `folder(of:home:)` = the one id→folder resolver (projects/ before archive/, project names sorted — every write path derives its target from the id alone; nothing threads (project, id)), `writeNew(body:project:type:home:)` (lazy folder under `projects/<project>/` — default `posts`, the selected project flows in from PostsModel; #109: `type` param default `.post`, stamped first in the block — New Outline passes `.outline`; the returned Post carries it; #30: `origin` param default `.writer` — New Post from Session passes `.ai` so a session-born piece stamps immutable `origin: ai`), `overwrite` (resolves via `folder(of:)`, preserves existing type/pass_state/origin, normalizes bare posts on save; **#31 finish-audit: the three owned keys update IN PLACE on blocked files — the old stamped() round-trip erased the captured stats and foreign frontmatter on every editor save; the body always swaps to the caller's**), `rename` = retitle + move WITHIN the same parent dir (piece stays in its project, stays archived if archived; file stays `post.md`; a title slugging to the current id only retitles), `trash` (resolves via `folder(of:)` + `FileManager.trashItem` — recoverable), `readBody` (frontmatter stripped for editing). **#114 (S4):** `convert(id:headingsLadder:home:)` — the one-time in-place Convert to Post: `type` flips to post, body transforms once (verbatim = unchanged; ladder = `OutlineTree.headingsLadderBody`), id/folder never move, vanished piece throws. One-way in v1. `overwrite` + `convert` share `existingStamp(id:home:)` (folder resolve + read + preserved pass_state/origin/type derivation — one source of truth). **#22:** `openableTypes`/`isMarkdown` (.md/.markdown only, local file URLs — a dragged web link is not a document; shared `markdownExtensions` list), `importFile(at:origin:project:home:)` (copy never move; lands in the selected project else default; BOM stripped + CRLF→LF normalized at the boundary — in Swift a CRLF pair is one grapheme and every `\n` split sees one line, so the corpus machinery needs LF; external YAML keys kept verbatim with `type`/`pass_state`/`origin` set-overwritten via `mergedFrontmatter` — `type: post` wins even over an external `type: outline`; absent keys inserted before the closing `---`; empty block → fresh stamp shape; id = title slug at import, #60 collision machinery; private `materialize` is the one lazy-folder path `writeNew` shares). **#108:** `move(_:to:home:)` (projects→projects folder move; refuses archived pieces **via the resolved disk path** — never the scan snapshot's `isArchived` flag — and derives the current project from the same path, so a Finder-side move between scan and click can't misfile; validates the name via `validatedProject`, same-project confirm = no-op not an error, destination-exists = disk anomaly that throws — never clobbers), `archive(_:home:)`/`restore(_:home:)` (folder moves into/out of `archive/<project>/`, project disk-derived the same way), `unarchiveProject(_:home:)` (moves every child of `archive/<name>/` into `projects/<name>/` — one path covers fresh and merge; the source is removed only when the loop emptied it — dot-entries skipped by the move are not destroyed with the folder; duplicate-id collisions throw honestly), `createProject(named:home:)` (empty/slash/dot-prefix/`:`/control-char names + case-insensitive duplicates throw; lazily materializes `projects/<name>/`), private `relocate` behind them — post.md bytes are never rewritten by any of these; ops return Void (the rescan re-derives posts from disk). **#24 (S3.1):** a same-file `extension PostStore` carries the pass write side — `snapshotPass(id:kind:body:home:)` (pre-pass body verbatim to `<piece>/passes/pass-<n>.md`; fixed filename per pass type, so a re-run overwrites and the latest per type survives; body only, no frontmatter — the writer's diff anchor against post.md) and `advancePassState(id:kind:home:)` (monotonic: the new state is the higher of the file's pass_state and the pass's doneState via private `higherState` — passes run in any order, never regress; **#31 (S5.1): the state update iLine truncated
+18
View File
@@ -42,4 +42,22 @@ enum DesignTokens {
/// Iowan Old Style / Charter / Georgia); mono to the system monospaced.
static let serif: Font.Design = .serif
static let mono: Font.Design = .monospaced
/// The conversation surface's faces (owner ruling, 2026-11-05): the chat
/// wears the editor's typography (ProseTypography) — Valkyrie OT B the
/// prose voice (agent turns, thinking), Concourse OT Book the user
/// capsule/composer sans, UbuntuMono NFM the quiet mono voice. PostScript
/// names mirror ProseTypography; Font.custom falls back to system faces
/// if a name ever goes missing.
static func valkyrie(_ size: CGFloat) -> Font {
Font.custom("ValkyrieOTBRegular", size: size)
}
static func concourse(_ size: CGFloat) -> Font {
Font.custom("ConcourseOT3Book", size: size)
}
static func ubuntuMono(_ size: CGFloat) -> Font {
Font.custom("UbuntuMonoNFM", size: size)
}
}
+20 -20
View File
@@ -222,9 +222,9 @@ struct SessionTranscriptView: View {
/// live stream verbatim (#97).
private func agentProse(_ content: Text) -> some View {
content
.font(.system(size: 15, design: DesignTokens.serif))
.font(DesignTokens.valkyrie(15))
.foregroundStyle(DesignTokens.foreground)
.lineSpacing(9) // CSS 1.6
.lineSpacing(5.3) // CSS 1.6 — Valkyrie's natural 18.7 carries most of it
.textSelection(.enabled)
.frame(maxWidth: .infinity, alignment: .leading)
}
@@ -234,9 +234,9 @@ struct SessionTranscriptView: View {
/// bottom-trailing), capped at 85% of the visible column.
private func userCapsule(_ text: String) -> some View {
Text(text)
.font(.system(size: 13))
.font(DesignTokens.concourse(13))
.foregroundStyle(DesignTokens.foreground)
.lineSpacing(6.5) // CSS 1.5
.lineSpacing(3.7) // CSS 1.5 (19.5 − Concourse's natural 15.8)
.textSelection(.enabled)
.padding(.horizontal, 16)
.padding(.vertical, 12)
@@ -260,7 +260,7 @@ struct SessionTranscriptView: View {
/// refusals, pass kick-off labels, reveals. Fit-content width.
private func statusBox(_ text: String) -> some View {
Text(text)
.font(.system(size: 11, design: DesignTokens.mono))
.font(DesignTokens.ubuntuMono(11))
.foregroundStyle(DesignTokens.muted)
.lineSpacing(5.5) // CSS 1.5
.textSelection(.enabled)
@@ -300,7 +300,7 @@ struct SessionTranscriptView: View {
var body: some View {
Label(pattern, systemImage: "rectangle.and.pencil.and.ellipsis")
.font(.system(size: 11, design: DesignTokens.mono))
.font(DesignTokens.ubuntuMono(11))
.foregroundStyle(DesignTokens.muted)
.frame(maxWidth: .infinity, alignment: .leading)
}
@@ -339,12 +339,12 @@ struct SessionTranscriptView: View {
Button("Keep", action: keep)
.buttonStyle(.bordered)
.controlSize(.small)
.font(.system(size: 11, design: DesignTokens.mono))
.font(DesignTokens.ubuntuMono(11))
.help("Land this note in the piece's research/ folder")
Button("Reject", action: reject)
.buttonStyle(.bordered)
.controlSize(.small)
.font(.system(size: 11, design: DesignTokens.mono))
.font(DesignTokens.ubuntuMono(11))
.help("Vanish the candidate — nothing is recorded")
}
}
@@ -366,7 +366,7 @@ struct SessionTranscriptView: View {
private func meta(_ text: String) -> some View {
Text(text)
.font(.system(size: 11, design: DesignTokens.mono))
.font(DesignTokens.ubuntuMono(11))
.foregroundStyle(DesignTokens.muted)
}
}
@@ -404,7 +404,7 @@ struct SessionTranscriptView: View {
}
Text("Thinking…")
}
.font(.system(size: 11, design: DesignTokens.mono))
.font(DesignTokens.ubuntuMono(11))
.foregroundStyle(DesignTokens.muted)
}
.buttonStyle(.plain)
@@ -414,9 +414,9 @@ struct SessionTranscriptView: View {
.accessibilityValue(expanded ? "expanded" : "collapsed")
if expanded {
content
.font(.system(size: 13, design: DesignTokens.serif))
.font(DesignTokens.valkyrie(13))
.foregroundStyle(DesignTokens.muted)
.lineSpacing(7.8) // CSS 1.6
.lineSpacing(4.6) // CSS 1.6 (20.8 − Valkyrie's natural 16.2)
.textSelection(.enabled)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 14)
@@ -438,11 +438,11 @@ struct SessionTranscriptView: View {
var body: some View {
DisclosureGroup {
Text(json)
.font(.system(size: 10, design: .monospaced))
.font(DesignTokens.ubuntuMono(10))
.textSelection(.enabled)
} label: {
Text(kind)
.font(.system(size: 11, design: .monospaced))
.font(DesignTokens.ubuntuMono(11))
.foregroundStyle(.secondary)
}
.frame(maxWidth: .infinity, alignment: .leading)
@@ -465,7 +465,7 @@ private extension SessionTranscriptView {
HStack(alignment: .bottom, spacing: 8) {
TextField("Ask the mentor…", text: $draft, axis: .vertical)
.textFieldStyle(.plain)
.font(.system(size: 13))
.font(DesignTokens.concourse(13))
.lineLimit(1 ... 4)
.padding(.horizontal, 10)
.padding(.vertical, 8)
@@ -531,7 +531,7 @@ private extension SessionTranscriptView {
}
} label: {
Text(model.isStreaming ? "Stop" : "Send")
.font(.system(size: 11, design: DesignTokens.mono))
.font(DesignTokens.ubuntuMono(11))
.foregroundStyle(model.isStreaming ? DesignTokens.accent : DesignTokens.surface)
.padding(.horizontal, 14)
.frame(minHeight: 30)
@@ -561,7 +561,7 @@ private extension SessionTranscriptView {
HStack(spacing: 8) {
ProgressView().controlSize(.small)
Text("Mentor is working — Stop to interrupt.")
.font(.caption)
.font(DesignTokens.ubuntuMono(10))
.foregroundStyle(.secondary)
}
.padding(.horizontal, 12)
@@ -577,7 +577,7 @@ private extension SessionTranscriptView {
binding.wrappedValue.toggle()
} label: {
Text("debug")
.font(.system(size: 10, design: DesignTokens.mono))
.font(DesignTokens.ubuntuMono(10))
.foregroundStyle(binding.wrappedValue ? DesignTokens.accent : DesignTokens.muted)
.opacity(binding.wrappedValue ? 1 : 0.65)
}
@@ -607,9 +607,9 @@ struct ResearchNoteContent: View {
var body: some View {
VStack(alignment: .leading, spacing: 6) {
Text(candidate.title)
.font(.system(size: 13, design: DesignTokens.serif))
.font(DesignTokens.valkyrie(13))
Text(candidate.url)
.font(.system(size: 11, design: DesignTokens.mono))
.font(DesignTokens.ubuntuMono(11))
.foregroundStyle(DesignTokens.muted)
.lineLimit(1)
.truncationMode(.middle)