-
Notifications
You must be signed in to change notification settings - Fork 0
Clamp desktop windows to current bounds #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clamp desktop windows to current bounds #160
Conversation
✅ Deploy Preview for bugbasher ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Test Coverage
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| changed = true | ||
| return { | ||
| ...window, | ||
| position: { x: 0, y: 0 }, | ||
| size: maximizeSize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clamp maximized windows without refreshing their restore state
When setDesktopBounds shrinks the desktop, maximized windows have their position and size reset but their saved previous snapshot is left untouched. Later, toggleMaximize restores from that stale snapshot, so unmaximizing after a viewport shrink will reopen the window at the old off‑screen coordinates and dimensions, undoing the clamping. Consider updating the previous values whenever a maximized window is resized so restore always respects the current desktop bounds.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codex please fix this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
- Updated maximized window handling to clamp the stored restore snapshot whenever desktop bounds shrink so restored windows stay within the visible viewport. src/contexts/WindowManagerContext.tsxL294-L360
Testing
- ✅
npm run format - ✅
npm run lint ⚠️ npm test(fails: node: bad option: --experimental-transform-types, --test-coverage-include=src/components/, --test-coverage-include=src/routes/)
|
@codex please review again |
|
Codex Review: Didn't find any major issues. Swish! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting |
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68e4326defc4832a9e3ca1e7e3a70b62