Skip to content
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

feat: screen state #1446

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

KelvinDiasMoreira
Copy link
Contributor

@KelvinDiasMoreira KelvinDiasMoreira commented Feb 4, 2025

When submitting this pull request, I confirm the following (please check the boxes):

  • I have read and understood the Contributor Guidelines.
  • I have checked that there are no duplicate pull requests related to this request.
  • I have considered, and confirm that this submission is valuable to others.
  • I accept that this submission may not be used and the pull request may be closed at the discretion of the maintainers.

Fill in the PR content:

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added window state persistence functionality to maintain window position, size, and maximized state between application sessions.

  • Added configPath to store window state in HydraScreenState.json within user data directory
  • Implemented saveScreenConfig method using fs/promises to persist window bounds and maximized state
  • Added loadScreenConfig to restore previous window state on startup with error handling
  • Added window state saving on close event to capture final window configuration
  • Integrated window state restoration into createMainWindow with proper maximized state handling

💡 (4/5) You can add custom instructions or style guidelines for the bot here!

1 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile

src/main/services/window-manager.ts Outdated Show resolved Hide resolved
src/main/services/window-manager.ts Outdated Show resolved Hide resolved
src/main/services/window-manager.ts Outdated Show resolved Hide resolved
@thegrannychaseroperation
Copy link
Contributor

@KelvinDiasMoreira I think that you better take advantage of the existing storage that we use (LevelDB) instead of writing the info into a JSON file. Could you please do that? Thank you for your interest in contributing.

Copy link

sonarqubecloud bot commented Feb 6, 2025

@KelvinDiasMoreira
Copy link
Contributor Author

@thegrannychaseroperation can you review ?

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