Commit 9647ef369f
Verified · cmc
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 | |||
| 1765 | 1765 | ||
| 1766 | - [ ] **Step 2: Run tests to verify they fail** | 1766 | - [ ] **Step 2: Run tests to verify they fail** |
| 1767 | 1767 | ||
| 1768 | Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro' test` | 1768 | Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.5' test` |
| 1769 | Expected: FAIL — no such project. | 1769 | Expected: FAIL — no such project. |
| 1770 | 1770 | ||
| 1771 | - [ ] **Step 3: Generate the project and implement the shell, list, step layout and both canvases** | 1771 | - [ ] **Step 3: Generate the project and implement the shell, list, step layout and both canvases** |
| @@ -1896,11 +1896,11 @@ Expected: FAIL. | |||
| 1896 | 1896 | ||
| 1897 | - [ ] **Step 3: Implement `FoldParameterMapping` and `FoldGesture`** | 1897 | - [ ] **Step 3: Implement `FoldParameterMapping` and `FoldGesture`** |
| 1898 | 1898 | ||
| 1899 | The step completes when the parameter is 1 and the finger lifts. Releasing below 1 leaves the paper where it is. | 1899 | The 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. |
| 1900 | 1900 | ||
| 1901 | - [ ] **Step 4: Run tests to verify they pass** | 1901 | - [ ] **Step 4: Run tests to verify they pass** |
| 1902 | 1902 | ||
| 1903 | Run: `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` | 1903 | Run: `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` |
| 1904 | Expected: PASS. | 1904 | Expected: PASS. |
| 1905 | 1905 | ||
| 1906 | - [ ] **Step 5: Commit** | 1906 | - [ ] **Step 5: Commit** |
| @@ -1953,12 +1953,12 @@ func testTurnOverReorientsTheModelNotTheCamera() { | |||
| 1953 | 1953 | ||
| 1954 | - [ ] **Step 2: Run tests to verify they fail** | 1954 | - [ ] **Step 2: Run tests to verify they fail** |
| 1955 | 1955 | ||
| 1956 | Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro' test -only-testing:FoldUITests/ReorientGestureTests` | 1956 | Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.5' test -only-testing:FoldUITests/ReorientGestureTests` |
| 1957 | Expected: FAIL. | 1957 | Expected: FAIL. |
| 1958 | 1958 | ||
| 1959 | - [ ] **Step 3: Implement `ReorientGesture`** | 1959 | - [ ] **Step 3: Implement `ReorientGesture`** |
| 1960 | 1960 | ||
| 1961 | Gate the gesture on the current step's `kind`, so a fold drag and a reorient drag are never both live. | 1961 | Gate 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. |
| 1962 | 1962 | ||
| 1963 | - [ ] **Step 4: Run tests to verify they pass** | 1963 | - [ ] **Step 4: Run tests to verify they pass** |
| 1964 | 1964 | ||
| @@ -2039,12 +2039,12 @@ func testDiagramDoesNotRotateWhenTheModelIsOrbited() { | |||
| 2039 | 2039 | ||
| 2040 | - [ ] **Step 2: Run tests to verify they fail** | 2040 | - [ ] **Step 2: Run tests to verify they fail** |
| 2041 | 2041 | ||
| 2042 | Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro' test -only-testing:FoldUITests/AccessibilityAuditTests` | 2042 | Run: `xcodebuild -project App/Fold.xcodeproj -scheme Fold -destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=26.5' test -only-testing:FoldUITests/AccessibilityAuditTests` |
| 2043 | Expected: FAIL. | 2043 | Expected: FAIL. |
| 2044 | 2044 | ||
| 2045 | - [ ] **Step 3: Implement `OrbitGesture`, the accessibility labels, the privacy manifest, the rights note and the screenshot script** | 2045 | - [ ] **Step 3: Implement `OrbitGesture`, the accessibility labels, the privacy manifest, the rights note and the screenshot script** |
| 2046 | 2046 | ||
| 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. |
| 2048 | 2048 | ||
| 2049 | - [ ] **Step 4: Run tests to verify they pass** | 2049 | - [ ] **Step 4: Run tests to verify they pass** |
| 2050 | 2050 | ||
| @@ -2153,6 +2153,13 @@ git commit -m "The crane, the sampan and the box" | |||
| 2153 | 2153 | ||
| 2154 | --- | 2154 | --- |
| 2155 | 2155 | ||
| 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 | |||
| 2156 | ## After the plan | 2163 | ## After the plan |
| 2157 | 2164 | ||
| 2158 | The 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. | 2165 | The 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. |