Skip to content

fix: skip setup data restore on linux#171

Open
nat-openclaw wants to merge 3 commits into
mainfrom
nat-openclaw/issue-170-issue-170-1781218610546-sr7l9y
Open

fix: skip setup data restore on linux#171
nat-openclaw wants to merge 3 commits into
mainfrom
nat-openclaw/issue-170-issue-170-1781218610546-sr7l9y

Conversation

@nat-openclaw

Copy link
Copy Markdown
Collaborator

Closes #170\n\n## Summary\n- skip setup data backups during Linux setup updates\n- skip restoring stale setup backups on Linux and delete the temp backup folder instead\n- keep the Windows backup/restore and addon dependency reinstall path intact\n\n## Checks\n- node --check application/src/electron/updater.ts\n- node --check application/src/electron/startup.ts\n\nNote: bun is not installed in this environment, and npm install cannot handle the repo's workspace:* dependencies, so the application typecheck could not be run locally.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3fa45726-319b-4525-baa9-e69a8a0339aa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch nat-openclaw/issue-170-issue-170-1781218610546-sr7l9y

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 and usage tips.

@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
open-game-installer-web Ready Ready Preview, Comment Jun 12, 2026 12:25am

@Nat3z

Nat3z commented Jun 12, 2026

Copy link
Copy Markdown
Owner

@nat-openclaw can you deep review the code and make sure there's no windows errors? /model gpt

@nat-openclaw

nat-openclaw commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author
▶️ Actions Performed
  • Inspect PR diff and changed updater/startup/addon handler code — Diff is limited to Linux guards in updater/startup; addon handler changes are already on main, not part of this PR.
  • Trace Windows update backup → setup launch → startup restore flow for regressions — Windows updater still downloads to temp, backs up before spawning setup, and startup restore path remains active for non-Linux.
  • Audit new git repository validation for Windows .git file/path edge cases — .git directory and gitdir-file handling resolves absolute and relative Windows paths correctly.
  • Apply fixes if clear Windows bugs are found — No Windows regression found that requires a code change.
  • Run syntax/type-relevant checks and inspect git status — node --check passed for updater.ts, startup.ts, and handler.addon.ts; working tree is clean.

@nat-openclaw

Copy link
Copy Markdown
Collaborator Author

Deep-checked the Windows updater path and didn’t find a regression from this change.

  • Windows still does the full flow: download installer → backup state → spawn setup → restore on next launch.
  • The new Linux guards are process.platform === 'linux', so they won’t short-circuit win32.
  • backupFilesAsync() now always uses the updater __dirname; that still matches the Windows backup flow.
  • The .git repo check looks fine for normal repos and .git file pointers, including relative gitdir: paths.

Checks run:

  • node --check application/src/electron/updater.ts
  • node --check application/src/electron/startup.ts
  • node --check application/src/electron/handlers/handler.addon.ts

All passed. I didn’t make any code changes or commit anything.

@Nat3z

Nat3z commented Jun 12, 2026

Copy link
Copy Markdown
Owner

@nat-openclaw can you investigate too why OGI after updating the setup, doesn't stay on that screen and instead drops you into the main menu for like a second then does the closing it's supposed to?

@nat-openclaw

nat-openclaw commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author
▶️ Actions Performed
  • Confirm root cause in startup-runner and updater flow — runStartupTasks ignores updated:true; startAppFlow always loads main UI
  • Gate main-app load when installer update returns updated: true — startup-runner returns shutdownPending; main.ts skips main UI load
  • Run syntax checks on touched electron files — node --check passed on startup-runner, main, system-updater, updater

When a setup update triggers shutdown, skip loading the main UI so users
see the update status until process.exit() runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nat-openclaw

Copy link
Copy Markdown
Collaborator Author

Yep — I found the flash.

The updater was scheduling shutdown, but startup kept going, so OGI was loading the main menu into the same window for a moment before exit. I changed the startup flow to detect when an installer/setup update is already in progress, keep the splash screen up, and skip loading the main UI until shutdown happens.

This should cover both Linux and Windows, and it doesn’t change the Linux backup/restore fix from this PR.

Checked with node --check on the affected Electron files. Pushed in 214db18.

@Nat3z

Nat3z commented Jun 12, 2026

Copy link
Copy Markdown
Owner

@nat-openclaw fix plz

opengameinstaller-gui typecheck: src/electron/updater.ts(27,10): error TS2440: Import declaration conflicts with local declaration of '__dirname'.

@nat-openclaw

nat-openclaw commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

I’m working on this and will keep this comment updated.

Target: PR #171
Current: Building workspace packages before typecheck

  • Remove conflicting __dirname import from updater.ts — Removed manager.paths __dirname import
  • ▶️ Run opengameinstaller-gui typecheck — Running opengameinstaller-gui typecheck
  • Commit and push fix to PR branch

React to this comment with 👎 to cancel the run.

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.

fix restored data causes bad on linux

2 participants