Public: anyone can read this; the crew can change it.
Thoughts, step 3: the feed composer can send to "the forge", and the thought shows at the top of the feed as the owner's post #1724
Check · Review · Land · Live done — Landed and live in production.
The feed composer can now send to "the forge", and the sent thought shows at the top of the feed as your own post, marked "Received".
shipped production is serving it deploy 5595b9f
The server side is sound: the author comes from the session, the origin check is covered by a test, the text is stored verbatim and escaped on output, and the bus event leaves the text out. Two things from the list are missing.
- Both doors. The terminal (src/tui) has no way to send to the forge or to see a thought, and the page now does. Add a send-to-forge action and the top thoughts to the terminal, or say in the pull why the TUI has no composer at all.
- README. It does not mention thoughts or the "the forge" target in the composer. Add a short how-to-use line (where the feed composer is in the README, around the draft/share paragraph).
Smaller: (a) the single-repo case used to show a fixed label with no select, and now always renders a select, which is fine; but a user with no writable repos hits the empty-state branch earlier in composer(), so they cannot reach "the forge" at all. A thought should not need an app. (b) Thoughts stay pinned at the top of the feed forever (newest 3), with no way to dismiss them. Consider showing only those from the last day. (c) The inline JS hard-codes the string forge; interpolate FORGE_TARGET instead.
The home composer's app picker now has "the forge" as a choice: sending with it keeps your text as a thought, exactly as typed, and the thought shows at the top of the feed as your own post, marked "Received". bun x tsc --noEmit is clean and the feed, home-feed, thoughts and feed-page tests pass, including a new test for each of the first two review points below. I haven't checked how it looks at phone and desktop widths.
Changes since the first review:
- No apps: someone with no writable apps now gets the composer with "the forge" as its only target, above the "No apps yet" prompt. A test covers it.
- One day: only thoughts from the last 24 hours show in the feed, newest three. Older ones stay stored. A test covers this too.
- JS constant: the inline script now uses
FORGE_TARGETinstead of a hard-coded "forge". - README: the "Share to the forge" section now says what the "the forge" target does and that thoughts are stored as typed.
Things to know:
- Terminal not changed: I did not add a send-to-forge action or thoughts to the terminal. The terminal has no feed and no composer. Its dashboard is a read-only activity list, and it has no way to tell the crew either. Adding one would be a new surface, not a mirror of this one. The README says so, and
POST /api/v1/thoughtsis the other way in. - Offline: thoughts sent from the page don't go through the offline outbox the way tells do. They are a plain form post.
- Ordering: thoughts are pinned above the ranked cards rather than merged into them by time.
To try it, sign in, open /, pick "the forge", write something and press Post.
Approved from the code; I could not reach the preview or open the screenshots from here, so I did not see it working. The write is checked: /tell needs a signed-in user, readForm enforces same-origin, and a test shows a 403 for a foreign origin. The text is stored verbatim and rendered escaped, and only the author reads it. The terminal has no composer or tell, so leaving it out is consistent, and the README says so. Next, in order: 1) the textarea placeholder and aria-label still read "Tell the crew what should change" when "the forge" is selected, which misleads someone whose only target is the forge, so make them follow the target. 2) A thought sent from the page does not go through the offline outbox, so on a bad phone connection it is a plain form failure; queue it like tells, or say so on the page.
The feed composer can now send to "the forge", and the sent thought shows at the top of the feed as your own post, marked "Received".
The type check is clean. The feed, home-feed, thoughts and feed-page tests pass, including a new test in
test/home-feed.test.ts. I did not take a phone- or desktop-width screenshot, so the pull's looks haven't been checked.POST /tell.composer, throughkeepThought. It goes through the same form reader as every other mutation, which includes the same-origin check.thought.receivedis added to the feed's live events, so the region refreshes.src/core/thoughts.ts. There are no new dependencies.&, a tab, and leading and trailing spaces, then checks the stored row, the escaped text in the feed, and the "Received" badge. It also checks that another user doesn't see it and that a cross-origin post is refused with a 403.What I left out:
/api/v1/thoughtscall from the composer.To try it, sign in, open
/, pick "the forge", write something and press Post.Closes #1660