Skip to content

A game tracked without an App ID is offered its game database link - #127

Draft
ChakraFusion wants to merge 8 commits into
Liquid-co:dev-publicfrom
ChakraFusion:pr/link-to-gamedb
Draft

ChakraFusion wants to merge 8 commits into
Liquid-co:dev-publicfrom
ChakraFusion:pr/link-to-gamedb

Conversation

@ChakraFusion

Copy link
Copy Markdown

Builds on #118 (it uses #118's marks table and device-settings refresh). Its commits are here too until #118 merges; this PR's own change is the two commits after the merge.

A folder tracked by hand, or one the scan found and named itself ("Pal (Epic/Unreal Save)"), has no App ID, so it gets no cover art, launching, session detection or device settings. #73 links a game the user picks in "Track game"; this covers games already tracked.

Suggested, not set on a guess (the same reasoning as your review on #118): through the App ID, the game database's settings files are left out of syncing, so a wrong guess about which game a folder is would leave out files of the save without anyone knowing.

  • Once per game and save folder, the folder is looked up in the game database strictly (GameDB.IdentifyFolderStrictly). It counts when it is the game's save location, lies inside it, or holds it at most one folder down ("Duckov" holding "Saves"). A folder like LocalLow, which holds many games' saves, never counts.
  • A match is shown in the game's configuration tab: "This looks like … in the game database", with Link and Not this game.
  • Link sets the App ID, and cover art if there was none. The name stays the user's, and its device settings follow. The tab's form takes the new App ID too, so saving the form doesn't undo the link.
  • Neither answer is asked about again for that folder, and neither is an App ID someone later removes.

POST /api/games/{id}/gamedb-link {accept}; the game's JSON carries gameDBSuggestion. The new text is in all three catalogs; the Chinese is a first attempt for @Janlhin to check.

Tests:

  • TestGameDB_IdentifyFolderStrictly.
  • TestGameDBLink_SuggestedThenConfirmed: suggested and not set, a wide folder not suggested, confirming links, declining isn't asked again, and a removed App ID isn't suggested again.

Checks: the full unit and e2e suites and the frontend tests pass locally, and the frontend builds.

🤖 Generated with Claude Code

ChakraFusion and others added 8 commits October 20, 2026 21:37
…ack what is a save

The game database names the settings files of the games it knows (Liquid-co#84).
For the rest, a file is now taken for a game's settings by its contents
(presets/detectsettings.go): the vocabulary of one machine's display -
resolution, vsync, shadow quality, upscaler - matched inside identifiers
split at case changes and separators ("_enableFrameGeneration",
"r_materialAniso"), in UTF-8 or UTF-16. Unreal Engine's Config/<platform>
folder is taken by convention.

Names only add weight, by how reliably the game database's own labels show
them to mean settings: over its 16,700 settings and 9,000 save entries,
"settings" names 1,521 settings files and 70 saves, ".ini" 1,831 and 137,
so a name never decides on its own. A name with a save word in it rules a
file out unless the contents are overwhelming; the game database's save
locations are never taken, and nor are logs, binaries, long files that are
only partly settings, or Syncthing's conflict copies.

A file taken for settings that changes like a save is given back for good
(verdict "save", which also overrules the game database):
- before it is left out, and at every later run, the game's snapshots are
  asked whether it changed in most of the snapshots in which the rest of
  the save changed (snapshot/history.go);
- while it is left out, every change here and every manifest another
  device sends count whether it changed when the rest of the save did;
  three such changes, outnumbering the times it stayed put, give it back
  (daemon/detectsettings.go).

Detected files and verdicts are kept per game (migration 0042:
settings_files, settings_observations, and marks for when each game was
last judged) and applied through the device settings, so hashes recorded
under the old list are carried over as before. The game's file list says
why each excluded file is excluded, and unticking one there syncs it. The
configuration tab's new text is in the catalogs (en, zh-Hans, zh-Hant).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y-content

# Conflicts:
#	cmd/opensave-app/frontend/src/locales/en.json
#	cmd/opensave-app/frontend/src/locales/zh-Hans.json
#	cmd/opensave-app/frontend/src/locales/zh-Hant.json
Asked in review: builds of the earlier draft of this change made
settings_files and settings_observations (0043) and marks (0041) with the
same schema, and a database from one of them would not start under a
plain CREATE TABLE ("table already exists"), as happened with
sync_device_settings. IF NOT EXISTS for all three, and a test that opens a
database holding them with 0042 unrecorded; it fails without.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…c until confirmed

Asked in review: a wrong guess would stop part of a save syncing without
anyone knowing, a bigger risk than the game database's listed files. So a
file found by its contents is now only suggested (verdict "suggested"): it
keeps syncing, and the game's configuration tab lists it with "Keep on
this device" and "Keep syncing". Keeping it on this device leaves it out
of syncing as the database's files are, and the give-back checks watch it
as before; keeping it syncing records "declined", and it is not suggested
again. A suggestion that the snapshots show changing with the save is
withdrawn. The game database's files stay automatic.

POST /api/games/{id}/suggested-settings {path, keepHere} answers one; the
game's JSON carries suggestedSettings. The tab's new text is in the
catalogs (en, zh-Hans, zh-Hant).

TestSuggestedSettings_SyncUntilConfirmed: detection suggests the settings
files and leaves them syncing, an answer each way does what it says, and
detecting again changes neither.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A folder tracked by hand, or found by the scan under a name of its own
making, had no App ID, and so no cover art, launching, session detection
or device settings. Once per game and folder (a mark), its folder is asked
of the game database strictly (IdentifyFolderStrictly): it counts when it
is the game's save location, lies inside it, or holds it at most one
folder down - never a folder like LocalLow that holds many games' saves.
A match gives it the App ID, and cover art if it had none; its name stays
the user's. Asked as the game's settings are detected, so they follow from
the App ID at once. An App ID someone takes away is not put back.

Tests: the strict identification, and the link - once, not for a wide
folder (which the plain IdentifyFolder would link), and not again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Asked about in Liquid-co#106's review for its own lookup: a large save must not be
read into memory snapshot by snapshot. ChangesLikeASave read every file of
each of a game's last 40 snapshots to tell whether the rest of the save
changed - some ten million rows for a quarter-million-file save, each time
detection ran - and for a snapshot without a recorded file list it
unpacked and hashed the whole archive. Now the database compares two
snapshots (store.SnapshotsDiffer, stopping at the first difference), only
the files being judged are read (SnapshotPathHashes), and a snapshot with
no recorded list is left out (SnapshotHasFiles). ArchiveFiles and filesOf,
used only here, are gone.

TestSnapshotsDiffer covers the comparison; TestChangesLikeASave passes
unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Asked on Liquid-co#118 for files found by their contents, and it holds here too:
through the App ID the game database's settings files are left out of
syncing, so a wrong guess about which game a folder is would leave out
files of the save without anyone knowing. The game a folder plainly is
(IdentifyFolderStrictly) is now only suggested: the game's configuration
tab says "This looks like ... in the game database" with Link and Not
this game. Link sets the App ID, and cover art if there was none - the
name stays the user's - and its device settings follow; Not this game
leaves it as it is. Either answer, and an App ID taken away, is not asked
about again for that folder.

POST /api/games/{id}/gamedb-link {accept}; the game's JSON carries
gameDBSuggestion. After Link the tab's form takes the App ID too, so
saving it does not undo the link. The new text is in the catalogs.

TestGameDBLink_SuggestedThenConfirmed: suggested and not set, a wide
folder not suggested, confirming links, declining is not asked again,
and an App ID taken away is not suggested again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Oct 26, 2026

Copy link
Copy Markdown

@ChakraFusion is attempting to deploy a commit to the sivadaboi's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

1 participant