Add editable live width×height fields to settings (#69 follow-up)#73
Merged
Conversation
The window size was already saved/restored, but there was no way to see or set the exact dimensions. Add a "Window Size" row to the settings panel with two numeric inputs that: - show the current overlay window size on open, - update live as the user drag-resizes the window (main broadcasts 'window-size-changed' on every resize), and - resize the window to an exact size when edited (committed on blur/Enter). Main process exposes get-window-size / set-window-size over IPC, with the set path clamped to 200–8000 px so a stray value can't break the window. The renderer block no-ops (and hides the row) when electronAPI is absent, so the web build is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017NiS2a4jZ877XgftkH1Dd1
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.
Follow-up to #69 / PR #71.
The overlay window size was already saved and restored, but @petegordon pointed out there was no width × height readout in the settings — and no way to see it change as the window resizes, or to type an exact size. This adds that.
What's new
A Window Size row in the settings panel with two numeric inputs (
width × height) that:How it works
main.js— newget-window-size/set-window-sizeIPC. The set path is clamped to 200–8000 px so a stray keystroke can't shrink the window to nothing or throw it off-screen. The existingresizehandler now also broadcastswindow-size-changedso the fields track live drags.preload.js— exposesgetWindowSize(),setWindowSize(w, h),onWindowSizeChanged(cb).index.html— the new row + styling for the numeric fields (matches the existing settings look).app.js— wires the fields; guards against stomping a field you're mid-edit in, and no-ops + hides the row whenelectronAPIis absent (web build has no window to resize).Testing
node --checkpasses on all four changed files.npm test— all 85controller-coretests pass.🤖 Generated with Claude Code
https://claude.ai/code/session_017NiS2a4jZ877XgftkH1Dd1
Generated by Claude Code