feat(microblog): post summary for Micro.blog
A piece's `summary:` frontmatter line now travels to Micro.blog beside `category:`. A first send carries the summary when it is not empty; a re-send replaces the post's summary only when the piece has the line (opt-in by key; an empty value clears it; no line leaves the blog's). The same rule as categories, so a piece that never gained the line cannot blank a summary set on Micro.blog itself. The publish sheet gains a Summary field and an AI summary button. The button drafts a first-person teaser from the open piece on a fresh one-shot engine on the chat profile (the Blind Read's rail — the resident session is never touched); the reply fills the field for the writer to edit, and nothing is written until the send stamps the line. The sheet is modal, so while its own turn runs the button is the Stop; a Pass or Blind Read that owns the rail disables the button with the reason on hover and refuses from behind it. The summary is read off the RAW frontmatter line, never through the lenient decode — which trims every edge quote — and the read walks the block the way the lenient reader does. A `split`-based read finds no block in a mixed-ending file while the lenient reader still sees the key, and the empty value it answers would have been sent over a live post's summary. Reviewed twice (two-axis during the build, three-reviewer finish-audit after): the mixed-ending read, an unfenced body line claiming the key, the uncancellable modal turn, and the wrapper rule eating a teaser's edge quotes were found and fixed before this commit. Every guard was watched fail on its own pin. Rail 814/814; SwiftFormat and SwiftLint clean. Docs: AGENTS.md bullets and learnings, the GLOSSARY term, CHANGELOG [Unreleased], PRD S6.1, and the devlog. Closes #208
This commit is contained in:
1 parent
6db4cf8cf1
commit
36393a9e8e
22 files changed
+1096
-36
No files matched your search
@@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file. The format
|
||||
|
||||
### Added
|
||||
|
||||
- **publish:** Micro.blog summaries travel (#208) — the piece's `summary:` frontmatter line rides the send beside `category:`. A first send carries the summary when non-empty; a re-send replaces the post's summary only when the piece has the line (no line leaves whatever the blog has; an empty `summary:` clears it) — the same opt-in-by-key rule as categories, so a piece that never gained the line can't blank a summary set on Micro.blog itself. The publish sheet has a **Summary** field (line breaks become spaces, the sink is one line) and an **AI summary** button that drafts a first-person teaser from the open piece on a fresh one-shot engine on the chat profile; the reply fills the field for the writer to edit, nothing is written until the send stamps the line. The edit lands at the send like a category edit (a failed write refuses with nothing on the wire; Publish applies it first). While the turn runs the AI button is the Stop — the sheet is modal, so the pass bar's Cancel sits behind it — and a Pass or Blind Read that owns the one-shot rail disables the button with the reason on hover (and refuses from behind it). The AI button refuses while the piece can't be flushed or the engine isn't ready, with the field's text kept. Import keeps an imported `summary:` line. The field reads its text off the RAW frontmatter line, never through the lenient decode (which trims every edge quote — a teaser's closing `"why"` would vanish through that door), walking the block the way the lenient reader does so a mixed-ending file can't fuse the closing fence onto the last block line (which would have sent an empty summary over a live post's). +23 tests (the wire contract for create and update, the one-line codec incl. quote-bearing round-trips and the mixed-ending and unfenced-body reads, apply-at-send with the failed-write refusal, publish-applies-first, the end-to-end clear, the import keeping the line, the sheet field's trimmed-string pending-edit rule, the prompt and reply cleanup, and the model's summarize turn over the scripted engine incl. refusal, rail-busy refusal, and cancel); each guard was watched fail on its own pin. Suite 814
|
||||
|
||||
- **publish:** Micro.blog categories travel (#207) — the piece's `category:` frontmatter line rides the send (one line, `category: [Tech, Notes]`; a bare `category: Essays` is one category). A first send carries the list beside the title and content; a re-send replaces the post's categories with exactly the piece's list — but only when the piece has the line at all (no line leaves whatever the blog has; an empty `category: []` clears them). Naming a category Micro.blog doesn't know creates it there, so there is no separate create step. The publish sheet has a **Categories** field: comma-separated, with the system completion menu over your blog's existing categories (fetched when the sheet opens; a failed fetch stays silent and a typed new name still works). Clicking any number of categories adds them all — the menu stays open — a half-typed word is replaced by the pick, and a name already in the field is never offered again. The edit lands on the piece when you send (Cancel/Done discard it); Publish with a pending category edit applies it first — to the post the piece remembers, never a stale address — and never publishes after a failed update. +39 tests (the wire contract, the codec incl. its backslash escaping, the model's write-then-send order and the sanitized name, the blog's category list, publish-applies-first and targeting the post the send touched, the sheet field's picks-add completion and menu, the import keeping the line), each seen red first. Suite 791
|
||||
|
||||
- **publish:** the library shows where each piece stands on Micro.blog (#206) — a published piece's row reads `published <date>` and its menu opens the live post; a sent-but-unpublished one reads `draft on Micro.blog`. Publish is remembered now (`micropub_published` stamped in the piece's frontmatter — the sheet used to flip the draft and forget, so nothing on disk ever said a piece was out). Sending a piece again no longer duplicates it: a piece that remembers its post updates that post in place (same URL — a draft refreshes for review, a published piece edits live via **Update Live Post**), and an image whose bytes haven't changed rides its earlier upload instead of uploading a second copy (a per-piece `.museion-uploads.json` memo keyed by content hash). When Micro.blog answers 404 — the post was deleted there — the piece forgets the dead link and the sheet offers a fresh draft instead of failing forever. A file brought in by Import carries no Micro.blog memory: its `micropub_url`/`micropub_published` lines are dropped at the boundary, so a file from someone else can never aim a send at one of your existing posts. Pieces published before this build read as drafts until their next Publish (or the `micropub_published` key is added to the frontmatter by hand — `yyyy-MM-dd'T'HH:mm:ss`, local time). The row's micro-label shows the status in origin's place (the 178pt row cannot hold both); VoiceOver reads both.
|
||||
|
||||
Reference in new issue
Block a user