docs(kanban): use generated keyed commands

Keep the north-star kanban sketches aligned with the generated lower-aware append/replace helpers instead of teaching keyed slot extension methods.

req: dx/006

req: codegen/002
This commit is contained in:
slhx agent
2026-06-02 03:07:26 +02:00
parent ee6045aec5
commit 03b5f0f29b
+4 -4
View File
@@ -92,7 +92,7 @@ slhx reads this from hemplate Surface facts and generates scoped typed resources
```rust
use ui::board::{forms, slots};
slots::card.replace(card.id, CardView::from(card));
ui::board::replace(slots::card, card.id, &CardView::from(card));
forms::create_card.clear("title");
ui::render(&BoardView::from(board));
```
@@ -135,7 +135,7 @@ pub fn create_card(
app.board.update(|board| board.insert_card(form.column, card.clone()));
(
slots::card.append(card.id, &CardView::from(card)),
ui::board::append(slots::card, card.id, &CardView::from(card)),
forms::create_card.clear("title"),
// slhx-sync: queue atomic board state diff for sync
SyncEffect::send_patch(atoms::board, Patch::insert_card(form.column, card)),
@@ -233,7 +233,7 @@ pub fn apply_board_patch(
Effect::broadcast(
Channel::Board(app.board.id()),
Effect::batch(changed_cards.into_iter().map(|c|
slots::card.replace(c.id, &CardView::from(c))
ui::board::replace(slots::card, c.id, &CardView::from(c))
)),
),
)),
@@ -255,7 +255,7 @@ Server-authoritative on conflict. No Redux sagas. No React Query cache fades.
```rust
#[slhx_sync::presence]
pub fn user_joined(user: UserPresence) -> impl IntoEffect {
slots::presence_user.append(user.id, &PresenceBadge::from(user))
ui::board::append(slots::presence_user, user.id, &PresenceBadge::from(user))
}
```