Repository navigation
Conversation
Ctrl/Cmd + =/+/-/0, Ctrl + wheel and pinch set the webview's native zoom (50-300% in 10% steps), and the level is kept between launches in homeshell/desktop.json under the user config directory. Closes eclipse-enclave#11
EclipseSourceAI
left a comment
There was a problem hiding this comment.
Note
Autonomous AI review. May contain mistakes.
Useful comment? React 👍. Disagree? React 👎 to reject it for follow-up reviews. A reply explaining why helps too.
This agent never approves PRs. A maintainer must sign off.
Only a maintainer can re-request a review from this agent.
Powered by Eclipse Enclave via review-guard-mcp
This PR adds browser-style zoom to the desktop app. A script injected with window.Init catches the zoom keys, Ctrl+wheel and macOS pinch, and calls a bound Go function (homeshellZoom). That function steps the level on a 10% grid (zoom.Next), sets the webview's native zoom through a small cgo shim per platform (WebKitGTK set_zoom_level / WKWebView pageZoom) and saves the level to desktop.json. Nothing changes in the daemon, the API or the webapp.
What I checked
- Native handles: against the pinned webview_go (
6173450d4dd6), the shims reach the right objects. GTK adds theWebKitWebViewas the window's only child. Cocoa makes theWKWebViewthe content view, and does that inside the constructor, so restoring the zoom beforeSetHtmlworks on macOS too. - Linux build: the
webkit2gtk-4.0directive goes through the existing pkg-config shim, so it links 4.1 like webview_go itself does. - Injected script: I ran it under Node with edge cases. Keys and wheel behave as described.
- UI test: I didn't run a Playwright check. It drives Chromium and can't reach the native webview, as the PR says.
Where a maintainer should look
- macOS: nothing compiles
zoom_darwin.goon this PR (see inline). Nobody has run it on a Mac, and pinch is untested. - Where the zoom file lives: on macOS,
desktop.jsonlands in the daemon's data directory. On Linux it goes to a different location (~/.config/homeshell). - Smaller points: pinch steps aren't symmetric between zooming in and out, and the webkit 4.0 shim's TODO needs to mention this new directive.
Keep desktop.json in its own homeshell-desktop directory, since on macOS homeshell/ is the daemon's data directory. Step pinch zoom by factors of 1.1 so in and out are symmetric, and zoom while the fingers move. Build desktop/cmd/ in the release assets smoke test, the only PR build of the macOS code. Note the zoom shim in the webkit2gtk-4.0 shim's TODO.
EclipseSourceAI
left a comment
There was a problem hiding this comment.
Note
Autonomous AI review. May contain mistakes.
Useful comment? React 👍. Disagree? React 👎 to reject it for follow-up reviews. A reply explaining why helps too.
This agent never approves PRs. A maintainer must sign off.
Only a maintainer can re-request a review from this agent.
Powered by Eclipse Enclave via review-guard-mcp
Follow-up review: the only commit since my last pass (9b86f24) is exactly the fix-up for the four points I raised, nothing else changed.
I checked each fix against the code instead of just taking the reply at face value:
desktop.jsonnow lives underhomeshell-desktop/on both platforms, confirmed by the newTestDefaultStoreHasItsOwnDirectorytest and theos.UserConfigDir()call.- Pinch zoom now steps by
log(scale)/log(1.1), so 3x and 1/3x both give 12 steps (verified the math directly withnode -e), and it now reacts ongesturechangefor live feedback. The newTestScriptcases match this behavior exactly. release-assets-smoke.ymlnow triggers ondesktop/cmd/**, so the macOS cgo code gets a PR build.- The
webkit2gtk-4.0.pcshim's TODO now mentionszoom_linux.goas a second consumer to update when the shim is removed.
No new issues found in the delta. No inline comments this round.
These previous comments can be resolved as they are now handled:
- desktop.json collided with the daemon's data directory on macOS
- pinch zoom steps were asymmetric and had no live feedback
- zoom_darwin.go wasn't compiled by any PR check
- webkit2gtk-4.0 shim's TODO didn't account for the new consumer
I can't resolve them myself as I would need write permission on this repository.
What and why
The desktop app had no zoom: a bare system webview ignores the browser zoom shortcuts. An injected script now catches them and sets the webview's native zoom, 50–300% in 10% steps. The level is kept between launches in a file the desktop app owns, not in the daemon's settings. Closes #11.
=+/-_/0homeshell-desktop/, nothomeshell/: on macOS the latter is the daemon's data directory.Evidence (Linux, real window via xdotool, level read back from
desktop.json):The level is restored on relaunch.
Not run on a Mac: pinch is untested by hand.
desktop/cmd/**now triggers the Release Assets Smoke Test, so this PR compileszoom_darwin.goon macOS. No e2e test: Playwright drives Chromium and cannot reach the native webview. The injected script runs under Node in a table-driven Go test (TestScript) instead.Merge danger: two-way door, desktop app only. No daemon, API or webapp change. The smoke test now also runs on PRs touching
desktop/cmd/.Changelog
Checklist
AGENTS.md) (unit only, see above)AGENTS.md