Repository navigation
feat: the bot's cursor follows each part of a screen as it is written - #37
Merged
Merged
Conversation
Each draft served at /view gets a small script first, after the doctype so the page keeps its layout mode. Once the page is read it finds where the content ends (the newest text, or the newest element), scrolls so that spot stays in view, and posts the point, the part around it and the view size it measured in to the app. A frame from another origin may read the page before it knows its size, so the script waits for the resize. The file on disk is served untouched. Spec 22.3, 22.5, 22.6 and T3; tested with the real Claude Code.
…itten While a bot writes a screen, its cursor (the arrow in its color with its name, shared with the browser as BotCursor) glides to the end of what is written, and a frame in its color marks the part being built, on the artboard and on the screen in focus. Only the frame on show counts, so the cursor matches what is seen; measures are scaled by the view the script saw. With nothing visible yet the cursor waits at the top; near the right or bottom edge its name moves aside. The preview's drafts use the daemon's own script, and it writes at a pace closer to a model's.
Merged
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
A cursor in the design area, in the spirit of Google Stitch: while a bot writes an HTML screen, its cursor follows each part being built, and the artboard scrolls along with it.
Daemon (spec 22.3)
/viewstarts with a small script. It goes after the doctype so the page keeps its layout mode, or at the top when there is no doctype. The file on disk is served as it is.load, the script:{botloft: "cursor", view, point, box}to the app.resizewhen the frame does not know its size yet. A cross-origin iframe can read the page withinnerHeight0, which was seen in the real test.App (spec 22.5)
BotCursor: the arrow in the bot's color with its name and the typing dots.cursor.js. Vite serves that one folder outside the app, only in dev.Security (spec 22.6)
Tests
cargo test(256 tests), clippy and fmt pass.pnpm check(144 tests) passes.cursor.test.tsx: the cursor scales to the artboard, parks while there is no point, shows the next version's mark only once it is on show, ignores other windows and hides when writing ends.Manual step
pnpm tauri devwith a devBOTLOFT_HOME: ask a bot for a page and watch the cursor in the WebView2 window.