Commit Graph
80 Commits
Author SHA1 Message Date
ddidderrandClaude Opus 4.7 0d2520fd16 fix(ui): stop showing manually deleted games as installed
A game that the user deletes from disk while the launcher is running stayed
visible as "Installed" in the UI indefinitely, both as a status label and as
a member of the Installed tab. After a restart the Install button reappeared
but the game still wrongly showed up under Installed. The backend rescan
(`set_all_uninstalled` + `update_game_installation_state` in
src-tauri/src/lib.rs) was already producing the correct `installed: false`
on each refresh; the React store was just refusing to honour it.

Two independent UI bugs were in play:

1. The `games-list-updated` listener merged each update with
   `previous?.install_status ?? ...`, which preserved a prior `Installed`
   value regardless of what the backend now reported. The fix introduces
   `mergeGameUpdate`: the backend `installed` flag wins for settled state
   (Installed vs NotInstalled), while genuine in-progress states
   (CheckingPeers / Downloading / Unpacking) are preserved across refreshes
   so concurrent backend ticks cannot blow away an active download UI.
   `status_message` and `status_level` are cleared only when the local
   `installed` / `downloaded` flags actually flip, so a transient error
   ("No peers currently have this game.") survives a cosmetic refresh but
   is wiped once the underlying state changes.

2. The Installed tab filter was `installed || downloaded`, which leaked
   downloaded-but-not-yet-installed games into a tab whose label promises
   only ready-to-play titles. It now filters on `installed` alone, matching
   `getActionLabel`'s own definition of when "Install" appears.

While the install-state semantics were being sorted out, the filter
taxonomy was clarified to match what users actually mean:

  | Button     | Filter                                            |
  |------------|---------------------------------------------------|
  | All Games  | installed || downloaded || peer_count > 0         |
  | Local      | installed || downloaded                           |
  | Installed  | installed                                         |

The "Available" button was renamed "Local" because users do not think of
themselves as a peer; Local means "on my system, whether the archive is
still packed or already installed". "All Games" previously surfaced every
row in the bundled game.db, including catalogue entries that no peer on
the LAN holds — confusing, since those games cannot be acted on. It now
scopes to LAN-reachable games. The `isUnavailable` helper and its
`Unavailable` action label are left in place: with this filter no
displayed game can hit that state today, but the helper is cheap to keep
as a safety net for transient peer-count flips and for a possible future
"also show catalogue-only entries" toggle.

Tooltips were rewritten to a consistent `Show games … on your system` /
`Show all games available on the LAN` pattern, all phrased from the user's
point of view (no "peer" jargon in user-facing strings; doc/code comments
still use "peer" where it reflects the actual protocol).

Two stale comments were dropped along the way: a note on
`getInitialGameDir` that claimed it only sets the directory if not already
set (the function unconditionally calls `setGameDir` when a value is
persisted), and a leftover `// Rest of your component remains the same`
marker from an earlier scaffold.

Test plan:

- `npm --prefix crates/lanspread-tauri-deno-ts exec tsc -- --noEmit`
  passes (run as part of this change).
- `just run`, point the launcher at a game directory holding two installed
  games, then manually `rm -rf` each game's local folder. Within one
  refresh cycle the Installed tab should empty and each game's action
  button should flip to Install / Download as appropriate, without
  needing a restart.
- Start a download and verify the UI does not regress to NotInstalled
  when the next `games-list-updated` arrives mid-flight.
- Cycle through All Games / Local / Installed and confirm membership
  matches the table above; in particular, a game whose archive is
  downloaded but not installed appears under Local and All Games but not
  Installed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-15 12:22:02 +02:00
ddidderr 75be55d255 remember game dir 2025-11-14 10:44:02 +01:00
ddidderr cc42bc6f4b Reapply "build system windows"
This reverts commit d9dc040927.
2025-11-14 09:33:38 +01:00
ddidderr d9dc040927 Revert "build system windows"
This reverts commit da758d770a.
2025-11-14 09:32:22 +01:00
ddidderr da758d770a build system windows 2025-11-14 09:30:47 +01:00
ddidderr 833c8afedf game thumbnails 2025-11-14 09:03:05 +01:00
ddidderr 6eec74f0f6 unavailable games red button 2025-11-14 02:24:18 +01:00
ddidderr 2952b596e2 peers gone... 2025-11-14 02:16:53 +01:00
ddidderr b9e3e760d9 peer count in UI 2025-11-14 00:03:32 +01:00
ddidderr e19eda7919 installed + downloaded 2025-11-13 23:26:07 +01:00
ddidderr 8fe68f9574 wip 2025-11-13 21:43:20 +01:00
ddidderr f223418d22 ui fix peer filtering 2025-11-13 19:45:54 +01:00
ddidderr b8d6d29ae0 available as default game filter 2025-11-13 19:39:07 +01:00
ddidderr 2d7f7513ad peer count for all games 2025-11-13 19:38:21 +01:00
ddidderr d96d191c13 wip 2025-11-13 19:25:45 +01:00
ddidderr 16aeade138 ui 2025-11-13 09:22:05 +01:00
ddidderr b66a2764fe ui 2025-11-12 23:08:08 +01:00
ddidderr ae19d94fb2 wip 2025-11-12 23:05:50 +01:00
ddidderr 5710d87295 wip 2025-11-08 18:40:19 +01:00
ddidderr 6845a7d6fe wip 2025-11-08 17:27:01 +01:00
ddidderr 765447e6d1 [code][fix] improvements for LAN 202503
- more robust client <-> server connection
  - new client event: DownloadGameFilesFailed
  - 3 seconds to reconnect
  - retry forever if server is gone and never lose a UI request

- code cleanup here and there (mostly server)
2025-03-20 19:39:32 +01:00
ddidderr 56c1eb0167 [ui] wait for server, rename to softlan-launcher 2024-11-15 12:29:16 +01:00
ddidderr 3610eb77a6 [ui] show size in GB 2024-11-15 12:10:02 +01:00
ddidderr bc70d6300b [client] unpack game works! 2024-11-15 11:20:35 +01:00
ddidderr f9cd8471b4 [backup] on the way 2024-11-15 08:59:53 +01:00
ddidderr 2b64d1e4ba [client][server] file transfer working, ui not ready for it 2024-11-14 23:26:31 +01:00
ddidderr 942eb8003e [improve] set game dir on client -> updates Play/Install button based on games existing 2024-11-14 19:41:55 +01:00
ddidderr 009c0739d2 [ui] make the grid good 2024-11-14 00:01:55 +01:00
ddidderr a6ed6e04fe [backup] games from server with images 2024-11-13 23:51:28 +01:00
ddidderr 5d45c4ce4b [ui] change framework from Tauri Leptos to Tauri Vanilla (Typescript) and React 2024-11-13 22:15:04 +01:00