Repository navigation
feat(desktop): open a site, save a copy for the agent, and serve its redesign live (#15) - #25
Merged
Merged
Conversation
…redesign live (issue 15) local_site_capture opens a site from this computer (public addresses, or one on this computer the person typed; never a private network, redirects included), saves its page, words, stylesheets and, when a paired browser can, a picture under .hanzo/reference. local_preview_start serves <folder>/redesign on 127.0.0.1 with live reload; local_preview_open shows it in Chrome. Previews stop when the window closes. Claude-Session: https://claude.ai/code/session_015XYKLn69gF4x75RWePpDBV
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.
The window's half of #15 (hanzo-inc/app#312). @hanzo/build 0.2.138 (hanzoai/build#46) and @hanzo/app 0.3.114+ (hanzoai/app#84) carry the rest; the catalog bump is a separate PR and nothing here touches
pnpm-workspace.yaml, the patch or the lockfile.Five commands in
src-tauri/src/commands/local_site/, each granted incapabilities/main.json:local_site_folder: a new folder under Documents/Hanzo, named for the site; it makes nothing, so a site that will not open leaves nothing behind.local_site_capture: opens the site from this computer's connection and saves.hanzo/reference/(page, words, up to six stylesheets, and a picture when a paired browser can take one). Public addresses only, or one on this computer the person typed; never a private network, redirects included (a name is resolved here and the request pinned to the address that passed).local_preview_start/local_preview_stop: serves<folder>/redesignon 127.0.0.1 with live reload (server-sent events), files under the folder only, ownHostonly. Stops when the main window closes.local_preview_open: shows a running preview in Chrome, else the default browser.cargo test --bin hanzo-desktop --no-default-features local_site: 37 passed (URL policy and redirects, the capture writer, page reading, the screenshot sequence against a fake browser, the preview server's routes, live reload, traversal and host refusals, and a capture of a site served on this computer through to its redesign). A real capture of example.com into a temp folder, and curl against the running preview (placeholder, live reload event after a file landed, 403 on/../, 421 on a foreign Host), were also run by hand. The default-feature test build does not compile on main (src/machine/client.rstests useExecStreamwithout importing it); unrelated and left alone.Claude-Session: https://claude.ai/code/session_015XYKLn69gF4x75RWePpDBV