---
epic: 7
story: 7.1
title: "SwiftUI Two-Column Editor"
status: draft
---

## Epic 7 — macOS App (Swift/SwiftUI)
**Goal:** A beautiful, native macOS app that feels like it belongs on the platform.

### Story 7.1: SwiftUI Two-Column Editor

As a **macOS user**,
I want a native two-column layout with an editor on the left and results on the right,
So that I can see my calculations and their results side by side in a familiar, platform-native interface.

**Acceptance Criteria:**

**Given** the app is launched
**When** the main window appears
**Then** it displays a two-column layout: a text editor on the left and an answer column on the right
**And** the editor uses a custom NSTextView-backed view with system font rendering

**Given** the user types a calculation on line N in the editor
**When** the engine evaluates the line
**Then** the result appears on the corresponding line N in the right-hand answer column, vertically aligned

**Given** the document has more lines than fit in the viewport
**When** the user scrolls the editor
**Then** the answer column scrolls in sync so that line alignment is always maintained

**Given** the user has Dynamic Type set to a large accessibility size in System Settings
**When** the app renders text
**Then** both the editor and answer column respect the Dynamic Type setting and scale appropriately
**And** the layout remains usable without truncation or overlap

**Given** a document with 1000+ lines
**When** the user scrolls rapidly
**Then** scrolling is smooth (60 fps) with no visible jank or dropped frames
