Spike M's outcome: retarget the existing Paste item; narrow drag types on every focus gain
The spike's result, in the plan's Review, as Spike M asks. Proven in-process with a probe app; a real screenshot, Finder copy, Pages text and a Finder drag over the field still need hands. Recommendation: Task 17 as written; Task 16A only if the hand-checked drop over the field fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Spike M's outcome recorded
1 file changed,
+66
−0
docs/superpowers/plans/2026-11-28-native-slice2-part1.md+66 −0
CI passed — run details
CI log
=== build === CGO_ENABLED=0 go build ./... === vet === go vet ./... === fmt-check === === staticcheck === go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 ./... === govulncheck === go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./... No vulnerabilities found. === gitleaks === [90m8:29PM[0m [32mINF[0m [1mUnknown SCM platform. Use --platform to include links in findings.[0m [36mhost=[0mamadan.net [90m8:29PM[0m [32mINF[0m [1m1 commits scanned.[0m [90m8:29PM[0m [32mINF[0m [1mscanned ~2854818 bytes (2.85 MB) in 280ms[0m [90m8:29PM[0m [32mINF[0m [1mno leaks found[0m === budget === go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size budget size: 22 directories within budget === script-test === scripts/prepare-apps_test.sh ok releases lookup failure stops before ship ok app owned elsewhere stops the script ok apps listing failure stops before create ok ambiguous release dir is refused ok explicit version resolves the ambiguity ok releases match is exact, not substring ok shipped version is only promoted, existing app not created ok fresh account creates, ships, promotes to edge, enables ok failing promote stops the script ok ship is retried while uploads are rate limited all passed hack/fonts_test.sh fonts_test: ok === test === go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -count=1 ./... receipt: test step 9.208s against a 60s target (the gate's other steps are not in this figure) receipt: 16 packages ran, 0 cached, 6 without tests, 0 failed receipt: slow package 8.473s amadan.net/oficina/base/internal/webtest receipt: slow package 880ms amadan.net/oficina/base/internal/issuer receipt: slow package 626ms amadan.net/oficina/base/internal/equipo receipt: slow package 583ms amadan.net/oficina/base/internal/operations receipt: slow package 178ms amadan.net/oficina/base/internal/consumer receipt: slow test 1.51s amadan.net/oficina/base/internal/webtest TestHomeDoesNotWaitOnAStalledSnapshot receipt: slow test 1.08s amadan.net/oficina/base/internal/webtest TestAskZoneIsToldOnce receipt: slow test 640ms amadan.net/oficina/base/internal/issuer TestAuthorizeSignsForInstalledApp receipt: slow test 610ms amadan.net/oficina/base/internal/webtest TestAskUploadStalledBodyFreesItsSlot receipt: slow test 510ms amadan.net/oficina/base/internal/operations TestOperationsRefusals === native === strings: copy review's strings.json is not here (git-ignored); its comparison skipped strings: 120 in the catalog, 117 used worktree-lib_test: ok
diff --git a/docs/superpowers/plans/2026-11-28-native-slice2-part1.md b/docs/superpowers/plans/2026-11-28-native-slice2-part1.md| index 42566d9..987dd5d 100644 |
| --- a/docs/superpowers/plans/2026-11-28-native-slice2-part1.md |
| +++ b/docs/superpowers/plans/2026-11-28-native-slice2-part1.md |
| @@ -720,3 +720,69 @@ How the re-review (2026-11-28, approved) is folded in: |
| | **Nit 4** | P9: the 120-byte cut falls on a character boundary | |
| | **Nit 5** | Task 4: account `bds`, as Base was deployed on 2026-11-27 (`07ec2ec`) | |
| | **Nit 6** | Task 21: a hand check that an upload held for 45 s completes | |
| + |
| +## Spike M's outcome (2026-11-28) |
| + |
| +The spike ran on a local scratch branch (`spike/mac-paste-drop`, never |
| +pushed, thrown away once the hand checks are done). It held Base's real |
| +`Composer`, with an `attaches` hook and the drag-type narrowing added, in a |
| +probe app with three windows: the main window's composer (which attaches) |
| +beside a Search field, a panel's composer, and a Settings-like field. A |
| +script drove it in-process: first responders, ⌘V through the main menu, a |
| +menu click, and the drag types after each focus change. It never moved the |
| +mouse, and it borrowed the general pasteboard and put it back. |
| + |
| +**This session can't activate an app**, so it has no key window. The |
| +probe's route took the window it had focused as the key window. Without |
| +that, no plain `paste:` had a responder chain to go down. |
| + |
| +**Paste: the existing Edit ▸ Paste item, retargeted, holds.** |
| +- The item, found by action `paste:`, kept AppKit's title and ⌘V. |
| +- **Main composer:** |
| + - an image (PNG) pasted with ⌘V attached, and the field got nothing; |
| + - a file URL attached from a menu click; |
| + - text with RTF and a TIFF (as Pages puts it) pasted as text ("Quarterly |
| + notes"); |
| + - bold RTF became `**bold words**`, so the `pasting` flag works through |
| + the retargeted item. |
| +- **The panel's composer:** text pasted, and bold RTF became Markdown. With |
| + only an image on the board, Paste was disabled and nothing attached. |
| +- **The Settings-like field:** "ABCD1234" pasted, with an image also on the |
| + board. |
| +- **SwiftUI changing the menus** (a `CommandMenu` retitled) left the same |
| + Paste item in place, still retargeted. With its action forced back to |
| + `paste:`, as a rebuild would leave it, the route's observer |
| + (`NSApplication.didUpdateNotification` and `NSMenu.didAddItem`) took it |
| + over again, and ⌘V attached again. |
| + |
| +**Drop: narrowing on every focus gain is needed, and works.** |
| +- Focused, the composer's field and the window's shared field editor took |
| + only `public.utf8-plain-text`. |
| +- Focus on the Search field in the same window gave the shared editor all |
| + its own types back (`NSFilenamesPboardType`, `Apple URL pasteboard type`, |
| + and the rest). So the narrowing has to run on every focus gain, as R2 |
| + says. Back on the composer, it was narrowed again. |
| +- An unfocused field registers no drag types. |
| +- An `NSURL` on a pasteboard carries `public.file-url`, |
| + `NSFilenamesPboardType` and URL types, and no plain text. So the narrowed |
| + editor wouldn't take it. |
| +- SwiftUI's `onDrop` draws a `DraggingDestinationView` (registered for |
| + `public.data` and `public.item`) across the whole pane, as a sibling of |
| + the field, not an ancestor. A drop over the field reaches it only if |
| + AppKit picks the destination by position among the registered views, |
| + skipping the narrowed editor. |
| +- **Not proven:** that a real Finder drag over the field lands on the pane |
| + and inserts no path. It needs a real drag, and this session moves no |
| + mouse. |
| + |
| +**Still to do by hand** (`SPIKE_MANUAL=1 ~/amadan.net/oficina/base-spike-m/native/apple/.build/debug/BasePasteProbe`; |
| +its main window shows what attached and what was dropped): |
| +- a real screenshot (⌘⇧⌃4) pasted in the main composer; |
| +- a Finder file copied (⌘C) and pasted; |
| +- text copied from Pages; |
| +- a Finder file dropped on the field, on the pane, and on the field after |
| + focus has left it and come back. |
| + |
| +**Recommendation:** Task 17 goes ahead as written, retargeting the |
| +existing item. Task 16A isn't needed unless the hand-checked drop over the |
| +field fails. |