Skip to content

feat(desktop): open a site, save a copy for the agent, and serve its redesign live (#15) - #25

Merged
zeekay merged 2 commits into
mainfrom
feat/redesign-url
Nov 21, 2026
Merged

zeekay merged 2 commits into
mainfrom
feat/redesign-url

Conversation

@zeekay

@zeekay zeekay commented Nov 21, 2026

Copy link
Copy Markdown
Member

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 in capabilities/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>/redesign on 127.0.0.1 with live reload (server-sent events), files under the folder only, own Host only. 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.rs tests use ExecStream without importing it); unrelated and left alone.

Claude-Session: https://claude.ai/code/session_015XYKLn69gF4x75RWePpDBV

…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
@zeekay
zeekay merged commit 29c633b into main Nov 21, 2026
4 checks passed
@zeekay
zeekay deleted the feat/redesign-url branch November 21, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant