Skip to content

ix-windows: draggable, non-resizable, rounded overlay + docs#1334

Merged
Andrew Gazelka (andrewgazelka) merged 3 commits into
mainfrom
worktree-ix-windows-polish
Jun 18, 2026
Merged

ix-windows: draggable, non-resizable, rounded overlay + docs#1334
Andrew Gazelka (andrewgazelka) merged 3 commits into
mainfrom
worktree-ix-windows-polish

Conversation

@andrewgazelka

@andrewgazelka Andrew Gazelka (andrewgazelka) commented Jun 18, 2026

Copy link
Copy Markdown
Member

What

Polish the ix-windows resource overlay so it behaves like a proper floating card.

  • Draggable — borderless windows have no title bar, so OUTER_JS starts a window drag on a primary-button mousedown over the card chrome (UserEvent::Drag -> begin_drag -> drag_window). Content inside the sandboxed iframe stays interactive (only the chrome is a move handle).
  • Non-resizable (with_resizable(false)) — the size is owned by the content (auto-fit), so a manual resize just fought the next content report.
  • Rounded corners — the macOS server only rounds titled windows, so the borderless content-view layer is rounded explicitly.
  • Docs — README gains Move, don't resize + a Self-contained HTML only section; the overview doc is updated to the current iframe/sandbox model (it still referenced a removed MEASURE_JS / #ix-root inner-HTML swap) and the new Drag/begin_drag surface.

Test

  • nix build .#ix-windows green.
  • Ran the binary against a live resource: window auto-sized to content (e.g. 394×136), dragged by the card edge, button inside stayed clickable, corners rounded, no manual resize.

Notes

Mermaid-in-overlay confirmed working only when the SVG is pre-rendered and embedded (CDN mermaid.js is blocked by the opaque-origin sandbox); documented in the README.

Reviewed by the adversarial review-changes workflow: approve-with-fixes, 0 blockers; the confirmed doc-staleness findings are fixed here.

🤖 Authored with Claude Code (Opus).

Note

Add draggable, non-resizable, rounded overlay windows to ix-windows

  • Adds a UserEvent::Drag variant and WindowManager::begin_drag method to initiate a native OS window drag when the webview posts a "drag" IPC message from the card chrome.
  • Windows are now created with with_resizable(false); users move them by dragging the chrome instead.
  • Fixes rounded corner clipping on macOS by enabling a CALayer with corner radius and masksToBounds on the content view after blur installation.
  • Updates documentation to describe the sandboxed iframe approach, drag-to-move behavior, and the IPC message flow from inner JS to outer JS to the event loop.

Macroscope summarized 2427e06.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

Copy link
Copy Markdown
Contributor

Blast radius

23 of 1485 checks would rebuild between base d75b6ab and head db236e3.

pie showData title Rebuilt checks by category
  "image" : 15
  "rust" : 2
  "site" : 2
  "agent" : 1
  "blast" : 1
  "eval" : 1
  "lint" : 1
Loading
flowchart LR
  c0["ix-mcp"]
  c1["blast-radius-test"]
  c2["agent-skills"]
  c3["lint"]
  c4["site-test"]
  c5["site-case-tests"]
  c0 --> k0["agent-skills"]
  c0 --> k2["eval"]
  c0 --> k3["image-development-base"]
  c0 --> k4["image-kernel-dev"]
  c0 --> k5["image-minecraft"]
Loading
changed checks (23)
  • agent-skills
  • blast-radius-test
  • eval
  • image-development-base
  • image-kernel-dev
  • image-minecraft
  • image-minecraft-bedrock
  • image-minecraft-status
  • image-minecraft_1.21.11-fabric
  • image-minecraft_1.21.11-paper
  • image-minecraft_26.1.2-fabric
  • image-minecraft_26.1.2-paper
  • image-minecraft_26w17a-fabric
  • image-minestom
  • image-neovim-ci
  • image-remote-desktop
  • image-symphony-codex
  • image-test-cluster-bootstrap
  • lint
  • rust-mcp.evalSmoke
  • rust-mcp.requirementsSmoke
  • site-case-tests
  • site-test

@andrewgazelka Andrew Gazelka (andrewgazelka) added this pull request to the merge queue Jun 18, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI review found issues in this pull request.

Verdict: patch is incorrect
Confidence: 0.78

The runtime changes look scoped, but the PR introduces documentation that claims a sandbox/network guarantee the implementation does not provide.

  • P2 packages/ix-windows/README.md:40 Sandbox docs overstate network blocking

Comment on lines +40 to +47
A resource's HTML is rendered inside a sandboxed, opaque-origin `<iframe>`
(`sandbox="allow-scripts"`, no `allow-same-origin`) loaded with no page origin, so
it must be **self-contained**: inline all CSS and JS and data. External CDN
scripts/styles, same-origin `fetch`, cookies, and storage are blocked by the
sandbox. Pre-render anything that needs a library and embed the result -- e.g.
render a mermaid diagram to SVG server-side (`kroki.io`, the `mermaid` CLI, ...)
and put the static `<svg>` in the HTML, rather than loading `mermaid.js` from a
CDN (which silently fails).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Sandbox docs overstate network blocking

The new self-contained section says the iframe sandbox blocks external CDN scripts/styles. With only sandbox="allow-scripts" and no CSP, the opaque origin prevents access to parent/cookies/storage, but it does not by itself block absolute external subresources such as <script src="https://..."> or <link rel="stylesheet">. This creates a misleading security/developer guarantee; either enforce self-contained rendering in code or soften the docs here and in the matching overview text.

Merged via the queue into main with commit 072d3cd Jun 18, 2026
11 of 14 checks passed
@andrewgazelka Andrew Gazelka (andrewgazelka) deleted the worktree-ix-windows-polish branch June 18, 2026 07:18
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