Move a story between the article list and the rail - #236
Open
ssavutu wants to merge 2 commits into
Open
Conversation
A developing story and the article that answers it were separate pieces of typing: an editor tracking a story in the rail retyped the headline into the editor, and one who had already filed the article retyped it into the rail. Both directions now carry the headline and blurb across. The article list gets a row action that posts the title and excerpt as a developing story, and the rail gets one that opens the new-article editor seeded from the story. Keeping the title identical across the hop is what lets the homepage link the two, since the rail matches on the slug the title derives. The copy is one-way on purpose. The rail is keyed on the title, so a story keeps saying what it said even if the article is later retitled or never filed at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NhFBibhRZkEZzW3qJrAMy5
The rail is day-to-day newsroom work, not configuration: an editor tracking a story is the person who knows it is developing. Requiring an admin meant the row action added alongside it answered 403 for most of the people who would reach for it. Sign-in is still required; only the admin check goes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NhFBibhRZkEZzW3qJrAMy5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-on to #235. A developing story and the article that answers it were separate pieces of typing: an editor tracking a story in the rail retyped the headline into the editor, and one who had already filed the article retyped it into the rail. Both hops now carry the headline and the blurb across.
Article → developing story
A row action on the article list (
TrendingUp) posts the article's title and excerpt toPOST /v1/developing-stories. The list already receivesexcerpt, so this needs no new endpoint. A 409 says the story is already on the rail; a 403 is left to the existing admin-only dialog, since the rail's writes are admin-only.Developing story → article
A row action on the developing-stories page opens
/articles/new?title=…&excerpt=…, andEditArticleViewseeds title and excerpt from the query when the route is the new-article one. Keeping the title identical across the hop is what lets the homepage rail link the story to the article once it publishes, since the rail matches on the slug derived from the title.Notes
npx vitest run(21) andtscpass, with only the pre-existing@radix-ui/react-labelresolution error and the pre-existingsaveArticleexhaustive-deps warning.🤖 Generated with Claude Code
https://claude.ai/code/session_01NhFBibhRZkEZzW3qJrAMy5