Skip to content

fix(config): Bridge still starts when it can't save the downloaded game list - #119

Merged
snekxs merged 1 commit into
OpenMouse-Project:mainfrom
HighestFidelity:pr/catalog-save
Nov 13, 2026
Merged

snekxs merged 1 commit into
OpenMouse-Project:mainfrom
HighestFidelity:pr/catalog-save

Conversation

@HighestFidelity

Copy link
Copy Markdown
Contributor

At startup Bridge fetches the game catalog and, when it changed, saves it to config.json. That save used ?, so if config.json couldn't be written (read-only file, full disk, a sync tool holding a lock), load_with_catalog failed and Bridge didn't start at all, even though it had a perfectly good catalog in memory.

What changed:

  • A failed save now logs a warning and Bridge keeps going with the fetched catalog for this run. It gets written with the next settings change.
  • The fetch-and-apply step moved into apply_fetched_catalog (normalizes the games, saves only when they changed). The "catalog unavailable" log moved into log_catalog_unavailable. Same messages as before.

Tested:

  • New unit tests: a_catalog_that_cannot_be_saved_is_still_used (save forced to fail, catalog still applied) and an_unchanged_catalog_is_not_saved_again (same games in another order and case write nothing; a new game is saved).
  • cargo fmt --check, cargo test --locked, and clippy with -D warnings for Linux and x86_64-pc-windows-gnu all pass.
  • A fork build with this change passed a quick Windows test. I didn't make config.json unwritable on a real install.

🤖 Generated with Claude Code

…me list

A failed save of the fetched game catalog no longer aborts startup. The
catalog is still used for this run and written with the next settings
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 86974b1 and 48431cf.

Files selected for processing: 1

  • src/config.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added type: bug PR title category: bug area: native Native bridge and platform services labels Nov 13, 2026
HighestFidelity added a commit to HighestFidelity/OpenMouse-Bridge that referenced this pull request Nov 13, 2026
@snekxs
snekxs merged commit beb4360 into OpenMouse-Project:main Nov 13, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native bridge and platform services type: bug PR title category: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants