Files
orangecat/scripts/test
CatoandClaude 09dd258b84 feat(articles): post an article on your own projects' walls too (#1596)
* feat(articles): post an article on your own projects' walls too

- publishArticle takes projectIds; keeps only projects the writer owns
  (fetchUserProjects: owned by their actor, not a draft — the list short
  posts cross-post to) and builds contexts with the one shared
  buildTimelineContexts, now in timeline/utils/timeline-contexts.ts.
- Composer: "Also post on a project" under "Who can read this?", opening the
  same ProjectSelectionModal short posts use; hidden when the writer has no
  projects; not shown when editing.
- ?project=<id or title slug> preselects an owned project; one that is not
  the writer's is not chosen and the composer says so. The fallback sign-in
  button now carries the query in `from`, like middleware and useRequireAuth.
- Project walls read `project` visibility contexts as well as subject posts,
  so cross-posts (short posts and articles) actually appear there.
- Link contract documented once in import-source.ts.

Claude-Session: https://claude.ai/code/session_019MDtmvPuHDQeZwXtasWfSx

* test(articles): give the editor fixture its project list

The article-writing browser check bundles the real composer with its data
boundaries stubbed. "Also post on a project" added one (the writer's
projects, read through the Supabase client), which threw on load in CI with
no Supabase env, so the editor never rendered. The fixture now stubs it like
publishArticle, and checks the control at every width: a ?project= that is
not the writer's is not chosen and says so; an owned one is preselected, its
sheet fits and has full-size targets, and publishing sends its id; with no
projects the control is absent. The sheet is imported directly, not through
next/dynamic, which the fixture does not provide.

Claude-Session: https://claude.ai/code/session_019MDtmvPuHDQeZwXtasWfSx

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-13 11:02:40 +01:00
..