Skip to content

SP-3501 Window size fix - #161

Open
Alex-1089 wants to merge 4 commits into
mainfrom
bug/SP-3501_resize-issue
Open

SP-3501 Window size fix#161
Alex-1089 wants to merge 4 commits into
mainfrom
bug/SP-3501_resize-issue

Conversation

@Alex-1089

@Alex-1089 Alex-1089 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • The app now reliably restores window size/position and correctly tracks maximized and fullscreen state across launches (instead of always starting maximized).
    • Window geometry is validated against the current screen to keep it visible, with safe fallback behavior when screen bounds can’t be determined.
    • Window settings are persistently saved on close to prevent inconsistent startup behavior.
  • Documentation
    • Updated the changelog with a new 0.13.4 “Fixed” entry describing the window restore/maximization issue.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d286586f-44bc-4e48-babe-d0494c63499f

📥 Commits

Reviewing files that changed from the base of the PR and between f2c772b and 3c7bb11.

📒 Files selected for processing (1)
  • CHANGELOG.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

📝 Walkthrough

Walkthrough

Changes

The application persists window size, position, maximized state, and fullscreen state. Startup restores saved geometry within the active screen, and shutdown saves it before close. The changelog documents release 0.13.4.

Window Geometry Persistence

Layer / File(s) Summary
Window bounds configuration
internal/config/config.go
Adds WindowBounds, JSON serialization, configuration accessors, persistence, and initialization of saved window state.
Startup window initialization
main.go, app.go
Uses saved bounds for initial Wails window settings and restores valid size and position within the active screen.
Window geometry save lifecycle
app.go, CHANGELOG.md
Saves live or previously stored geometry before close and documents the 0.13.4 fix.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Config
  participant main
  participant App
  participant WailsWindow
  Config-->>main: return persisted WindowBounds
  main->>WailsWindow: set initial size and window state
  App->>WailsWindow: restore valid position and size
  WailsWindow->>App: provide geometry before close
  App->>Config: persist WindowBounds
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: fixing window size/geometry restoration behavior.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bug/SP-3501_resize-issue

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 3
  • Undeclared components: 0
  • Declared components: 3
  • Detected files: 192
  • Detected files undeclared: 0
  • Detected files declared: 192
  • Licenses detected: 2
  • Licenses detected with copyleft: 1
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app.go`:
- Around line 155-159: Update the close-handling logic around GetWindowBounds to
check its success result before copying geometry into bounds or persisting it.
When no normal bounds exist, avoid saving or restoring the zero-sized rectangle;
otherwise preserve the existing valid normal geometry behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: be0f09ae-2ed4-49fc-a254-a1a9eaa101b3

📥 Commits

Reviewing files that changed from the base of the PR and between 73202fd and dcb80a2.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • app.go
  • internal/config/config.go

Comment thread app.go
@github-actions

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 3
  • Undeclared components: 0
  • Declared components: 3
  • Detected files: 192
  • Detected files undeclared: 0
  • Detected files declared: 192
  • Licenses detected: 2
  • Licenses detected with copyleft: 1
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

@Alex-1089

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@github-actions

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 3
  • Undeclared components: 0
  • Declared components: 3
  • Detected files: 192
  • Detected files undeclared: 0
  • Detected files declared: 192
  • Licenses detected: 2
  • Licenses detected with copyleft: 1
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

@github-actions

Copy link
Copy Markdown

SCANOSS SCAN Completed 🚀

  • Detected components: 3
  • Undeclared components: 0
  • Declared components: 3
  • Detected files: 192
  • Detected files undeclared: 0
  • Detected files declared: 192
  • Licenses detected: 2
  • Licenses detected with copyleft: 1
  • Policies: ✅ 1 pass (1 total)

View more details on SCANOSS Action Summary

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.

2 participants