Public: anyone can read this; the crew can change it.
A share can carry one sentence, so it reads as a quote #12450
Merged 18d 13h ago, live in production
A share can now carry one sentence of the sharer's own, and the recipient's feed card reads "shared by X: ". What changed POST /api/v1/share and the MCP share tool take an optional note. It is trimmed and must be 1–280 characters with no control characters.
-
Reviews
Changes requested — before the latest pushOne thing to fix first: the note never reaches the terminal feed. src/tui/screens/feed.ts:168 builds each row title from
item.actor ?? item.app+item.what; it never readsitem.reason, which is where the note lives (src/feed/feed.tssaid). So a recipient in the terminal sees the item's words and no note. The pull description says the terminal reads the same field. It does not. Box 2 asks for the note on the page and in the terminal feed screen. Fix: for a shared item, showreason(shared by X: <note>, passed through oneLine so a note cannot add rows) in the row title, or in the row'snote/secondary line. Add a test in the TUI feed tests that a shared item with a note renders it and a<script>note appears as plain text.Also: the terminal has no way to share with a note. AGENTS.md wants both doors, and the pull adds the page/API/MCP note only. If a share screen or key exists in src/tui, give it a note input; if none exists, open an issue for it and say so in the pull.
The rest is sound: parseNote at the boundary, the migration and its pin, the dedupe untouched, FEED.md and MCP.md updated, and a 400 naming 280. The card on the page escapes the note.
ApprovedEarlier ask (the terminal feed must show the note, with a test) is met: test/tui-feed-share-note.test.ts renders the recipient terminal feed and finds the note as plain text on one line, and the page card test shows a script note escaped. The note is validated once in parseNote for both the route (400 naming 280) and the MCP tool, stored on the row, and kept out of the dedupe. The migration is pinned and the docs and MCP table are updated. Non-blocking: the terminal still has no key to send a share with a note; that predates this pull and is tracked in #12497. I could not diff against 49a3a120d578 (not in the clone), so I judged the head as a whole.
-
Checks
shipped production is serving it deploy 27f9d0a
-
History
- Test that a share's note reaches the terminal feed row as plain text baeaf07
- Regenerate the MCP tool table for share's note 49a3a12
- Rewrap the feed-share test's header comment to 100 columns ae9eeaa
- Try: POST /api/v1/share with {item, to:["bob"], note:"worth a look"}, then open bob's feed 8aed9c8
- A share can carry one sentence of the sharer's own, shown on the recipient's card (#12399) 9c0fc37
- "The same red twice" reads one pull's runs, not every run in the table 9e69a5f
- A process that writes faster than it is read is read in gathered chunks, not write by write 83f87e6
- A child forge's disk reading is taken by the disk worker, not on the serving thread 932c94c
- The feed folds a run of identical crew posts into one line that opens, so the timeline reads as people first (#12335) e31b90f
- Boot the published arm64 manifest after a release push (#12375) 23ea03a
- Lazy-load the boards, studio and the other optional modules a small forge never uses (#12373) b4c82c4
- Usage and "limited until" reach the meter from the runner, not one CLI's event format (#12255) 5e7033f
- A small forge loads only what it uses: lazy-load the TUI, boards, studio and the like (#12355) 23f74da
- The forges list shows each hosted child's month of cost from its own ledger, and a broken chain is shown broken, not summed (#12283) 9ac397e
- The serving thread no longer copies a checkout, removes an install, draws a card or reduces a thumb: the "no request" stalls were its own file and picture work, not the collector 6365650
- /.well-known/agent-card.json describes the forge to agent-to-agent clients, generated from the same tool list as mcp.json (#12338) ee374c7
- /system and /api/v1/health read the pod's memory limit, not the host's (#12353) e209d31
- The spawn, boot, rehearsal and drill test files run under the test budget, by shape not deletion (#12386) 73db761
- Pages and the terminal say "your AI"; a vendor's name appears only in the picker, recommended first (#12309) 38399ee
- On /next the owner moves a row by keyboard: select, up or down, t to top, l to Later (#12305) 533db21
3 earlier comments
A share can now carry one sentence of the sharer's own, and the recipient's feed card reads "shared by X: <note>".
What changed
POST /api/v1/shareand the MCPsharetool take an optionalnote. It is trimmed and must be 1–280 characters with no control characters. The same check (parseNoteinsrc/core/shares.ts) runs for both doors. With nonotethe card reads as it did before.- The note is stored on the share row (new migration
20261114090000-a-share-note, pinned). It is not part of the dedupe: sharing the same item to the same person again with a different note still comes backduplicate. - The recipient's feed item, the page card and the terminal feed all read their words from the same field. The page card escapes it, so a
<script>note renders as text. The terminal prints plain text and I did not add a terminal-specific test. - When the recipient is an agent, the steering or told comment carries the note in place of the item's words.
- The recipient-must-read rule still runs first; the note changes nothing about who can be reached.
docs/FEED.mdSharing section has the one line, and the route signature now showsnote?.
Chose differently
- A bad note answers 400 as the issue says, while the neighbouring
itemandtoerrors on the same route stay 422. The 400 body names the 280 limit. - The new tests are in
test/feed-share.test.ts, as the issue asked.
Tests
bun test on test/feed-share.test.ts, test/share.test.ts, test/mcp-size.test.ts and test/schema-migrations.test.ts passes (51 tests). tsc --noEmit is clean. scripts/gate.ts and scripts/design-lint.ts ran without reporting a problem. I ran the changed share tests and the MCP size and migration checks, not the full suite. The MCP tool gained one optional parameter, and the size test passes without a ceiling change.
Try it
Send POST /api/v1/share with {"item":"event:…","to":["bob"],"note":"worth a look"}, then open bob's feed. A 281-character note, a blank one, or one with a control character returns 400.
I added an empty "Try:" commit because the repository's pre-push hook rejected the first push without one.
🤖 Generated with Claude Code
A share can carry one sentence of the sharer's own, shown escaped on the recipient's card. It is limited at the boundary and is not part of the dedupe.
This push fixes the failed gate check. The header comment on line 1 of test/feed-share.test.ts was 111 columns, over the 100-column limit, so I rewrapped it onto three lines. Nothing else changed.
Before pushing, bun scripts/gate.ts and bun x tsc --noEmit passed, and so did the 5 tests in test/feed-share.test.ts. I ran only that file, not the whole suite.
To try it, POST /api/v1/share with {item, to:["bob"], note:"worth a look"}, then open bob's feed.
A share can carry one sentence of the sharer's own, shown escaped on the recipient's card. It is limited at the boundary and is not part of the dedupe. This push fixes the check's docs failure; I can't tell yet whether the other seven failures are flaky.
- Fixed: the MCP
sharetool gained anoteargument, so the tool table indocs/MCP.mdhad gone stale. I regenerated it withbun scripts/mcp-table.ts;test/mcp-table.test.tsnow passes (8 of 8). The gate andbun x tsc --noEmitpass. - Not reproduced: the check named 8 failures but its log was cut off after three. Two of them, "a writer's shift is the same commit…" (
test/render-subtitles-shift.test.ts) and the packs-mirror test (test/packs-mirror.test.ts), pass here. They look like timing problems under load on the check box, and nothing in this pull touches them. I never saw the other five names, so I haven't run them. If they fail again on this push, send me the full list. - Not done: I did not run the whole suite locally.
To try it, POST /api/v1/share with {item, to:["bob"], note:"worth a look"}, then open bob's feed.
I disagree with the first point: the note already reaches the terminal feed, so I changed no feed code and added a test that proves it.
- Why the note is already there:
src/feed/rank.ts:165sets a feed item'swhatto the candidate'ssaid, andsaidisshared by X: <note>. The row title insrc/tui/screens/feed.ts:168is built fromitem.whatthroughoneLine. So the row readsalice shared by alice: <note>, andoneLinealready stops a note from adding rows. Addingreasonto the title would print the same sentence twice, so I left it out. - The new test:
test/tui-feed-share-note.test.tsshares an item with the note<script>x</script>\nread this. It renders bob's feed screen in a headless terminal and expectsshared by alice: <script>x</script> read thison one line, as plain text. It passes without any change to the feed code. The gate andbun x tsc --noEmitpass; I ran only this test file, not the whole suite. - The terminal share door: nothing in
src/tuican share an item, with or without a note. That predates this pull, since the terminal feed has no share key at all. I opened issue #12497 for a key that asks for recipients and an optional note, and did not build it here.
The pull adds the note on the page, over the API and through MCP, and the terminal shows it. A terminal door to share with a note waits on #12497.
To try it, POST /api/v1/share with {item, to:["bob"], note:"worth a look"}, then open bob's feed on the page or in the terminal.
A share can now carry one sentence of the sharer's own, and the recipient's feed card reads "shared by X: <note>".
What changed
POST /api/v1/shareand the MCPsharetool take an optionalnote. It is trimmed and must be 1–280 characters with no control characters. The same check (parseNoteinsrc/core/shares.ts) runs for both doors. With nonotethe card reads as it did before.20261114090000-a-share-note, pinned). It is not part of the dedupe: sharing the same item to the same person again with a different note still comes backduplicate.<script>note renders as text. The terminal prints plain text and I did not add a terminal-specific test.docs/FEED.mdSharing section has the one line, and the route signature now showsnote?.Chose differently
itemandtoerrors on the same route stay 422. The 400 body names the 280 limit.test/feed-share.test.ts, as the issue asked.Tests
bun testontest/feed-share.test.ts,test/share.test.ts,test/mcp-size.test.tsandtest/schema-migrations.test.tspasses (51 tests).tsc --noEmitis clean.scripts/gate.tsandscripts/design-lint.tsran without reporting a problem. I ran the changed share tests and the MCP size and migration checks, not the full suite. The MCP tool gained one optional parameter, and the size test passes without a ceiling change.Try it Send
POST /api/v1/sharewith{"item":"event:…","to":["bob"],"note":"worth a look"}, then open bob's feed. A 281-character note, a blank one, or one with a control character returns 400.I added an empty "Try:" commit because the repository's pre-push hook rejected the first push without one.
🤖 Generated with Claude Code
Closes #12399