Repository navigation
AI in action: live working cards, class mode, text that fits, nicer AI handwriting - #28
Merged
Merged
Conversation
…ed and drawn-on writing - rupok-live fit.rs: add_text and replace_items_with_text size, wrap and place agent text inside the slide frame; too much text shrinks, moves up or continues on new pages. - write_handwriting always fits the page (explicit spots, new pages), continues an earlier group (anchor.group) and has a joined style. - rupok-ink write: Catmull-Rom smoothing, hand-like pen order, ink-based letter spacing, a wandering baseline, pressure on downstrokes, faster natural timing, optional joined letters. - show_progress op (rupok_live::progress): the agent's working card. - Engine: streamed writing queues behind the reveal; agent shapes draw on.
Every tool says readOnlyHint / destructiveHint (real deletes only) / idempotentHint so clients can auto-allow safe calls. The fake ACP agent streams plans, progress cards, a failing then fixed Smart Object, long text, a delete, a streamed solve and a student's ask.
Working cards where results land (plan, step, live preview, cancel, retry), results animate in with a small sparkle, class mode (routine edits apply with an Undo toast, destructive ones still ask), Solve this streams line by line, students can ask AI onto their own layer, and the AI button is always there and reliable in Teach.
…utton, Class mode chip - docs/ai-agents.md: AI in action (working cards, show_progress and the agent guide, text fit, class mode, live solve, students ask) and the pre-approve setups for Claude Code, Codex and OpenCode. - skills/rupok-live-board: act, don't ask; let the class watch. - Every MCP tool's annotations are checked by a test. - Teach: the chat sits under the floating AI button so it stays clickable; the chat closes in Student view; toasts go by themselves.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Make Rupok's AI feel "in action": the class watches it work on the board, live, with nothing to click.
The bugs
1. AI text ran off the page.
add_textaccepted any size and only capped the box width at the page edge. Height and position were never checked, and the board's text box hadmin-widthwith no maximum, so a paragraph at 96px crossed the frame and the window.crates/rupok-live/src/fit.rsfits every agent text inside the slide's safe margin (add_text,replace_items_with_text):warningswith codefit, plussizeandcontinued).write_handwritingfits the same way: explicit spots are pulled inside the page, letters shrink to fit, and a new page is scaled to fit.2. The AI handwriting looked like a font. In
rupok-ink/src/write:v/ware one movement, stems are retraced ina/n/d, dots come last;joinedstyle links the letters of a word.The output is still deterministic and wasm-safe.
3. The AI panel sometimes didn't show. Three causes:
toggleAisawchatOpen()), so the click showed nothing.FloatingAiStatusneededlivePhase() !== "idle").Fixes:
chat.ts, and the button brings the chat back.4. Too many permission prompts.
readOnlyHint,idempotentHintandopenWorldHint, anddestructiveHintonly for real deletes and ink replacement. A test checks this.AI in action
apps/board/src/aiAction/):show_progressop and MCP tool (rupok_live::progress,mcp_progress.rs): any agent can post and update its card.```boardblock, and each line is written in handwriting as soon as it is complete. Writing queues behind the current reveal.write_handwritinggainsanchor.groupso outside agents can do the same.Op changes are additive: a new
ShowProgressvariant,Anchor.group, and new files where possible.Tests
Rust:
show_progressshape, access and validation;E2E
ai-in-action.mjs(fake ACP agent extended): 40/40 pass.Checks run locally:
cargo fmt --check;clippy --workspace --all-targets -D warnings;cargo test --workspace;tscandvite build;pen-latency.mjs --swiftshader --check: all budgets pass. One run on the overloaded machine failed "first frame of next stroke"; the rerun passed. The pen path is unchanged.The screenshots, the GIF and the before/after handwriting were shared with the founder separately (the founder's local
shots-ai-action/folder).