// What a line said to the one input came to, beside its change receipt// (`OneInputNote`). The words themselves go in through the dial on the phone// (owner's rule 8, 16 Oct 2026); the Mac's docked input went with the Mac// client (architect, 20 Oct 2026), and what the words do is still// `OneInputModel`'s.importCottonKitimportSwiftUI/// What the input says beside the change receipt: that the words did/// nothing, and why, or a note beside what they did. Nil when the change/// receipt says it all.structOneInputNote: Equatable {let label: String/// The words, in hand.let title: Stringlet explanation: Stringstaticfunc of(_ result: OneInputResult) -> OneInputNote? {var lines: [String] = []guard result.said != nilelse { returnnil }let label = switch result.saidKind {case .notDone?: ShellLines.line("input", "note.not_done")case .aside?, nil: ShellLines.line("input", "note.note") }iflet said = result.said { lines.append(said) }returnOneInputNote(label: label, title: result.words, explanation: lines.joined(separator: " ")) }}/// The input's note, on the receipt face, with Done to let it go.structOneInputNoteCard: View {let note: OneInputNotelet onDismiss: () -> Voidvar body: someView {ReceiptFace(label: note.label, seed: "one-input-\(note.title)", labelIdentifier: "one-input-note-head") { VStack(alignment: .leading, spacing: 6) {ReceiptBody(title: note.title, explanation: note.explanation) .accessibilityElement(children: .combine) HStack {Spacer(minLength: 8)PaperTypedButton("Done", size: 14, action: onDismiss) .accessibilityIdentifier("one-input-note-dismiss") } } }// A container, never one combined element: Done is a button a// reader reaches on its own, beside the words it lets go. .accessibilityElement(children: .contain) .accessibilityIdentifier("one-input-note") }}/// The store's question before it makes the bar's record ("Which one?"),/// on the receipt face the input's note wears: the words in hand,/// the question under them, one row per answer, and Cancel to let it go with/// nothing made. An answer waits while it is on its way.structCreateQuestionCard: View {let question: CreateQuestionlet identifier: Stringlet onAnswer: (CreateQuestion.Option) async -> Voidlet onDismiss: () -> Void @State privatevar answering: String?var body: someView {ReceiptFace(label: ShellLines.line("input", "note.question"), seed: "one-input-question-\(question.words)", labelIdentifier: "one-input-question-head") { VStack(alignment: .leading, spacing: 6) {// The words in hand and the question, read as the card's// header; each answer is a button of its own under it.ReceiptBody(title: question.words, explanation: question.question) .accessibilityElement(children: .combine) .accessibilityAddTraits(.isHeader) .accessibilityIdentifier("\(identifier)-question-words")// The card stands directly above the bar, inside the safe// area, like a receipt, and a bottom inset is drawn at the// height it asks for: a long run of ROWS pushed the head// under the clock (walk 3), and rows scrolled inside a// bounded height left the later ones never on screen (the// 8th account, walk 5 Oct). Past a few, the options are// short tags wrapped across the card, so every one is drawn// and can be tapped; only a very long run scrolls.switchSelf.drawing(question.options.count) {case .scrolledTags:ScrollView { wrapped } .frame(height: Self.scrolledHeight) .scrollBounceBehavior(.basedOnSize)case .tags: wrappedcase .rows: options } HStack {Spacer(minLength: 8)PaperTypedButton("Cancel", size: 14, action: onDismiss) .accessibilityIdentifier("\(identifier)-question-dismiss") } } } .accessibilityElement(children: .contain) .accessibilityIdentifier("\(identifier)-question") }/// Options drawn as rows; more are wrapped tags, and past/// `wrappedOptions` the tags scroll in `scrolledHeight`.staticlet plainOptions = 3staticlet wrappedOptions = 14/// How a question's answers are drawn, by how many it offers.enumDrawing: Equatable { case rows, tags, scrolledTags }/// Rows up to `plainOptions`, wrapped tags (every one on screen) up to/// `wrappedOptions`, scrolled tags past that.staticfunc drawing(_ count: Int) -> Drawing {if count > wrappedOptions { return .scrolledTags }return count > plainOptions ? .tags : .rows }/// Three option rows (about 55 points each) and half of the next.staticlet scrolledHeight: CGFloat = 190privatefunc answer(_ option: CreateQuestion.Option) {guard answering == nilelse { return } answering = option.idTask {await onAnswer(option) answering = nil } }privatevar options: someView { VStack(alignment: .leading, spacing: 6) {ForEach(question.options) { option inTypedRow(label: option.label, chevron: false) { answer(option) } .disabled(answering != nil) .accessibilityLabel(option.label) .accessibilityAddTraits(.isButton) .accessibilityIdentifier("\(identifier)-question-\(option.id)") } } }/// The same answers as tags wrapped across the card.privatevar wrapped: someView {PaperWrap(spacing: 10) {ForEach(question.options) { option inButton { answer(option) } label: { PaperTag(title: option.label, seed: option.id) } .buttonStyle(MotionButtonStyle()) .disabled(answering != nil) .accessibilityLabel(option.label) .accessibilityIdentifier("\(identifier)-question-\(option.id)") } } .frame(maxWidth: .infinity, alignment: .leading) }}