Skip to content

[WIP] Update Tauri v2 window-state persistence behavior on Windows - #5

Draft
crazyrob425 with Copilot wants to merge 1 commit into
mainfrom
copilot/update-window-state-persistence
Draft

[WIP] Update Tauri v2 window-state persistence behavior on Windows#5
crazyrob425 with Copilot wants to merge 1 commit into
mainfrom
copilot/update-window-state-persistence

Conversation

Copilot AI commented Mar 26, 2026

Copy link
Copy Markdown

Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.

Original prompt

Update crazyrob425/KDP-E-Book-Generator (base main) Tauri v2 wrapper window-state persistence behavior on Windows to restore to the same monitor when possible; otherwise restore to a monitor that contains the saved top-left corner, with clamping to the monitor work area. Persist size/position/maximized state to a JSON file under AppData along with other app data. Use minimal Rust changes with Tauri v2 APIs, debounce saves, and update README to document behavior and AppData paths. Open a PR targeting main.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: @copilot Accepted Confirmation: Are you sure?

Assistant: Yes—forking is a good workaround if you can’t (or don’t want to) fight the permission issue on the original repo.

What I can do vs. what I can’t do

  • I can implement the Tauri wrapper + SQLite backend + Windows GitHub Actions build pipeline in a fork so you get a working version you can download installers from.
  • I cannot directly fork/push into blacklistedrob-prog/KDP-E-Book-Generator from here right now because this session doesn’t have the necessary write privileges on that repo, and forking itself may also be blocked depending on what GitHub allows the integration to do in your account.

If forking is available on your side, this is the fastest path

You do one click:

  1. Go to blacklistedrob-prog/KDP-E-Book-Generator
  2. Click Fork
  3. After it creates crazyrob425/KDP-E-Book-Generator (or whatever name you pick), send me the fork repo name.

Then I can work against the fork and you’ll get:

  • src-tauri/ recreated
  • Rust-only commands + progress events
  • SQLite (bundled) initialized on app start (no UI)
  • GitHub Actions workflow that builds Windows MSI and uploads it as an artifact
  • README instructions: “download artifact → install → run”

What I need from you

Reply with either:

  • A) “I forked it: crazyrob425/KDP-E-Book-Generator” (best), or
  • B) “I can’t fork because ____” (error message / restriction)

Once you give me the fork repo path, I’ll proceed with the full rebuild there and keep it as close as possible to your current project structure and vibe.

User: i forked it: crazyrob425/KDP-E-Book-Generator

Assistant: I’ve started the Copilot coding agent work on your fork crazyrob425/KDP-E-Book-Generator to add the full Tauri v2 wrapper, Rust-only SQLite backend, job progress events, and a Windows MSI GitHub Actions build workflow; you can track progress at the task link below.

data:
  - title: "[WIP] Add Tauri v2 wrapper + Rust SQLite backend + Windows MSI CI workflow"
    repository: "crazyrob425/KDP-E-Book-Generator"
    url: https://github.com/copilot/tasks/pull/PR_kwDORrTYZM7N3TMP?session_id=e90b41bf-e178-49ad-b8df-4693713808ef
    state: queued

User: @copilot Accepted Confirmation: Are you sure?

Assistant: I’m proceeding on your fork and kicking off the work to add the Tauri v2 wrapper + Rust SQLite backend + Windows MSI GitHub Actions build. You can track it here:

data:
    - title: '[WIP] Add full Tauri v2 desktop wrapper to KDP-E-Book-Generator'
      repository: crazyrob425/KDP-E-Book-Generator
      url: https://github.com/copilot/tasks/pull/PR_kwDOQrzIB87N3Wq8?session_id=c1184aff-4831-4ecb-a697-e79461fa6cb9
      state: queued

While that runs, if you want the result to feel exactly like your current app on Windows, tell me two preferences (one line is fine):

  1. Window behavior: remember size/position (yes/no)
  2. Data location: keep everything in %AppData% (default) or a folder next to the project files

User: yes, in appdata

Assistant: Waiting on your response in the confirmation dialog to continue updating the in-progress PR with Windows window state persistence and AppData-based storage.

User: @copilot Accepted Confirmation: Are you sure?

Assistant: Got it: persist window size/position = yes, and store everything under AppData.

I can’t apply more repo changes from this message (I’m temporarily unable to run the repo-update automation right now), but here’s exactly what will be done in the PR so you know it’s handled correctly:

  • Window state persistence (Windows): save the window’s size/position on move/resize, write it to a small settings file under the app’s AppData directory, and restore it on next launch.
  • AppData storage: keep the SQLite DB (and any caches/export temp files) under the OS-provided app data directory (e.g., %AppData%\\Binary Books E-Crafter\\... or the Tauri app data path), not next to your project files.

If you want me to match your preference precisely, confirm one detail:

  • When restoring, should it clamp to the current monitor bounds (so it never opens off-screen after you change monitors)? yes/no

User: yes

Assistant: Window-state persistence (with off-screen clamping) + AppData-only storage is now queued to be implemented on `crazyrob425/KDP-E-Book-G...

This pull request was created from Copilot chat.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

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