Commit 9647ef369f

9647ef369fc7b8b1c683eb00bc2def0b9ff8a819

parent: 89c5239e02

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-20 14:39 UTC

Plan: batch F rulings and the items open before Task 15

Record the fold drag's screen convention, weak-perspective path, end
tolerance and per-window segments, the reorient drag's direction and
test, the orbit maths and drag suspension, the VoiceOver action, and the
iOS 26.5 test destination. List what is open before Task 15: reaching an
earlier step, dragging back past a peak, phase or window, and multi-axis
steps in the app.

Closes #6

Layout: unified · split

docs/superpowers/plans/2026-10-19-fold.md +14 −7
@@ -1765,7 +1765,7 @@ Completing a step needs Task 12's gesture and orbiting needs Task 14's; their te
17651765
17661766- [ ] **Step 2: Run tests to verify they fail**
17671767
1768Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro' test`
1768Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.5' test`
17691769Expected: FAIL — no such project.
17701770
17711771- [ ] **Step 3: Generate the project and implement the shell, list, step layout and both canvases**
@@ -1896,11 +1896,11 @@ Expected: FAIL.
18961896
18971897- [ ] **Step 3: Implement `FoldParameterMapping` and `FoldGesture`**
18981898
1899The step completes when the parameter is 1 and the finger lifts. Releasing below 1 leaves the paper where it is.
1899The step completes when the parameter is 1 and the finger lifts; the release position counts as the finger's last position. Releasing below 1 leaves the paper where it is. Screen points are UIKit's (origin top-left, y down); the degenerate fallback advances with a downward drag. The path is projected at the camera target's depth rather than with per-point perspective, because under perspective a flap landing flat overshoots its end on screen; a 0.5-point end tolerance applies along the path, never across it. Segment boundaries are every axis window's ends, each fold-and-unfold's peak and each non-rigid phase's end; each segment follows an axis that moves throughout it, falls back to the vertical drag when its own path is under 8 points, and is one way. Under the launch argument `-UITesting` the app exposes the path as a hidden element `fold.path` for the UI tests' drag helpers; nothing of that is active otherwise.
19001900
19011901- [ ] **Step 4: Run tests to verify they pass**
19021902
1903Run: `swift test --package-path Packages/FoldKit --filter FoldParameterTests`, then `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro' test -only-testing:FoldUITests/FoldGestureTests`
1903Run: `swift test --package-path Packages/FoldKit --filter FoldParameterTests`, then `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.5' test -only-testing:FoldUITests/FoldGestureTests`
19041904Expected: PASS.
19051905
19061906- [ ] **Step 5: Commit**
@@ -1953,12 +1953,12 @@ func testTurnOverReorientsTheModelNotTheCamera() {
19531953
19541954- [ ] **Step 2: Run tests to verify they fail**
19551955
1956Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro' test -only-testing:FoldUITests/ReorientGestureTests`
1956Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.5' test -only-testing:FoldUITests/ReorientGestureTests`
19571957Expected: FAIL.
19581958
19591959- [ ] **Step 3: Implement `ReorientGesture`**
19601960
1961Gate the gesture on the current step's `kind`, so a fold drag and a reorient drag are never both live.
1961Gate the gesture on the current step's `kind`, so a fold drag and a reorient drag are never both live. A rightward drag advances and a leftward drag turns back; the width is frame n − 1's projected extent at the grab. The UI test checks the diagram and the camera (exposed under `-UITesting` as `paper.camera`) after a partial lift, since XCUITest's drag returns only on lift.
19621962
19631963- [ ] **Step 4: Run tests to verify they pass**
19641964
@@ -2039,12 +2039,12 @@ func testDiagramDoesNotRotateWhenTheModelIsOrbited() {
20392039
20402040- [ ] **Step 2: Run tests to verify they fail**
20412041
2042Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro' test -only-testing:FoldUITests/AccessibilityAuditTests`
2042Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.5' test -only-testing:FoldUITests/AccessibilityAuditTests`
20432043Expected: FAIL.
20442044
20452045- [ ] **Step 3: Implement `OrbitGesture`, the accessibility labels, the privacy manifest, the rights note and the screenshot script**
20462046
2047`take-screenshots.sh` follows `krz/daybyday/scripts/take-screenshots.sh`. `PrivacyInfo.xcprivacy` declares no tracking and no collected data.
2047`take-screenshots.sh` follows `krz/daybyday/scripts/take-screenshots.sh`. `PrivacyInfo.xcprivacy` declares no tracking and no collected data. XCUITest cannot make a two-finger pan, so the orbit and zoom maths are `Camera.orbited(by:)` and `Camera.zoomed(by:within:)` in Folding, unit-tested through the poles, and the UI tests use pinch and rotate. A pan or pinch that begins during a one-finger drag suspends the drag and restores its starting *t*. The paper view has a VoiceOver adjustable action that moves *t* by tenths; reaching 100% completes the step as a lift does.
20482048
20492049- [ ] **Step 4: Run tests to verify they pass**
20502050
@@ -2153,6 +2153,13 @@ git commit -m "The crane, the sampan and the box"
21532153
21542154---
21552155
2156## Open before Task 15
2157
2158- **Reaching an earlier or chosen step.** The app starts each model at step 1 and has no step list; the spec leaves its form open (a visible strip or revealed on demand). On the crane, revisiting a step means refolding from the start.
2159- **Dragging back past a peak, phase or window.** A fold-and-unfold cannot be dragged back once past its peak, a reverse fold past its open phase, or a staggered step past an internal window end, although the spec's first goal says a step can be folded "and back".
2160- **Multi-axis steps in the app.** The fold drag's path joins each segment's followed centroid end to end, so on a multi-axis step it can leave the paper view; a short window nested inside a long one falls back to a vertical drag while the paper moves; non-rigid steps follow the axis with the most travel per phase, untested until one ships. Check all three on the crane. The catalogue gate exercises `FoldParameterMapping` on every step but not `ReorientMapping`.
2161- On device: the fold drag's 0.5-point end tolerance is about 14° on the cup's shortest iPhone paths; check it against "the last 10° completes itself". Check that a late second finger orbits rather than folds. Measure the session and mapping build times on the crane.
2162
21562163## After the plan
21572164
21582165The plan delivers v1 complete: the engine, the compiler, the notation, the renderer, the app and four traditional models. Growing the catalogue needs no further engineering — the frog base, fish base, flapping bird and preliminary base are each a crease pattern, a script and a correction pass, gated by machinery that already exists.