Text chat 37: fluxer-api channel-type endpoints #322

Closed
opened 2026-11-12 18:16:19 +00:00 by charles · 0 comments
Owner

Plan: docs/superpowers/plans/2026-11-12-textchat.md, section "Task 37". Spec: §18 of docs/superpowers/specs/2026-11-12-fluxer-native-textchat-design.md (channel types, added 2026-11-12 when Charles overruled #286 Q4).

Task 37: fluxer-api channel-type endpoints

Issue: (to be created)

Files:

  • Create: crates/fluxer-api/src/forums.rs, crates/fluxer-api/src/announcements.rs
  • Modify: crates/fluxer-api/src/{threads.rs,dms.rs,messages.rs,uploads.rs,lib.rs}, README
  • Test: crates/fluxer-api/tests/channel_types.rs

Interfaces:

  • Consumes: Text chat 5 (UploadFile, Progress, the multipart builder), 6, 36.

  • Produces on ApiClient: get_channel(id) -> Channel; create_forum_post(forum, &StartForumPost) -> ForumPostCreated; create_forum_post_with_files(forum, &StartForumPost, Vec<UploadFile>, Progress) -> ForumPostCreated (multipart payload_json + files[n], message.attachments[i].id = i; the presigned form sends upload_filename in message.attachments with the JSON call); search_threads(channel, &ThreadSearchQuery) -> ThreadSearchResponse (HTTP 202 → NotReady); post_data(forum, &[Snowflake]) -> PostData (chunks of 100); archived_public_threads(channel, &ArchivedThreadsQuery), archived_private_threads(channel, &ArchivedThreadsQuery), my_archived_private_threads(channel, before: Option<Snowflake>, limit); edit_thread(thread, &EditThreadRequest) -> Channel; delete_channel(id); add_thread_member(thread, user), remove_thread_member(thread, user), patch_thread_member_settings(thread, &ThreadMemberSettingsPatch); crosspost(channel, message) -> Message, crosspost_source(channel, message) -> CrosspostSource, follow_channel(channel, &FollowChannelRequest) -> FollowedChannel; purge_personal_notes(channel) -> PurgeResult. Every thread/forum route carries X-Fluxer-Features (already on every request; asserted).

  • Step 1: Write failing tests (wiremock against the Task 36 fixtures): get_channel_thread, create_forum_post_json_body, create_forum_post_multipart_payload_and_files, search_threads_query_string_and_202, post_data_chunks_by_100, archived_public_before_param, my_archived_private_before_is_snowflake, edit_thread_patch_body, thread_member_add_remove_paths, crosspost_and_follow_paths, purge_notes_path, thread_routes_send_features_header.

  • Step 2–5: FAIL → implement → PASS → commit feat(api): forum, thread admin, announcement and notes endpoints.

🤖 Generated with Claude Code

Plan: `docs/superpowers/plans/2026-11-12-textchat.md`, section "Task 37". Spec: §18 of `docs/superpowers/specs/2026-11-12-fluxer-native-textchat-design.md` (channel types, added 2026-11-12 when Charles overruled #286 Q4). ### Task 37: `fluxer-api` channel-type endpoints **Issue:** (to be created) **Files:** - Create: `crates/fluxer-api/src/forums.rs`, `crates/fluxer-api/src/announcements.rs` - Modify: `crates/fluxer-api/src/{threads.rs,dms.rs,messages.rs,uploads.rs,lib.rs}`, README - Test: `crates/fluxer-api/tests/channel_types.rs` **Interfaces:** - Consumes: Text chat 5 (`UploadFile`, `Progress`, the multipart builder), 6, 36. - Produces on `ApiClient`: `get_channel(id) -> Channel`; `create_forum_post(forum, &StartForumPost) -> ForumPostCreated`; `create_forum_post_with_files(forum, &StartForumPost, Vec<UploadFile>, Progress) -> ForumPostCreated` (multipart `payload_json` + `files[n]`, `message.attachments[i].id = i`; the presigned form sends `upload_filename` in `message.attachments` with the JSON call); `search_threads(channel, &ThreadSearchQuery) -> ThreadSearchResponse` (HTTP 202 → `NotReady`); `post_data(forum, &[Snowflake]) -> PostData` (chunks of 100); `archived_public_threads(channel, &ArchivedThreadsQuery)`, `archived_private_threads(channel, &ArchivedThreadsQuery)`, `my_archived_private_threads(channel, before: Option<Snowflake>, limit)`; `edit_thread(thread, &EditThreadRequest) -> Channel`; `delete_channel(id)`; `add_thread_member(thread, user)`, `remove_thread_member(thread, user)`, `patch_thread_member_settings(thread, &ThreadMemberSettingsPatch)`; `crosspost(channel, message) -> Message`, `crosspost_source(channel, message) -> CrosspostSource`, `follow_channel(channel, &FollowChannelRequest) -> FollowedChannel`; `purge_personal_notes(channel) -> PurgeResult`. Every thread/forum route carries `X-Fluxer-Features` (already on every request; asserted). - [ ] **Step 1: Write failing tests** (wiremock against the Task 36 fixtures): `get_channel_thread`, `create_forum_post_json_body`, `create_forum_post_multipart_payload_and_files`, `search_threads_query_string_and_202`, `post_data_chunks_by_100`, `archived_public_before_param`, `my_archived_private_before_is_snowflake`, `edit_thread_patch_body`, `thread_member_add_remove_paths`, `crosspost_and_follow_paths`, `purge_notes_path`, `thread_routes_send_features_header`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(api): forum, thread admin, announcement and notes endpoints`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
charles added this to the Text chat milestone 2026-11-12 18:16:19 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#322
No description provided.