Compare commits
10
Commits
4a056f9c53
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9aa0314564 | ||
|
|
dd8637e7c7 | ||
|
|
97893147a6 | ||
|
|
d183d735d7 | ||
|
|
c959b67f14 | ||
|
|
653ca69d1f | ||
|
|
1b0c23ae5b | ||
|
|
46e87e678c | ||
|
|
64a7eaa37e | ||
|
|
d5a515091a |
No files matched your search
@@ -2,16 +2,16 @@
|
||||
name: release
|
||||
description: "Cut a Museion release: bump, notes, rail, DMG, tag, publish."
|
||||
platforms: [macos]
|
||||
version: 0.1.1
|
||||
version: 0.3.0
|
||||
author: Hermes
|
||||
metadata:
|
||||
hermes:
|
||||
tags: [Release, Museion, Xcode, Notarization, Gitea, apex]
|
||||
tags: [Release, Museion, Xcode, Notarization, Gitea, apex, Micro.blog, BuyMeACoffee]
|
||||
---
|
||||
|
||||
# Cutting a Museion release
|
||||
|
||||
Runs a release end to end: refresh the bundled apex renderer, version bump, changelog heading, release notes, the verify rail, sliced commits, an annotated tag, the notarized DMG from `scripts/release.sh`, then push and the Gitea release. The skill decides nothing about signing — `release.sh` and the Account Holder's keychain do that — and it bumps no version on its own. Push and the forge release wait for Alexander's explicit go (root `AGENTS.md`, User Preferences).
|
||||
Runs a release end to end: refresh the bundled apex renderer, version bump, changelog heading, release notes, the verify rail, sliced commits, an annotated tag, the notarized DMG from `scripts/release.sh`, then push and the Gitea release, then the announcements — Micro.blog and Buy Me a Coffee — each left as a **draft** for Alexander to publish. The skill decides nothing about signing — `release.sh` and the Account Holder's keychain do that — and it bumps no version on its own. Push and the forge release wait for Alexander's explicit go (root `AGENTS.md`, User Preferences); neither announcement is ever published by the agent.
|
||||
|
||||
## When to Use
|
||||
|
||||
@@ -25,6 +25,8 @@ Runs a release end to end: refresh the bundled apex renderer, version bump, chan
|
||||
- A valid **Developer ID Application** identity: `security find-identity -v -p codesigning`. When it is missing, the fix is Alexander's (developer.apple.com + a Keychain Access CSR — the `scripts/release.sh` header has the route); the agent imports nothing.
|
||||
- Notary profile `museion-notary`, registered once by the Account Holder. The agent never runs `notarytool store-credentials`.
|
||||
- `tea` logged in to `git.babylondreams.de` (the default login).
|
||||
- Micro.blog announcement token in the login keychain: `security find-generic-password -a micro.blog -s com.babylondreams.Museion.release-announce -w` prints it (step 11 has the one-time `add-generic-password`). When missing, Alexander generates an App Token (Micro.blog → Account → App Tokens) and the agent stores it — never the other way around.
|
||||
- Ego Browser running and logged in to Buy Me a Coffee — `buymeacoffee-post` has the one-time check.
|
||||
- Budget: ~2 min for `release.sh`, ~7 min for the rail.
|
||||
|
||||
## Procedure
|
||||
@@ -71,7 +73,7 @@ Run through the `terminal` tool. Each step ends on a check; the next starts when
|
||||
cp "$W/apex-arm64" Museion/Resources/apex
|
||||
```
|
||||
Bump `## apex X.Y.Z` + the `vX.Y.Z` prose in `Museion/Resources/THIRD-PARTY-NOTICES.md`; add a `### Changed` → `- **reading:**` line under the release heading in `CHANGELOG.md`. Done when `otool -l Museion/Resources/apex | grep -A2 LC_RPATH | grep path` prints exactly `@executable_path/../Resources/libyaml.bundle`, `codesign -dvv` shows `flags=0x10000(runtime)` + the Developer ID authority, `Museion/Resources/apex --version` prints the new version, and `--no-mixed-lists` appears in `--help` (ADR-0011's load-bearing flag). If a future apex links libyaml statically (asked upstream), drop the rpath/codesign dylib steps and the `.bundle`, and update this skill. An upgrade found after tagging costs a second rail run and a second notarization.
|
||||
2. **Bump.** `MARKETING_VERSION` on every target and configuration in `Museion.xcodeproj/project.pbxproj`; `CURRENT_PROJECT_VERSION` stays. Read back: `xcodebuild -project Museion.xcodeproj -scheme Museion -configuration Release -destination 'platform=macOS,arch=arm64' -showBuildSettings | awk -F'= ' '/MARKETING_VERSION = /'`. Done when it prints the new version.
|
||||
2. **Bump.** Patch for a bug-fix cut (`X.Y.0` → `X.Y.1`), minor for a feature cut (`X.Y.1` → `X.Y+1.0`) — `MARKETING_VERSION` on every target and configuration in `Museion.xcodeproj/project.pbxproj`; `CURRENT_PROJECT_VERSION` stays. Read back: `xcodebuild -project Museion.xcodeproj -scheme Museion -configuration Release -destination 'platform=macOS,arch=arm64' -showBuildSettings | awk -F'= ' '/MARKETING_VERSION = /'`. Done when it prints the new version.
|
||||
3. **Changelog heading.** `## [X.Y.Z] - YYYY-MM-DD` over the former `[Unreleased]` entries, a fresh empty `[Unreleased]` above, one pointer line to the notes (`CHANGELOG.md` follows Common Changelog). Done when every entry since the last tag sits under the heading.
|
||||
4. **Release notes** — `docs/releases/X.Y.Z.md`, the CHANGELOG section distilled for humans: what is in it (grouped highlights), the milestones it closes, install, known limits, numbers. Shape precedent: `docs/releases/0.1.0.md`. Written from the shipped surface — every claim traces to a CHANGELOG entry or to source.
|
||||
5. **README matches what shipped:** install copy, requirements, license pointer; the minimum macOS from `MACOSX_DEPLOYMENT_TARGET`, never from prose.
|
||||
@@ -89,7 +91,42 @@ Run through the `terminal` tool. Each step ends on a check; the next starts when
|
||||
```
|
||||
|
||||
Done when the API shows `draft: false`, one asset at the local byte size, and a token-authenticated download of the asset sha256-matches the local file.
|
||||
11. **Session log + DOX.** `write-log` for the release; the devlog commit follows the tag (the log is the record about the release, not part of it). DOX pass: root `AGENTS.md` (commands block, scripts index, session-log window) and `docs/AGENTS.md`. The log commit rides the next go.
|
||||
11. **Micro.blog announcement — a DRAFT, never a publish.** The post goes to Micro.blog as `post-status: draft` so Alexander reviews and publishes it himself (the `preview` link lands in the report). Token: a Micro.blog **App Token** (Account → App Tokens) stored ONCE in the login keychain under its own service — never the app's production slot (`com.babylondreams.Museion.micropub`, account `micro.blog` — that is the app's live credential, see MuseionTests/AGENTS.md), never a file in the repo:
|
||||
```bash
|
||||
security add-generic-password -U -a micro.blog -s com.babylondreams.Museion.release-announce -w '<app token>' </dev/null
|
||||
```
|
||||
(The `</dev/null` is load-bearing: without it `security` prompts for a retype.) Then:
|
||||
|
||||
```bash
|
||||
TOK=$(security find-generic-password -a micro.blog -s com.babylondreams.Museion.release-announce -w)
|
||||
curl -sS -H "Authorization: Bearer $TOK" 'https://micro.blog/micropub?q=config' # read destinations + channels
|
||||
```
|
||||
**`mp-destination` is mandatory on this account**: `q=config` lists three microblogs and `microblog-default` is `false` on every one, so a post without it is ambiguous. The main blog is `https://AlexKucera.micro.blog/` (name `alexanderkucera.com`); the other two are a tweets cross-post and a test blog. Article posts take `mp-channel: default` (the `channels` list: `default` = Posts, `pages` = Pages). Post:
|
||||
```bash
|
||||
python3 - "$TOK" <<'PY'
|
||||
import json, sys, urllib.request
|
||||
tok = sys.argv[1]
|
||||
payload = {"type": ["h-entry"], "properties": {
|
||||
"name": ["Museion X.Y.Z"],
|
||||
"content": ["<the announcement, markdown>"],
|
||||
"post-status": ["draft"],
|
||||
"mp-destination": ["https://AlexKucera.micro.blog/"],
|
||||
"mp-channel": ["default"]}}
|
||||
req = urllib.request.Request("https://micro.blog/micropub", data=json.dumps(payload).encode(),
|
||||
headers={"Authorization": f"Bearer {tok}", "Content-Type": "application/json"}, method="POST")
|
||||
with urllib.request.urlopen(req, timeout=30) as r:
|
||||
print(r.status, r.headers.get("Location"), r.read().decode())
|
||||
PY
|
||||
```
|
||||
Body: `docs/releases/X.Y.Z.md` is too long for a microblog post — distill it to a short announcement (what was fixed in plain words, the download link, the release-page link, "Developer ID signed and notarized"). A draft does NOT syndicate, so the `syndicate-to` targets in `q=config` (Mastodon/Bluesky/Threads) are not touched until Alexander publishes. Read back before reporting: `GET '/micropub?q=source&url=<Location>'` must show `post-status: draft` and the content intact — a 2xx alone is not a result. Done when the read-back says draft and the report carries the `url` (the post's final address) and the `preview` link. `preview` is display-only — never the publish/update target. A token pasted into chat is in the transcript: recommend rotation after the run.
|
||||
12. **Buy Me a Coffee announcement — a DRAFT, never a publish.** The step-11 announcement as a BMC post, left for Alexander to publish. The mechanics (Ego Browser, the `scripts/bmc.js` driver, selectors, pitfalls) live in the `buymeacoffee-post` skill; the release only fixes the `INPUT`:
|
||||
```js
|
||||
action: "create", mode: "draft", audience: "public",
|
||||
title: "Museion X.Y.Z",
|
||||
html: <the step-11 announcement as HTML>,
|
||||
```
|
||||
Done when `RESULT.mode` is `"draft"` and `RESULT.editUrl` is a `https://buymeacoffee.com/posts/<id>/edit` URL — the script prints `null` when the drafts list does not show the row, and that is not done. The edit URL goes in the report beside the Micro.blog `preview` link.
|
||||
13. **Session log + DOX.** `write-log` for the release; the devlog commit follows the tag (the log is the record about the release, not part of it). DOX pass: root `AGENTS.md` (commands block, scripts index, session-log window) and `docs/AGENTS.md`. The log commit rides the next go.
|
||||
|
||||
## Quick Reference
|
||||
|
||||
@@ -102,7 +139,9 @@ Run through the `terminal` tool. Each step ends on a check; the next starts when
|
||||
- Gatekeeper: `spctl -a -t open --context context:primary-signature -v dist/Museion-X.Y.Z.dmg`
|
||||
- Push: `git push origin main vX.Y.Z`
|
||||
- Release: `tea releases create --tag vX.Y.Z --target <sha> -t "Museion X.Y.Z" -f <notes> -a ./dist/Museion-X.Y.Z.dmg`
|
||||
- Read back: `tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'`
|
||||
- Read back: `tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'` (Gitea spells it `tag_name`, not `tag`)
|
||||
- Micro.blog: `POST https://micro.blog/micropub` JSON `h-entry` + `post-status: draft` + `mp-destination` (mandatory — no default blog) + `mp-channel: default` → `202` + `Location`; read back `q=source&url=…` → `post-status: draft`. Token: Keychain service `com.babylondreams.Museion.release-announce`. Never publish.
|
||||
- Buy Me a Coffee: `buymeacoffee-post` → `create` + `mode: "draft"` + `audience: "public"` → `RESULT.editUrl` into the report. Never publish.
|
||||
|
||||
## Pitfalls
|
||||
|
||||
@@ -114,10 +153,14 @@ Run through the `terminal` tool. Each step ends on a check; the next starts when
|
||||
- A DMG built before the last binary or script change is stale: rebuild, re-notarize, and the sha256 in the report is the one that ships.
|
||||
- The tag moves only while local; after the push a fix is a new version.
|
||||
- `tea releases create` takes the tag via `--tag` OR the positional — both is "ambiguous arguments". `@file` bodies work only on `tea api`; releases take `-f <file>`.
|
||||
- The release asset download 404s without a token (private repo). Read the token from `~/Library/Application Support/tea/config.yml` into a shell variable for the `curl` — never print it.
|
||||
- The release asset download 404s without a token (private repo). Read the token from `~/Library/Application Support/tea/config.yml` into a shell variable for the `curl` — never print it. `grep -E '^\s*token:'` + `sed` is enough; PyYAML is not installed on the system python.
|
||||
- `tea releases create` prints NOTHING on success (exit 0, empty output). The `tea api` read-back is the only proof — and Gitea's release JSON has `tag_name`, not GitHub's `tag`.
|
||||
- `security add-generic-password -w <value>` without `</dev/null` prompts for a retype and fails with "passwords don't match" when stdin is not a tty; the item is NOT stored and the next read returns 0 chars. Always `</dev/null`, always read the length back.
|
||||
- A Micro.blog post without `mp-destination` is a gamble on this account — `q=config` shows three microblogs and none is `microblog-default`. Read `q=config` before every announcement; the destination set can change.
|
||||
- `q=source&url=…` read-back does not echo `mp-destination` or `mp-channel`; the post's `Location` host (`alexanderkucera.com`) is the evidence the destination took.
|
||||
- `core.hooksPath=scripts/hooks`: the pre-push hook is the lint gate; the rail is yours to run before tagging.
|
||||
- A dylib dropped into a synced Resources folder gets linked into the app by Xcode's classifier; vendored libraries ride a `.bundle` folder (ADR-0011).
|
||||
|
||||
## Verification
|
||||
|
||||
`tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'` → `draft: false`, one asset whose downloaded sha256 equals `shasum -a 256 dist/Museion-X.Y.Z.dmg`; `spctl -a -t open --context context:primary-signature -v dist/Museion-X.Y.Z.dmg` → `accepted, source=Notarized Developer ID`.
|
||||
`tea api '/repos/{owner}/{repo}/releases/tags/vX.Y.Z'` → `draft: false`, one asset whose downloaded sha256 equals `shasum -a 256 dist/Museion-X.Y.Z.dmg`; `spctl -a -t open --context context:primary-signature -v dist/Museion-X.Y.Z.dmg` → `accepted, source=Notarized Developer ID`. Micro.blog: `GET https://micro.blog/micropub?q=source&url=<Location>` → `post-status: draft`, content intact. Buy Me a Coffee: `RESULT.mode: "draft"` + `RESULT.editUrl` in the report. Both drafts sit in Alexander's queues awaiting his publish.
|
||||
@@ -9,3 +9,4 @@ CLAUDE.md
|
||||
.claude/
|
||||
*.profraw
|
||||
.secrets
|
||||
.hermes
|
||||
@@ -115,7 +115,7 @@ When the user requests a durable behavior change, record it here or in the relev
|
||||
| `MuseionTests/AGENTS.md` | Swift Testing unit suite (hosted in the app) |
|
||||
| `MuseionUITests/` | XCUITest smoke test — single file, no child doc yet |
|
||||
| `scripts/` | Verify rail + hooks + build/deploy/release-packaging scripts — contracts live in each script's header; full-test.sh is the sanctioned verify rail (#190), release.sh cuts the DMG from an already-bumped commit, no child doc |
|
||||
| `.agents/skills/` | Project-local agent skills (cross-tool convention, committed) — `release/`: the end-to-end release runbook (bump → notes → rail → tag → DMG → go-gated push + Gitea release); no child doc |
|
||||
| `.agents/skills/` | Project-local agent skills (cross-tool convention, committed) — `release/`: the end-to-end release runbook (apex refresh → bump → notes → rail → tag → DMG → go-gated push + Gitea release → Micro.blog + Buy Me a Coffee announcements as drafts); no child doc |
|
||||
| `docs/AGENTS.md` | Durable documentation — ADRs and their conventions |
|
||||
| `ref/writing skills/AGENTS.md` | Bundled writing-skill set — the G3a payload seeded into the museion profile |
|
||||
| `GLOSSARY.md` | Binding project glossary — shared vocabulary for app, mentor, and docs |
|
||||
@@ -149,6 +149,8 @@ Single-context: `GLOSSARY.md` + `docs/adr/` at the repo root. See `docs/agents/d
|
||||
|
||||
### Testing
|
||||
- Gate-running rules are encoded in `scripts/full-test.sh` (#190) — run `./scripts/full-test.sh start` + `status` polling (`summary` for the finished counts), never hand-rolled xcodebuild/xcresult incantations. The rest of this section is authoring rules the script cannot encode.
|
||||
- macOS 27.2 (verified on 27.2.1) routes a drag to the DEEPEST destination — a LIVE NSTextView registers itself for drag types (a bare `NSTextView(frame:)` reads `registeredDraggedTypes == []`, so a standalone probe lies; lldb on the running app shows the list), matches Finder drags via `NSFilenamesPboardType`, and its stock `performDragOperation` pastes the file path; the window-level SwiftUI `.dropDestination` never fires over it — the inverse of the 27.0.1 ruling #141 was verified on. Drag routing is an OS-version claim: own the drop at the view (override the `NSDraggingDestination` methods without super) and re-dogfood after every OS point release; instrumented real handlers + one human drag settle which destination fires (#141 follow-up, 2026-12-03)
|
||||
- A pin that drives a seam introduced WITH the fix has no broken-build past to fail on — drive the framework entry point itself (`DragInfoStub` for `NSDraggingDestination`, the scripted transport for the ACP wire), or the pin passes with the fix reverted (#141 follow-up, `image-drop-27-2-drag-routing-pastes-path`)
|
||||
- A model-owned real-clock ticker races a test's injected decisive ticks — a >1 s main-actor stall lets the live ticker complete a met goal first, flipping pins on elapsed-time text; give `start(...)` a `spawnsTicker: Bool = true` seam and opt machine tests out (#162)
|
||||
- Two FSEvent-burst rescans can double-count one shared `PostScanCache` miss (both snapshot the count before either stamps it) → `contentRevision` double-bumps, benign over-invalidation — tests pinning settled-state revision must quiesce the burst (stability loop ≥ the 0.5 s FSEvents latency) before snapshotting (#197)
|
||||
- A scripted transport double fires onCrash/onMessage BEFORE resuming the continuation it answers — resume-first lets the awaiting task close its assertion window (confirmation count 0) before the callback lands (#178)
|
||||
@@ -174,15 +176,15 @@ Session logs live in `docs/devlog/` (one per completed task/issue/milestone). Fu
|
||||
|
||||
<!-- write-log: window-start -->
|
||||
| Date | Log |
|
||||
| --- | --- |
|
||||
| 2026-12-01 | [20261201-release-010-readme-notes-packaging_log.md](docs/devlog/20261201-release-010-readme-notes-packaging_log.md) |
|
||||
| 2026-11-23 | [20261123-home-repoint-retains-old-editor-target_log.md](docs/devlog/20261123-home-repoint-retains-old-editor-target_log.md) |
|
||||
| 2026-11-19 | [20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md](docs/devlog/20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md) |
|
||||
| 2026-11-17 | [20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md](docs/devlog/20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md) |
|
||||
| 2026-11-17 | [20261117-issue193-split-fat-files-along-postsmodel-pattern_log.md](docs/devlog/20261117-issue193-split-fat-files-along-postsmodel-pattern_log.md) |
|
||||
| 2026-11-17 | [20261117-issue192-collapse-gate-running-learnings-into-verify-rail-pointer_log.md](docs/devlog/20261117-issue192-collapse-gate-running-learnings-into-verify-rail-pointer_log.md) |
|
||||
| 2026-11-17 | [20261117-issue197-repo-wide-swiftlint-green-documented-lint-contract_log.md](docs/devlog/20261117-issue197-repo-wide-swiftlint-green-documented-lint-contract_log.md) |
|
||||
| 2026-11-17 | [20261117-issue190-full-test-verify-rail-pre-push-hook_log.md](docs/devlog/20261117-issue190-full-test-verify-rail-pre-push-hook_log.md) |
|
||||
| 2026-11-16 | [20261116-failed-flush-discarded-on-document-switch_log.md](docs/devlog/20261116-failed-flush-discarded-on-document-switch_log.md) |
|
||||
| 2026-11-13 | [20261113-fold-typing-budget-pin_log.md](docs/devlog/20261113-fold-typing-budget-pin_log.md) |
|
||||
<!-- write-log: window-end -->
|
||||
|------|-----|
|
||||
| 2026-12-03 | [20261203-issue205-reveal-in-finder-copy-path_log.md](20261203-issue205-reveal-in-finder-copy-path_log.md) |
|
||||
| 2026-12-03 | [20261203-issue204-fix-cards-jump-to-the-anchor_log.md](20261203-issue204-fix-cards-jump-to-the-anchor_log.md) |
|
||||
| 2026-12-03 | [20261203-image-drop-27-2-drag-routing-pastes-path_log.md](20261203-image-drop-27-2-drag-routing-pastes-path_log.md) |
|
||||
| 2026-12-03 | [20261203-release-011-apex-refresh-is-step-one_log.md](20261203-release-011-apex-refresh-is-step-one_log.md) |
|
||||
| 2026-12-01 | [20261201-release-010-readme-notes-packaging_log.md](20261201-release-010-readme-notes-packaging_log.md) |
|
||||
| 2026-11-30 | [20261130-external-watch-compares-unnormalized-text_log.md](20261130-external-watch-compares-unnormalized-text_log.md) |
|
||||
| 2026-11-23 | [20261123-home-repoint-retains-old-editor-target_log.md](20261123-home-repoint-retains-old-editor-target_log.md) |
|
||||
| 2026-11-19 | [20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md](20261119-issue200-gate-quit-time-flushes-through-departure-gate_log.md) |
|
||||
| 2026-11-17 | [20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md](20261117-acp-backpressure-defeats-timeout-and-shutdown_log.md) |
|
||||
| 2026-11-17 | [20261117-issue193-split-fat-files-along-postsmodel-pattern_log.md](20261117-issue193-split-fat-files-along-postsmodel-pattern_log.md) |
|
||||
<!-- write-log: window-end -->
|
||||
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file. The format
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- **library:** **Reveal in Finder** and **Copy Path** on every piece row — the library column's menu and the Archive pane's (#205) — one shared `FinderHandOffButtons` fragment in the workspace chrome over a model-resolved path: `PostsModel.fileURL(for:)` answers the piece's `post.md` through the one `PostStore.folder(of:home:)` resolver against the watched Home (never the scan snapshot), and a vanished piece answers nil so both entries no-op instead of revealing a stale path. Reveal selects the file in Finder; Copy Path puts the POSIX path on the pasteboard (Finder's own form; the pasteboard is cleared first). Library placement sits between Move to Archive and the destructive Trash behind a divider; the Archive menu appends after Convert. +3 tests (projects/ resolve, archive/ resolve, vanished → nil), flip-verified — bypassing the resolver reddens exactly the vanished and archive pins. Suite 735
|
||||
|
||||
- **fix cards:** **Jump** on a Fix Card selects the anchor's span in the piece's editor and makes the main window key (#204) — the borderless button sits in every non-stale card's action row (closed cards keep it; a stale anchor has nothing to land on); the span is the card's quote at its 1-based occurrence, resolved against the LIVE session text so a dirty buffer still lands, and it rides the reading flip-back's caret rail (one token counter; a zero-length hint stays a bare caret, a non-zero range selects). A jump leaves reading mode first, writes nothing, and re-fires on every click. Two review rounds closed the view-layer gaps the pure pins could not see: a jump dropped in reading mode, a main window that never became key (`NSApp.activate` is a no-op once the palette's click activated the app), a leading-blank caret hop that moved a span onto the title, and a cursor record taken before the scroll. +3 tests (`anchorRange` occurrence math with a UTF-16 fixture, the model's reveal stamp, the editor's `landingSpan`), all flip-verified. Suite 732
|
||||
|
||||
## [0.1.2] - 2026-12-03
|
||||
|
||||
Human-readable notes: [docs/releases/0.1.2.md](docs/releases/0.1.2.md).
|
||||
|
||||
### Fixed
|
||||
|
||||
- **editor:** Dropping an image file on the prose editor pastes the file path instead of ingesting it (#141 follow-up; macOS 27.2.1 dogfood 2026-12-03; unticketed fix) — #141 was field-verified on 27.0.1, where the window-level SwiftUI `.dropDestination` starved every deeper destination; 27.2 routes a drag to the DEEPEST destination, and a live NSTextView registers itself for drag types (it matches Finder drags through `NSFilenamesPboardType`), so its stock `performDragOperation` → `readSelection` pasted the path and the window destination never fired — the same for a markdown file dropped on the editor (path instead of guest). The editor text views now share a `FileDropTextView` base that owns the drops landing on them: URL-bearing drags route (never `super`) — the prose editor through the one new `AppGateState.routeFileDrop` (Cold Turkey guard → markdown → guest, anything else → `ingestDrop`), which the window destination also uses for drops landing outside the editor (one router, one surface per drag; a landed drop hops to Posts as markdown always did); the outline rows have no route and bounce instead of pasting the path; text-only drags keep the stock drop; URL-less drags bounce. The pasteboard probe is memoized per `changeCount` (a 20k-URL drag measured 137 ms per mouse-move uncached). `ingestDrop` refuses web URLs loudly with the type strip (a browser image drag has no file to copy), and a file that vanished between drag and drop refuses as missing, not as a folder. +9 tests — the drag overrides driven through a real `NSDraggingInfo` mock (a Finder-shaped drag routes and never pastes the path, an unrouted view claims nothing, a text drag keeps the stock drop, raw image data bounces, the probe follows the pasteboard, the outline rows bounce, web URLs and vanished files refuse with the right notice) and the router's own pins (guest, Cold Turkey refusal, ingest hand-off, mixed refusal); all 9 flip-verified. Verified with one real Finder drag on 27.2.1. Suite 729
|
||||
|
||||
## [0.1.1] - 2026-12-03
|
||||
|
||||
Human-readable notes: [docs/releases/0.1.1.md](docs/releases/0.1.1.md).
|
||||
|
||||
@@ -123,6 +123,10 @@ _Avoid_: reject, dismiss
|
||||
Accepting a mechanical Fix Card so its edit lands in the file. Demonstration cards never offer it — they close Done or Skip.
|
||||
_Avoid_: accept, fix (verb)
|
||||
|
||||
**Jump**:
|
||||
Selecting a Fix Card's anchor span in the piece's editor — the span the card points at, revealed and selected, the editor made key. A view act: records nothing, writes nothing. A stale anchor offers none.
|
||||
_Avoid_: go to, scroll to, reveal
|
||||
|
||||
**Done**:
|
||||
Closing a Fix Card because the writer rewrote the span — the demonstration lane's terminal, beside Apply and Skip. Records nothing.
|
||||
_Avoid_: applied, complete
|
||||
|
||||
@@ -424,7 +424,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 27.0;
|
||||
MARKETING_VERSION = 0.1.1;
|
||||
MARKETING_VERSION = 0.1.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.Museion;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
REGISTER_APP_GROUPS = YES;
|
||||
@@ -461,7 +461,7 @@
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
MACOSX_DEPLOYMENT_TARGET = 27.0;
|
||||
MARKETING_VERSION = 0.1.1;
|
||||
MARKETING_VERSION = 0.1.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.Museion;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
REGISTER_APP_GROUPS = YES;
|
||||
@@ -484,7 +484,7 @@
|
||||
DEVELOPMENT_TEAM = 3M7APDAAC5;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 27.0;
|
||||
MARKETING_VERSION = 0.1.1;
|
||||
MARKETING_VERSION = 0.1.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
@@ -506,7 +506,7 @@
|
||||
DEVELOPMENT_TEAM = 3M7APDAAC5;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 27.0;
|
||||
MARKETING_VERSION = 0.1.1;
|
||||
MARKETING_VERSION = 0.1.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
@@ -526,7 +526,7 @@
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 3M7APDAAC5;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 0.1.1;
|
||||
MARKETING_VERSION = 0.1.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
@@ -546,7 +546,7 @@
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = 3M7APDAAC5;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 0.1.1;
|
||||
MARKETING_VERSION = 0.1.2;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.babylondreams.MuseionUITests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
STRING_CATALOG_GENERATE_SYMBOLS = NO;
|
||||
|
||||
+12
-11
@@ -23,16 +23,16 @@ Owned by the root AGENTS.md contract. The `.xcodeproj` uses **filesystem-synchro
|
||||
The map and the contracts, one bullet per file. Pin-level detail lives in the test files' scenario headers (see MuseionTests/AGENTS.md); devlog narratives in `docs/devlog/`.
|
||||
|
||||
- `DesignTokens.swift` — palette/geometry. Two-color world, live-calibrated (deliberate departure from the export palette): `background` #FAF9F3 (chrome + focus ground), `surface` #FFFEFB (one page color for edit AND read); light-only, the single semantic exception `readyGreen` (the mentor ready dot — a meaning, never a style color). Radius 10; column widths rail 56 / library 232 / mentor 356; chat face constructors `valkyrie`/`concourse`/`ubuntuMono` (Font.custom falls back to system).
|
||||
- `WorkspaceView.swift` — first-frame main surface, rendered unconditionally (gateless: the engine check runs async beside it). Nav rail Posts / Sessions / Learnings / Trends / Archive + engine-status pill + Settings. Column collapse mirrors the export's media queries as pane collapse — library hides < 1100 px, mentor < 920 px; never a fixed four-column minWidth. Window-level `.dropDestination` (markdown only → external guest): ONE window-level destination is the whole routing surface under this hosting — nested editor-level SwiftUI destinations and NSTextView drag registrations starve (field-verified); a mixed md+image set refuses loudly. The house ask sheets present here (pending-state + binding pattern; the sheet structs live in `WorkspaceViewSheets.swift`, #193). #193 splits: `ArchivePaneView` → `ArchivePaneView.swift`, shared chrome (`SelectedRowStrip`/`BorderedSecondaryButtonStyle`/`PaneHeader`) → `WorkspaceChrome.swift`; `RailButton` stays here (the rail is its only caller).
|
||||
- `ArchivePaneView.swift` — #193: the #108 Archive pane (moved from WorkspaceView.swift) — archive/ as a rail destination, List-only: clicking a piece selects it and hops to Posts (where the editor column lives); reuses `LibraryPostRow`.
|
||||
- `WorkspaceView.swift` — first-frame main surface, rendered unconditionally (gateless: the engine check runs async beside it). Nav rail Posts / Sessions / Learnings / Trends / Archive + engine-status pill + Settings. Column collapse mirrors the export's media queries as pane collapse — library hides < 1100 px, mentor < 920 px; never a fixed four-column minWidth. Window-level `.dropDestination`: the drop surface for drags that land OUTSIDE the editor — macOS 27.2.1 routes a drag to the DEEPEST destination, so over the editor the text view takes the drag itself (`FileDropTextView`'s drag handlers) and this destination never fires (the inverse of the 27.0.1 ruling #141 was verified on); both route through `AppGateState.routeFileDrop` — the ONE file-drop router (pure-markdown → external guest, anything else → `ingestDrop`, Cold Turkey–guarded; a mixed md+image set and web URLs refuse loudly). A landed drop hops to Posts (unreachable for images today — the editor mounts only there). The house ask sheets present here (pending-state + binding pattern; the sheet structs live in `WorkspaceViewSheets.swift`, #193). #193 splits: `ArchivePaneView` → `ArchivePaneView.swift`, shared chrome (`SelectedRowStrip`/`BorderedSecondaryButtonStyle`/`PaneHeader`) → `WorkspaceChrome.swift`; `RailButton` stays here (the rail is its only caller).
|
||||
- `ArchivePaneView.swift` — #193: the #108 Archive pane (moved from WorkspaceView.swift) — archive/ as a rail destination, List-only: clicking a piece selects it and hops to Posts (where the editor column lives); reuses `LibraryPostRow`. Row menu: Move Back / Rename / Convert, plus #205 Reveal in Finder / Copy Path.
|
||||
- `WorkspaceViewSheets.swift` — #193: the house ask sheets (moved from WorkspaceView.swift) — `OriginAskSheet` (the ONE origin ask per import batch, #94), `OutlineGuardSheet` (#111 mixed-content), `ConvertSheet` (#114), `NewProjectSheet` (#108).
|
||||
- `WorkspaceChrome.swift` — #193: the shared chrome (moved from WorkspaceView.swift) — `SelectedRowStrip` (the selected-row capsule), `BorderedSecondaryButtonStyle` (the bordered secondary button), `PaneHeader` (the 52pt pane-head row); every pane reuses them.
|
||||
- `WorkspaceChrome.swift` — #193: the shared chrome (moved from WorkspaceView.swift) — `SelectedRowStrip` (the selected-row capsule), `BorderedSecondaryButtonStyle` (the bordered secondary button), `PaneHeader` (the 52pt pane-head row); every pane reuses them. #205 `FinderHandOffButtons` — the ONE Reveal in Finder / Copy Path fragment every piece-listing row menu mounts directly (library column, Archive pane); both act on `model.fileURL(for:)`, a nil URL no-ops.
|
||||
- `PostsPaneView.swift` — Posts destination (#193: the library column and the row live in their own files): editor column, mentor column (fixed 356). Editor column renders the external guest ahead of the post session (one guest at a time). Focused branch mounts the Cold Turkey chrome as overlays; lock transitions never restructure the editor column.
|
||||
- `PostsLibraryColumn.swift` — #193: the library column (moved from PostsPaneView.swift), shared by the unfocused layout and the focus-mode left reveal — one implementation, both surfaces. Project section heads + Pass-State groups, collapse toggle per-view; owns the rename + move sheets (`RenamePostSheet`, `MoveToProjectSheet`) and the row context menu. Library search: debounced, title+body over non-archived pieces through the file-scope `librarySearch` mount, body scan off-main through `readBody` (frontmatter never searched). `LaunchFocusReset` (r8) rides the column: the window's first become-key resigns focus back to the window, once per process.
|
||||
- `LibraryPostRow.swift` — #193: the post row (moved from PostsPaneView.swift) — 2px leading strip, ✳ on outline pieces, row menu Rename/Convert/Move to Project/Move to Archive/Trash; the Archive pane reuses it.
|
||||
- `PostsLibraryColumn.swift` — #193: the library column (moved from PostsPaneView.swift), shared by the unfocused layout and the focus-mode left reveal — one implementation, both surfaces. Project section heads + Pass-State groups, collapse toggle per-view; owns the rename + move sheets (`RenamePostSheet`, `MoveToProjectSheet`) and the row context menu (#205: the shared `FinderHandOffButtons` fragment, between Move to Archive and Trash). Library search: debounced, title+body over non-archived pieces through the file-scope `librarySearch` mount, body scan off-main through `readBody` (frontmatter never searched). `LaunchFocusReset` (r8) rides the column: the window's first become-key resigns focus back to the window, once per process.
|
||||
- `LibraryPostRow.swift` — #193: the post row (moved from PostsPaneView.swift) — 2px leading strip, ✳ on outline pieces, row menu Rename/Convert/Move to Project/Move to Archive/Reveal in Finder/Copy Path/Trash (the menu is attached by the callers — `PostsLibraryColumn.swift`, `ArchivePaneView.swift`); the Archive pane reuses it.
|
||||
- `PostLibrary.swift` — `Post` + `Post.scan`: two-level scan over `projects/<name>/<id>/post.md` AND `archive/<name>/<id>/post.md` (ADR-0012), skip guards at both levels (lazy folders, loose files, hidden dirs, symlinked dirs); frontmatter keys read leniently (First Draft/writer/post defaults); title = first non-empty body line, `untitled` fallbacks; runs off-main. `stats_*` keys load only if EVERY value parses finite (a non-finite peak would trap the chart y-domain); read-back re-gates on the named immutable pair (`PostFrontmatter.isUnaidedFirstDraftPair` — origin writer, type post; never pass_state, which legitimately advances). `scan(home:cache:)` takes a `PostScanCache` (path+mtime+size memo; the stamp is taken BEFORE the read, so a mid-scan rewrite can never pin as fresh). `micropubURL` gated on `Micropub.trustworthyURL` — imported YAML rides verbatim, so hostile values scan nil.
|
||||
- `PostFrontmatter.swift` — #180: the Post frontmatter codec — the ONE lenient read (`parse`/`split`/`decoded`) and the three write postures behind one known-key table (`ownedKeys`: type, pass_state, origin — one insertion-order rule): fresh stamp (`stamped`), merge-import (`mergingImport` — external keys verbatim, ours win), update-keys (`updating` — the in-place line-walk, every other line byte-identical). Absorbed and deleted `PostStore.stamped/splitFrontmatter/mergedFrontmatter` and `LearningDecay.stampingFrontmatter` byte-identically (merge-import's documented prefix-preservation divergence excepted). Owns the two named eligibility predicates both gates consume: `isUnaidedFirstDraftPair` (writer ∧ post — the scan's read-back gate) and `isCaptureEligible` (pair ∧ First Draft — the capture gate). Learning/Fix Card documents stay out of scope; the learnings dismiss stamp rides the generic update posture.
|
||||
- `PostStore.swift` — write side (nonisolated). Shared slug (lowercase, diacritic-fold, strip punctuation, whitespace→hyphens, keep CJK, 80-char cap); collision suffixes over the GLOBAL slug space (projects + archive — an archived slug is never reused), all comparisons through `folded` = NFC + lowercase (APFS is case- and normalization-insensitive); `folder(of:home:)` is the ONE id→folder resolver — write paths derive their target from the id alone. `writeNew` defaults `type: .post` / `origin: .writer` (session-born pieces pass `.ai`, immutable). `overwrite` preserves type/pass_state/origin and updates owned keys IN PLACE via the codec's update posture — block rewrites erase captured stats and foreign frontmatter. `rename` = retitle + move within the same parent. `importFile` copies (never moves), strips BOM + normalizes CRLF→LF at the boundary, external YAML keys verbatim with our `type`/`pass_state`/`origin` winning. Project ops (`move`/`archive`/`restore`/`unarchiveProject`/`createProject`) derive current state from the resolved DISK path, never the scan snapshot; post.md bytes are never rewritten by them; `createProject` validates names (empty/slash/dot/`:`/control + case-insensitive duplicates throw). Pass substrate: `snapshotPass` (pre-pass body verbatim to `passes/pass-<n>.md`, fixed name per type), `advancePassState` (monotonic, in-place stamp; also ticks the decay clock — a failed tick never fails a pass). `writeResearchNote` is the ONLY path to `research/` (a symlinked dir refuses). `captureFirstDraftStats` — eligibility is the codec's named `isCaptureEligible` predicate over the file's own frontmatter; failure never fails the pass. `ingestImage` copies into `assets/`, publishable types only (what can't ship can't enter); `illustrationRef` is the one `` builder.
|
||||
- `PostStore.swift` — write side (nonisolated). Shared slug (lowercase, diacritic-fold, strip punctuation, whitespace→hyphens, keep CJK, 80-char cap); collision suffixes over the GLOBAL slug space (projects + archive — an archived slug is never reused), all comparisons through `folded` = NFC + lowercase (APFS is case- and normalization-insensitive); `folder(of:home:)` is the ONE id→folder resolver — write paths derive their target from the id alone. `writeNew` defaults `type: .post` / `origin: .writer` (session-born pieces pass `.ai`, immutable). `overwrite` preserves type/pass_state/origin and updates owned keys IN PLACE via the codec's update posture — block rewrites erase captured stats and foreign frontmatter. `rename` = retitle + move within the same parent. `importFile` copies (never moves), strips BOM + normalizes CRLF→LF at the boundary, external YAML keys verbatim with our `type`/`pass_state`/`origin` winning. Project ops (`move`/`archive`/`restore`/`unarchiveProject`/`createProject`) derive current state from the resolved DISK path, never the scan snapshot; post.md bytes are never rewritten by them; `createProject` validates names (empty/slash/dot/`:`/control + case-insensitive duplicates throw). Pass substrate: `snapshotPass` (pre-pass body verbatim to `passes/pass-<n>.md`, fixed name per type), `advancePassState` (monotonic, in-place stamp; also ticks the decay clock — a failed tick never fails a pass). `writeResearchNote` is the ONLY path to `research/` (a symlinked dir refuses). `captureFirstDraftStats` — eligibility is the codec's named `isCaptureEligible` predicate over the file's own frontmatter; failure never fails the pass. `ingestImage` copies into `assets/`, publishable types only (what can't ship can't enter; a file the disk can't stat refuses as `missing`, never as a folder); `illustrationRef` is the one `` builder.
|
||||
- `DraftStats.swift` — the four unaided-first-draft metrics (burstiness, typeTokenRatio, sentenceVariation, trigramRepetition), pure and never NaN; `words(in:)` is the ONE word-count rail (Cold Turkey counts with it — text metrics can never drift).
|
||||
- `WritingGoal.swift` — the pure goal engine (no UI, no clock): `now` injected, `isMet` live and unlatched (deleting below target un-mets).
|
||||
- `WritingLockState.swift` — the lock machine + kiosk: 1 s ticker + per-keystroke `feed(text:)` drive the goal run, `tick(at:)` completes on the first met tick; kiosk = the 6-option combo recipe, enter/exit replay only what entry toggled, exit clears options FIRST; ⌘W/⌃⌘F/⌘N refusals = a local keyDown monitor matched by KEY CODE + exact modifier set + lowercased character net (charactersIgnoringModifiers is layout- and Caps-Lock-dependent); hosted-test guard = full no-op (never kiosk the test machine); nothing persists — the block dies with the session. `WritingLockAppDelegate` (same file) owns BOTH quit refusals: #162 asks once while a block holds; #200 gates quit-time document departure FIRST (never walk away from a block the quit then refuses to complete) — `quitReply(posts:)` is the pure decision (nil posts passes; the pins inject here), the one spoken refusal alert is hosted-guarded like the kiosk.
|
||||
@@ -41,15 +41,16 @@ The map and the contracts, one bullet per file. Pin-level detail lives in the te
|
||||
- `Pass.swift` — `PassKind` (pass1/pass2 — the app's own names) + `PassContext.stub` (the pinned minimal engine prompt: verdict in the reply, findings as fix-card tool calls, research as candidate tool calls — the engine never writes to the piece folder) + `estimateTokens` (chars/4).
|
||||
- `BlindRead.swift` — neutral "Version A/B" prompt (both bodies inline, origin-free words never appear — the judge must not know which is the rewrite; caller randomizes order), ask = pick + one line why; `reveal` mapping appended by the model ONLY after the turn ends.
|
||||
- Micropub (`Micropub.swift`, `MicropubMedia.swift`, `MicropubPublishSheet.swift`) — the Micro.blog publish path. Client over the injectable Transport: draft = h=entry (name, markdown content verbatim, post-status draft, sorted keys; `category:` frontmatter NEVER travels; NO `photo` property — uploaded illustrations ride INLINE in content, refs rewritten to uploaded URLs on the WIRE only, the piece on disk never changes). Every URL through `trustworthyURL` (https + host + no line/control characters — the URL is trust-boundary data landing in frontmatter); 401/403 → authFailed with `error_description`; `preview` is display-only, never the publish target. `MicropubTokenStore` = the app's own login-keychain credential (ADR-0014's no-Keychain rule covers only provider keys). Media: `illustrations(in:)` parses only `` refs (remote refs ride as prose; multi-line alts don't parse at all — by design); parse + rewrite share ONE regex; markdown-active URLs ride the angle form. The model rail (`uploadIllustrations`) is the publish FLOOR: whitespace-empty alt refuses BEFORE any wire traffic, payload reads are contained (`../` or a symlinked asset refuses), uploads are all-or-nothing, style judgment stays with the author. The sheet owns Send as Draft → Publish, each an explicit click; refusals inline with buttons kept.
|
||||
- `PostsModel.swift` — @MainActor @Observable, app-scoped. Domain extensions live in their own files (guard+Convert `PostsModelOutline.swift`, passes+Blind Read `PostsModelPasses.swift`, fix cards `PostsModelCards.swift`, write rail+structural ops `PostsModelWrites.swift`, external guest+imports `PostsModelImports.swift`, watcher+rescan `PostsModelWatcher.swift` (home of `PostsWatcher`) — the #146/#193 splits). **#179 write rail**: every library store write (draft save, session-born post, rename, move to project, archive/restore, trash, convert, project creation, import batch, pass advance) rides `performWrite` — ONE seam pairing the write with exactly one rescan and owning the error strip (cleared BEFORE the write, so importFiles' mid-closure per-file failures survive; a nil-Home refusal writes nothing); the MODEL owns the Home (`watchedHome` — written only by the watcher extension's `startWatching` behind `bind`, driven by WorkspaceView's root `.task(id: museionHome)` (first frame + every repoint, whichever pane is showing); no public method takes a Home parameter); the editor's debounced flush and the micropub publish stay OUTSIDE the rail (own error semantics). `PostDraft` in-memory until first save; `mountID` keys the editor `.id` so every staging REMOUNTS (the outliner re-seeds its tree). Mixed-outline guard: a lossy outline select HOLDS the ask over an empty editor (nothing can normalize on ⌘S before the choice); reselect of the held piece is a no-op. Convert: consent rechecked at answer time (Headings aborts when the body went lossy behind the ask); converting the open piece tears down and reopens routed prose. `runPass` chain: guards through `guardOpenPieceRun` (#181: the ONE guard rail shared with blindRead — nothing running, mentor not mid-turn, engine ready, open saved piece) → readiness (missingKey names the provider) → flush → snapshot (unconditional, even for a later cancel) → capture stats → lint emit → `runningPass` live → own-engine run → advance ONLY on `.ended` with stopReason ≠ "refusal"; #179 audit: a Home repoint across the engine's turn REFUSES the advance with a strip message (the rail resolves `watchedHome` at call time — stamping into the repointed library would be silent on a slug collision). `blindRead` rides the same guard rail; nothing advances or records. `refreshCards` rides the rescan + open tails; `applyCard` = flush-first, stale anchor flags the card with no text change, the edit lands through `EditorSession.adoptText`; `promoteCard` writes a Learning and touches no text. `micropubSendDraft` = flush-first, ONE disk read serves both wire fields, success stamps `micropub_url`. `canArmWritingLock`/`editorBodyText` mirror the editor's outline routing (prose only). #200: quit is a document departure — `shutdown()` routes both sessions through `documentsMayDepart` (void — the verdict channel is quitReply's); `PostsModel.active` (weak static, registered by `AppGateState.init` — the `WritingLockState.active` precedent) is the quit gate's reachability, bare test rigs never register.
|
||||
- `PostsModel.swift` — @MainActor @Observable, app-scoped. Domain extensions live in their own files (guard+Convert `PostsModelOutline.swift`, passes+Blind Read `PostsModelPasses.swift`, fix cards `PostsModelCards.swift`, write rail+structural ops `PostsModelWrites.swift`, external guest+imports `PostsModelImports.swift`, watcher+rescan `PostsModelWatcher.swift` (home of `PostsWatcher`), (Home, ID) identity `PostsModelIdentity.swift` — `openSessionTargets` + #205 `fileURL(for:)`, the row menus' post.md path, a pure read) — the #146/#193 splits. **#179 write rail**: every library store write (draft save, session-born post, rename, move to project, archive/restore, trash, convert, project creation, import batch, pass advance) rides `performWrite` — ONE seam pairing the write with exactly one rescan and owning the error strip (cleared BEFORE the write, so importFiles' mid-closure per-file failures survive; a nil-Home refusal writes nothing); the MODEL owns the Home (`watchedHome` — written only by the watcher extension's `startWatching` behind `bind`, driven by WorkspaceView's root `.task(id: museionHome)` (first frame + every repoint, whichever pane is showing); no public method takes a Home parameter); the editor's debounced flush and the micropub publish stay OUTSIDE the rail (own error semantics). `PostDraft` in-memory until first save; `mountID` keys the editor `.id` so every staging REMOUNTS (the outliner re-seeds its tree). Mixed-outline guard: a lossy outline select HOLDS the ask over an empty editor (nothing can normalize on ⌘S before the choice); reselect of the held piece is a no-op. Convert: consent rechecked at answer time (Headings aborts when the body went lossy behind the ask); converting the open piece tears down and reopens routed prose. `runPass` chain: guards through `guardOpenPieceRun` (#181: the ONE guard rail shared with blindRead — nothing running, mentor not mid-turn, engine ready, open saved piece) → readiness (missingKey names the provider) → flush → snapshot (unconditional, even for a later cancel) → capture stats → lint emit → `runningPass` live → own-engine run → advance ONLY on `.ended` with stopReason ≠ "refusal"; #179 audit: a Home repoint across the engine's turn REFUSES the advance with a strip message (the rail resolves `watchedHome` at call time — stamping into the repointed library would be silent on a slug collision). `blindRead` rides the same guard rail; nothing advances or records. `refreshCards` rides the rescan + open tails; `applyCard` = flush-first, stale anchor flags the card with no text change, the edit lands through `EditorSession.adoptText`; `promoteCard` writes a Learning and touches no text; #204 `revealCard` stamps ONE `revealRequest` (the anchor's span in the LIVE session text + a per-jump token) — a view act, nothing written; the editor column feeds it into the #71 caret rail (`caretHint`, now a `FixCardRevealRequest` — a non-zero range selects the span). `micropubSendDraft` = flush-first, ONE disk read serves both wire fields, success stamps `micropub_url`. `canArmWritingLock`/`editorBodyText` mirror the editor's outline routing (prose only). #200: quit is a document departure — `shutdown()` routes both sessions through `documentsMayDepart` (void — the verdict channel is quitReply's); `PostsModel.active` (weak static, registered by `AppGateState.init` — the `WritingLockState.active` precedent) is the quit gate's reachability, bare test rigs never register.
|
||||
- `PostsModelWatcher.swift` — #193: the watching domain of PostsModel (moved from PostsModel.swift) — `PostsWatcher` (recursive FSEvents stream, file-level, 0.5 s latency) on BOTH `projects/` and `archive/`; `bind(home:)` (WorkspaceView's root `.task(id: museionHome)` drives it); `startWatching` (the one `watchedHome` writer); `rescan` off-main through the app-scoped scan cache, skipping the `posts` assignment on equality (@Observable invalidates on assignment — panes would regroup on autosave echoes), bumping `contentRevision` on list change OR cache miss (#144), handing the session the open post's disk text (the #67 check, watcher echo suppressed by equality), riding the cards refresh at the tail.
|
||||
- `PostsModelWrites.swift` — #193: the #179 write rail + structural ops (moved from PostsModel.swift) — `performWrite` (ONE seam: write + exactly one rescan + the error strip, cleared before the write), `flushOrAbort` (flush-first; a failed write, an unanswered #67 conflict, or a never-loaded session's retyped words abort with nothing changed — the alert stays up), `documentsMayDepart` (#200: the departure gate's quit run — shutdown's flush half shared with `applicationShouldTerminate`; BLOCK-QUIT posture, never silently drop), rename, trash, the #108 project ops (create/stage, `moveTargets`, move to project, archive/restore/unarchive); document departure (new post/outline, select, open external, guest dismissal) rides the same gates through `sessionMayDepart`/`departOpenDocuments` — a navigation whose outgoing flush fails aborts with the dirty session retained (brief-25).
|
||||
- `PostsModelImports.swift` — #193: the external guest (#91–#93) + import batch (#94/#95) (moved from PostsModel.swift) — `openExternal`/`dismissExternal` (`-> Bool` — false holds the departure)/the guest watch (one guest at a time, symlink-resolved — an atomic write renames over a symlink — dismissed flush-first by any post/draft open — held by the departure gate when its flush fails (brief-25: the guest, its buffer, and its watcher stay live until the edits land)); `stageImport`/`cancelImport`/`importFiles` (ONE origin ask per batch, per-file failures continue into `lastError`).
|
||||
- `OutlineTree.swift` — the one-file plain nested-bullet tree model (ADR-0013): lenient parse, canonical serialize, normalize on save (preamble verbatim, stray prose after the first item drops); `parsesWithLoss` shares `parseItem` so detector and parser never disagree; structural ops are path-addressed, id-preserving, boundary-nil; single-node moves CROSS parents at sibling boundaries (LogSeq-style); `enter` = split/outdent/new-sibling; `extract`/`insertRun` are the drag primitives; `headingsLadderBody` = the Convert transform. Folds live in the view, keyed by node UUID.
|
||||
- `OutlineEditorView.swift` — `OutlinePresenter` (pure projection: visible rows, fold skipping, zoom re-basing at a node's children, block selection, `applyBatch` sibling-only moves) + the SwiftUI surface: chrome bullets by depth, per-depth rails, ONE promoted `OutlineRowTextView` on the focused row, drag grip + drop chrome, zoom breadcrumbs, Esc stack (drag-cancel → selection-collapse → zoom-out). **Esc needs a local NSEvent keyDown monitor** — SwiftUI's hosting layer swallows Esc before keyDown AND before `.onExitCommand` (probe-pinned in EscEventProbeTests). Every keystroke serializes the whole tree through the existing session machinery; zoom/drag state is view-only, reset on load.
|
||||
- `OutlineDrag.swift` — drag plumbing: NSEvent monitors (global outside the app, so an Esc-cancel never resolves as a drop); the gesture holds STRONG arm-time captures (a mid-drag scroll can drop the origin row's catcher — mouse-up must still clear state); live geometry from `CatcherView.rowFrames` reading CURRENT window-space frames (SwiftUI 27 removed the `.window` coordinate space; cached frames go stale on scroll); the pure drop math (`DropTarget`, `draggedIDs`, `isValidDrop`, `applyDrop`, `hitTestDrop`) rides a nonisolated presenter extension — resolved by id AFTER extraction.
|
||||
- `OutlineRowTextView.swift` — the promoted row editor: borderless NSTextView, native undo/IME, keyDown intercepts (every intercepted branch returns WITHOUT super), echo-guard update, `sizeThatFits` floors at 21 (no focus jump).
|
||||
- Editor core — `ProsePresenter.swift` (line-kind → attributes map mirroring the reading surface; plain store stays the source of truth — presentation-only attributes, ADR-0010). `EditorSession.swift` — per-document session: `SessionTarget` (post | external file), ~1 s debounce → `flush` (⌘S / selection change / quit also flush); externals write in place with NO sidecar; `loadFailed` never opens a writable empty session over a failed read (the first keystroke would destroy the file); the #67 conflict raises when disk ≠ last-flushed ≠ local, and the debounce never fires while the alert is unanswered; `adoptText` = programmatic writer-consented adoption (the #67 guard is the CALLER's job). Cursor sidecar `.museion-state.json` in the piece folder, written separately (a failed sidecar is not a failed save). `PostEditorView`/`ProseTextView` — plain NSTextView representable, loads keyed by `loadGeneration` (never per keystroke); spellcheck off by default (markdown on disk carries the spelling).
|
||||
- `OutlineRowTextView.swift` — the promoted row editor: borderless NSTextView, native undo/IME, keyDown intercepts (every intercepted branch returns WITHOUT super), echo-guard update, `sizeThatFits` floors at 21 (no focus jump). Rides `FileDropTextView` with no route mounted: a file drag landing on a row bounces (no path paste).
|
||||
- `FileDropTextView.swift` — the editor text views' drag base (macOS 27.2.1 routing): a live NSTextView registers itself for drag types and receives the drag a window-level SwiftUI destination never sees; URL-bearing drops route through `onFileDrop` (nil = bounce), text-only drops keep the stock drop, everything else bounces — never `super` for URLs (stock NSTextView pastes the dropped file's PATH via `readSelection` on NSFilenamesPboardType). The pasteboard probe is memoized per `changeCount` (`draggingUpdated` fires per mouse-move).
|
||||
- Editor core — `ProsePresenter.swift` (line-kind → attributes map mirroring the reading surface; plain store stays the source of truth — presentation-only attributes, ADR-0010). `EditorSession.swift` — per-document session: `SessionTarget` (post | external file), ~1 s debounce → `flush` (⌘S / selection change / quit also flush); externals write in place with NO sidecar; `loadFailed` never opens a writable empty session over a failed read (the first keystroke would destroy the file); the #67 conflict raises when disk ≠ last-flushed ≠ local, and the debounce never fires while the alert is unanswered; `adoptText` = programmatic writer-consented adoption (the #67 guard is the CALLER's job). Cursor sidecar `.museion-state.json` in the piece folder, written separately (a failed sidecar is not a failed save). `PostEditorView`/`ProseTextView` — plain NSTextView representable, loads keyed by `loadGeneration` (never per keystroke); spellcheck off by default (markdown on disk carries the spelling). `ProseListTextView` rides `FileDropTextView` with `onFileDrop` → the gate's `routeFileDrop`, so file drags landing on it ingest (never paste the path); `lastIngestNotice` is the refusal text the pins read.
|
||||
- Prose list machinery — `ProseList.swift` (pure item scan/mutation over the plain buffer; every structural edit is ONE range replacement = single undo step); `ProseListTextView.swift` — folds are VIEW state (buffer never changes; hidden scopes styled via `foldedAttributes`), re-keyed to the nearest same-marker parent, dying when the marker text vanishes; single-line edits re-key in place (`rekey`), the newline gate is `\.isNewline` NEVER literal `\n`/`\r` compares (a CRLF pair is one grapheme); wholesale restyles self-heal into the full pass via a font probe. Fold chrome renders as tiny per-glyph CALayers in a click-through overlay — NEVER a document-sized bitmap. Image drops bridge through `ProseDropBridge` into `ingestDrop` (saved posts only, publishable files only, PLAIN files only — a dropped symlink refuses); the drop point is solved by the pure `dropIndex` (sampling + bracket + binary search; the SwiftUI closure's `location` is unusable under this hosting, off-screen rects return garbage).
|
||||
- Settings — `SettingsPaneView.swift` (sidebar + detail: Content · Pass 1 · Pass 2 · Chat · Provider Keys; the pane takes the gate's `binaryPath` and hydrates at open; detail forms left-anchored). `SettingsModel.swift` — #181: `ModelProvider` is the provider-descriptor TABLE — label, effort ladder, flagship, default endpoint, env var, wire `dialect` (chat/models paths + the SSE decoder selector), `authMode` (Bearer vs Anthropic's header pair), `keyless` (nous rides the shared Portal login); the keyless UI branch, the probe's selectors, and both credential consumers key off it. `ProviderCredential` = the ONE credential resolution (provider key, else the Portal session key for keyless providers — official endpoint ONLY, never a user-set URL) serving Test Connection and pass readiness. Writes COALESCE: the newer write queues past an in-flight one, superseded writes never spawn (partial key prefixes of a secret never reach `.env`); `hydrate` reads only and never stomps a pending edit. `HermesSettingsWriter.swift` — the real write path: surface writes and the base_url write-through ride the HermesConfigRail (#182 — the writer only builds its key list: provider, default, effort set-or-unset, base_url LAST); provider keys upsert into ALL THREE profiles' `.env` (foreign lines byte-preserved, 0600, line-broken values REFUSED — env injection; paths via ProfileLayout). `ProviderProbe.swift` — Test Connection: every request carries `Content-Type: application/json` (without it z.ai answers 200 with an error envelope); per-provider dialects (OpenAI speaks the Responses API, Anthropic `x-api-key` + pinned version + required max_tokens, zai thinking+reasoning_effort, nous plain chat-completions) — #181: URL paths, auth shape, and the SSE decoder SELECT by the descriptor's dialect, the per-dialect code stays separate functions; 512 token cap; errors riding a 2xx decode as the provider error. `onChatSurfaceWrite` → `requestRestart` (chat surface only — pass engines are one-shot). `PassReadiness.swift` — #181: the per-surface readiness module (ready / missingKey / unknown): reads each surface's provider + `.env` key through the settings seam and resolves credentials through `ProviderCredential` (the keyless fallback included); MentorSessionModel stores the verdicts and reads no keys or auth files itself.
|
||||
- Focus mode — transient per-launch (no persistence); `FocusChrome` hover zones + overlay panels float over the measure, never push it; `CaretCentering` is EDITOR-WIDE, not focus-gated; focus × reading are orthogonal axes. Cold Turkey chrome (`ColdTurkeySeat`/`ColdTurkeyDot`) mounts as overlays on the focused branch only.
|
||||
@@ -77,7 +78,7 @@ The map and the contracts, one bullet per file. Pin-level detail lives in the te
|
||||
## museion-tools MCP server
|
||||
|
||||
- `MCPServer.swift` — the binary's second role (headless, never AppKit). NDJSON JSON-RPC on stdio: `initialize` echoes the client's protocolVersion; notifications never answered; three tools with typed schemas — `query_learnings` (serves the visible learnings files), `submit_fix_cards` (ranked ≤10 ceiling; an over-ceiling reply carries `dropped_over_ceiling`), `submit_research_notes` (decode-validate ONLY — research is engine-owned session cargo, NOTHING is written; the only path to disk is the writer's keep). Lines over 1 MB → `-32600`; fflush after every stdout line; `run(lines:write:)` is the test seam. #177: both submit tools decode through `ToolPayloads` (below) — the strict entry throws named `CardError`s (an empty cards/notes array is an error, never a silent no-op; the strict side takes snake_case only, no camelCase alias).
|
||||
- `FixCardStore.swift` — `StoredFixCard` (ADR-0006 fields verbatim, snake_case, ISO dates). `submit`: the piece must resolve to a `post.md` under a `projects/`|`archive/` component (one guard closed the arbitrary-file JSON-drop + substring-oracle MEDIUMs); a symlinked `cards/` dir refuses before any write; a stale anchor LANDS FLAGGED (the finding survives for the writer); the ceiling keeps the ranked head; `rank` stamped in submit order. `appliedText` = the pure nth-occurrence mechanical apply (nil, never a wrong-span patch); `close` flips status in place. `learnings` serves only visible (non-decayed) files. `promote`: ONE confirm = ONE Learning — the on-disk card is the truth (not-found or already-stamped throws before anything is written); symlinked learnings components refuse; the Learning is written first, then the card stamped; `learningMarkdown` is the TEACHING shape (anchor + mechanical replacement stay on the card — a Learning informs, it never gets applied).
|
||||
- `FixCardStore.swift` — `StoredFixCard` (ADR-0006 fields verbatim, snake_case, ISO dates). `submit`: the piece must resolve to a `post.md` under a `projects/`|`archive/` component (one guard closed the arbitrary-file JSON-drop + substring-oracle MEDIUMs); a symlinked `cards/` dir refuses before any write; a stale anchor LANDS FLAGGED (the finding survives for the writer); the ceiling keeps the ranked head; `rank` stamped in submit order. `anchorRange` = the nth-occurrence span (nil = stale, empty quote, or occurrence below 1 — never a wrong span; the lane never gates it); `appliedText` = the mechanical apply over that span (lane-gated, nil on a stale anchor, never a wrong-span patch); `close` flips status in place. `learnings` serves only visible (non-decayed) files. `promote`: ONE confirm = ONE Learning — the on-disk card is the truth (not-found or already-stamped throws before anything is written); symlinked learnings components refuse; the Learning is written first, then the card stamped; `learningMarkdown` is the TEACHING shape (anchor + mechanical replacement stay on the card — a Learning informs, it never gets applied).
|
||||
- `LearningDecay.swift` — the pass clock `learnings/pass-counts.json` (lenient read, clamped values); `passesHidden` is the ONE visibility verdict (interval doubles per re-dismiss, capped; garbage dismiss state means VISIBLE — a malformed dismiss never hides a Learning forever); `dismiss` stamps decay in the Learning's own frontmatter behind write-path guards (traversal/hidden/symlinked/foreign-dir/already-hidden refusals).
|
||||
- `ToolPayloads.swift` — #177: THE tool-payload decoder, one home for the `submit_fix_cards`/`submit_research_notes` wire shapes; the MCP server (strict — required fields throw `CardError`) and the session model's transcript rail (lenient — the nested card-rail shape first, the flat #14-era fake shape kept; unparseable payloads fall to a raw row) both read through it. Every wire-shape fact, lenient and strict, is pinned in `ToolPayloadsTests` — a shape change fails one suite.
|
||||
|
||||
@@ -86,7 +87,7 @@ The map and the contracts, one bullet per file. Pin-level detail lives in the te
|
||||
- `EngineHost.swift` — #178: the engine lifecycle owner + the `EngineTransport` seam. The seam is the whole engine surface — `onMessage`/`onCrash`/`onStderrLine` hooks + `start() throws` + `request(_:params:timeout:)` + `notify` + `close()` — with two adapters: `ACPEngineClient` (real stdio, production) and `ScriptedEngine` (in-process, MuseionTests — engine-behaviour tests run without child processes). `EngineHost` (@MainActor) owns spawn (`makeTransport` factory, profile → transport, reads `binaryPath` at spawn time), the initialize handshake (advisory BASE-version drift note — the gate records the derived `0.21.5+build`, the handshake answers the base; never blocks), teardown, and the per-surface residency (ADR-0014): ONE resident chat engine (`startChat()`/`killChat()`) plus at most one one-shot engine (`withOneShot(profile:)` — spawn per run, teardown at the body's end = the verdict). Hook wiring lives in the host: each hook rides `DispatchQueue.main.async`, never `Task { @MainActor }` (the #28 main-queue FIFO wire-order guarantee); the one-shot transport gets `onMessage` ONLY — a pass crash must not flip the pane. `nonisolated(unsafe)` mirrors close children in deinit.
|
||||
- `ACPEngineClient.swift` — hand-rolled thin NDJSON JSON-RPC stdio client (`hermes acp -p <profile>`; no Swift SDK exists), conforming to `EngineTransport` (notifications arrive on the `onMessage` property — always set before `start()`). Wire facts: stdout = wire, stderr = logs (never parsed for state); `session/new` REQUIRES `mcpServers` (Museion sends `[]`); `session/cancel` is a notification; requests time out (15 s default); crash/EOF fail pending requests and fire `onCrash` exactly once (latched); `close()` = handlers-off → SIGTERM → grace → SIGKILL → reap; SIGPIPE ignored. brief-27: stdin writes AND the stdin write-handle close ride a dedicated serial `writerQueue` — the state queue NEVER touches the pipe, so a full pipe (hung engine) can block a send but never a deadline, Stop delivery, or teardown.
|
||||
- `MentorSessionModel.swift` — @MainActor @Observable, and the ONLY observable the panes see (#178: engine processes live behind `EngineHost` — the model holds no transport, spawns nothing, and stays session + turn coordination; panes never touch the host). Lazy open on first `openSession()` (hosted-guarded; resumes the newest roster entry — a fresh transcript over an engine that knows the session would prompt/fork against unloaded state); spawn/handshake/teardown route through `host` (`startChat()` answers the engine version + the advisory drift note the pane displays). `sendPrompt` returns a `TurnOutcome` (a response missing `stopReason` maps to `.failed` — it never advances a pass); thought chunks stream to their OWN buffer (a collapsed `.thought` row, never the critique text); prompts ride a 1800 s timeout (the response arrives when the TURN ends, minutes into a pass); tool payloads decode through `ToolPayloads` (#177 — nested card-rail shape, flat fallback). #177 typed rail: text rows carry `(body, speaker, notice)` — `Speaker` agent|user|system, `NoticeKind` refused|interrupted|connectionLost|kickoff|failed|plain — typed at EVERY append site, never a stored `"Mentor: "`/`"You: "` prefix; the two wire-only classifications are sniffed ONCE at the append seam (`replayedUserContent` — a replayed "Pass Pass N…" kick-off → system/kickoff; `agentSpeakerNotice` — "Operation interrupted:" → system/interrupted); the refusal and connection-lost rows are agent-voice by pinned render; `draftCandidateText` is pure over `.agent, .plain` rows. Sessions: MULTIPLE engine-owned sessions on the one bridge; `SessionRoster` persists NAMES ONLY (id/name/pieceTitle/createdAt; transcripts are engine-owned per ADR-0007, replayed on demand); resume accepts BOTH load-response shapes (the real 0.21.5 id rides `_meta.hermes.sessionProvenance`; empty-everywhere = engine unknown → honest refusal row, never a fabricated session); fork/compact/brainstorm ride the same rails; research candidates route by PAYLOAD SHAPE (a top-level `notes` array) BEFORE the fix-card parse — titles are display text, never a routing key; candidates are session cargo (dispositions reset on resume). Per-surface engines (ADR-0014): passes and Blind Read run on ONE private one-shot rail (`runOneShot` → `host.withOneShot`, spawn per run + teardown at the verdict) into a TRANSIENT unrostered transcript (passes never mint sessions); the turn pipeline is one shared `turnCore`; `restart()`/`requestRestart()` share `respawn()` (deferred to turn end while streaming; resumes the PRE-restart active session; teardown + fresh spawn ride `host.killChat()`/`host.startChat()`). `PassReadiness` per kind (the enum + refresh live in `PassReadiness.swift`, #181 — the model only stores): `missingKey` names the provider and `runPass` guards it after the shared open-piece rail (still before anything touches disk); `.unknown` never blocks; credentials resolve through `ProviderCredential` (the Portal login path injectable).
|
||||
- `MentorPaneView.swift` — header (serif title + engine status + session chip; ready = the semantic green dot + lowercase `ready`), shared transcript + composer (`SessionTranscriptView` — one conversation surface, two panes; interpreted markdown opens http(s) ONLY, every other scheme discards), crash card, `PassBarView` (Pass 1/2 tabs, token estimate, Cancel ↔ Blind Read ↔ Run Pass — disabled states carry the reason; the missing-key line links to Settings), the Fix Cards palette (a floating window; open cards first; **Apply = ask-before** — a blocking sheet showing the exact edit, never apply-all; demonstration → Done; stale anchor → Skip only; Promote = one confirm), and research candidate cards (Keep = ask-before sheet → `writeResearchNote`; Reject = no confirm).
|
||||
- `MentorPaneView.swift` — header (serif title + engine status + session chip; ready = the semantic green dot + lowercase `ready`), shared transcript + composer (`SessionTranscriptView` — one conversation surface, two panes; interpreted markdown opens http(s) ONLY, every other scheme discards), crash card, `PassBarView` (Pass 1/2 tabs, token estimate, Cancel ↔ Blind Read ↔ Run Pass — disabled states carry the reason; the missing-key line links to Settings), the Fix Cards palette (a floating window; open cards first; **Apply = ask-before** — a blocking sheet showing the exact edit, never apply-all; demonstration → Done; stale anchor → Skip only; Promote = one confirm; #204 **Jump** on every non-stale card that still shows an action row (a closed-and-promoted card has none) — leaves reading mode, selects the anchor span in the editor, reveals it, and makes the main window key (the coordinator owns `tv.window`; `NSApp.activate` is a no-op once the palette's click already activated the app)), and research candidate cards (Keep = ask-before sheet → `writeResearchNote`; Reject = no confirm).
|
||||
- Wiring: `AppGateState.mentor` is the app-scoped model; quit teardown on `NSApplication.willTerminateNotification` → `mentor.shutdown()` (idempotent — scenePhase `.inactive` would fire on plain focus loss). #200: quit FIRST routes through `WritingLockAppDelegate.applicationShouldTerminate`'s departure gate (`AppGateState.init` registers `PostsModel.active`) — a piece that can't depart blocks quit with one spoken reason; willTerminate's `posts.shutdown()` stays as the belt (conflict-held flush + watcher stop).
|
||||
|
||||
## Work Guidance
|
||||
|
||||
@@ -134,6 +134,8 @@ struct ArchivePaneView: View {
|
||||
model.stageConversion(post)
|
||||
}
|
||||
}
|
||||
Divider()
|
||||
FinderHandOffButtons(model: model, post: post)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
//
|
||||
// FileDropTextView.swift
|
||||
// Museion
|
||||
//
|
||||
// #141 (macOS 27.2.1): a drag goes to the DEEPEST destination, and a live
|
||||
// NSTextView registers itself for drag types — so a file drag landing on
|
||||
// an editor text view is delivered to the view, not to the window-level
|
||||
// SwiftUI .dropDestination (the inverse of the 27.0.1 ruling #141 was
|
||||
// verified on). Stock NSTextView handling pastes the dropped file's PATH
|
||||
// (`readSelection` on NSFilenamesPboardType). This base replaces that for
|
||||
// URL-bearing drags and leaves text-only drags to the stock behavior. The
|
||||
// prose editor routes through the gate's one router (`AppGateState.
|
||||
// routeFileDrop`); the outline rows have no route and bounce.
|
||||
//
|
||||
|
||||
import AppKit
|
||||
|
||||
class FileDropTextView: NSTextView {
|
||||
/// Where a URL-bearing drop routes. Nil = the view claims nothing
|
||||
/// (outline rows: images don't ingest there, so the drag bounces
|
||||
/// instead of pasting a path).
|
||||
var onFileDrop: (([URL]) -> Bool)?
|
||||
|
||||
/// One classification per pasteboard state — `draggingUpdated` fires on
|
||||
/// every mouse-move and the read is a pasteboard round-trip (a hostile
|
||||
/// 20k-URL drag measured 137 ms per move uncached).
|
||||
private var dropProbe: (changeCount: Int, kind: DropKind)?
|
||||
|
||||
enum DropKind: Equatable {
|
||||
/// File URLs (Finder) or web URLs (browser) — routed, never pasted.
|
||||
case urls([URL])
|
||||
/// Text only (a selection drag, text from another app) — the stock
|
||||
/// NSTextView drop, which inserts text and nothing else.
|
||||
case text
|
||||
/// Raw image data, file promises — anything URL-less and text-less.
|
||||
case none
|
||||
}
|
||||
|
||||
/// The drag's URLs — or nil when it carries none.
|
||||
static func droppedURLs(from pasteboard: NSPasteboard) -> [URL]? {
|
||||
let urls = pasteboard.readObjects(forClasses: [NSURL.self], options: nil) as? [URL] ?? []
|
||||
return urls.isEmpty ? nil : urls
|
||||
}
|
||||
|
||||
static func classify(_ pasteboard: NSPasteboard) -> DropKind {
|
||||
if let urls = droppedURLs(from: pasteboard) {
|
||||
return .urls(urls)
|
||||
}
|
||||
return pasteboard.types?.contains(.string) == true ? .text : .none
|
||||
}
|
||||
|
||||
/// `classify`, memoized on the pasteboard's changeCount.
|
||||
func dropKind(of pasteboard: NSPasteboard) -> DropKind {
|
||||
if let dropProbe, dropProbe.changeCount == pasteboard.changeCount {
|
||||
return dropProbe.kind
|
||||
}
|
||||
let kind = Self.classify(pasteboard)
|
||||
dropProbe = (pasteboard.changeCount, kind)
|
||||
return kind
|
||||
}
|
||||
|
||||
override func draggingEntered(_ sender: any NSDraggingInfo) -> NSDragOperation {
|
||||
switch dropKind(of: sender.draggingPasteboard) {
|
||||
case .urls: onFileDrop != nil ? .copy : [] // accept so a refusal stays LOUD
|
||||
case .text: super.draggingEntered(sender)
|
||||
case .none: []
|
||||
}
|
||||
}
|
||||
|
||||
override func draggingUpdated(_ sender: any NSDraggingInfo) -> NSDragOperation {
|
||||
switch dropKind(of: sender.draggingPasteboard) {
|
||||
case .urls: onFileDrop != nil ? .copy : []
|
||||
case .text: super.draggingUpdated(sender)
|
||||
case .none: []
|
||||
}
|
||||
}
|
||||
|
||||
override func performDragOperation(_ sender: any NSDraggingInfo) -> Bool {
|
||||
switch dropKind(of: sender.draggingPasteboard) {
|
||||
case let .urls(urls): onFileDrop?(urls) ?? false
|
||||
case .text: super.performDragOperation(sender)
|
||||
case .none: false
|
||||
}
|
||||
}
|
||||
|
||||
/// Nothing to conclude — the ingest leaves the scroll stack as a
|
||||
/// keystroke would.
|
||||
override func concludeDragOperation(_: (any NSDraggingInfo)?) {}
|
||||
}
|
||||
@@ -153,6 +153,20 @@ nonisolated enum FixCardStore {
|
||||
return text.ranges(of: quote).count >= occurrence ? .valid : .stale
|
||||
}
|
||||
|
||||
/// #204: the anchor's exact span in `text` — the appliedText math WITHOUT
|
||||
/// the edit: the quote's 1-based non-overlapping occurrence as an NSRange
|
||||
/// a jump can select. nil for every case that must never land: a stale
|
||||
/// anchor (quote gone or occurrence short) or an empty quote. The lane
|
||||
/// never gates here — a demonstration card's anchor is still a real
|
||||
/// place in the text; the palette decides what to offer.
|
||||
static func anchorRange(of card: StoredFixCard, in text: String) -> NSRange? {
|
||||
guard card.anchor.occurrence >= 1, !card.anchor.quote.isEmpty else { return nil }
|
||||
return text.ranges(of: card.anchor.quote)
|
||||
.dropFirst(card.anchor.occurrence - 1)
|
||||
.first
|
||||
.map { NSRange($0, in: text) }
|
||||
}
|
||||
|
||||
// MARK: - Apply (pure)
|
||||
|
||||
/// #25 (S3.2/S3.3): the mechanical Apply as a pure function — the edit
|
||||
@@ -164,12 +178,8 @@ nonisolated enum FixCardStore {
|
||||
/// issue and accept degrade to a loud no-match, never a wrong-span
|
||||
/// patch. The caller owns the ask and the file write.
|
||||
static func appliedText(of card: StoredFixCard, in text: String) -> String? {
|
||||
guard card.lane == .mechanical,
|
||||
card.anchor.occurrence >= 1,
|
||||
!card.anchor.quote.isEmpty,
|
||||
let range = text.ranges(of: card.anchor.quote).dropFirst(card.anchor.occurrence - 1).first
|
||||
else { return nil }
|
||||
return text.replacingCharacters(in: range, with: card.fix)
|
||||
guard card.lane == .mechanical, let range = anchorRange(of: card, in: text) else { return nil }
|
||||
return (text as NSString).replacingCharacters(in: range, with: card.fix)
|
||||
}
|
||||
|
||||
// MARK: - Submit
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
// Museion
|
||||
//
|
||||
// #25 (S3.3): the Fix Cards palette becomes the card work surface. Open
|
||||
// cards lead with their actions — Apply (a blocking ask), Skip, Done —
|
||||
// closed cards dim behind them. No apply-all, no batch, nothing applies
|
||||
// cards lead with their actions — Apply (a blocking ask), Skip, Done,
|
||||
// Promote (#26), Jump (#204) — closed cards dim behind them. No apply-all, no batch, nothing applies
|
||||
// without the ask (S3.3). #23's show-only surface kept its bones.
|
||||
//
|
||||
|
||||
@@ -106,9 +106,10 @@ private struct CardList: View {
|
||||
|
||||
/// One card: pattern title, problem + fix body, rank · pass · lane ·
|
||||
/// emitter mono meta (ADR-0006). A stale anchor reads distinct — orange —
|
||||
/// and never offers Apply. Closed cards dim, record their status in the
|
||||
/// meta, and offer no actions. The blocking Apply ask is the ROW's own
|
||||
/// sheet: one card asks at a time, by construction (S3.3).
|
||||
/// and never offers Apply or Jump (#204). Closed cards dim, record their
|
||||
/// status in the meta, and keep only Promote and Jump — a closed card that
|
||||
/// is already promoted keeps neither (its row is gone). The blocking Apply
|
||||
/// ask is the ROW's own sheet: one card asks at a time (S3.3).
|
||||
private struct CardRow: View {
|
||||
let card: FixCardStore.StoredFixCard
|
||||
@Environment(AppGateState.self) private var gate
|
||||
@@ -134,14 +135,22 @@ private struct CardRow: View {
|
||||
.font(.system(size: 11, design: DesignTokens.mono))
|
||||
.foregroundStyle(stale ? .orange : DesignTokens.muted)
|
||||
if open || card.promotedAt == nil {
|
||||
// The actions this card offers (#25 S3.3, #26 S4.1):
|
||||
// mechanical + valid → Apply (the blocking ask) and Skip;
|
||||
// demonstration → Done and Skip (never Apply, ADR-0006);
|
||||
// stale anchor → Skip only. Promote (its own ask) sits
|
||||
// between the primary action and Skip, and outlives the
|
||||
// card — closed cards keep it until promoted (#26: the
|
||||
// The actions this card offers (#25 S3.3, #26 S4.1, #204):
|
||||
// Jump on every card whose anchor still resolves (closed cards
|
||||
// included — the span is still a real place; stale anchors offer
|
||||
// none — nothing to land on); mechanical + valid → Apply (the
|
||||
// blocking ask) and Skip; demonstration → Done and Skip (never
|
||||
// Apply, ADR-0006); stale anchor → Skip only. Promote (its own
|
||||
// ask) sits between the primary action and Skip, and outlives
|
||||
// the card — closed cards keep it until promoted (#26: the
|
||||
// Learning is the durable artifact).
|
||||
HStack(spacing: 8) {
|
||||
if !stale {
|
||||
Button("Jump") { gate.posts.revealCard(card) }
|
||||
.buttonStyle(.borderless)
|
||||
.controlSize(.small)
|
||||
.help("Select the anchored span in the piece")
|
||||
}
|
||||
if open, !stale {
|
||||
if card.lane == .mechanical {
|
||||
Button("Apply") { asking = true }
|
||||
|
||||
@@ -16,11 +16,9 @@ import SwiftUI
|
||||
@MainActor
|
||||
@Observable
|
||||
final class AppGateState {
|
||||
/// #141: the live prose text view — the window-level drop destination
|
||||
/// (the ONLY destination that ever fires; nested editor-level SwiftUI
|
||||
/// targets are never consulted, and AppKit views registered for file
|
||||
/// drags are starved by it — field-verified 2026-11-02) routes image
|
||||
/// drops to the editor through this handle.
|
||||
/// #141: the live prose text view — the window-level SwiftUI destination
|
||||
/// (drops landing OUTSIDE the editor) reaches it through this handle;
|
||||
/// routing lives in `routeFileDrop`.
|
||||
let proseDrop = ProseDropBridge()
|
||||
let gateModel = EngineGateModel()
|
||||
let provisioning = ProvisioningModel()
|
||||
@@ -118,6 +116,23 @@ final class AppGateState {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// #91 + #141 — the ONE file-drop router. Two surfaces reach it, never
|
||||
/// both for one drag (27.2 routing: the editor's text view when the
|
||||
/// pointer is over it, the window-level SwiftUI destination elsewhere):
|
||||
/// a PURE-markdown set opens as the guest; anything else goes to the
|
||||
/// open piece's prose ingest, which refuses loudly (drafts, mixed
|
||||
/// md+image sets, non-publishable or non-file URLs).
|
||||
/// #162: no new buffers while a Cold Turkey block holds.
|
||||
func routeFileDrop(_ urls: [URL]) -> Bool {
|
||||
guard !writingLock.isLocked else { return false }
|
||||
if urls.allSatisfy(PostStore.isMarkdown), let url = urls.first {
|
||||
posts.openExternal(url)
|
||||
return true
|
||||
}
|
||||
guard let textView = proseDrop.textView else { return false }
|
||||
return textView.ingestDrop(urls)
|
||||
}
|
||||
}
|
||||
|
||||
/// #23: no `@main` here — MuseionLauncher (MCPServer.swift) branches
|
||||
|
||||
@@ -127,8 +127,11 @@ struct OutlineRowTextView: NSViewRepresentable {
|
||||
}
|
||||
}
|
||||
|
||||
/// The row NSTextView: structural key interception.
|
||||
final class RowTextView: NSTextView {
|
||||
/// The row NSTextView: structural key interception. `FileDropTextView`
|
||||
/// base (27.2 routing): a file drag landing on a row bounces instead of
|
||||
/// pasting the path — images don't ingest into outlines (#141); text
|
||||
/// drags keep the stock drop.
|
||||
final class RowTextView: FileDropTextView {
|
||||
weak var bridge: OutlineRowTextView.Coordinator?
|
||||
|
||||
override func keyDown(with event: NSEvent) {
|
||||
|
||||
@@ -47,9 +47,10 @@ struct PostEditorView: View {
|
||||
/// #68: reading is a transient act of inspection — no persistence; a
|
||||
/// fresh open always lands in editing.
|
||||
@State private var reading = false
|
||||
/// Flip-back caret (#68): source location + a token so repeated flips to
|
||||
/// the same location re-apply. Consumed by ProseTextView's coordinator.
|
||||
@State private var flipBackCaret: (location: Int, token: Int)?
|
||||
/// Flip-back caret (#68) and #204 jump span: a zero-length range is a
|
||||
/// bare caret landing, a non-zero range selects the anchor; the token
|
||||
/// re-applies repeats. Consumed by ProseTextView's coordinator.
|
||||
@State private var flipBackCaret: FixCardRevealRequest?
|
||||
@State private var flipToken = 0
|
||||
/// Reading scroll state (#68 mapping): entry caret + live top block.
|
||||
@State private var readingState = ReadingStateBox()
|
||||
@@ -108,6 +109,22 @@ struct PostEditorView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
// #204: a Fix Card jump (the palette's Jump) lands here — the model's
|
||||
// reveal request rides the SAME caret rail as the reading flip-back,
|
||||
// through the ONE token counter (two counters could collide and a
|
||||
// jump would silently never land): the span selected, revealed, and
|
||||
// the main window made key so the writer can type where the card
|
||||
// pointed (the coordinator does that — it owns tv.window). A jump
|
||||
// while READING leaves reading first — plain `reading = false`, not
|
||||
// exitReading (which would stamp its own zero-length hint over the
|
||||
// jump); the remounted coordinator applies the jump after the load.
|
||||
// Outline pieces have no prose surface — the request is dropped.
|
||||
.onChange(of: gate.posts.revealRequest) { _, request in
|
||||
guard let request, !outline else { return }
|
||||
flipToken += 1
|
||||
flipBackCaret = FixCardRevealRequest(range: request.range, token: flipToken)
|
||||
reading = false
|
||||
}
|
||||
.onAppear {
|
||||
if draftMirror.isEmpty {
|
||||
draftMirror = draftText ?? ""
|
||||
@@ -182,6 +199,7 @@ struct PostEditorView: View {
|
||||
focused: gate.isFocused,
|
||||
caretHint: flipBackCaret,
|
||||
dropBridge: gate.proseDrop,
|
||||
routeDrop: { gate.routeFileDrop($0) },
|
||||
// #162: the Cold Turkey word feed.
|
||||
onTextChange: { gate.writingLock.feed(text: $0) },
|
||||
)
|
||||
@@ -196,6 +214,7 @@ struct PostEditorView: View {
|
||||
},
|
||||
caretHint: flipBackCaret,
|
||||
dropBridge: gate.proseDrop,
|
||||
routeDrop: { gate.routeFileDrop($0) },
|
||||
// #162: the Cold Turkey word feed.
|
||||
onTextChange: { gate.writingLock.feed(text: $0) },
|
||||
)
|
||||
@@ -218,7 +237,7 @@ struct PostEditorView: View {
|
||||
flipToken += 1
|
||||
// Toggle-back maps the reading scroll back (top visible block);
|
||||
// click-to-edit lands at the clicked paragraph (survives always).
|
||||
flipBackCaret = (caret ?? readingState.topSourceLocation ?? 0, flipToken)
|
||||
flipBackCaret = FixCardRevealRequest(range: NSRange(location: caret ?? readingState.topSourceLocation ?? 0, length: 0), token: flipToken)
|
||||
reading = false
|
||||
}
|
||||
|
||||
@@ -338,8 +357,8 @@ private struct SaveStateDot: View {
|
||||
|
||||
// MARK: - TextKit2 surface (the lifted spike pane)
|
||||
|
||||
/// #141: the SwiftUI drop target's handle down to the live prose text
|
||||
/// view (weak — dies with the editor surface).
|
||||
/// #141: the window-level SwiftUI destination's handle down to the live
|
||||
/// prose text view (weak — dies with the editor surface).
|
||||
@MainActor
|
||||
final class ProseDropBridge {
|
||||
weak var textView: ProseListTextView?
|
||||
@@ -348,8 +367,9 @@ final class ProseDropBridge {
|
||||
/// NSTextView in a scroll view; attributes are presentation-only over a plain
|
||||
/// store. Session mode: edits → session.edit (debounce), cursor → session,
|
||||
/// loads keyed by generation (open + Yes-reload). Draft mode: edits → onEdit.
|
||||
/// #71: `caretHint` (location + token) lands the caret after a flip back
|
||||
/// from reading — applied once per token, after any generation load.
|
||||
/// #71/#204: `caretHint` (range + token) lands a bare caret after a flip
|
||||
/// back from reading or SELECTS a card's anchor span after a Jump — applied
|
||||
/// once per token, after any generation load.
|
||||
struct ProseTextView: NSViewRepresentable {
|
||||
var session: EditorSession?
|
||||
var draft: String?
|
||||
@@ -361,22 +381,24 @@ struct ProseTextView: NSViewRepresentable {
|
||||
var spellChecking = false
|
||||
/// #21: focus mode — the text ground joins the workspace background.
|
||||
var focused = false
|
||||
var caretHint: (location: Int, token: Int)?
|
||||
var caretHint: FixCardRevealRequest?
|
||||
/// #141: the piece folder dropped images ingest into — saved posts
|
||||
/// only (drafts have no folder until first save; the external guest
|
||||
/// isn't a piece). Nil = image drags refuse loudly.
|
||||
var ingestFolder: URL?
|
||||
/// #141: the drop bridge — the WINDOW-level SwiftUI drop target
|
||||
/// reaches this text view through it (app-scoped, passed down from
|
||||
/// the gate at both call sites — never optional).
|
||||
/// #141: the window-level SwiftUI destination's handle to the live
|
||||
/// view (drops landing OUTSIDE the editor); the gate's router for drops
|
||||
/// landing ON it — both handed down from the gate at both call sites.
|
||||
var dropBridge: ProseDropBridge
|
||||
var routeDrop: ([URL]) -> Bool
|
||||
|
||||
init(
|
||||
session: EditorSession,
|
||||
spellChecking: Bool = false,
|
||||
focused: Bool = false,
|
||||
caretHint: (location: Int, token: Int)? = nil,
|
||||
caretHint: FixCardRevealRequest? = nil,
|
||||
dropBridge: ProseDropBridge,
|
||||
routeDrop: @escaping ([URL]) -> Bool,
|
||||
onTextChange: ((String) -> Void)? = nil,
|
||||
) {
|
||||
self.session = session
|
||||
@@ -386,6 +408,7 @@ struct ProseTextView: NSViewRepresentable {
|
||||
self.onTextChange = onTextChange
|
||||
ingestFolder = session.postID != nil ? session.folderURL : nil
|
||||
self.dropBridge = dropBridge
|
||||
self.routeDrop = routeDrop
|
||||
}
|
||||
|
||||
init(
|
||||
@@ -393,8 +416,9 @@ struct ProseTextView: NSViewRepresentable {
|
||||
spellChecking: Bool = false,
|
||||
focused: Bool = false,
|
||||
onEdit: @escaping (String) -> Void,
|
||||
caretHint: (location: Int, token: Int)? = nil,
|
||||
caretHint: FixCardRevealRequest? = nil,
|
||||
dropBridge: ProseDropBridge,
|
||||
routeDrop: @escaping ([URL]) -> Bool,
|
||||
onTextChange: ((String) -> Void)? = nil,
|
||||
) {
|
||||
self.draft = draft
|
||||
@@ -404,6 +428,7 @@ struct ProseTextView: NSViewRepresentable {
|
||||
self.caretHint = caretHint
|
||||
self.onTextChange = onTextChange
|
||||
self.dropBridge = dropBridge
|
||||
self.routeDrop = routeDrop
|
||||
}
|
||||
|
||||
/// Cursor state snapshot from the live view (#66).
|
||||
@@ -421,16 +446,30 @@ struct ProseTextView: NSViewRepresentable {
|
||||
/// location 0 then rests inside the invisible 9pt blank fragment ABOVE
|
||||
/// the title, rendering as a detached terracotta stroke at the canvas
|
||||
/// top. Programmatic landings (cursor restore, reading flip-back) hop
|
||||
/// over leading blanks to the first content line; interactive
|
||||
/// placements (click, drag, typing) never route through here.
|
||||
/// over leading blanks to the first content line — zero-length landings
|
||||
/// only, a #204 span never hops (`landingSpan`); interactive placements
|
||||
/// (click, drag, typing) never route through here.
|
||||
static func caretPastLeadingBlanks(_ location: Int, in text: String) -> Int {
|
||||
max(location, ProsePresenter.firstContentLocation(text as NSString) ?? location)
|
||||
}
|
||||
|
||||
/// Where a caret-hint lands, clamped to the text: a zero-length range
|
||||
/// (#71 flip-back) is a bare caret and hops past leading blanks; a
|
||||
/// non-zero range (#204 jump) SELECTS the anchor exactly where it
|
||||
/// resolved — a quote that IS the leading blanks selects those blanks,
|
||||
/// never the title (the load restore gates its hop the same way).
|
||||
static func landingSpan(for hint: FixCardRevealRequest, in text: String) -> NSRange {
|
||||
let length = (text as NSString).length
|
||||
let start = hint.range.length == 0 ? caretPastLeadingBlanks(max(0, hint.range.location), in: text) : max(0, hint.range.location)
|
||||
let loc = min(start, length)
|
||||
return NSRange(location: loc, length: min(max(0, hint.range.length), length - loc))
|
||||
}
|
||||
|
||||
func makeNSView(context: Context) -> NSScrollView {
|
||||
let tv = ProseListTextView() // #115: list shortcuts + folds on the plain surface
|
||||
tv.ingestFolder = ingestFolder // #141: image-drop ingest (nil on drafts/guests)
|
||||
dropBridge.textView = tv // #141: the SwiftUI drop target's handle
|
||||
dropBridge.textView = tv // #141: the window destination's handle
|
||||
tv.onFileDrop = routeDrop // #141: the view's own drag handlers route here
|
||||
tv.isRichText = false // plain source of truth; attributes are presentation
|
||||
tv.allowsUndo = true
|
||||
tv.isAutomaticQuoteSubstitutionEnabled = false
|
||||
@@ -485,6 +524,7 @@ struct ProseTextView: NSViewRepresentable {
|
||||
tv.isContinuousSpellCheckingEnabled = spellChecking
|
||||
tv.ingestFolder = ingestFolder // #141: cheap idempotent set
|
||||
dropBridge.textView = tv // #141: idempotent re-point
|
||||
tv.onFileDrop = routeDrop // #141: idempotent re-point
|
||||
// #21: the ground follows focus in/out without a remount.
|
||||
let ground = focused ? NSColor(DesignTokens.background) : NSColor(DesignTokens.surface)
|
||||
tv.backgroundColor = ground
|
||||
@@ -532,25 +572,9 @@ struct ProseTextView: NSViewRepresentable {
|
||||
tv.textStorage?.setAttributedString(ProsePresenter.attribute(draft))
|
||||
tv.refreshFolds() // #115: re-key folds over the swapped content
|
||||
}
|
||||
// #71: flip-back caret — apply once per token, after any load above.
|
||||
// #71 flip-back caret / #204 jump span — apply once per token, after any load above.
|
||||
if let hint = caretHint, context.coordinator.appliedCaretToken != hint.token {
|
||||
context.coordinator.appliedCaretToken = hint.token
|
||||
let length = (tv.string as NSString).length
|
||||
// #ui-r1: same leading-blank hop as the load restore — a reading
|
||||
// flip-back must never park the caret above the first content line.
|
||||
let loc = min(Self.caretPastLeadingBlanks(max(0, hint.location), in: tv.string), length)
|
||||
tv.setSelectedRange(NSRange(location: loc, length: 0))
|
||||
// ponytail: same layout race as the cursor-restore scroll above —
|
||||
// this was the click-to-edit "always lands at top" defect: the sync
|
||||
// scrollRangeToVisible fired before the target region was laid out.
|
||||
// One runloop hop fixes it (offscreen-verified, 3000-para doc).
|
||||
DispatchQueue.main.async { [weak tv] in
|
||||
tv?.scrollRangeToVisible(NSRange(location: loc, length: 0))
|
||||
tv?.window?.makeFirstResponder(tv)
|
||||
}
|
||||
if let session {
|
||||
session.cursorUpdate(ProseTextView.cursorState(of: tv))
|
||||
}
|
||||
context.coordinator.applyCaretHint(hint, tv: tv, session: session)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -576,6 +600,33 @@ struct ProseTextView: NSViewRepresentable {
|
||||
onTextChange = representable.onTextChange
|
||||
}
|
||||
|
||||
/// The caret rail's landing (#71 flip-back, #204 jump). Called by the
|
||||
/// representable once per token.
|
||||
func applyCaretHint(_ hint: FixCardRevealRequest, tv: NSTextView, session: EditorSession?) {
|
||||
appliedCaretToken = hint.token
|
||||
let landing = ProseTextView.landingSpan(for: hint, in: tv.string)
|
||||
tv.setSelectedRange(landing)
|
||||
// ponytail: same layout race as the cursor-restore scroll — this was
|
||||
// the click-to-edit "always lands at top" defect: the sync
|
||||
// scrollRangeToVisible fired before the target region was laid out.
|
||||
// One runloop hop fixes it (offscreen-verified, 3000-para doc).
|
||||
DispatchQueue.main.async { [weak tv] in
|
||||
guard let tv else { return }
|
||||
// #204: a jump (span > 0) comes from the palette window, which
|
||||
// holds key after the click — make the main window key or the
|
||||
// first responder never sees keystrokes. The #71 flip-back
|
||||
// (span 0) is already in the key window; untouched.
|
||||
if landing.length > 0 {
|
||||
tv.window?.makeKeyAndOrderFront(nil)
|
||||
}
|
||||
tv.scrollRangeToVisible(landing)
|
||||
tv.window?.makeFirstResponder(tv)
|
||||
// Recorded AFTER the scroll: the sidecar's scrollOffset must be
|
||||
// the landed one, or a reopen restores an off-screen selection.
|
||||
session?.cursorUpdate(ProseTextView.cursorState(of: tv))
|
||||
}
|
||||
}
|
||||
|
||||
func textDidChange(_ notification: Notification) {
|
||||
guard let tv = notification.object as? NSTextView, let storage = tv.textStorage else { return }
|
||||
let sel = tv.selectedRange()
|
||||
|
||||
+12
-4
@@ -756,6 +756,12 @@ struct IngestError: LocalizedError {
|
||||
IngestError(message: "“\(name.prefix(40))” is a folder, not an image.")
|
||||
}
|
||||
|
||||
/// A file the drag named but the disk can no longer stat — moved or
|
||||
/// deleted between drag and drop (or a URL that never was a file).
|
||||
static func missing(_ name: String) -> IngestError {
|
||||
IngestError(message: "“\(name.prefix(40))” couldn’t be read — it may have moved since the drag began.")
|
||||
}
|
||||
|
||||
/// assets/ exists as a symlink or a file — never write through it
|
||||
/// (research/promote posture: the #34 rail would refuse the send).
|
||||
static func hostileAssets() -> IngestError {
|
||||
@@ -790,10 +796,12 @@ nonisolated extension PostStore {
|
||||
// AS a link (finish-audit 2026-11-02), and the #34 rail then
|
||||
// refuses the whole send — nothing enters assets/ that can't ship.
|
||||
let values = try? source.resourceValues(forKeys: [.isDirectoryKey, .isSymbolicLinkKey])
|
||||
guard source.isFileURL, let values,
|
||||
values.isDirectory != true, values.isSymbolicLink != true
|
||||
else {
|
||||
throw values?.isSymbolicLink == true ? IngestError.isLink(name) : IngestError.isFolder(name)
|
||||
guard source.isFileURL, let values else { throw IngestError.missing(name) }
|
||||
if values.isSymbolicLink == true {
|
||||
throw IngestError.isLink(name)
|
||||
}
|
||||
if values.isDirectory == true {
|
||||
throw IngestError.isFolder(name)
|
||||
}
|
||||
let assets = pieceFolder.appendingPathComponent("assets", isDirectory: true)
|
||||
if FileManager.default.fileExists(atPath: assets.path) {
|
||||
|
||||
@@ -218,6 +218,8 @@ struct PostsLibraryColumn: View {
|
||||
Button("Move to Archive") {
|
||||
model.archivePost(post)
|
||||
}
|
||||
Divider()
|
||||
FinderHandOffButtons(model: model, post: post)
|
||||
Button("Move to Trash", role: .destructive) {
|
||||
model.trash(post)
|
||||
}
|
||||
|
||||
@@ -140,6 +140,12 @@ final class PostsModel {
|
||||
/// submitted; nil session (draft/guest/nothing) shows none.
|
||||
/// #146: setter internal — the split-out domain extensions set it.
|
||||
var openPieceCards: [FixCardStore.StoredFixCard] = []
|
||||
/// #204: one jump-to-the-anchor request from the Fix Cards palette —
|
||||
/// the anchor's span in the LIVE session text plus a token that
|
||||
/// advances per jump (the editor column applies once per token, the
|
||||
/// #71 flip-back caret pattern). Set by `revealCard`; never written
|
||||
/// to disk — a jump is a view act.
|
||||
var revealRequest: FixCardRevealRequest?
|
||||
/// Last failed-op message surfaced in the editor (nil = clean).
|
||||
/// #146: setter internal — the split-out domain extensions set it.
|
||||
var lastError: String?
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
//
|
||||
// #146: the fix-card extensions of PostsModel — stored-card surfacing
|
||||
// (#23), apply/skip/done (#25, S3.2/S3.3), and promote (#26, S4.1) —
|
||||
// moved from PostsModel.swift (file-length ceiling), code unchanged.
|
||||
// moved from PostsModel.swift (file-length ceiling), code unchanged;
|
||||
// #204: the jump-to-the-anchor reveal (`revealCard`, `FixCardRevealRequest`).
|
||||
//
|
||||
|
||||
import Foundation
|
||||
@@ -133,6 +134,31 @@ extension PostsModel {
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Jump to the anchor (#204)
|
||||
|
||||
/// #204: one jump-to-the-anchor request — the anchor's span in the live
|
||||
/// session text plus a token that advances per jump so the editor column
|
||||
/// (which applies once per token) re-fires on a repeated jump. Ephemeral
|
||||
/// view state: nothing here ever reaches disk.
|
||||
struct FixCardRevealRequest: Equatable {
|
||||
var range: NSRange
|
||||
var token: Int
|
||||
}
|
||||
|
||||
extension PostsModel {
|
||||
/// #204: jump to a card's anchor — the palette's Jump. Resolves the
|
||||
/// anchor against the LIVE session text (a dirty buffer still lands
|
||||
/// where the writer sees it) and stamps one reveal request; the editor
|
||||
/// column observes it and selects + reveals the span. A stale anchor
|
||||
/// (quote gone, occurrence short) stamps nothing — the previous
|
||||
/// request stands. Touches no text, no card, no disk: a jump is a view
|
||||
/// act, the writer's hands stay on the wheel.
|
||||
func revealCard(_ card: FixCardStore.StoredFixCard) {
|
||||
guard let session, let range = FixCardStore.anchorRange(of: card, in: session.text) else { return }
|
||||
revealRequest = FixCardRevealRequest(range: range, token: (revealRequest?.token ?? 0) + 1)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Fix Card promote (#26, S4.1/S4.3)
|
||||
|
||||
/// #26 (S4.1): what Promote did — the Learning landed, or the operation
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
// card refresh, Micropub. The bare `session.postID == id` comparison is
|
||||
// retired: two libraries can hold the same slug, and the id alone matched
|
||||
// a session retained from another library (the repoint finding's seam).
|
||||
// #205: also the piece's on-disk path (`fileURL(for:)`) — the same
|
||||
// (Home, ID) identity resolved to post.md for the row menus' Finder
|
||||
// hand-off; nil when the piece is gone.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
@@ -22,4 +25,17 @@ extension PostsModel {
|
||||
guard let session, let home = watchedHome else { return false }
|
||||
return session.targets(postID: id, home: home)
|
||||
}
|
||||
|
||||
/// #205: the piece's `post.md` on disk — the row menus' Reveal in
|
||||
/// Finder / Copy Path target. The same (Home, ID) identity resolved to
|
||||
/// a path: `watchedHome` is the Home half, `PostStore.folder(of:)` the
|
||||
/// ONE id→folder resolver (never the scan snapshot — the folder is
|
||||
/// what Finder opens). A pure read — nothing written, no strip. Nil
|
||||
/// when the piece is gone, so the menu entries no-op instead of
|
||||
/// revealing a stale path.
|
||||
func fileURL(for post: Post) -> URL? {
|
||||
guard let home = watchedHome,
|
||||
let dir = PostStore.folder(of: post.id, home: home) else { return nil }
|
||||
return dir.appendingPathComponent("post.md")
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,7 @@ final class ProseChromeView: NSView {
|
||||
}
|
||||
}
|
||||
|
||||
final class ProseListTextView: NSTextView {
|
||||
final class ProseListTextView: FileDropTextView {
|
||||
/// A fold: the marker line's buffer position + its text (the re-key
|
||||
/// identity when an edit above shifts offsets) + the hidden scope
|
||||
/// (shift-maintained by the #142 cheap path; the full pass re-derives
|
||||
@@ -338,8 +338,10 @@ final class ProseListTextView: NSTextView {
|
||||
return firstRect(forCharacterRange: NSRange(location: charIndex, length: 1), actualRange: nil).midY
|
||||
}
|
||||
|
||||
/// #141's SwiftUI entry — the window `.dropDestination`'s perform
|
||||
/// routes here after markdown forwarding is ruled out upstream.
|
||||
/// #141's ingest entry — `AppGateState.routeFileDrop` routes here
|
||||
/// from whichever surface took the drag (the text view's own drag
|
||||
/// handlers over the editor, the window `.dropDestination` elsewhere)
|
||||
/// after markdown forwarding is ruled out upstream.
|
||||
/// The drop point is read from the live pointer (NSEvent.mouseLocation
|
||||
/// — the SwiftUI closure's location proved unusable, dogfood 2026-11-02).
|
||||
/// Gates: saved piece, every file publishable (#34's mimeType set) —
|
||||
@@ -354,8 +356,10 @@ final class ProseListTextView: NSTextView {
|
||||
}
|
||||
// The publish-able set IS #34's mimeType gate — nothing the rail
|
||||
// can't ship ever enters assets/. A mixed md+image set refuses
|
||||
// here too (only pure-markdown sets are forwarded upstream).
|
||||
guard urls.allSatisfy({ Micropub.mimeType(forDestination: $0.lastPathComponent) != nil }) else {
|
||||
// here too (only pure-markdown sets are forwarded upstream), and
|
||||
// so does a web URL (a browser image drag): the extension may
|
||||
// look publishable, but nothing is on disk to copy.
|
||||
guard urls.allSatisfy({ $0.isFileURL && Micropub.mimeType(forDestination: $0.lastPathComponent) != nil }) else {
|
||||
showIngestNotice("Drop images (PNG, JPEG, GIF, WebP, SVG) or markdown — one kind at a time.")
|
||||
return false
|
||||
}
|
||||
@@ -416,7 +420,12 @@ final class ProseListTextView: NSTextView {
|
||||
private var ingestNotice: NSTextField?
|
||||
private var ingestNoticeHide: DispatchWorkItem?
|
||||
|
||||
/// The last refusal text — the observable the pins read (the strip
|
||||
/// itself is private chrome).
|
||||
private(set) var lastIngestNotice: String?
|
||||
|
||||
private func showIngestNotice(_ text: String) {
|
||||
lastIngestNotice = text
|
||||
let strip: NSTextField
|
||||
if let ingestNotice {
|
||||
strip = ingestNotice
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
//
|
||||
// #193: the shared workspace chrome, moved from WorkspaceView.swift
|
||||
// (file-length ceiling) — SelectedRowStrip, BorderedSecondaryButtonStyle,
|
||||
// PaneHeader; every pane reuses them, code unchanged.
|
||||
// PaneHeader; every pane reuses them, code unchanged. #205 adds
|
||||
// FinderHandOffButtons (born here).
|
||||
//
|
||||
|
||||
import AppKit
|
||||
import SwiftUI
|
||||
|
||||
/// r6 (mercury#49/52, argon#13): the shared selected-row strip — a 2pt
|
||||
@@ -94,3 +96,26 @@ struct PaneHeader<Trailing: View>: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// #205: the row menus' Finder hand-off — Reveal in Finder + Copy Path,
|
||||
/// one fragment for every surface that lists pieces (the library column,
|
||||
/// the Archive pane). Both act on `model.fileURL(for:)` — the resolved
|
||||
/// `post.md`; a nil URL (the piece is gone) no-ops.
|
||||
struct FinderHandOffButtons: View {
|
||||
let model: PostsModel
|
||||
let post: Post
|
||||
|
||||
var body: some View {
|
||||
Button("Reveal in Finder") {
|
||||
if let url = model.fileURL(for: post) {
|
||||
NSWorkspace.shared.activateFileViewerSelecting([url])
|
||||
}
|
||||
}
|
||||
Button("Copy Path") {
|
||||
if let url = model.fileURL(for: post) {
|
||||
NSPasteboard.general.clearContents()
|
||||
NSPasteboard.general.setString(url.path, forType: .string)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,27 +56,14 @@ struct WorkspaceView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
// #91: drag a markdown file onto the window — same guest slot as
|
||||
// File ▸ Open… Non-markdown drops are refused.
|
||||
// #91/#141: drops landing OUTSIDE the editor (over the editor the
|
||||
// text view takes the drag itself — FileDropTextView); one router.
|
||||
.dropDestination(for: URL.self) { urls, _ in
|
||||
// #162: no new buffers while a Cold Turkey block holds —
|
||||
// the open Piece is the one being counted.
|
||||
guard !gate.writingLock.isLocked else { return false }
|
||||
// #141: the window destination is the only one that ever
|
||||
// fires (field-verified 2026-11-02 — nested editor-level
|
||||
// SwiftUI targets are never consulted, and AppKit views
|
||||
// registered for file drags are starved by it).
|
||||
// PURE-markdown sets keep #91's open-as-guest; a mixed
|
||||
// md+image set falls through and ingestDrop refuses it
|
||||
// loudly (images must not vanish silently behind the md).
|
||||
// Nil text view: bounce.
|
||||
if urls.allSatisfy(PostStore.isMarkdown), let url = urls.first {
|
||||
gate.posts.openExternal(url)
|
||||
let landed = gate.routeFileDrop(urls)
|
||||
if landed {
|
||||
selection = .posts
|
||||
return true
|
||||
}
|
||||
guard let textView = gate.proseDrop.textView else { return false }
|
||||
return textView.ingestDrop(urls)
|
||||
return landed
|
||||
}
|
||||
// #21: left-edge hover slides rail+library back in as an overlay.
|
||||
// Library only while the window width allows it (#17 verdict stands:
|
||||
|
||||
@@ -41,10 +41,10 @@ Conventions every suite follows. Per-suite pin inventories are NOT kept here —
|
||||
- `PostsModelDepartureTests` — brief-25/#198: document departure guarded — a navigation whose outgoing flush fails (injected read-only dirs) or hits an unanswered #67 conflict aborts and retains the dirty session/guest; #200: quit-time shutdown pins — foreign disk body untouched across a conflicted shutdown, clean dirty session and the open guest flush, a never-loaded session's retyped words refuse (vacuous-flush gap).
|
||||
- `MicropubTests`, `MicropubModelTests`, `MicropubMediaTests` — publish wire contract, model flow, media/illustration surface.
|
||||
- `MCPToolsTests`, `MCPServerWireTests`, `MCPToolsPromoteTests`, `ToolPayloadsTests`, `LearningsPaneTests`, `LearningDecayTests` — museion-tools store, wire, promote, tool-payload decoder shapes (strict + lenient, #177), learnings pane, decay.
|
||||
- `FixCardApplyTests` — fix-card apply/skip/done lifecycle.
|
||||
- `FixCardApplyTests` — fix-card apply/skip/done lifecycle; #204: the jump-to-the-anchor pins (`anchorRange` occurrence math incl. UTF-16, the model's `revealCard` request stamp, the editor's `landingSpan` — a bare caret hops past leading blanks, a jump span never does).
|
||||
- `PostsModelTests`, `PassRunTests`, `BlindReadTests`, `EngineLifecycleTests`, `SessionLifecycleTests`, `SessionScopeTests`, `TranscriptRailTests` — model orchestration over the scripted in-process engine (#178): passes, blind read, per-surface engines, session lifecycle, scoped hosting, the typed transcript rail (#177 — speaker/notice type facts through the scripted engine, prefix-free invariant, append-seam classifiers), and the #179 write-rail pins in PostsModelTests (write → one library refresh + strip cleared; failed write owns the strip; nil-Home refuses cleanly; import batch keeps per-file strip messages; mid-pass Home repoint refuses the advance — `endHeldPrompt` is the rig hook that ends a held turn normally, polled to via `hasHeldPrompt` first: `runningPass` flips before the one-shot engine parks its prompt, so firing into that window false-fails under load).
|
||||
- `DeslopLintTests` (with the `DeslopLintWiringTests` member) — native lint findings, config story, emit loop.
|
||||
- `EditorSessionTests`, `ReadingPresenterTests`, `ProsePresenterTests`, `FocusModeTests`, `ImportExternalTests`, `ImageIngestTests` — editor session, reading pipeline, editing-surface parity, focus math, import + image ingest.
|
||||
- `EditorSessionTests`, `ReadingPresenterTests`, `ProsePresenterTests`, `FocusModeTests`, `ImportExternalTests`, `ImageIngestTests` — editor session, reading pipeline, editing-surface parity, focus math, import, image ingest + the 27.2 drag-routing seam (`DragInfoStub`, the suite's NSDraggingInfo mock: a Finder-shaped drag routes through the text view and never pastes the path; text-only drags keep the stock drop; outline rows bounce; the probe follows `changeCount`; web URLs and vanished files refuse with the right notice) + the one router's pins (guest, Cold Turkey refusal, ingest hand-off, mixed refusal).
|
||||
- `OutlineTreeTests`, `OutlinePresenterTests`, `OutlineDragTests`, `EscEventProbeTests` — outliner model, projection, drag plumbing, Esc delivery probe.
|
||||
- `ProseListTests`, `ProseRekeyTests` — prose list model + fold rendering, fold rekey pipeline.
|
||||
- `SettingsModelTests`, `SettingsModelWritePathTests`, `HermesSettingsWriterTests`, `ProviderProbeTests`, `ProviderProbeTransportTests`, `ProviderCredentialTests` — settings model, real CLI write path, probe decode + request builders, the #181 ONE credential resolution (pasted key wins, keyless fallback on the official endpoint, custom-endpoint and no-login refusals).
|
||||
|
||||
@@ -14,6 +14,16 @@
|
||||
// card closes applied), skip and done flip only the status, and the stale
|
||||
// anchor selects and changes no text while the card flags itself stale.
|
||||
//
|
||||
// #204 — Scenario: the card points, the editor lands
|
||||
// From issue #204: a Fix Card should let the writer jump to the relevant
|
||||
// paragraph — the palette's Jump hands the editor the anchor's exact span.
|
||||
// Given an open piece carrying a fix card whose anchor is valid,
|
||||
// when the writer clicks Jump on that card,
|
||||
// then the model stamps one reveal request carrying the anchor's NSRange
|
||||
// resolved against the LIVE session text (a dirty buffer still lands),
|
||||
// the request's token advances so repeated jumps re-fire, nothing is
|
||||
// written (not text, not the card), and a stale anchor stamps nothing.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
@testable import Museion
|
||||
@@ -284,7 +294,103 @@ struct FixCardApplyTests {
|
||||
#expect(!FileManager.default.fileExists(atPath: folder.appendingPathComponent("post.md").path)) // nothing written
|
||||
}
|
||||
|
||||
// MARK: Promote (#26, S4.1)
|
||||
// MARK: Jump to the anchor (#204)
|
||||
|
||||
/// #204: the pure anchor-span math — the appliedText occurrence rule
|
||||
/// (1-based, non-overlapping) answered as a range, with every
|
||||
/// must-never-land case nil.
|
||||
@Test func `anchorRange resolves the nth occurrence and nils every unlandable case`() throws {
|
||||
let piece = try makePiece()
|
||||
let written = try FixCardStore.submit(
|
||||
piecePath: piece.path,
|
||||
cards: [
|
||||
card(quote: "anchor sentence"),
|
||||
card(quote: "anchor sentence", occurrence: 2),
|
||||
card(quote: "vanished quote", occurrence: 1),
|
||||
card(quote: "anchor sentence", lane: .demonstration),
|
||||
],
|
||||
)
|
||||
// submit refuses an empty quote and occurrence 0 at the trust
|
||||
// boundary — the unlandable-input cases are pinned through the
|
||||
// stored shape directly.
|
||||
let emptyQuote = FixCardStore.StoredFixCard(
|
||||
id: UUID(), submittedAt: Date(), rank: nil, pattern: "p", problem: "p",
|
||||
diagnosticQuestion: "", fix: "", anchor: .init(quote: "", occurrence: 1),
|
||||
lane: .mechanical, emitter: .lint, provenance: nil, status: .open, anchorStatus: .stale, promotedAt: nil,
|
||||
)
|
||||
let zeroOccurrence = FixCardStore.StoredFixCard(
|
||||
id: UUID(), submittedAt: Date(), rank: nil, pattern: "p", problem: "p",
|
||||
diagnosticQuestion: "", fix: "", anchor: .init(quote: "anchor", occurrence: 0),
|
||||
lane: .mechanical, emitter: .lint, provenance: nil, status: .open, anchorStatus: .stale, promotedAt: nil,
|
||||
)
|
||||
let text = "The anchor sentence. And the anchor sentence again."
|
||||
|
||||
let first = try #require(FixCardStore.anchorRange(of: written[0].card, in: text))
|
||||
#expect((text as NSString).substring(with: first) == "anchor sentence")
|
||||
#expect(first.location == 4) // 1-based, the FIRST match
|
||||
let second = try #require(FixCardStore.anchorRange(of: written[1].card, in: text))
|
||||
#expect(second.location == 29) // occurrence 2 — not the first
|
||||
#expect(FixCardStore.anchorRange(of: written[2].card, in: text) == nil) // stale
|
||||
// A demonstration card's anchor is still a real place in the text.
|
||||
#expect(FixCardStore.anchorRange(of: written[3].card, in: text) != nil)
|
||||
#expect(FixCardStore.anchorRange(of: emptyQuote, in: text) == nil)
|
||||
#expect(FixCardStore.anchorRange(of: zeroOccurrence, in: text) == nil)
|
||||
// The range is UTF-16 (NSTextView's unit), not Characters — a grapheme
|
||||
// before the anchor is 2 units here; a Character-counted location would say 6.
|
||||
let wide = FixCardStore.anchorRange(of: written[0].card, in: "✍️ The anchor sentence.")
|
||||
#expect(wide?.location == 7)
|
||||
}
|
||||
|
||||
/// #204: a jump selects the anchor exactly where it resolved; only a bare
|
||||
/// caret (the #71 flip-back) hops past leading blanks — a quote that IS
|
||||
/// the leading blanks must select those blanks, never the title. Both
|
||||
/// shapes clamp to the text.
|
||||
@Test @MainActor func `landingSpan hops only a bare caret and clamps both shapes to the text`() {
|
||||
let text = "\n\n\nTitle line."
|
||||
let jump = FixCardRevealRequest(range: NSRange(location: 0, length: 3), token: 1)
|
||||
#expect(ProseTextView.landingSpan(for: jump, in: text) == NSRange(location: 0, length: 3)) // the blank run itself
|
||||
let caret = FixCardRevealRequest(range: NSRange(location: 0, length: 0), token: 2)
|
||||
#expect(ProseTextView.landingSpan(for: caret, in: text) == NSRange(location: 3, length: 0)) // hops to the title
|
||||
let over = FixCardRevealRequest(range: NSRange(location: 10, length: 50), token: 3)
|
||||
#expect(ProseTextView.landingSpan(for: over, in: text) == NSRange(location: 10, length: 4)) // clamped
|
||||
}
|
||||
|
||||
/// #204: the model stamps ONE reveal request per jump — the range
|
||||
/// resolved against the LIVE session text (dirty buffer included), the
|
||||
/// token advancing so a repeated jump re-fires; a stale anchor stamps
|
||||
/// nothing. No write of any kind.
|
||||
@Test @MainActor func `revealCard stamps a reveal request against the live text and writes nothing`() throws {
|
||||
let (model, home) = try makeModelHome()
|
||||
let post = try PostStore.writeNew(body: "# Carded\n\nThe anchor sentence.\n", home: home)
|
||||
let folder = try #require(PostStore.folder(of: post.id, home: home))
|
||||
let written = try FixCardStore.submit(
|
||||
piecePath: folder.path,
|
||||
cards: [card(quote: "anchor sentence"), card(quote: "vanished quote")],
|
||||
)
|
||||
model.select(post.id)
|
||||
let session = try #require(model.session)
|
||||
// The writer typed since the last flush — the jump must resolve
|
||||
// against the buffer, not disk (the range would otherwise drift).
|
||||
session.edit("# Carded\n\nIntro line.\nThe anchor sentence.\n")
|
||||
let before = try Data(contentsOf: folder.appendingPathComponent("post.md"))
|
||||
|
||||
model.revealCard(written[0].card)
|
||||
|
||||
let request = try #require(model.revealRequest)
|
||||
#expect(request.range.location == (session.text as NSString).range(of: "anchor sentence").location)
|
||||
#expect(request.range.length == ("anchor sentence" as NSString).length) // UTF-16 units — what NSTextView selects
|
||||
let token = request.token
|
||||
#expect(try Data(contentsOf: folder.appendingPathComponent("post.md")) == before) // no write
|
||||
#expect(try FixCardStore.scan(pieceURL: folder).allSatisfy { $0.status == .open }) // card untouched
|
||||
|
||||
// A repeated jump re-fires (the editor applies once per token).
|
||||
model.revealCard(written[0].card)
|
||||
#expect(model.revealRequest?.token == token + 1)
|
||||
|
||||
// A stale anchor stamps nothing — the previous request stands.
|
||||
model.revealCard(written[1].card)
|
||||
#expect(model.revealRequest?.token == token + 1)
|
||||
}
|
||||
|
||||
/// Scenario: the mentor remembers — promoting through the model writes
|
||||
/// the Learning under the open piece's Home, refreshes the palette's
|
||||
|
||||
@@ -25,6 +25,66 @@ import Foundation
|
||||
@testable import Museion
|
||||
import Testing
|
||||
|
||||
/// The smallest NSDraggingInfo the drag overrides read: only the
|
||||
/// pasteboard matters (the stock text drop also wants a destination view,
|
||||
/// which the hosted text view supplies itself).
|
||||
@MainActor
|
||||
final class DragInfoStub: NSObject, NSDraggingInfo {
|
||||
let draggingPasteboard: NSPasteboard
|
||||
init(_ pb: NSPasteboard) {
|
||||
draggingPasteboard = pb
|
||||
}
|
||||
|
||||
var draggingDestinationWindow: NSWindow? {
|
||||
nil
|
||||
}
|
||||
|
||||
var draggingSourceOperationMask: NSDragOperation {
|
||||
[.copy]
|
||||
}
|
||||
|
||||
var draggingLocation: NSPoint {
|
||||
.zero
|
||||
}
|
||||
|
||||
var draggedImageLocation: NSPoint {
|
||||
.zero
|
||||
}
|
||||
|
||||
var draggedImage: NSImage? {
|
||||
nil
|
||||
}
|
||||
|
||||
var draggingSource: Any? {
|
||||
nil
|
||||
}
|
||||
|
||||
var draggingSequenceNumber: Int {
|
||||
0
|
||||
}
|
||||
|
||||
func slideDraggedImage(to _: NSPoint) {}
|
||||
override func namesOfPromisedFilesDropped(atDestination _: URL) -> [String]? {
|
||||
nil
|
||||
}
|
||||
|
||||
var draggingFormation: NSDraggingFormation = .none
|
||||
var animatesToDestination = false
|
||||
var numberOfValidItemsForDrop = 0
|
||||
func enumerateDraggingItems(
|
||||
options _: NSDraggingItemEnumerationOptions,
|
||||
for _: NSView?,
|
||||
classes _: [AnyClass],
|
||||
searchOptions _: [NSPasteboard.ReadingOptionKey: Any],
|
||||
using _: @escaping (NSDraggingItem, Int, UnsafeMutablePointer<ObjCBool>) -> Void,
|
||||
) {}
|
||||
var springLoadingHighlight: NSSpringLoadingHighlight {
|
||||
.none
|
||||
}
|
||||
|
||||
func resetSpringLoading() {}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
struct ImageIngestTests {
|
||||
/// Throwaway Home + a saved post standing in for the open editor
|
||||
@@ -96,9 +156,10 @@ struct ImageIngestTests {
|
||||
#expect(!FileManager.default.fileExists(atPath: folder.appendingPathComponent("assets").path))
|
||||
}
|
||||
|
||||
// MARK: - #141 drag-layer entry (ingestDrop — the SwiftUI drop
|
||||
// MARK: - #141 drag-layer entry (ingestDrop — whichever surface took
|
||||
|
||||
// target's perform lands on the text view)
|
||||
// the drag routes here: the text view's own handlers over the editor,
|
||||
// the window SwiftUI destination elsewhere)
|
||||
|
||||
@Test func `ingestDrop copies lands the ref and selects alt`() throws {
|
||||
let (_, folder) = try ingestHome()
|
||||
@@ -129,6 +190,189 @@ struct ImageIngestTests {
|
||||
#expect(try !draft.ingestDrop([imageSource("x.png")]))
|
||||
}
|
||||
|
||||
// MARK: - 27.2 drag routing (a drag goes to the deepest destination:
|
||||
|
||||
// FileDropTextView owns drops that land on the editor — stock NSTextView
|
||||
// handling would paste the file PATH)
|
||||
|
||||
/// A Finder-shaped drag pasteboard: `public.file-url` plus the legacy
|
||||
/// filenames type NSTextView registers for.
|
||||
private func finderDragPasteboard(_ urls: [URL]) -> NSPasteboard {
|
||||
let filenames = NSPasteboard.PasteboardType(rawValue: "NSFilenamesPboardType")
|
||||
let pb = NSPasteboard(name: .drag)
|
||||
pb.declareTypes([.fileURL, filenames], owner: nil)
|
||||
pb.setString(urls[0].absoluteString, forType: .fileURL)
|
||||
pb.setPropertyList(urls.map(\.path), forType: filenames)
|
||||
return pb
|
||||
}
|
||||
|
||||
/// A live text view in a window (the stock text drop inserts only into
|
||||
/// a hosted view). Caller orders the window out.
|
||||
private func hostedView() -> (tv: ProseListTextView, win: NSWindow) {
|
||||
let win = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 200, height: 200), styleMask: [.titled], backing: .buffered, defer: false)
|
||||
let tv = ProseListTextView()
|
||||
tv.string = "Body.\n"
|
||||
win.contentView?.addSubview(tv)
|
||||
win.makeFirstResponder(tv)
|
||||
return (tv, win)
|
||||
}
|
||||
|
||||
/// A temp markdown file standing in for a dragged guest.
|
||||
private func markdownSource() throws -> URL {
|
||||
let md = FileManager.default.temporaryDirectory.appendingPathComponent("imageingest-\(UUID().uuidString).md")
|
||||
try "# Guest\n".write(to: md, atomically: true, encoding: .utf8)
|
||||
return md
|
||||
}
|
||||
|
||||
@Test func `a file drag landing on the text view routes, never pastes the path`() throws {
|
||||
let (_, folder) = try ingestHome()
|
||||
let (tv, win) = hostedView()
|
||||
defer { win.orderOut(nil) }
|
||||
tv.ingestFolder = folder
|
||||
tv.onFileDrop = { [weak tv] in tv?.ingestDrop($0) ?? false } // the gate's router in miniature
|
||||
let source = try imageSource("sketch.png")
|
||||
let drag = DragInfoStub(finderDragPasteboard([source]))
|
||||
|
||||
#expect(tv.draggingEntered(drag) == .copy)
|
||||
#expect(tv.draggingUpdated(drag) == .copy)
|
||||
#expect(tv.performDragOperation(drag))
|
||||
#expect(tv.string.contains(""))
|
||||
#expect(!tv.string.contains(source.path), "the stock path paste survived")
|
||||
|
||||
// Unrouted (no handler mounted): a Finder drag claims nothing and
|
||||
// pastes nothing.
|
||||
let (bare, bareWin) = hostedView()
|
||||
defer { bareWin.orderOut(nil) }
|
||||
let bareDrag = DragInfoStub(finderDragPasteboard([source]))
|
||||
#expect(bare.draggingEntered(bareDrag) == [])
|
||||
#expect(!bare.performDragOperation(bareDrag))
|
||||
#expect(bare.string == "Body.\n")
|
||||
}
|
||||
|
||||
@Test func `a text-only drag keeps the stock drop and never reaches the router`() {
|
||||
let (tv, win) = hostedView()
|
||||
defer { win.orderOut(nil) }
|
||||
var routed: [URL]?
|
||||
tv.onFileDrop = { routed = $0; return true }
|
||||
let pb = NSPasteboard(name: .drag)
|
||||
pb.declareTypes([.string], owner: nil)
|
||||
pb.setString("dropped text", forType: .string)
|
||||
|
||||
#expect(FileDropTextView.classify(pb) == .text)
|
||||
#expect(tv.draggingEntered(DragInfoStub(pb)) == .copy)
|
||||
#expect(tv.performDragOperation(DragInfoStub(pb)))
|
||||
#expect(tv.string.contains("dropped text"))
|
||||
#expect(routed == nil)
|
||||
|
||||
// URL-less AND text-less (raw image data from Photos/Preview): bounces.
|
||||
let png = NSPasteboard(name: .drag)
|
||||
png.declareTypes([.png], owner: nil)
|
||||
#expect(tv.draggingEntered(DragInfoStub(png)) == [])
|
||||
#expect(!tv.performDragOperation(DragInfoStub(png)))
|
||||
#expect(tv.string.contains("dropped text"))
|
||||
}
|
||||
|
||||
@Test func `the drag probe follows the pasteboard contents, not its memory`() throws {
|
||||
let (tv, win) = hostedView()
|
||||
defer { win.orderOut(nil) }
|
||||
let source = try imageSource("sketch.png")
|
||||
let pb = finderDragPasteboard([source])
|
||||
#expect(tv.dropKind(of: pb) == .urls([source]))
|
||||
// Same pasteboard object, new contents (changeCount moved): follows.
|
||||
pb.declareTypes([.string], owner: nil)
|
||||
pb.setString("now text", forType: .string)
|
||||
#expect(tv.dropKind(of: pb) == .text)
|
||||
pb.clearContents()
|
||||
#expect(tv.dropKind(of: pb) == .none)
|
||||
}
|
||||
|
||||
@Test func `the outline rows bounce a file drag instead of pasting the path`() throws {
|
||||
let win = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 200, height: 200), styleMask: [.titled], backing: .buffered, defer: false)
|
||||
defer { win.orderOut(nil) }
|
||||
let row = RowTextView()
|
||||
row.string = "- item"
|
||||
win.contentView?.addSubview(row)
|
||||
let drag = try DragInfoStub(finderDragPasteboard([imageSource("sketch.png")]))
|
||||
|
||||
#expect(row.draggingEntered(drag) == [])
|
||||
#expect(!row.performDragOperation(drag))
|
||||
#expect(row.string == "- item")
|
||||
}
|
||||
|
||||
@Test func `a web URL refuses loudly with the type notice and plants nothing`() throws {
|
||||
// A browser image drag reaches the router as an https URL — the
|
||||
// extension looks publishable, but nothing is on disk to copy. The
|
||||
// sink would refuse it too; only the isFileURL gate names the type.
|
||||
let (_, folder) = try ingestHome()
|
||||
let tv = ProseListTextView()
|
||||
tv.string = "Body.\n"
|
||||
tv.ingestFolder = folder
|
||||
let web = try #require(URL(string: "https://example.com/cat.jpg"))
|
||||
#expect(!tv.ingestDrop([web]))
|
||||
#expect(tv.lastIngestNotice?.hasPrefix("Drop images") == true, "notice: \(tv.lastIngestNotice ?? "nil")")
|
||||
#expect(!FileManager.default.fileExists(atPath: folder.appendingPathComponent("assets").path))
|
||||
}
|
||||
|
||||
@Test func `a file that vanished after the drag refuses as missing, not as a folder`() throws {
|
||||
let (_, folder) = try ingestHome()
|
||||
let tv = ProseListTextView()
|
||||
tv.string = "Body.\n"
|
||||
tv.ingestFolder = folder
|
||||
let gone = try imageSource("ghost.png")
|
||||
try FileManager.default.removeItem(at: gone)
|
||||
#expect(!tv.ingestDrop([gone]))
|
||||
let notice = try #require(tv.lastIngestNotice)
|
||||
#expect(notice.contains("couldn’t be read"), "notice: \(notice)")
|
||||
#expect(!notice.contains("folder"), "notice: \(notice)")
|
||||
#expect(!FileManager.default.fileExists(atPath: folder.appendingPathComponent("assets").path))
|
||||
}
|
||||
|
||||
// MARK: - The one router (AppGateState.routeFileDrop)
|
||||
|
||||
@Test func `the router opens a pure-markdown set as the guest`() throws {
|
||||
let gate = AppGateState()
|
||||
let md = try markdownSource()
|
||||
defer { try? FileManager.default.removeItem(at: md) }
|
||||
#expect(gate.routeFileDrop([md]))
|
||||
#expect(gate.posts.externalSession != nil)
|
||||
}
|
||||
|
||||
@Test func `the router refuses everything while a Cold Turkey block holds`() throws {
|
||||
let gate = AppGateState()
|
||||
gate.posts.newPost()
|
||||
gate.posts.draft?.text = "seed words here"
|
||||
gate.startWritingLock(goal: .words(2))
|
||||
defer {
|
||||
gate.writingLock.feed(text: "seed words here plus two more")
|
||||
gate.writingLock.tick()
|
||||
}
|
||||
let md = try markdownSource()
|
||||
defer { try? FileManager.default.removeItem(at: md) }
|
||||
#expect(gate.writingLock.isLocked)
|
||||
#expect(!gate.routeFileDrop([md]))
|
||||
#expect(gate.posts.externalSession == nil)
|
||||
}
|
||||
|
||||
@Test func `the router hands non-markdown to the open piece's ingest`() throws {
|
||||
let gate = AppGateState()
|
||||
let (_, folder) = try ingestHome()
|
||||
let source = try imageSource("sketch.png")
|
||||
// No editor mounted: bounce.
|
||||
#expect(!gate.routeFileDrop([source]))
|
||||
let tv = ProseListTextView()
|
||||
tv.string = "Body.\n"
|
||||
tv.ingestFolder = folder
|
||||
gate.proseDrop.textView = tv
|
||||
#expect(gate.routeFileDrop([source]))
|
||||
#expect(tv.string.contains(""))
|
||||
// A mixed md+image set reaches the ingest's loud refusal, never the guest.
|
||||
let md = try markdownSource()
|
||||
defer { try? FileManager.default.removeItem(at: md) }
|
||||
#expect(try !gate.routeFileDrop([imageSource("second.png"), md]))
|
||||
#expect(tv.lastIngestNotice?.hasPrefix("Drop images") == true)
|
||||
#expect(gate.posts.externalSession == nil)
|
||||
}
|
||||
|
||||
// MARK: - #141 finish-audit pins
|
||||
|
||||
@Test func `a dropped symlink refuses with nothing planted`() throws {
|
||||
@@ -149,8 +393,8 @@ struct ImageIngestTests {
|
||||
}
|
||||
|
||||
@Test func `a mixed image and markdown set refuses loudly`() throws {
|
||||
// The window destination forwards only PURE-markdown sets (#91);
|
||||
// a mixed set must reach this refusal, not vanish behind the md.
|
||||
// The router forwards only PURE-markdown sets (#91); a mixed set
|
||||
// must reach this refusal, not vanish behind the md.
|
||||
let (_, folder) = try ingestHome()
|
||||
let tv = ProseListTextView()
|
||||
tv.string = "Body.\n"
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
// #179: the write-rail pins — one seam pairs every library store write
|
||||
// with exactly one rescan and owns the error strip; the model owns the
|
||||
// Home (no method takes one).
|
||||
// #205: the row menus' Reveal in Finder / Copy Path target — the piece's
|
||||
// post.md resolved on disk; a vanished piece answers nil.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
@@ -68,6 +70,37 @@ func makeModelHome() throws -> (PostsModel, URL) {
|
||||
#expect(model.lastError == nil)
|
||||
}
|
||||
|
||||
@Test @MainActor func `reveal and copy path resolve the post file on disk`() throws {
|
||||
let (model, home) = try makeModelHome()
|
||||
let post = try PostStore.writeNew(body: "# Find Me\n", project: "essays", home: home)
|
||||
|
||||
let url = model.fileURL(for: post)
|
||||
|
||||
let expected = home.appendingPathComponent("projects/essays/\(post.id)/post.md")
|
||||
#expect(url == expected)
|
||||
#expect(FileManager.default.fileExists(atPath: url?.path ?? ""))
|
||||
}
|
||||
|
||||
@Test @MainActor func `reveal and copy path answer nil for a vanished piece`() throws {
|
||||
let (model, home) = try makeModelHome()
|
||||
let post = try PostStore.writeNew(body: "# Ghost\n", home: home)
|
||||
try PostStore.trash(post, home: home)
|
||||
|
||||
#expect(model.fileURL(for: post) == nil)
|
||||
}
|
||||
|
||||
@Test @MainActor func `reveal and copy path resolve an archived piece off the archive root`() throws {
|
||||
let (model, home) = try makeModelHome()
|
||||
let post = try PostStore.writeNew(body: "# Shelved\n", project: "essays", home: home)
|
||||
try PostStore.archive(post, home: home)
|
||||
|
||||
let url = model.fileURL(for: post)
|
||||
|
||||
let expected = home.appendingPathComponent("archive/essays/\(post.id)/post.md")
|
||||
#expect(url == expected)
|
||||
#expect(FileManager.default.fileExists(atPath: url?.path ?? ""))
|
||||
}
|
||||
|
||||
@Test @MainActor func `new project draft lands in the named project`() throws {
|
||||
let (model, home) = try makeModelHome()
|
||||
try PostStore.createProject(named: "essays", home: home)
|
||||
|
||||
@@ -322,7 +322,7 @@ extension ProseFoldRekeyTests {
|
||||
debounce: .seconds(3600),
|
||||
)
|
||||
let coordinator = ProseTextView.Coordinator(
|
||||
representable: ProseTextView(session: session, dropBridge: ProseDropBridge()),
|
||||
representable: ProseTextView(session: session, dropBridge: ProseDropBridge(), routeDrop: { _ in false }),
|
||||
)
|
||||
textView.delegate = coordinator // production wiring (PostEditorView)
|
||||
textView.setSelectedRange(NSRange(location: 0, length: 0))
|
||||
|
||||
@@ -89,6 +89,14 @@ The app is signed with a Developer ID and notarized with Apple, so it opens like
|
||||
5. **Run a Pass** from the Mentor pane. Read the verdict, work the Fix Cards one at a time, promote the patterns worth remembering into Learnings.
|
||||
6. **Publish** when the piece is yours.
|
||||
|
||||
## Support Museion
|
||||
|
||||
Museion is free and open source. It is one of a suite of apps I build and publish, and together they are my only income.
|
||||
|
||||
Every feature above took hours to build. Those hours have to come from somewhere. If Museion has become part of how you write, a coffee at **[buymeacoffee.com/babylondreams](https://buymeacoffee.com/babylondreams)** keeps them coming, for this app and the rest of the suite.
|
||||
|
||||
Thank you for writing with it.
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
| Action | Keys |
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
# Image drop pastes the file path on macOS 27.2 — the editor's text views now own drops that land on them (#141 follow-up)
|
||||
|
||||
> **Date:** 2026-12-03
|
||||
> **Type:** generic
|
||||
> **Reference:** follow-up to #141 (unticketed fix; dogfood on macOS 27.2.1)
|
||||
|
||||
## Goal
|
||||
|
||||
Alexander dropped a Finder screenshot onto a saved post and got the file PATH pasted as plain text — no `assets/` copy, no `` ref. #141 shipped exactly this feature (field-verified 2026-11-02 on macOS 27.0.1). Find out why it broke and restore it with ONE path that targets the current OS (his ruling: "adjust for the latest OS. no two paths"). Closed with a finish-audit (three fresh-context reviewers; findings and dispositions below).
|
||||
|
||||
## What Was Done
|
||||
|
||||
- **Diagnosis from evidence, not theory.** The unified log of the release build showed the drag pasteboard read as `public.file-url` only; the user's post on disk held three `` refs and no `assets/` (so `ingestImage` had never run). `softwareupdate --history` dated the OS jump: 27.0.1 → 27.2.1 on 2026-11-16, two weeks after #141's verification. Then ONE instrumented Debug build (temporary `Logger(subsystem: "com.babylondreams.Museion", category: "dropprobe")` lines in the SwiftUI closure + `NSDraggingDestination`/`readSelection`/`paste` overrides on the text view, read through `log stream`/`log show --level notice`) and one human drag settled it:
|
||||
- `textview draggingEntered → copy` … `performDragOperation BEGIN` → `readSelection type=NSFilenamesPboardType → true` → `performDragOperation → true`
|
||||
- NO `swiftui destination fired`, NO `ingestDrop entry`.
|
||||
- lldb on the live app (`expr -l Swift -- let $ws = NSApp.windows …`) showed the `ProseListTextView` registered for ~19 drag types (NSFilenames, Apple URL, TIFF, PNG, RTF, RTFD, file-promise …) — NSTextView registers itself once live; a bare `NSTextView(frame:)` probe reads `[]`, even inside a window.
|
||||
- `FileDropTextView.swift` (NEW) — the editor text views' drag base: `onFileDrop: (([URL]) -> Bool)?`; `DropKind` (`urls` / `text` / `none`) classified from the pasteboard (`readObjects(forClasses: [NSURL.self])`, else the string type), memoized per `changeCount`; the `NSDraggingDestination` overrides route URL-bearing drags (never `super` — the stock path paste lives there), hand text-only drags to the stock drop, bounce the rest. `ProseListTextView` and the outliner's `RowTextView` ride it (rows mount no route → bounce).
|
||||
- `MuseionApp.swift` — `AppGateState.routeFileDrop(_:)`: the ONE file-drop router (Cold Turkey guard → pure-markdown set → `posts.openExternal` → else `proseDrop.textView?.ingestDrop`). `proseDrop` is documented as the window destination's handle.
|
||||
- `ProseListTextView.swift` — `lastIngestNotice` test seam (the refusal text the pins read); `ingestDrop`'s publishable gate requires `isFileURL` (a browser image drag refuses with the type strip instead of reaching the sink).
|
||||
- `PostStore.swift` — `IngestError.missing(_:)`: a file the disk can't stat refuses as missing ("couldn't be read"), never as a folder; the sink's guards are three flat checks (missing / link / folder).
|
||||
- `PostEditorView.swift` — `ProseTextView` gains a non-optional `routeDrop: @escaping ([URL]) -> Bool` beside `dropBridge`; `makeNSView`/`updateNSView` set `tv.onFileDrop = routeDrop`. Both `PostEditorView` call sites pass `{ gate.routeFileDrop($0) }`; `ProseRekeyTests`' direct construction passes `{ _ in false }`.
|
||||
- `WorkspaceView.swift` — the window `.dropDestination` is four lines: `let landed = gate.routeFileDrop(urls); if landed { selection = .posts }; return landed`. The hop now fires on every landed drop, not only markdown — unreachable for images today (the editor mounts only on Posts).
|
||||
- `MuseionTests/ImageIngestTests.swift` — `DragInfoStub`, the suite's `NSDraggingInfo` mock (pasteboard-only; the stock text drop inserts only into a hosted view). +9 pins: a Finder-shaped drag routes through the view and never pastes the path (and an unrouted view claims nothing); a text-only drag keeps the stock drop and never reaches the router (raw PNG data bounces); the probe follows the pasteboard contents; the outline rows bounce a file drag; a web URL refuses with the type notice; a vanished file refuses as missing; and the router's own pins (pure-markdown → guest, Cold Turkey refusal, ingest hand-off + mixed refusal).
|
||||
- DOX: `Museion/AGENTS.md` (WorkspaceView, editor-core, OutlineRowTextView + the new FileDropTextView bullet, PostStore), `MuseionTests/AGENTS.md` (suite map), root `AGENTS.md` (learning: 27.2 drag routing is an OS-version claim), `CHANGELOG.md` `[Unreleased]` Fixed entry.
|
||||
|
||||
## Decisions & Rationale
|
||||
|
||||
| Decision | Rationale |
|
||||
|----------|-----------|
|
||||
| Target 27.2.1 only — no dual-surface compat for 27.0.1 | Alexander's ruling mid-session ("adjust for the latest OS. no two paths"); the repo already targets what the maintainer runs. The 27.0.1 "window destination starves everything" contract is deleted from the docs, not carried. |
|
||||
| The view under the pointer owns the drop; ONE router behind both surfaces | AppKit delivers a drag to exactly one destination. Over the editor that is the text view (deepest, self-registered); elsewhere it is the window SwiftUI destination. Both call `routeFileDrop`, so the md→guest / image→ingest decision exists once and can never drift between surfaces. |
|
||||
| Override the `NSDraggingDestination` methods without `super` for URL-bearing drags | The paste is the stock implementation (`performDragOperation` → `readSelection(NSFilenamesPboardType)`); accepting the drag and then refraining from pasting is not an option — the paste happens inside super. |
|
||||
| Text-only drags keep the stock drop (`case .text: super…`) | Finish-audit (security + general): a blanket `[]` for URL-less drags had killed in-editor selection moves and text drops from other apps — a regression the fix itself introduced. The path paste needs file URLs, which never reach super. |
|
||||
| One `FileDropTextView` base for the prose editor AND the outline rows | Finish-audit (general): `RowTextView` had the identical 27.2 exposure and the CHANGELOG claimed outlines refuse. One implementation, two subclasses, zero duplication; rows mount no route → bounce. |
|
||||
| Accept every URL-bearing drag in `draggingEntered` (`copy`), refuse in `performDragOperation` | `.none` at entry bounces silently; #141's contract is a LOUD refusal (the rust strip). Web URLs ride the same gate. URL-less, text-less drags (raw image data) bounce — nothing to route. |
|
||||
| Memoize the probe per `pasteboard.changeCount` | Finish-audit (security, measured): `draggingUpdated` fires per mouse-move and `readObjects` is a pasteboard round-trip — 5k URLs → 38 ms, 20k → 137 ms per move. Two lines make hover O(1). |
|
||||
| Pasteboard-shaped seams replaced by a real `NSDraggingInfo` mock | Finish-audit (general): the first pins called seams that did not exist before the fix, so no code path in them could ever have pasted the path — green with or without the fix. `DragInfoStub` drives the real overrides; the mock is ~17 lines (the one trap: `namesOfPromisedFilesDropped(atDestination:)` sits on an NSObject informal protocol and needs `override`; the class must be `@MainActor`). |
|
||||
| `lastIngestNotice` as the refusal observable | The web-URL pin was green with the `isFileURL` clause deleted (the sink refuses too; only the strip TEXT differs). One `private(set) var` set in `showIngestNotice` makes the message assertable. |
|
||||
| No explicit `registerForDraggedTypes` call | The live view is already registered by AppKit (lldb-verified) and receives the drag; registering again changes nothing on 27.2.1. |
|
||||
|
||||
## Gotchas & Fixes
|
||||
|
||||
| Problem | Root Cause | Fix |
|
||||
|---------|------------|-----|
|
||||
| Dropped image → file path pasted, no ingest | macOS 27.2 routes a drag to the deepest destination; a live NSTextView self-registers for drag types and matches Finder via `NSFilenamesPboardType`; the window-level SwiftUI `.dropDestination` never fired — the inverse of the 27.0.1 ruling #141 was built on | Text views own the drop (overrides, no super for URLs) → one router |
|
||||
| A bare `NSTextView(frame:)` probe reported `registeredDraggedTypes == []` and suggested NSTextView could never receive the drag | Registration happens lazily once the view is live in a real window/hosting; the standalone probe is the wrong instrument | Read the LIVE view over lldb (`$`-prefixed bindings persist across `-o` commands) |
|
||||
| `log stream` caught nothing while `log show --last 5m` did | The stream attaches asynchronously; the app launched into the gap | Use `log show` for anything within the last minutes; keep the stream for live watching |
|
||||
| Interpolated values read back as `<private>` | os_log redacts non-public interpolations by default | `privacy: .public` on every value you need to read |
|
||||
| First fixed build failed: `Consecutive statements on a line must be separated by ';'` | `a != nil, b != nil ? x : y` — a condition list inside a ternary does not parse | `guard … else { return [] }; return .copy` (swiftformat later folded the switches into expressions) |
|
||||
| `xcodebuild test` failed to compile `ProseRekeyTests.swift:325` | A third `ProseTextView(…)` call site in the tests dir (my grep covered `Museion/` only) | Pass `routeDrop:` there; grep `dropBridge:` repo-wide next time |
|
||||
| swiftformat turned `ingestDrop`'s `///` block into `//` | A blank line had slipped between the doc block and the function (docComments rule) | Re-attach the `///` block directly above the function |
|
||||
| `open -n` launched the instrumented build once more after a failed compile | The launch command ran unconditionally after `build exit=65` | Gate every launch on the build exit code |
|
||||
| Audit flip: the Cold Turkey pin stayed green with its guard flipped | I batched two guards on ONE path — the md-branch flip (`if false`) sent the lock pin's markdown input down the ingest branch before the missing lock guard mattered | Flip same-path guards one at a time: restored, flipped the lock guard alone → the pin reddened by name (1 failed / 19 passed) |
|
||||
| Audit pin failed on the apostrophe | The message landed as `couldn't` (straight) while the test asserted `couldn’t` — the house voice is the curly one | Fix the message, not the pin |
|
||||
| swiftlint `line_length` (180) on the mock's `enumerateDraggingItems` signature | swiftformat does not wrap that parameter list | Wrap the signature by hand |
|
||||
|
||||
## Finish audit (three reviewers, one fanout)
|
||||
|
||||
Accepted and fixed: the text-drag regression (security S6 + general G4/G5 converged); the web-URL pin's non-discrimination + the vanished-file "is a folder" message (S2 + G6); zero router pins (G3 + S4); the outline rows' identical exposure (G9); the per-mouse-move pasteboard read (S1, measured); stale `ProseDropBridge` doc and a test comment (G1, G2); the retold 27.2 story trimmed to pointers (ponytail P1); devlog/INDEX suite count (G10); "27.2" vs "27.2.1" precision (G11); the widened `selection = .posts` hop documented (G7 — unreachable for images today).
|
||||
Deferred (visible, not dropped): magic-byte sniffing and a size cap in `ingestImage` (S3 — the pre-existing #34 extension-only posture; the drop is an explicit user action on a file the user chose; add if the posture is ever tightened); the non-atomic multi-image loop (pre-existing #141 `ponytail:` ceiling — a `[good, symlink]` drop orphans the good copy).
|
||||
Recorded as checked, no change: lock gate order (S4), pasteboard spoofing — `..` segments never reach `assets/` through the slug (S5), `draggingExited` left to stock (G8).
|
||||
Coherence: the general reviewer verified zero old-contract phrases outside the retained #141 history devlog, all three `ProseTextView(` call sites, the 723→729 count, `readObjects(forClasses: [NSURL.self])` behavior on Finder/browser/text pasteboards (empirical probe), override signatures against the SDK, and no retain cycle (`proseDrop.textView` weak; `onFileDrop` captures the app-lifetime gate). No overlap between the two surfaces was flagged as duplication after the base-class hoist — each drag still reaches exactly one.
|
||||
|
||||
## Files Changed
|
||||
|
||||
| File | Change Summary |
|
||||
|------|---------------|
|
||||
| `Museion/FileDropTextView.swift` | NEW — the drag base: `onFileDrop`, `DropKind`, `droppedURLs(from:)`, `classify`, per-`changeCount` memo, the four overrides |
|
||||
| `Museion/MuseionApp.swift` | `AppGateState.routeFileDrop` (the one router); `proseDrop` doc rewritten |
|
||||
| `Museion/ProseListTextView.swift` | rides `FileDropTextView`; `lastIngestNotice` seam; `isFileURL` in the ingest gate |
|
||||
| `Museion/OutlineRowTextView.swift` | `RowTextView` rides `FileDropTextView` (no route → bounce) |
|
||||
| `Museion/PostStore.swift` | `IngestError.missing`; flat sink guards |
|
||||
| `Museion/PostEditorView.swift` | `ProseTextView.routeDrop` param + `tv.onFileDrop` wiring in make/update; both call sites; bridge doc |
|
||||
| `Museion/WorkspaceView.swift` | Window destination reduced to the router + `selection = .posts` |
|
||||
| `MuseionTests/ImageIngestTests.swift` | `DragInfoStub` + 9 pins (drag overrides, probe, rows, refusals, router) |
|
||||
| `MuseionTests/ProseRekeyTests.swift` | `routeDrop:` at the direct `ProseTextView` construction |
|
||||
| `Museion/AGENTS.md`, `MuseionTests/AGENTS.md`, `AGENTS.md`, `CHANGELOG.md`, `docs/devlog/INDEX.md` | DOX pass + learning + `[Unreleased]` Fixed entry |
|
||||
|
||||
## Verification
|
||||
|
||||
- Full rail **729/729** (720 + 9 pins), xcresult-authoritative counts; swiftformat 0/153; swiftlint 0 violations. Re-run at finish-up on the exact committed bytes (run `20261203T153446Z`, pid 5687): 729/729 again.
|
||||
- Flip cycle: 8 guards flipped in one batched edit (all independent paths) → exactly those 8 pins failed by name, 13 pre-existing green; the Cold Turkey pin flipped alone → 1 failed / 19 green. Restores byte-compared against `cp` backups (the tree is uncommitted — `git checkout` would have eaten the session).
|
||||
- One real Finder drag on 27.2.1 (Debug build): `assets/…png` landed, `` at the drop point.
|
||||
|
||||
## Open Items & Next Steps
|
||||
|
||||
- [ ] Ticket + commit left to Alexander (forge writes are his call); the CHANGELOG entry is marked "unticketed fix" until then.
|
||||
- [ ] The three pasted-path lines from the probe drag (15:49) may still sit in `ep-1-why-i-built…`/post.md — the real drag on the fixed build landed cleanly at line 43; the earlier paste is the author's to delete.
|
||||
- [ ] Deferred audit items: magic-byte sniff + size cap in `ingestImage` (pre-existing #34 posture); pre-flight all sources before the first copy (non-atomic multi-drop, pre-existing #141 ceiling).
|
||||
- [ ] Browser image drags (https URL) refuse loudly but don't ingest — downloading into assets/ would be new scope.
|
||||
- [ ] Raw image-data drags (Photos/Preview) bounce silently — nothing to route.
|
||||
- [ ] Re-dogfood the drop after the next macOS point release: drag routing is an OS-version claim.
|
||||
|
||||
---
|
||||
|
||||
*Log written by write-log skill*
|
||||
@@ -0,0 +1,79 @@
|
||||
# Fix Cards: Jump to the anchor (#204)
|
||||
|
||||
> **Date:** 2026-12-03
|
||||
> **Type:** issue
|
||||
> **Reference:** https://git.babylondreams.de/AlexKucera/Museion/issues/204 — "Fix Cards should allow jumping to the relevant paragraph."
|
||||
|
||||
## Goal
|
||||
|
||||
Give the Fix Cards palette a **Jump** action: clicking it on a card lands the writer on the span the card points at — the anchor quote (1-based occurrence) selected in the prose editor, scrolled into view, the main window made key so typing can start at once. The ticket body was empty; four grilling answers settled the shape (borderless Jump in the action row; select the full span + scroll; activate the main window; stale anchors offer none, closed cards keep it).
|
||||
|
||||
## What Was Done
|
||||
|
||||
- `FixCardStore.anchorRange(of:in:)` — the nth-occurrence math `appliedText` already used, answered as the `NSRange` a jump selects (nil for stale / empty quote / occurrence below 1; the lane never gates it — a demonstration card's anchor is still a real place). `appliedText` now routes through it (one math, −3 lines).
|
||||
- `PostsModel.revealCard(_:)` + `FixCardRevealRequest {range, token}` + the stored `revealRequest` — resolves the span against the LIVE `session.text` (a dirty buffer still lands) and stamps a request whose token advances per jump so repeats re-fire. Writes nothing.
|
||||
- The editor column feeds the request into the existing #71 caret rail: `PostEditorView.caretHint` widened from `(location, token)` to `FixCardRevealRequest?` (a zero-length range = bare caret, non-zero = select the span); one shared `flipToken` counter; a jump leaves reading mode first (`reading = false`, not `exitReading`, which stamps its own zero-length hint). The Coordinator's `applyCaretHint` selects, scrolls (runloop hop, the #71 layout race), and makes the main window key on jumps only.
|
||||
- `ProseTextView.landingSpan(for:in:)` — the landing math as a pure static: a bare caret hops past leading blanks, a span never does; both clamp to the text.
|
||||
- `FixCardsPalette`: a borderless **Jump** button in every non-stale card's action row (open and closed alike).
|
||||
- Pins in `FixCardApplyTests` (`// MARK: Jump to the anchor (#204)`): `anchorRange` occurrence math incl. a UTF-16 emoji fixture; `revealCard` stamps against the live text, re-fires, stale stamps nothing, no write; `landingSpan` hop gate + clamps.
|
||||
- DOX: `Museion/AGENTS.md` (store, model, palette bullets), `MuseionTests/AGENTS.md`, `GLOSSARY.md` gains **Jump** beside Apply; file headers updated.
|
||||
|
||||
**Verification (finish-up step 1, run bare):** `./scripts/full-test.sh` exit 0 — **732 executed / 732 passed / 0 failed** (the rail's log shows `SwiftCompile` lines for every edited file); `swiftformat . --lint` exit 0 (0/153); `swiftlint .` exit 0 (0 violations / 142 files). Every new pin flip-verified with the guard off and the tree restored byte-exact: emoji UTF-16 (Character-count rewrite → location 6 ≠ 7), dirty-buffer location (snapshot text → 14 ≠ 26), token advance (constant token → 0 ≠ 1), landingSpan hop (always-hop → `{3,3}` ≠ `{0,3}`). Two review rounds: an implement-close general review (REQUEST_CHANGES → 2 should-fix + nits fixed) and a three-reviewer finish-audit (ponytail / security / general, all APPROVE after fixes).
|
||||
|
||||
## Decisions & Rationale
|
||||
|
||||
| Decision | Rationale |
|
||||
|----------|-----------|
|
||||
| Ride the #71 caret rail (`caretHint`) instead of a second reveal path | One landing mechanism, one layout-race fix, one `appliedCaretToken`. The token counter stays SHARED — two independent counters could collide and a jump would silently never apply |
|
||||
| `FixCardRevealRequest` doubles as the hint type | SwiftLint `large_tuple` rejects a 3-member tuple; the request already IS `(range, token)`, the exact shape the hint needs |
|
||||
| Resolve the span against the live `session.text`, not disk | The card's quote is validated on disk but the writer may have typed since; a disk range would drift under a dirty buffer (pinned: buffer location 26 vs snapshot 14) |
|
||||
| Jump visibility follows the DISK `anchorStatus` | A card valid on disk whose quote the dirty buffer removed still shows Jump and `revealCard` stamps nothing — a documented silent degrade. Folding a live check into `stale` would also hide Apply: a behavior change outside #204, left for a ruling |
|
||||
| Closed non-stale cards keep Jump; a closed AND promoted card has none | The span is still a real place after the card closes. The action row's pre-existing `open \|\| promotedAt == nil` gate hides the whole row for a fully resolved card — kept for the smallest diff; docs say so plainly |
|
||||
| Window keying in the Coordinator (`tv.window?.makeKeyAndOrderFront`), not `NSApp.activate` | `NSApp.activate(ignoringOtherApps:)` is a no-op once the app is active — the palette's click already activated it — and deprecated since macOS 14. The Coordinator owns `tv.window`; gated on a positive span so the #71 flip-back path is untouched |
|
||||
| `reading = false` directly in the handler | `exitReading(caret:)` bumps the token and stamps its own zero-length hint — it would overwrite the jump |
|
||||
| Hoist the landing math into `landingSpan` | The Coordinator method needs an NSTextView; the repo pins pure statics (`caretPastLeadingBlanks` precedent). +3 lines bought a pin that caught the hop bug |
|
||||
| No view-layer pins | Repo convention: pure seams pinned, SwiftUI views dogfooded. The three view-layer deltas are named under Open Items |
|
||||
| No `Closes #204` in the commit | House precedent is the maintainer closes after dogfood; the commit references the ticket only |
|
||||
|
||||
## Gotchas & Fixes
|
||||
|
||||
| Problem | Root Cause | Fix |
|
||||
|---------|------------|-----|
|
||||
| First review: a Jump while the editor was in READING mode did nothing | `reading == true` mounts `ReadingSurface` (no `ProseTextView`); the next `exitReading` would overwrite the hint | `reading = false` in the `.onChange` handler — the remounted Coordinator applies the jump after the generation load; main-queue FIFO puts the jump's scroll after the restore scroll |
|
||||
| First review: "type immediately" failed — main window stayed behind the palette | `NSApp.activate` cannot re-key within an already-active app; `makeFirstResponder` on a non-key window routes no keystrokes | `makeKeyAndOrderFront` on `tv.window` inside the Coordinator's existing async hop, jumps only |
|
||||
| `updateNSView` hit SwiftLint's 50-line `function_body_length` | swiftformat expanded the one-line `if span > 0 { … }` into four brace-lines | Extracted the caret-hint block into `Coordinator.applyCaretHint(_:tv:session:)` |
|
||||
| Audit: a quote that IS the document's leading blanks selected the title | The #ui-r1 leading-blank hop ran for non-zero spans too (the load restore gates its hop on zero length) | `landingSpan` hops only a bare caret; pinned with `"\n\n\nTitle line."` |
|
||||
| Audit: jump → ⌘S → reopen restored an off-screen selection | `cursorUpdate` ran before the async `scrollRangeToVisible`, recording the pre-jump `scrollOffset` | The record moved into the async hop, after the scroll |
|
||||
| Test literal compared UTF-16 length with `.count` | `NSRange.length` is UTF-16 units, `String.count` is graphemes — equal for ASCII only | `("…" as NSString).length` + an emoji fixture (location 7 UTF-16 vs 6 Characters) |
|
||||
| My first UTF-16 probe was useless (7 / 7) | Python `len(str)` counts code points — neither UTF-16 units nor graphemes | Compute Swift test literals with a `swift` probe, not Python |
|
||||
| First flip-run read green-ish (18 s, the target test absent from the output) | Bare `xcodebuild` after a seconds-old edit can serve a stale binary (#197) | `touch` the file, count `SwiftCompile` lines in the run log, then trust the result — the re-run failed exactly the target expect |
|
||||
| Two patch anchors missed (once on tab count, once on an indentation-only blank line) | swiftformat/indentation drift between read and patch | Assert-anchored replaces fired BEFORE any write both times; located regions by stripped markers |
|
||||
| Audit nit: `appliedText` and `anchorRange` were near-copies | The span math existed twice and must change together | `appliedText` = lane gate + `anchorRange` + `replacingCharacters` |
|
||||
|
||||
## Files Changed
|
||||
|
||||
| File | Change Summary |
|
||||
|------|---------------|
|
||||
| `Museion/FixCardStore.swift` | `anchorRange(of:in:)`; `appliedText` routes through it |
|
||||
| `Museion/PostsModel.swift` | stored `revealRequest: FixCardRevealRequest?` |
|
||||
| `Museion/PostsModelCards.swift` | `FixCardRevealRequest`, `revealCard(_:)`; header names #204 |
|
||||
| `Museion/PostEditorView.swift` | `caretHint` → `FixCardRevealRequest?`; the #204 `.onChange` observer; `ProseTextView.landingSpan`; `Coordinator.applyCaretHint` (select, scroll, key on jumps, record after scroll); docs |
|
||||
| `Museion/FixCardsWindow.swift` | borderless **Jump** on non-stale cards; CardRow doc + header |
|
||||
| `MuseionTests/FixCardApplyTests.swift` | three #204 pins |
|
||||
| `Museion/AGENTS.md` | store / model / palette bullets carry #204 |
|
||||
| `MuseionTests/AGENTS.md` | `FixCardApplyTests` row names the #204 pins |
|
||||
| `GLOSSARY.md` | **Jump** entry beside Apply |
|
||||
| `CHANGELOG.md` | `[Unreleased]` → Added |
|
||||
| `docs/devlog/INDEX.md`, `AGENTS.md` | this log's row + the rolling window |
|
||||
|
||||
## Open Items & Next Steps
|
||||
|
||||
- [ ] Dogfood on the real app: Jump from reading mode; Jump on a card whose quote sits at the very top of a piece; Jump → ⌘S → reopen lands on the span.
|
||||
- [ ] Close #204 (maintainer).
|
||||
- [ ] Ruling wanted: should a disk-valid / buffer-stale card hide Jump? A live check folded into `stale` would also hide Apply — decide both together.
|
||||
- [ ] Optional: restructure the action-row gate so a closed + promoted card keeps Jump.
|
||||
- [ ] Unpinned view-layer deltas (no render harness): the `reading = false` handler, `makeKeyAndOrderFront` on jump, `cursorUpdate` after the scroll.
|
||||
|
||||
---
|
||||
|
||||
*Log written by write-log skill*
|
||||
@@ -0,0 +1,72 @@
|
||||
# #205 — Reveal in Finder + Copy Path on piece rows
|
||||
|
||||
> **Date:** 2026-12-03
|
||||
> **Type:** issue
|
||||
> **Reference:** https://git.babylondreams.de/AlexKucera/Museion/issues/205 — "Add Reveal in Finder and Copy Path to sidebar"
|
||||
|
||||
## Goal
|
||||
|
||||
Give every piece row a Finder hand-off: **Reveal in Finder** opens the piece's `post.md` selected, **Copy Path** puts its absolute path on the clipboard. The ticket was a title only — no body, no comments. The owner resolved the fog in one clarifying round: both the library column's row menu AND the Archive pane's row menu; the `post.md` FILE path (not the folder); Archive entries appended after its existing Move Back / Rename / Convert.
|
||||
|
||||
Scenario (the slice's north star): given a piece whose folder exists under the watched Home, right-click → Reveal / Copy Path → Finder opens with `post.md` selected / the absolute `post.md` path lands on the pasteboard — and a vanished piece (folder gone) does nothing, silently.
|
||||
|
||||
## What Was Done
|
||||
|
||||
- `Museion/PostsModelIdentity.swift` — `PostsModel.fileURL(for:) -> URL?`: the piece's `post.md` resolved through the ONE id→folder resolver `PostStore.folder(of:home:)` against the model-owned `watchedHome`. Pure read; nil when the folder is gone. Header names the second resident.
|
||||
- `Museion/WorkspaceChrome.swift` — `FinderHandOffButtons: View` (Reveal → `NSWorkspace.shared.activateFileViewerSelecting`, Copy Path → `NSPasteboard.general` `clearContents` + `setString(url.path)`), each behind `if let url = model.fileURL(for:)`. `import AppKit` added; header updated.
|
||||
- `Museion/PostsLibraryColumn.swift` + `Museion/ArchivePaneView.swift` — two lines each inside the existing `.contextMenu`: `Divider()` + `FinderHandOffButtons(model:post:)`. Library: between Move to Archive and the destructive Trash. Archive: appended after Convert.
|
||||
- `MuseionTests/PostsModelTests.swift` — three pins: projects/ resolve → exact URL + file exists; archive/ resolve → exact URL + file exists; vanished-after-trash → nil. Header lines added.
|
||||
- `Museion/AGENTS.md` — five bullets: WorkspaceChrome (the new struct), PostsLibraryColumn (the fragment's placement), PostsModel extensions list (names `PostsModelIdentity.swift`), LibraryPostRow (menu count + callers-attach attribution), PostsModelWrites (reverted to its original text after the read moved out).
|
||||
- Reviews: implement close (standards + spec, two rounds) and finish-audit (general + security + ponytail). Findings below.
|
||||
|
||||
## Decisions & Rationale
|
||||
|
||||
| Decision | Rationale |
|
||||
|----------|-----------|
|
||||
| The seam is a model read, not a view helper | The SwiftUI menu body is untested by repo convention; `fileURL(for:)` is the observable the pins can reach. Resolves against `watchedHome` (the model owns the Home — no public method takes one, #179). |
|
||||
| `fileURL` lives in `PostsModelIdentity.swift`, not `PostsModelWrites.swift` | First landed in the writes file; the standards review flagged a read parked under `// MARK: Projects` in the write-rail file. The identity file's charter is "(Home, ID) questions route through here" — a path IS that identity resolved. Not the write rail: nothing written, no strip. |
|
||||
| One `FinderHandOffButtons` struct shared by both menus | First version pasted the two Buttons + AppKit closures into both menus verbatim (Duplicated Code). Extracted to the shared-chrome file. A `finderButtons(model:post:)` View-extension wrapper was tried and DELETED — a Middle Man: same-length call, module-wide extension for two callers. |
|
||||
| `post.md` path, POSIX `url.path` | Owner decision. Finder's own Copy Path yields the POSIX path; `url.absoluteString` would be a one-line swap if a `file://` form is ever wanted. |
|
||||
| nil when the piece is gone → both entries no-op | The scenario's third line. Never reveal a stale path; the next rescan drops the row. |
|
||||
| Three pins, not one | Each guards a distinct discriminator: projects/ resolve, archive/ resolve (D1 makes Archive half the feature — the general reviewer caught the gap), vanished → nil. The flip cycle proved the vanished and archive pins redden independently of the resolve pin. |
|
||||
| `clearContents()` before `setString` | Drops every declaration from the previous pasteboard owner — no stale file-URL or RTF flavor survives beside the new string (security review confirmed). |
|
||||
| Declined: rename `fileURL` → `postMDURL`/`documentURL` | Sibling of the resolver `folder(of:)`; the doc comment states the target. Reviewer judgement call, declined. |
|
||||
| Declined: folder-present-but-`post.md`-deleted edge | `folder(of:)` answers the directory; the file check is Finder's. Outside the scenario's "folder gone"; self-heals on rescan. |
|
||||
|
||||
## Gotchas & Fixes
|
||||
|
||||
| Problem | Root Cause | Fix |
|
||||
|---------|------------|-----|
|
||||
| `-only-testing` on the new pins printed `** TEST SUCCEEDED **` but the bundle said `executed: 0` | Backticked free-function names match zero Swift Testing tests under a name filter — the vacuous-green trap (#31/#134). Suite-name filters don't run free functions either (MuseionTests/AGENTS.md). | Stopped hand-rolling; the sanctioned rail `./scripts/full-test.sh start` + `status` is the only scoped-or-full verdict, counts from `xcresulttool` only. |
|
||||
| Two mis-patches in a row on `WorkspaceChrome.swift`'s tail (a collapsed newline in `PaneHeader.body`, then the new struct nested four levels deep inside `PaneHeader`) | The patch tool kept the leading tabs of my `old_string`; the end-of-file anchor had no trailing context to pin the column | After the second failure, rewrote the tail via a scripted read/replace/write instead of a third patch; verified 4 top-level structs, 0 extensions, balanced braces. Rule: two failed patches in one region → rewrite the enclosing region, don't patch a third time. |
|
||||
| Formatter flagged `ArchivePaneView.swift` closing brace (indent) — twice, same line | My inserted `.contextMenu` entries were right; the closing brace one tab off | `swiftformat` on the file; it touched only that brace (+14/−0 → pure additions). |
|
||||
| Standards review: 4 LOW findings on the first shape | Duplicated menu pair; read in the write-rail file; tautological `#expect(lastError == nil)`; test header missing #205 | All fixed; second-round review confirmed all four hold. |
|
||||
| Finish-audit fanout: 2 of 3 reviewer children died on HTTP 429 | Provider rate limit — three children plus the parent stream over the budget; both died before any tool call (transcripts held only the brief echo) | Solo, staggered re-dispatch after ~3 min cool-down; both completed. Nothing reported on a dead child. |
|
||||
| Post-fix lint flagged two files for trailing newline | The kernel's `write_file` after `read_file()["text"]` dropped the EOF newline in my own fix batch | `swiftformat` on the two files. Exactly why the audit skill says re-lint after fixes. The verify rail was re-run on the final bytes afterwards. |
|
||||
| RED proof: stashing the impl produced a compile error, not a test failure | The method didn't exist pre-fix — the pins can't build without the seam | That IS the honest red. The discriminating flip came later: bypassing the resolver (build `projects/<project>/<id>/post.md` without consulting disk) reddened exactly the vanished + archive pins (`733/735`), resolve pin green. |
|
||||
|
||||
## Files Changed
|
||||
|
||||
| File | Change Summary |
|
||||
|------|---------------|
|
||||
| `Museion/PostsModelIdentity.swift` | `fileURL(for:)` — the row menus' post.md resolver; header names #205 |
|
||||
| `Museion/WorkspaceChrome.swift` | `FinderHandOffButtons` struct + `import AppKit`; header updated |
|
||||
| `Museion/PostsLibraryColumn.swift` | `Divider()` + the fragment between Move to Archive and Trash |
|
||||
| `Museion/ArchivePaneView.swift` | `Divider()` + the fragment appended after Convert |
|
||||
| `MuseionTests/PostsModelTests.swift` | three pins (projects/ resolve, archive/ resolve, vanished → nil) + header |
|
||||
| `Museion/AGENTS.md` | five bullets (Chrome, LibraryColumn, PostsModel extensions, LibraryPostRow, Writes reverted) |
|
||||
| `docs/devlog/20261203-issue205-reveal-in-finder-copy-path_log.md` | this log |
|
||||
| `docs/devlog/INDEX.md`, `AGENTS.md` | log registration (row + 10-row window) |
|
||||
|
||||
## Verification
|
||||
|
||||
Final tree (run `20261203T171228Z`, postdates the last edit): `./scripts/full-test.sh` **735 executed / 735 passed / 0 failed** (734 baseline + 1 new pin… the three pins replaced the original two, net +1); `swiftformat --lint` exit 0, 0/5 files; `swiftlint lint` exit 0, 0 findings; `xcodebuild build` green. Flip: resolver bypass → `733/735`, exactly the vanished + archive pins red with their designed assertions.
|
||||
|
||||
## Open Items & Next Steps
|
||||
|
||||
- [ ] `DESIGN.md:188` row-menu enumeration ("Rename / Convert / Move / Trash") has been stale since #108 — pre-existing, outside the DOX chain, not this diff. Lands with the next DESIGN.md sweep.
|
||||
- [ ] Unpinned by convention: the SwiftUI menu bodies (labels, placement, `activateFileViewerSelecting`, pasteboard contents). Two review rounds were their only gate. Hand-test: right-click a piece in the library or Archive pane.
|
||||
|
||||
---
|
||||
|
||||
*Log written by write-log skill*
|
||||
@@ -0,0 +1,76 @@
|
||||
# Release 0.1.1 — the apex refresh becomes step one
|
||||
|
||||
> **Date:** 2026-12-03
|
||||
> **Type:** milestone
|
||||
> **Reference:** tag `v0.1.1` → `4a056f9`; [docs/releases/0.1.1.md](../releases/0.1.1.md)
|
||||
|
||||
## Goal
|
||||
|
||||
Cut 0.1.1, a bug-fix release carrying the one fix that sat under `[Unreleased]` since 0.1.0 (the external-watch normalizer, PR #203), and land the release skill that ran it.
|
||||
|
||||
## What Was Done
|
||||
|
||||
- **Pre-flight.** Local `main` == forge at `2d5073e` (the #203 merge; Alexander pulled it mid-session). Developer ID identity present, `tea` default login present. `[Unreleased]` held exactly one entry — the fix that defines this release.
|
||||
- **apex 1.1.58 → 1.1.59 (step 1).** GitHub `releases/latest` = v1.1.59 (published 2026-12-01, the day after the 0.1.0 cut). Universal tarball `.sha256` verified (`e75cd828…`), `lipo -thin arm64`, the three CI/Homebrew rpaths deleted, `@executable_path/../Resources/libyaml.bundle` added, Developer ID–signed `--options runtime --timestamp`. Proven in a scratch `Resources/libyaml.bundle/` layout before the copy: `--version` = 1.1.59, `--no-mixed-lists` renders `- a` + `1. one` as `<ul>` then `<ol>`. 1.1.59 still links libyaml dynamically — the vendored dylib and the ADR-0011 recipe stay as they were. `THIRD-PARTY-NOTICES.md` bumped.
|
||||
- **Bump.** `MARKETING_VERSION` 0.1.0 → 0.1.1 on all six target×configuration pairs; `CURRENT_PROJECT_VERSION` stays 1. Read back from `-showBuildSettings`: one unique value, `0.1.1`.
|
||||
- **Changelog.** `## [0.1.1] - 2026-12-03` over the external-watch entry, fresh empty `[Unreleased]` above, pointer to the notes, a `### Changed` → `- **reading:**` line for the apex refresh.
|
||||
- **Release notes.** `docs/releases/0.1.1.md` — bug-fix-sized: the false #67 conflict in plain language, the apex refresh, known limits pointing at 0.1.0's, install (replaces 0.1.1 in place), numbers (720 at the tag).
|
||||
- **README.** Unchanged — `<version>` placeholder, "macOS 27 or later" matches the 6× `MACOSX_DEPLOYMENT_TARGET = 27.0`, license pointer already covers apex + libyaml.
|
||||
- **Rail.** 720 executed / 720 passed / 0 failed. Freshness proven, not assumed: run dir `_build/full-test/20261203T064608Z-Museion/` at 07:46:32 > last tree edit 07:45:51; `CpResource …/Resources/apex` at 07:46:10; the built test host's apex reports 1.1.59; 59 `SwiftCompile` lines. `swiftformat` 0/152, `swiftlint` 0/0/141, `shellcheck scripts/release.sh` clean.
|
||||
- **Slices + tag.** `bba4688 build(release)` (skill + its DOX row + notes) · `570abb3 fix(reading)` (apex binary + notices) · `4a056f9 chore(release)` (bump + changelog heading). Working tree byte-identical to HEAD's tree at tag time (`git diff HEAD` empty). `git tag -a v0.1.1` on `4a056f9`.
|
||||
- **DMG.** `release.sh`: archive → Developer ID export → UDZO DMG → signed → notarized → stapled. Four proofs: from the mounted image `Contents/Resources/apex --version` = 1.1.59 and `CFBundleShortVersionString` = 0.1.1, shipped apex carries exactly the one rpath, the app does not link libyaml, `stapler validate` OK, `spctl` → `accepted, source=Notarized Developer ID`. **sha256 `e7add45a9a577b36fa39864f1acfdfa9db72448311ffa459031a33344dd9d76b`**, 3,164,194 bytes.
|
||||
- **Skill updated (mid-session, on Alexander's steer).** Step 1 went from "compare `--version`, upgrade if stale" to an **unconditional refresh with the full recipe inline** — the exact commands that until now lived only in the 0.1.0 devlog. Homebrew is a labeled fallback. Quick Reference line and three Pitfalls added; skill `version: 0.1.1`.
|
||||
|
||||
## Decisions & Rationale
|
||||
|
||||
| Decision | Rationale |
|
||||
|----------|-----------|
|
||||
| GitHub `releases/latest` is the apex source of record; Homebrew is fallback only | Live-checked during the cut: the Homebrew formula and the installed binary were both **1.1.58** while GitHub had 1.1.59. A `brew upgrade apex` printing "already up-to-date" would have shipped the stale renderer with a clean conscience |
|
||||
| Step 1 is unconditional, not a comparison | The old wording read as optional and was skipped by habit — Alexander's steer. A bundled binary is stale by definition between releases |
|
||||
| Scratch-layout proof BEFORE the copy into `Resources/` | A binary that fails `--no-mixed-lists` in `$TMPDIR` has touched nothing; the same failure in-tree costs a rail run |
|
||||
| The apex bump is its own `fix(reading)` slice | Same shape as 0.1.0's `fd806e9`; the binary and its notices travel together, separate from the version bump |
|
||||
| CHANGELOG `### Changed` entry for apex even though it's a patch bump | Common Changelog: anything a user can observe (renderer version) is recorded. 0.1.0 did the same for 1.1.17→1.1.58 |
|
||||
| Homebrew variant's rpath loop tolerates absent paths (`2>/dev/null \|\| true`) | The Homebrew build carries `$(brew --prefix)/lib` instead of the CI paths; `install_name_tool -delete_rpath` fails on a path the binary lacks. The Done-check (exactly ONE rpath left) is the real gate |
|
||||
|
||||
## Gotchas & Fixes
|
||||
|
||||
| Problem | Root Cause | Fix |
|
||||
|---------|------------|-----|
|
||||
| `git log --oneline` showed `3197b92` as tip while `rev-parse HEAD` said `2d5073e` — looked like a corrupted state | `rtk` (terminal-output wrapper on PATH) mangles `git log` porcelain output; it dropped the merge commit and flattened the first-parent line | Trusted plumbing (`cat-file -p`, `rev-parse`, `describe`) and the forge (`ls-remote`), all of which agreed: `2d5073e` is a real merge, parents `3197b92` + `07da076`, tree `93dcb24`. Prefer plumbing when a wrapper is in the path |
|
||||
| My first `origin/main` check printed `3197b92`, then minutes later everything said `2d5073e` | Alexander pulled the PR mid-session (reflog: `pull: Fast-forward`); my earlier read was correct at the time | Confirmed via `git ls-remote origin refs/heads/main` = forge truth before any write |
|
||||
| The release skill itself was uncommitted (untracked `SKILL.md` + unstaged `AGENTS.md` row) at the start of a release that requires a clean tree | The skill was authored in the 0.1.0 session but never committed | Folded into `build(release)` — it is release tooling; Alexander approved |
|
||||
| `find -newer rel.json` missed the extracted tarball files | Both were written in the same second | `tar tzf` for the layout, `find -name apex` for the binary |
|
||||
| `full-test.sh status` prints no run directory | The script keeps it in `${FT_BASE_DIR:-$ROOT/_build/full-test}/<utc-id>-<scheme>/` | Read `BASE` from the script; the run dir's mtime + the log's `CpResource` line are the freshness proof |
|
||||
| `tea releases create` printed nothing on success | Normal — silent exit 0 | The `tea api` read-back is the proof; it showed release id 28, `draft: false`, one asset at the local byte size |
|
||||
| First read-back script died on `KeyError: 'tag'` | Gitea's release JSON spells it `tag_name` (GitHub-shaped assumptions) | Read `tag_name`; recorded in the skill's Quick Reference |
|
||||
| `python3 -c 'import yaml'` → `ModuleNotFoundError` reading the tea token | PyYAML isn't on the system python | `grep -E '^\s*token:'` + `sed` — no new dependency for a one-line read |
|
||||
| `security add-generic-password … -w <value>` → "passwords don't match", nothing stored (read-back 0 chars) | Without a tty, `security` prompts for a retype | `</dev/null` on the add; always read the length back before relying on it |
|
||||
| Micro.blog `q=config` shows three microblogs, none `microblog-default` | A post without `mp-destination` would be ambiguous | Sent `mp-destination: https://AlexKucera.micro.blog/` explicitly; `Location` host confirms it took |
|
||||
|
||||
## Files Changed
|
||||
|
||||
| File | Change Summary |
|
||||
|------|---------------|
|
||||
| `.agents/skills/release/SKILL.md` | New (committed this release): step 1 = unconditional apex refresh with the full recipe inline (GitHub canonical, Homebrew fallback); step 11 = Micro.blog announcement as a draft (Keychain token service, `mp-destination` mandatory, read-back); Quick Reference lines; eight Pitfalls; `version: 0.2.0` |
|
||||
| `AGENTS.md` | `.agents/skills/` Child DOX Index row (now mentions the Micro.blog draft); session-log window refreshed to the 10 newest INDEX rows (picks up the 11-30 log the #203 merge indexed but didn't window) |
|
||||
| `docs/releases/0.1.1.md` | New — human-readable notes, the Gitea release body |
|
||||
| `CHANGELOG.md` | `[0.1.1] - 2026-12-03` heading, fresh `[Unreleased]`, notes pointer, `### Changed` apex entry |
|
||||
| `Museion.xcodeproj/project.pbxproj` | `MARKETING_VERSION = 0.1.1` ×6 |
|
||||
| `Museion/Resources/apex` | 1.1.58 → 1.1.59, arm64 slice, one rpath, Developer ID + hardened runtime (1,019,232 → 1,019,312 bytes) |
|
||||
| `Museion/Resources/THIRD-PARTY-NOTICES.md` | `## apex 1.1.59`, `v1.1.59` prose |
|
||||
| `docs/devlog/20261203-release-011-apex-refresh-is-step-one_log.md` | This log |
|
||||
| `docs/devlog/INDEX.md` | Row inserted at top |
|
||||
|
||||
## Open Items & Next Steps
|
||||
|
||||
- [x] Go given 2026-12-03. `git push origin main v0.1.1` → forge `main` = `4a056f9`, annotated tag derefs to it.
|
||||
- [x] Gitea release id 28 created (`draft: false`, one asset 3,164,194 bytes, body ends `[Generated by AI]`). Token-authenticated download hashes to `e7add45a…` — byte-identical to local — and `stapler validate` passes on the downloaded file.
|
||||
- [x] Micro.blog announcement posted as a **draft** (on Alexander's request, mid-run): `POST /micropub` → `202`, `Location` `https://alexanderkucera.com/2026/12/03/museion.html`, preview `https://micro.blog/account/posts/239/preview/6088556`. Read back `q=source` → `post-status: draft`, 1118 chars, both links present. Awaiting Alexander's publish.
|
||||
- [ ] Alexander: review + publish the Micro.blog draft from the preview link.
|
||||
- [ ] **Rotate the Micro.blog App Token** — it was pasted into chat, so it lives in this transcript. After rotating, re-store: `security add-generic-password -U -a micro.blog -s com.babylondreams.Museion.release-announce -w '<new>' </dev/null`.
|
||||
- [ ] Ask upstream (ApexMarkdown/apex) for a statically linked macOS build — would retire the rpath/codesign dylib dance and the `.bundle`; carried from the 0.1.0 log, still open
|
||||
- [ ] `rtk` mangling `git log` is a recurring hazard on this machine — already has a skill (`rtk-terminal-output`); consider making the release skill's step 7 use `git log --format` via plumbing or `--no-color` if it bites again
|
||||
|
||||
---
|
||||
|
||||
*Log written by write-log skill*
|
||||
@@ -5,6 +5,10 @@ Complete history of session logs in this directory, newest first. One-line summa
|
||||
<!-- write-log: full-index -->
|
||||
| Date | Type | File | Summary |
|
||||
|------|------|------|---------|
|
||||
| 2026-12-03 | issue | [20261203-issue205-reveal-in-finder-copy-path_log.md](20261203-issue205-reveal-in-finder-copy-path_log.md) | Reveal in Finder / Copy Path on library and Archive rows: one shared menu fragment over the model-resolved post.md path, three pins, rail 735/735 |
|
||||
| 2026-12-03 | issue | [20261203-issue204-fix-cards-jump-to-the-anchor_log.md](20261203-issue204-fix-cards-jump-to-the-anchor_log.md) | Fix Cards gain Jump: the anchor span selected in the editor, the main window keyed, over the #71 caret rail |
|
||||
| 2026-12-03 | generic | [20261203-image-drop-27-2-drag-routing-pastes-path_log.md](20261203-image-drop-27-2-drag-routing-pastes-path_log.md) | macOS 27.2 routes drags to the deepest view: NSTextView pasted the file path; the editor now owns drops through one router (rail 729/729) |
|
||||
| 2026-12-03 | milestone | [20261203-release-011-apex-refresh-is-step-one_log.md](20261203-release-011-apex-refresh-is-step-one_log.md) | Release 0.1.1: apex 1.1.59 refreshed FIRST (full recipe now in the release skill), bump + tag 4a056f9, rail 720/720, DMG notarized; push on go |
|
||||
| 2026-12-01 | milestone | [20261201-release-010-readme-notes-packaging_log.md](20261201-release-010-readme-notes-packaging_log.md) | Release 0.1.0: version bump + tag, README feature/usage rewrite, distilled release notes, release.sh (Developer ID DMG, notarize); rail 717/717; Developer ID cert pending |
|
||||
| 2026-11-30 | fix | [20261130-external-watch-compares-unnormalized-text_log.md](20261130-external-watch-compares-unnormalized-text_log.md) | Unticketed fix (brief-32, argus cycle-6): the external guest's watch reads through the ONE shared external normalizer — the false #67 conflict on unchanged BOM/CRLF files (re-arming after sibling events and alert answers, blocking departures/quit) is gone; real foreign writes still raise; RED-first 3 pins over the real watch closure; rail 720/720 |
|
||||
| 2026-11-23 | fix | [20261123-home-repoint-retains-old-editor-target_log.md](20261123-home-repoint-retains-old-editor-target_log.md) | Unticketed fix (brief-28, argus cycle-5): a Home repoint is a guarded document departure — the gate runs before the preference/binding commit, the refusal keeps Home A and the buffers; document identity is (Home, ID) across the model and re-checked at async completion (card scan, rescan — both mutation-checked); RED-first 6/6 at ca265d3b, review r1 +2 pins (rescan hoist, draft survives); rail 717/717 |
|
||||
@@ -88,4 +92,4 @@ Complete history of session logs in this directory, newest first. One-line summa
|
||||
| 2026-09-25 | issue | [20260925-issue50-profile-backup-s2-6_log.md](20260925-issue50-profile-backup-s2-6_log.md) | #50 S2.6 daily profile backup: liveness gate, curated copy, retention 7, RESTORE.md — 8 tests green |
|
||||
| 2026-09-16 | issue | [20260916-issue14-acp-bridge-s2-2_log.md](20260916-issue14-acp-bridge-s2-2_log.md) | #14 M0 ACP bridge: NDJSON JSON-RPC client, mentor pane, fix-card round-trip, crash restart — 37 tests green |
|
||||
| 2026-09-05 | issue | [20260905-issue48-provisioning-failure-alert-retry-ux_log.md](20260905-issue48-provisioning-failure-alert-retry-ux_log.md) | #48 shipped: failure card with retry/Not-Now, traversal guard, temp sweep — 30 tests green |
|
||||
| 2026-09-03 | issue | [20260903-issue42-engine-gate-s2-1_log.md](20260903-issue42-engine-gate-s2-1_log.md) | Engine gate S2.1 shipped: six-path probe, blocking sheet, state.json, About mirror — 12 tests green |
|
||||
| 2026-09-03 | issue | [20260903-issue42-engine-gate-s2-1_log.md](20260903-issue42-engine-gate-s2-1_log.md) | Engine gate S2.1 shipped: six-path probe, blocking sheet, state.json, About mirror — 12 tests green |
|
||||
@@ -0,0 +1,31 @@
|
||||
# Museion 0.1.2
|
||||
|
||||
*Released 2026-12-03 · a bug-fix release. Entry-by-entry detail: [CHANGELOG.md](../../CHANGELOG.md).*
|
||||
|
||||
0.1.2 fixes one bug that has been in every build so far and only showed up on macOS 27.2: dropping an image onto a post.
|
||||
|
||||
## What is in it
|
||||
|
||||
**Drop an image onto a post, and it lands in the piece again.** Since macOS 27.2, dragging an image file from Finder onto the prose editor pasted the file's *path* as plain text instead of copying the image into the piece and inserting its reference. The cause was a change in the operating system, not in Museion's code: 27.2 delivers a drag to whichever view sits directly under the pointer, so the editor's text view received the drop and ran its stock behavior — insert the path — while the app's own drop handling never saw it. A markdown file dropped onto the editor had the same symptom.
|
||||
|
||||
Now the editor owns the drops that land on it. An image is copied into the piece's `assets/` folder and `` appears at the drop point with the alt text selected, ready to type over. A markdown file dropped on the editor opens as a guest again. In an outline, a dropped file bounces instead of pasting a path. Dropping *text* — a selection from the editor, text from another app — still inserts text, as it always did.
|
||||
|
||||
Two refusals are deliberate: an image dragged from a web browser gets a notice (there is no file on disk to copy), and so does a file that went missing between the drag and the drop.
|
||||
|
||||
## Known limits
|
||||
|
||||
- Unchanged from 0.1.0 — see [0.1.0's known limits](0.1.0.md#known-limits).
|
||||
- An image dragged straight from a browser is not downloaded into the piece; save it to disk first, then drop it.
|
||||
|
||||
## Install
|
||||
|
||||
Download `Museion-0.1.2.dmg` below, open it, drag Museion to Applications (replaces 0.1.1 in place).
|
||||
|
||||
- **macOS 27 or later**, Apple Silicon.
|
||||
- Hermes and a provider key are needed only for Passes and Sessions; the editor, library, outlines, and publishing work without them — same as 0.1.0.
|
||||
|
||||
The app is Developer ID-signed and notarized.
|
||||
|
||||
## Numbers
|
||||
|
||||
Suite 729 at the tag, run through `scripts/full-test.sh`; SwiftFormat and SwiftLint clean repo-wide.
|
||||
Reference in new issue
Block a user