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:
1 parent
44978a4d4f
commit
7ed9b41256
3 files changed
+40
-22
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user