Skip to content

zgx: Appshots on Windows; Settings shows only what the platform has - #1230

Draft
gaelcado wants to merge 2 commits into
zeronsh:zeron/zgxfrom
gaelcado:gael/zgx-day-appshots-windows
Draft

gaelcado wants to merge 2 commits into
zeronsh:zeron/zgxfrom
gaelcado:gael/zgx-day-appshots-windows

Conversation

@gaelcado

@gaelcado gaelcado commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

On Windows, Settings → Appshots showed macOS's two permissions and "This shortcut is unavailable", because zgx had no Appshots on Windows at all: no hot key, no capture. This adds them: the shortcut is a hot key (RegisterHotKey) held by a thread of its own, and checked even while Appshots are off. The capture is the window in front, within its visible frame, named by its program's description and window title. Windows asks no permission, and no text is read (no UI Automation), so a capture is the picture only. After a capture, Zeron comes forward with the chip.

The page now shows only what the platform has. macOS keeps its permissions. Windows shows the capture rows and says no permission is needed; if another app holds the shortcut, the page says so. Linux, where zgx still has no capture, says Appshots aren't available yet. Search finds no permission rows where there are none.

"Screenshots not loading": reply pictures (![](C:\…\shot.png)) and pictures sent from another device only accepted paths starting with /. As a result, nothing showed for a chat on a Windows device. Paths now follow the shipping app's rules (tool_images.rs/reply_images.rs): a drive path is absolute, relative paths are joined with \, and network/device paths are refused. Separate commit. This is unrelated to the VC++ runtime question: a missing runtime stops the exe from starting at all.

Ports the Windows part of #216's plan (docs/plans/2026-08-22-appshots-windows-linux.md).

Windows (VM, live app on the shell fixture)

Before After

Ctrl+Alt+Space over Notepad: the capture lands as a chip, Zeron comes forward, and the chip opens the capture from its C:\ path:

The file it kept (%TEMP%\zeron-zgx-appshots\…\Notepad Appshot.png, 1190×688):

Rebased on the latest zeron/zgx (zgx pin 61b0c2bf) and run again in the VM: the page, then Ctrl+Alt+Space over Notepad, chip and Zeron in front:

Linux (fixture render, dark)

Before After

Windows layout, dark fixture:

Tests

  • Rebased again on zeron/zgx 224189a (zgx pin 0f0aa6a1), no conflict.
  • Luau: new Settings → Appshots shows only its platform's rows… and a picture's path on a Windows device is one to draw…. Full suite on 224189a: 916 passed, 8 failed. All 8 fail on the base too, on Linux: the two macOS-glyph Appshots settings tests, settings_in_place ×3, link_menus, editor_menu, plugin_settings. zgx lint: 0 errors.
  • Rust cargo test --release --no-fail-fast: no new failures vs a clean zeron/zgx (224189a too: the new pin doesn't compile off macOS, zgx-gpu's loops_said ungated, so Linux and xwin-check.sh were built with that field gated locally, outside this PR). The ones that fail here also fail there: editor_scroll, editor_menu, menu_bar, examples_tests::a_large_diff, shortcut_tests ×2, fit_tests, the cli engine helper, full_screen_titlebar, leftovers ×2, the sidebar reload test and the thought fade.
  • Platforms: Linux ✓, xwin-check.sh ✓ (on 224189a), Windows VM ✓ on the 61b0c2bf rebase (Windows 11 24H2, live hot key + capture); not run again on 224189a.

Open question: the MSVC runtime

A Windows build needs the MSVC runtime (VCRUNTIME140.dll, MSVCP140.dll). On a clean machine the exe stops at once with 0xC0000135 and shows nothing. The VM has the VC++ redistributable installed, so it runs there. Should zgx link the CRT statically (-C target-feature=+crt-static for x86_64-pc-windows-msvc), or should the installer ship the redistributable? This PR doesn't change it.

Overlap with #1235: both touch screens/settings/appshots.luau (this PR wraps the macOS-only rows in a platform check; #1235 drops pl = ds.Settings.inset() so the words sit on the cards' edge). Whichever merges second takes both.

@gaelcado
gaelcado force-pushed the gael/zgx-day-appshots-windows branch from 915fd30 to 05c0d86 Compare November 5, 2026 21:16
Windows gets the shortcut (a hot key on a thread of its own, checked even
while Appshots are off) and the capture (the window in front, its program's
name and title, no text). Settings → Appshots keeps macOS's permissions to
macOS, and says so where there's no capture (Linux).
A reply's pictures and a sent one were read only by a path starting with
"/", so on a Windows device none showed. The shipping app's rules now:
a drive's path, relative ones joined with \\, network paths refused.
@gaelcado
gaelcado force-pushed the gael/zgx-day-appshots-windows branch from 05c0d86 to da4644d Compare November 6, 2026 10:15
Gratenes added a commit to Gratenes/zeron that referenced this pull request Nov 8, 2026
…s only what the platform has) into android-mine

# Conflicts:
#	apps/zgx/Cargo.toml
#	apps/zgx/ui/ds/user_message.luau
#	apps/zgx/ui/screens/chat/reply_images.luau
Gratenes added a commit to Gratenes/zeron that referenced this pull request Nov 8, 2026
Gratenes added a commit to Gratenes/zeron that referenced this pull request Nov 8, 2026

This branch has not been deployed

No deployments
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