// The record button's toast (lane voiceline, architect 16 Oct 2026, from the// owner's 286 report; smooth, owner 02:20 IST 16 Oct 2026: no live// transcript; architect 21:05 IST 16 Oct 2026: no caption under the fan).//// At rest the bottom is bare: nothing is drawn between the caps' foot and the// record button, on any database. While the person speaks nothing is drawn —// the button's pulse is the listening. After the words are taken ONE toast// says what was understood and what happened ("Saved as a thought · Undo",// "Opened People", "Nothing came through"), then goes. It stands at the toast// edge, the top of the screen (`atToastEdge`, the owner 17 Nov 2026: every// toast at the top, never over the fan), never inside the record button's// bottom inset, which is clipped and cut it to a sliver (the owner's 289// screenshots).// Every line is the thought definition's `voice` words. One line// (`voice_line_lines`): a toast too long for it keeps its start and fades its// end (`voice_line_fade`).importSwiftUI/// What the record button's toast says now, and its act: a kept thought's/// Undo, a refused microphone's Open Settings. `FanRecord` says it; the fan/// draws it above itself (`FanToastKey`).structFanToast: Equatable, @unchecked Sendable {let words: Stringvar act: Act?structAct {let label: Stringlet run: () -> Void }staticfunc == (lhs: FanToast, rhs: FanToast) -> Bool { lhs.words == rhs.words && lhs.act?.label == rhs.act?.label }}/// The record button's toast, handed up from the button to the board, which/// hands it to the fan to draw in the page region.structFanToastKey: PreferenceKey {staticlet defaultValue: FanToast? = nilstaticfunc reduce(value: inoutFanToast?, nextValue: () -> FanToast?) { value = value ?? nextValue() }}structFanVoiceLine: View {let toast: FanToast @Environment(\.theme) privatevar theme/// The line's height: its lines of the words' size, with the words'/// own room above and below.staticfunc height(scale: ThemeScale) -> Double {Double(scale[.voiceLineLines]) * Double(scale[.fanRecordPillSize] + scale[.fanRecordPillPad]) }var body: someView {let scale = theme.scale HStack(spacing: scale[.fanCapsGap]) {// A short line stands centred; a long one keeps its start and// fades its end, inside the line's own width.ViewThatFits(in: .horizontal) { textColor.clear .overlay(alignment: .leading) { text } .clipped() .mask(fade) } .frame(maxWidth: .infinity)iflet act = toast.act {Button(act.label) { act.run() } .font(theme.type.body(scale[.fanRecordHintSize])) .foregroundStyle(theme.colors.accent.color) .accessibilityIdentifier("fan-record-undo") } } .frame(height: Self.height(scale: scale)) .padding(.horizontal, scale[.fanRecordPillPad]) .frame(maxWidth: .infinity)// The words stand on a strip of the pill's paper stock, so they read// over whatever the page draws at its foot. .background {Capsule() .fill(SearchGrammar.fill) .overlay(Capsule().strokeBorder(CottonColors.hairline, lineWidth: ComposerCardKnobs.chromeHairline)) } .cottonContentMargin() .accessibilityElement(children: .combine) .accessibilityIdentifier("fan-voice-line") }/// The line's words: one line at their natural width, never wrapped.privatevar text: someView {let scale = theme.scalereturnText(toast.words) .font(theme.type.hand(scale[.fanRecordPillSize])) .foregroundStyle(theme.colors.ink.color) .lineLimit(Int(scale[.voiceLineLines])) .fixedSize(horizontal: true, vertical: false) }/// The line's end dissolves over `voice_line_fade` points.privatevar fade: someView { HStack(spacing: 0) {Color.blackLinearGradient(colors: [.black, .clear], startPoint: .leading, endPoint: .trailing) .frame(width: theme.scale[.voiceLineFade]) } }}/// The record button's lines: the thought definition's `voice` words.publictypealiasVoiceWords = DefinitionVoiceWordsextensionDefinitionVoiceWords {/// The database's thought definition's lines; blank where no tool draws/// thoughts there.staticfunc reading(_ definitions: TableDefinitions) -> VoiceWords { definitions.playing(.thought)?.voice ?? VoiceWords(_generated: (), saved: "", undo: "", undone: "", opened: "{name}", back: "", ran: "", nothing: "", denied: "", settings: "") }/// "Opened {name}", filled.func opened(_ name: String) -> String { opened.replacingOccurrences(of: "{name}", with: name) }}