Discussion Integration
Controlled state, DiscussionAdapter trait, and host wiring patterns.
- Connecting a discussion thread to server actions or a custom backend adapter.
- Verifying
use_discussionhooks against controlled reply and focus signals.
- Hold replies in a controlled
Signal<Vec<DiscussionReply>>. - Implement
DiscussionAdapter::submit_replyin your app (HTTP, server fn, etc.). - Bridge composer submit via
DiscussionEvents::on_submit— call the adapter asynchronously and push the returned reply into your signal. - Optionally pass
DiscussionAttachmentValidationand wireevents.on_attachment_rejectonDiscussionThreadfor client-side attach rules; re-validate attachments inDiscussionAdapter::submit_replybefore persisting.
Only submit_reply is required. Override DiscussionAdapter::fetch_branch when your backend supports lazy branch loading (hidden_child_count, show-more drill-in). Override DiscussionAdapter::upload_attachment when the composer should persist attachment drafts to host storage before submit.
Hooks + mock adapter submit
Controlled replies signal, use_discussion hook count, and in-memory adapter bridge.
6
Main message with markdown and a design link.
Agree — let's track open questions here.
I'll draft the migration checklist.
Depth-3 reply for tree testing.
Separate branch at L1.
Based on the thread, the default depth is 4.