feat(nfc): an NFC page for the tag dumps the game's NFC tab lists #49

Open
airdamien wants to merge 5 commits from airdamien/LongshotLauncher:feat/nfc-tags into main
First-time contributor

Why

Longshot is getting an NFC tab that gives the game NFC tags from files in a folder of the player's (MagicBeanDev/Longshot#280). Players need a way to put their tag dumps there without finding a hidden folder: this adds an NFC page to the launcher for it.

What changed

  • Core/NfcTags.cs: the folder (LONGSHOT_NFC_DIR, else %LOCALAPPDATA%\Longshot\nfc on Windows, $XDG_DATA_HOME/longshot/nfc on Linux: the same rule as the game's host/nn_nfp.c), listing, checking a dump (.bin of 532, 540 or 572 bytes; a Flipper Zero .nfc; the two marks of a figure's NTAG215), adding (a name that is taken is never replaced: the same bytes are left, others go in as Name (2).bin), deleting. Written through AtomicFile.
  • Core/NfcReader.cs: reading a tag with a Nintendo Switch 2 Pro Controller over USB (Windows, WinUSB): the reader's commands behind a send-and-answer delegate, so the checks drive them with a pretended controller. Read only: a write command cannot be built.
  • App/ViewModels/NfcViewModel.cs, App/Views/NfcView.axaml, NfcDeleteView.axaml: the page. Add files (many at once), add a folder (with the folders under it), drop files or folders on the page, scan a tag, delete one or several (asked first), open the folder.
  • App/Views/HomeView.axaml, HomeViewModel.cs, MainViewModel.cs: an NFC card under the saves' on the home, and an NFC tags link on the home before any build exists (the folder does not wait for a build).
  • tests/launcher_core/NfcChecks.cs, NfcReaderChecks.cs: 119 checks at 4c77d3c6 (116 on Windows: three are Linux only), on pretended tags built in code. No real dump is in the repository, and CONTRIBUTING.md says none may be.
  • docs/nfc.md, README.

How it was tested

  • dotnet build LongshotLauncher.slnx: 0 errors (Windows 11, .NET SDK 10.0.201), at the first commit (5c1c0366).

  • The NFC checks alone, at the first commit (5c1c0366): NFC ONLY: 110 checks passed. The whole of tests/test_launcher_core.py has not run green here: on this Windows PC it stops in SelfUpdateChecks before reaching them, and does so on main too (a Linux path in that check); CI on Linux is where the whole suite runs. To run them alone I made Main call only NfcChecks(); NfcReaderChecks(); in a copy that is not committed.

  • On screen (the screenshot below): the page listing three pretended tags and one file that is no dump, from a scratch LONGSHOT_NFC_DIR.

  • By the author, on their own files: adding a folder of folders (before 921ac746 changed how a folder is walked: links to folders are no longer gone into).

  • On Linux (.NET SDK 10.0.404), by HumanBean at 4c77d3c6 (main merged in): dotnet build LongshotLauncher.slnx 0 errors, Debug and Release with -p:RestoreLockedMode=true as CI; the whole tests/test_launcher_core.py --strict --longshot <Longshot main>: launcher core: 934 checks passed, of them 119 NFC checks (counted in a copy that is not committed); tests/test_release.py: 28 tests OK. No window was opened there: the page and drag and drop were not run on Linux.

  • Scan a tag, by the author on a real controller (a Nintendo Switch 2 Pro Controller, firmware 1.1.5, over USB, Windows 11): a figure's tag held on the controller was read and saved into the folder as Scanned <ID>.bin.

Not tested: the page on Linux (the scan is Windows only and its button is disabled there); a scan's other ends on real hardware (no tag in time, a tag that is no figure's, the controller held by another program) beyond the checks' pretended controller; drag and drop was built and compiled, and tried by the author only.

Screenshot

The NFC page, this PR:

The NFC page

Notes for the reviewer

  • This is only useful once Longshot has the NFC tab (its pull request: MagicBeanDev/Longshot#280). It does nothing to a build without it.
  • The folder is a new place under the player's data (...\Longshot\nfc), beside the save backups' ...\Longshot\oot-save-backups.
  • AI assistance: written with Claude Code (the commit's trailers say so).

🤖 Generated with Claude Code

## Why Longshot is getting an NFC tab that gives the game NFC tags from files in a folder of the player's (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/280). Players need a way to put their tag dumps there without finding a hidden folder: this adds an **NFC** page to the launcher for it. ## What changed - `Core/NfcTags.cs`: the folder (`LONGSHOT_NFC_DIR`, else `%LOCALAPPDATA%\Longshot\nfc` on Windows, `$XDG_DATA_HOME/longshot/nfc` on Linux: the same rule as the game's `host/nn_nfp.c`), listing, checking a dump (`.bin` of 532, 540 or 572 bytes; a Flipper Zero `.nfc`; the two marks of a figure's NTAG215), adding (a name that is taken is never replaced: the same bytes are left, others go in as `Name (2).bin`), deleting. Written through `AtomicFile`. - `Core/NfcReader.cs`: reading a tag with a Nintendo Switch 2 Pro Controller over USB (Windows, WinUSB): the reader's commands behind a send-and-answer delegate, so the checks drive them with a pretended controller. Read only: a write command cannot be built. - `App/ViewModels/NfcViewModel.cs`, `App/Views/NfcView.axaml`, `NfcDeleteView.axaml`: the page. Add files (many at once), add a folder (with the folders under it), drop files or folders on the page, scan a tag, delete one or several (asked first), open the folder. - `App/Views/HomeView.axaml`, `HomeViewModel.cs`, `MainViewModel.cs`: an NFC card under the saves' on the home, and an *NFC tags* link on the home before any build exists (the folder does not wait for a build). - `tests/launcher_core/NfcChecks.cs`, `NfcReaderChecks.cs`: 119 checks at 4c77d3c6 (116 on Windows: three are Linux only), on pretended tags built in code. **No real dump is in the repository**, and CONTRIBUTING.md says none may be. - `docs/nfc.md`, README. ## How it was tested - `dotnet build LongshotLauncher.slnx`: 0 errors (Windows 11, .NET SDK 10.0.201), at the first commit (5c1c0366). - The NFC checks alone, at the first commit (5c1c0366): `NFC ONLY: 110 checks passed`. **The whole of `tests/test_launcher_core.py` has not run green here**: on this Windows PC it stops in `SelfUpdateChecks` before reaching them, and does so on `main` too (a Linux path in that check); CI on Linux is where the whole suite runs. To run them alone I made `Main` call only `NfcChecks(); NfcReaderChecks();` in a copy that is not committed. - On screen (the screenshot below): the page listing three pretended tags and one file that is no dump, from a scratch `LONGSHOT_NFC_DIR`. - By the author, on their own files: adding a folder of folders (before 921ac746 changed how a folder is walked: links to folders are no longer gone into). - On Linux (.NET SDK 10.0.404), by HumanBean at 4c77d3c6 (main merged in): `dotnet build LongshotLauncher.slnx` 0 errors, Debug and Release with `-p:RestoreLockedMode=true` as CI; the **whole** `tests/test_launcher_core.py --strict --longshot <Longshot main>`: `launcher core: 934 checks passed`, of them 119 NFC checks (counted in a copy that is not committed); `tests/test_release.py`: 28 tests OK. No window was opened there: the page and drag and drop were not run on Linux. - Scan a tag, by the author on a real controller (a Nintendo Switch 2 Pro Controller, firmware 1.1.5, over USB, Windows 11): a figure's tag held on the controller was read and saved into the folder as `Scanned <ID>.bin`. **Not tested:** the page on Linux (the scan is Windows only and its button is disabled there); a scan's other ends on real hardware (no tag in time, a tag that is no figure's, the controller held by another program) beyond the checks' pretended controller; drag and drop was built and compiled, and tried by the author only. ## Screenshot The NFC page, this PR: ![The NFC page](https://git.magicbean.dev/attachments/8da4ab15-95aa-4e76-baaa-7d56c3721402) ## Notes for the reviewer - This is only useful once Longshot has the NFC tab (its pull request: https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/280). It does nothing to a build without it. - The folder is a new place under the player's data (`...\Longshot\nfc`), beside the save backups' `...\Longshot\oot-save-backups`. - AI assistance: written with Claude Code (the commit's trailers say so). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(nfc): an NFC page for the tag dumps the game's NFC tab lists
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
5c1c036655
Add one file, many, or a folder with the folders under it; drop files on the page; delete one or several; open the folder;
scan a tag with a Nintendo Switch 2 Pro Controller over USB (Windows). The dumps stay on the PC, in the folder every
Longshot build shares.

Assisted-by: Claude Code
Co-Authored-By: Claude Fable 5.2 <[email protected]>
airdamien changed title from WIP: feat(nfc): an NFC page for the tag dumps the game's NFC tab lists to feat(nfc): an NFC page for the tag dumps the game's NFC tab lists 2026-11-13 19:25:17 +00:00
Author
First-time contributor

Scan a tag was run by the author on a real Switch 2 Pro Controller over USB: a figure's tag was read and saved into the folder. With that, the page's functions have all been used on real files and hardware; the title's WIP is off. Still for CI: the whole core suite (it does not run on the author's Windows PC, nor does main's).

Scan a tag was run by the author on a real Switch 2 Pro Controller over USB: a figure's tag was read and saved into the folder. With that, the page's functions have all been used on real files and hardware; the title's WIP is off. Still for CI: the whole core suite (it does not run on the author's Windows PC, nor does main's).
HumanBean left a comment

Thanks: the core is careful (the checks on fake tags, nothing written over, read-only commands, AtomicFile), and the folder rule matches the game's hos_nfc_dir() in MagicBeanDev/Longshot#280.

Must change: dropping files on the NFC page looks refused by the window's own drag handler (inline on Views.cs). The PR advertises the drop, so this blocks.

Should change: the "first 256 by name" note doesn't match how the game in MagicBeanDev/Longshot#280 caps the list. Adding a folder runs on the window's thread.

Nits: inline.

CI: run 166 (Compile and test, Conventional Commit title) is still pending on this head, so the whole core suite hasn't run anywhere yet.

Thanks: the core is careful (the checks on fake tags, nothing written over, read-only commands, `AtomicFile`), and the folder rule matches the game's `hos_nfc_dir()` in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/280. **Must change:** dropping files on the NFC page looks refused by the window's own drag handler (inline on `Views.cs`). The PR advertises the drop, so this blocks. **Should change:** the "first 256 by name" note doesn't match how the game in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/280 caps the list. Adding a folder runs on the window's thread. **Nits:** inline. CI: run 166 (`Compile and test`, `Conventional Commit title`) is still pending on this head, so the whole core suite hasn't run anywhere yet.
@ -0,0 +86,4 @@
}
/// (the game takes the first 256 by name: said once there are more)
public bool TooMany => Rows.Count(r => r.Valid) > NfcTags.Most;
Owner

As written in MagicBeanDev/Longshot#280, the game doesn't take "the first 256 by name". add_file() stops at NFC_MAX while the folder is still being read, and only then does list_files() qsort it, so past 256 the game keeps whichever 256 the directory gave it first. It also counts every .bin/.nfc that isn't a key_ file, dumps or not, while TooMany counts Valid rows only.

The right fix is in the game: sort first, then cap. After that, this should count every row, not only the valid ones (or the game should skip non-dumps before capping). Either way, this text, NfcTags.Most's comment and docs/nfc.md ("uses the first 256") should say what the game really does.

As written in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/280, the game doesn't take "the first 256 by name". `add_file()` stops at `NFC_MAX` while the folder is still being read, and only then does `list_files()` `qsort` it, so past 256 the game keeps whichever 256 the directory gave it first. It also counts every `.bin`/`.nfc` that isn't a `key_` file, dumps or not, while `TooMany` counts `Valid` rows only. The right fix is in the game: sort first, then cap. After that, this should count every row, not only the valid ones (or the game should skip non-dumps before capping). Either way, this text, `NfcTags.Most`'s comment and docs/nfc.md ("uses the first 256") should say what the game really does.
@ -0,0 +192,4 @@
return;
}
IReadOnlyList<NfcTagAdded> done;
try { done = NfcTags.Add(Folder, files); }
Owner

NfcTags.Add, and NfcTags.FilesUnder in AddFolderAsync/AddDropped, run on the window's thread. A player who picks a big folder (Downloads, a whole drive, a OneDrive folder) gets a frozen window while it is walked recursively and every candidate is read. Suggest doing the enumeration and the copies in Task.Run, as ScanAsync already does, with the buttons off while it runs.

`NfcTags.Add`, and `NfcTags.FilesUnder` in `AddFolderAsync`/`AddDropped`, run on the window's thread. A player who picks a big folder (Downloads, a whole drive, a OneDrive folder) gets a frozen window while it is walked recursively and every candidate is read. Suggest doing the enumeration and the copies in `Task.Run`, as `ScanAsync` already does, with the buttons off while it runs.
@ -0,0 +239,4 @@
},
};
}
catch (Exception e) when (e is DllNotFoundException or EntryPointNotFoundException or IOException)
Owner

Nit: anything else thrown on the scan's thread, such as a Win32Exception/SecurityException from the registry read in Guids() or an SEHException from a P/Invoke, faults the discarded _ = ScanAsync() task. The player then sees the spinner disappear with no message. A final catch (Exception e) that puts e.Message in Report would cover that.

Nit: anything else thrown on the scan's thread, such as a `Win32Exception`/`SecurityException` from the registry read in `Guids()` or an `SEHException` from a P/Invoke, faults the discarded `_ = ScanAsync()` task. The player then sees the spinner disappear with no message. A final `catch (Exception e)` that puts `e.Message` in `Report` would cover that.
@ -86,0 +93,4 @@
{
InitializeComponent();
DragDrop.SetAllowDrop(this, true);
AddHandler(DragDrop.DragOverEvent, (_, e) => e.DragEffects = DragDropEffects.Copy);
Owner

This handler won't be the last to set DragEffects. DragOver bubbles from here up to MainWindow, whose own DragEnter/DragOver handler (MainWindow.axaml.cs, Drag(e, true)) runs after this one and sets e.DragEffects = DragDropEffects.None, because MainViewModel.AcceptsDrop is page is FilesStepViewModel only. When the last effect is None, the OS (OLE on Windows, XDND on X11) treats the target as refusing the drop and doesn't deliver Drop, so AddDropped shouldn't be reached, and the cursor shows "no drop" over the page.

If you did see a drop work, please say on which OS. Otherwise, the smallest fix that keeps one path for drops: remove these two handlers, make AcceptsDrop => page is FilesStepViewModel or NfcViewModel, and have MainViewModel.Drop call nfc.AddDropped(paths) for that page. (Check that the window's "drop here" overlay text, if it names game files, fits this page too.)

This handler won't be the last to set `DragEffects`. `DragOver` bubbles from here up to `MainWindow`, whose own `DragEnter`/`DragOver` handler (`MainWindow.axaml.cs`, `Drag(e, true)`) runs after this one and sets `e.DragEffects = DragDropEffects.None`, because `MainViewModel.AcceptsDrop` is `page is FilesStepViewModel` only. When the last effect is None, the OS (OLE on Windows, XDND on X11) treats the target as refusing the drop and doesn't deliver `Drop`, so `AddDropped` shouldn't be reached, and the cursor shows "no drop" over the page. If you did see a drop work, please say on which OS. Otherwise, the smallest fix that keeps one path for drops: remove these two handlers, make `AcceptsDrop => page is FilesStepViewModel or NfcViewModel`, and have `MainViewModel.Drop` call `nfc.AddDropped(paths)` for that page. (Check that the window's "drop here" overlay text, if it names game files, fits this page too.)
Core/NfcTags.cs Outdated
@ -0,0 +40,4 @@
public static string Folder(Platform platform, Func<string, string?>? getenv = null)
{
getenv ??= Environment.GetEnvironmentVariable;
if (getenv(Variable) is { Length: > 0 } set) return Path.GetFullPath(set);
Owner

Nit: Path.GetFullPath(set) resolves a relative LONGSHOT_NFC_DIR against the launcher's current directory. The game uses it as given, and MakeGameCommand starts the game with WorkingDirectory = folder (the build's folder), so with a relative value the page and the game would use different folders. Either leave a relative value as it is and say in docs/nfc.md that it must be absolute, or refuse a relative one.

Nit: `Path.GetFullPath(set)` resolves a relative `LONGSHOT_NFC_DIR` against the launcher's current directory. The game uses it as given, and `MakeGameCommand` starts the game with `WorkingDirectory = folder` (the build's folder), so with a relative value the page and the game would use different folders. Either leave a relative value as it is and say in docs/nfc.md that it must be absolute, or refuse a relative one.
fix(nfc): drops go through the window, adding runs off its thread, the 256 note says what the game does
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
2644cdc096
- Dropping files on the NFC page: the window's drag handler set the effect back to None (AcceptsDrop was step 1's only), so
  the drop was refused. The page's own handlers are gone; AcceptsDrop takes the NFC page and MainViewModel.Drop hands its
  drops to AddDropped. The overlay names what each page takes (DropText).
- Adding files, a folder or a drop finds and copies them in Task.Run, back on the window's thread for the result; the add
  buttons and Delete selected are off meanwhile, with a spinner and how far it is.
- The 256 note, NfcTags.Most and docs/nfc.md say what host/nn_nfp.c in Longshot's PR 280 does today: it stops at 256 while
  reading the folder, then sorts, and counts files that are not dumps too. TooMany counts every row.
- The scan shows anything else it throws, not only the few it caught.
- A relative LONGSHOT_NFC_DIR is resolved against the default build's folder, where the game is started, as the game reads
  it; with no build, left aside. Checks for it.

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

Pushed 2644cdc0 on top of 5c1c0366, one commit for the points of the review (#49 (comment)). Not rebased: main's only new commit (README's Discord link) doesn't conflict.

  1. Drop (must). NfcView's own DragOver/Drop handlers are removed. MainViewModel.AcceptsDrop is now page is FilesStepViewModel or NfcViewModel, and MainViewModel.Drop hands the NFC page's drops to NfcViewModel.AddDropped, so there is one path for drops. The window's overlay text was step 1's ("Drop your game file to check it"): it's now DropText, which says "Drop NFC tag dumps, or folders of them, to add them" on this page. Page raises AcceptsDrop/DropText when it changes.
  2. The 256 note (should). TooManyText, NfcTags.Most's comment and docs/nfc.md now say what host/nn_nfp.c at MagicBeanDev/Longshot#280's head (ea2cbd4b) does: add_file() stops at 256 while the folder is still being read and list_files() sorts only after that, so past 256 the game keeps whichever files the folder gave it first. It counts every .bin/.nfc that isn't a key_ file, including files that aren't dumps. TooMany now counts every row (Rows.Count), the same files the game counts. The fix belongs in the game (sort, then cap) in MagicBeanDev/Longshot#280; Longshot isn't changed here. Once it's in, the text can say "the first 256 by name" again.
  3. Adding froze the window (should). Add files, Add a folder and a drop now share AddAsync. It runs the search (FilesUnder, recursive) and the copies (NfcTags.Add) in Task.Run and returns to the window's thread for the report, the toast and Reload. While it runs, Adding turns off Add files…, Add a folder… and Delete selected. A card with a spinner shows "Adding 40 of 120 files…", updated every 20 files through Ui.Post. A late update is dropped once that add is over. Any other exception is caught and shown on the page, and the busy flag is cleared in finally.
  4. Scan errors (nit). ScanAsync now ends with catch (OperationCanceledException) {} and a catch (Exception e) that puts "The scan stopped: …" in Report.
  5. Relative LONGSHOT_NFC_DIR (nit). The game uses the value as given and is started in the build's folder, so NfcTags.Folder takes an optional gameFolder. A fully qualified value is used as before. A relative one is resolved against gameFolder, and the page passes the default build's folder. With no build yet, a relative value is ignored and the usual folder is used. docs/nfc.md and the README say to give it as a full path. NfcChecks has three new checks: relative with a build, relative with none, and full with a build.

Something else I found, not changed here: on Linux, GamePlay.Environment removes every LONGSHOT_* variable before it starts the game (Dropped, the same as make_game's GAME_ENV_DROP). So LONGSHOT_NFC_DIR set for the launcher never reaches a game the launcher starts on Linux: the page would use that folder and the game the default one. The README's "for the game and the launcher alike" isn't true there yet. Either let LONGSHOT_NFC_DIR through or say so in the docs. That's for you to decide.

Not built or tested: nothing was built, run or tested on this PC (no dotnet, no checks). The C# was checked by reading only. CI is the first build. Drag and drop needs a run on both Windows and Linux (drag files and a folder onto the NFC page, then onto step 1), and so does adding a big folder (the window should stay responsive and the progress should move). The description's "110 checks" is now 113.

Pushed 2644cdc0 on top of 5c1c0366, one commit for the points of the review (https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/49#issuecomment-15456). Not rebased: main's only new commit (README's Discord link) doesn't conflict. 1. **Drop (must).** `NfcView`'s own `DragOver`/`Drop` handlers are removed. `MainViewModel.AcceptsDrop` is now `page is FilesStepViewModel or NfcViewModel`, and `MainViewModel.Drop` hands the NFC page's drops to `NfcViewModel.AddDropped`, so there is one path for drops. The window's overlay text was step 1's ("Drop your game file to check it"): it's now `DropText`, which says "Drop NFC tag dumps, or folders of them, to add them" on this page. `Page` raises `AcceptsDrop`/`DropText` when it changes. 2. **The 256 note (should).** `TooManyText`, `NfcTags.Most`'s comment and docs/nfc.md now say what `host/nn_nfp.c` at https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/280's head (ea2cbd4b) does: `add_file()` stops at 256 while the folder is still being read and `list_files()` sorts only after that, so past 256 the game keeps whichever files the folder gave it first. It counts every `.bin`/`.nfc` that isn't a `key_` file, including files that aren't dumps. `TooMany` now counts every row (`Rows.Count`), the same files the game counts. The fix belongs in the game (sort, then cap) in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/280; Longshot isn't changed here. Once it's in, the text can say "the first 256 by name" again. 3. **Adding froze the window (should).** Add files, Add a folder and a drop now share `AddAsync`. It runs the search (`FilesUnder`, recursive) and the copies (`NfcTags.Add`) in `Task.Run` and returns to the window's thread for the report, the toast and `Reload`. While it runs, `Adding` turns off *Add files…*, *Add a folder…* and *Delete selected*. A card with a spinner shows "Adding 40 of 120 files…", updated every 20 files through `Ui.Post`. A late update is dropped once that add is over. Any other exception is caught and shown on the page, and the busy flag is cleared in `finally`. 4. **Scan errors (nit).** `ScanAsync` now ends with `catch (OperationCanceledException) {}` and a `catch (Exception e)` that puts "The scan stopped: …" in `Report`. 5. **Relative `LONGSHOT_NFC_DIR` (nit).** The game uses the value as given and is started in the build's folder, so `NfcTags.Folder` takes an optional `gameFolder`. A fully qualified value is used as before. A relative one is resolved against `gameFolder`, and the page passes the default build's folder. With no build yet, a relative value is ignored and the usual folder is used. docs/nfc.md and the README say to give it as a full path. `NfcChecks` has three new checks: relative with a build, relative with none, and full with a build. Something else I found, not changed here: on Linux, `GamePlay.Environment` removes every `LONGSHOT_*` variable before it starts the game (`Dropped`, the same as make_game's `GAME_ENV_DROP`). So `LONGSHOT_NFC_DIR` set for the launcher never reaches a game the launcher starts on Linux: the page would use that folder and the game the default one. The README's "for the game and the launcher alike" isn't true there yet. Either let `LONGSHOT_NFC_DIR` through or say so in the docs. That's for you to decide. **Not built or tested:** nothing was built, run or tested on this PC (no `dotnet`, no checks). The C# was checked by reading only. CI is the first build. Drag and drop needs a run on both Windows and Linux (drag files and a folder onto the NFC page, then onto step 1), and so does adding a big folder (the window should stay responsive and the progress should move). The description's "110 checks" is now 113.
HumanBean left a comment

Re-review of 2644cdc0 only (the fix commit on top of 5c1c0366), by reading: nothing was built or run here.

Resolved from the last review (#49 (comment)):

  • Drop: with NfcView's handlers gone, the window's own DragEnter/DragOver (the window has DragDrop.AllowDrop="True") give Copy through AcceptsDrop, which now takes the NFC page, and Drop hands the paths to AddDropped. The overlay binds Dropping and DropText, both raised on page change. Step 1's path is unchanged.
  • Threading: AddAsync starts on the window's thread (a command or the window's drop handler), so every Report/Reload/ShowToast after an await is back on it. Only find, NfcTags.Add and the lazy counted run in Task.Run, and counted touches nothing but Ui.Post. SetAdding(false) is in finally, so the buttons come back on every path.
  • 256: TooMany (Rows.Count, from FilesIn/IsCandidate) and the texts match host/nn_nfp.c at MagicBeanDev/Longshot#280's head (ea2cbd4b): add_file() stops at NFC_MAX while the folder is read, qsort runs after it, and key_ is skipped regardless of case.
  • Relative LONGSHOT_NFC_DIR: hos_nfc_dir() uses the value as given and GamePlay.StartInfo sets WorkingDirectory = folder, so resolving it against the build's folder is right on Windows. A new NfcViewModel is made on each ShowNfc, so Folder doesn't go stale.
  • Scan: OperationCanceledException and a final catch (Exception) are in place. The earlier filtered catches don't make them unreachable.
  • Compiles by reading: the members it uses all exist (Home.Default?.Entry.Folder, Ui.Post, Command.Changed, ShownPath.Of(string?), NfcTags.Add(string, IEnumerable<string>), the c: namespace for Spinner). The three new checks are in the existing NfcChecks(), next to the other folder checks, and match the code.

Must change: on Linux, GamePlay.Environment drops every LONGSHOT_* variable before it starts the game, so a LONGSHOT_NFC_DIR set for the launcher never reaches the game. The page then shows and fills one folder while the game reads the default one. The README ("for the game and the launcher alike"), the Either row in docs/nfc.md and the new paragraph on relative paths all describe a behaviour that isn't true on Linux. Comments inline.

Nit: inline.

CI: "Compile and test" was skipped on 2644cdc0 (run 175; only "Conventional Commit title" ran), so nothing has compiled this commit yet. It still needs that, and a drag-and-drop run on Windows and Linux.

Re-review of 2644cdc0 only (the fix commit on top of 5c1c0366), by reading: nothing was built or run here. **Resolved from the last review** (https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/49#issuecomment-15456): - **Drop:** with `NfcView`'s handlers gone, the window's own `DragEnter`/`DragOver` (the window has `DragDrop.AllowDrop="True"`) give Copy through `AcceptsDrop`, which now takes the NFC page, and `Drop` hands the paths to `AddDropped`. The overlay binds `Dropping` and `DropText`, both raised on page change. Step 1's path is unchanged. - **Threading:** `AddAsync` starts on the window's thread (a command or the window's drop handler), so every `Report`/`Reload`/`ShowToast` after an `await` is back on it. Only `find`, `NfcTags.Add` and the lazy `counted` run in `Task.Run`, and `counted` touches nothing but `Ui.Post`. `SetAdding(false)` is in `finally`, so the buttons come back on every path. - **256:** `TooMany` (`Rows.Count`, from `FilesIn`/`IsCandidate`) and the texts match `host/nn_nfp.c` at https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/280's head (ea2cbd4b): `add_file()` stops at `NFC_MAX` while the folder is read, `qsort` runs after it, and `key_` is skipped regardless of case. - **Relative `LONGSHOT_NFC_DIR`:** `hos_nfc_dir()` uses the value as given and `GamePlay.StartInfo` sets `WorkingDirectory = folder`, so resolving it against the build's folder is right on Windows. A new `NfcViewModel` is made on each `ShowNfc`, so `Folder` doesn't go stale. - **Scan:** `OperationCanceledException` and a final `catch (Exception)` are in place. The earlier filtered catches don't make them unreachable. - **Compiles by reading:** the members it uses all exist (`Home.Default?.Entry.Folder`, `Ui.Post`, `Command.Changed`, `ShownPath.Of(string?)`, `NfcTags.Add(string, IEnumerable<string>)`, the `c:` namespace for `Spinner`). The three new checks are in the existing `NfcChecks()`, next to the other folder checks, and match the code. **Must change:** on Linux, `GamePlay.Environment` drops every `LONGSHOT_*` variable before it starts the game, so a `LONGSHOT_NFC_DIR` set for the launcher never reaches the game. The page then shows and fills one folder while the game reads the default one. The README ("for the game and the launcher alike"), the *Either* row in docs/nfc.md and the new paragraph on relative paths all describe a behaviour that isn't true on Linux. Comments inline. **Nit:** inline. **CI:** "Compile and test" was **skipped** on 2644cdc0 (run 175; only "Conventional Commit title" ran), so nothing has compiled this commit yet. It still needs that, and a drag-and-drop run on Windows and Linux.
@ -0,0 +197,4 @@
/// in a toast, and on the page each file skipped or renamed, with why. None: says `none`
async Task AddAsync(Func<IReadOnlyList<string>> find, string none, string? from = null)
{
if (Adding) return;
Owner

Nit: a drop while an add is running still shows the "Drop NFC tag dumps… to add them" overlay (AcceptsDrop doesn't look at Adding), and then the drop ends here and nothing is said. Either make AcceptsDrop false while nfc.Adding (and raise it from SetAdding), or put a line in Report/a toast such as "Still adding the last files: drop these again once it is done."

Nit: a drop while an add is running still shows the "Drop NFC tag dumps… to add them" overlay (`AcceptsDrop` doesn't look at `Adding`), and then the drop ends here and nothing is said. Either make `AcceptsDrop` false while `nfc.Adding` (and raise it from `SetAdding`), or put a line in `Report`/a toast such as "Still adding the last files: drop these again once it is done."
README.md Outdated
@ -214,3 +227,4 @@
| | |
|---|---|
| `LONGSHOT_NFC_DIR=<folder>` | The NFC folder somewhere else (a full path), for the game and the launcher alike ([docs/nfc.md](docs/nfc.md)) |
Owner

Not true on Linux yet: GamePlay.Environment (Core/MakeGameCommand.cs, Dropped = "LONGSHOT_", …) removes this variable before the game starts, so there the launcher and the game read different folders. Either let it through (e.g. && kv.Key != NfcTags.Variable beside the Dropped test, plus a check in the launcher core tests that GamePlay.Environment(Platform.Linux, …) keeps it) or say here and in docs/nfc.md that it only reaches the game on Windows. Letting it through looks like the better fix, since the page is built on the two sharing one folder.

Not true on Linux yet: `GamePlay.Environment` (Core/MakeGameCommand.cs, `Dropped` = `"LONGSHOT_"`, …) removes this variable before the game starts, so there the launcher and the game read different folders. Either let it through (e.g. `&& kv.Key != NfcTags.Variable` beside the `Dropped` test, plus a check in the launcher core tests that `GamePlay.Environment(Platform.Linux, …)` keeps it) or say here and in docs/nfc.md that it only reaches the game on Windows. Letting it through looks like the better fix, since the page is built on the two sharing one folder.
docs/nfc.md Outdated
@ -0,0 +15,4 @@
|---|---|
| Windows | `%LOCALAPPDATA%\Longshot\nfc` |
| Linux and Steam Deck | `$XDG_DATA_HOME/longshot/nfc` (default `~/.local/share/longshot/nfc`) |
| Either | `LONGSHOT_NFC_DIR=<folder>`, when it is set and not empty, instead |
Owner

Same as the README: on Linux a game started by the launcher never sees LONGSHOT_NFC_DIR (it is stripped with the other LONGSHOT_* variables), so Either only holds on Windows today. This also applies to the relative-path paragraph below it.

Same as the README: on Linux a game started by the launcher never sees `LONGSHOT_NFC_DIR` (it is stripped with the other `LONGSHOT_*` variables), so *Either* only holds on Windows today. This also applies to the relative-path paragraph below it.
Main's #52 (Hookshot settings and NX2navi import) and this branch each added a line at the same three places: the
dialogs' data templates (MainWindow.axaml), the views (Views.cs) and the core checks' list (Program.cs). Both lines kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(nfc): the game started on Linux keeps LONGSHOT_NFC_DIR; no drop while an add is running
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 5s
c3a934cd11
- GamePlay.Environment drops the launcher's LONGSHOT_ variables on Linux before it starts the game (make_game's
  GAME_ENV_DROP), so a LONGSHOT_NFC_DIR set for the launcher never reached the game: the page and the game read different
  folders. It now lets NfcTags.Variable through, and NfcChecks checks that Play keeps it on Linux (and still drops the
  others). The README and docs/nfc.md say the launcher passes it on, on both systems, and the relative-path paragraph says
  the game is started in the build's folder on both.
- MainViewModel.AcceptsDrop is false while the NFC page is still adding (NfcViewModel.Adding, raised from SetAdding), so the
  window no longer shows the drop overlay for a drop that the page would then ignore without a word. docs/nfc.md says so.

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

Pushed 77867988 and c3a934cd on top of 2644cdc0, for the points of the second review (the request for changes on 2644cdc0) and to bring the branch up to date with main. main is merged in, not rebased; nothing was force-pushed.

  1. Main merged in (77867988). The PR no longer merged cleanly: main's #52 (Hookshot settings and the NX2navi import) added a line at the same three places as this branch, the dialogs' data templates in App/MainWindow.axaml, the views in App/Views/Views.cs and the core checks' list in tests/launcher_core/Program.cs. Each conflict kept both lines; nothing else needed a hand.
  2. LONGSHOT_NFC_DIR on Linux (must, c3a934cd). Let through, as suggested: GamePlay.Environment keeps NfcTags.Variable beside the Dropped test, so the game the launcher starts on Linux reads the same folder as the page; every other LONGSHOT_* variable is still dropped. A new check in NfcChecks() (next to the folder checks) gives GamePlay.Environment(Platform.Linux, …) LONGSHOT_NFC_DIR, a LONGSHOT_NFC_DIRS and LONGSHOT_TOOLS: the first is kept, the other two dropped, and Windows keeps it too. With the change taken out, that check fails. The README's environment row and docs/nfc.md now say the launcher passes it on to the game on both systems (a short paragraph under the Either row), and the relative-path paragraph says the game is started in the build's folder on both.
  3. Drop while adding (nit, c3a934cd). MainViewModel.AcceptsDrop is now page is FilesStepViewModel or NfcViewModel { Adding: false }, and SetAdding raises it (Main.RaiseAcceptsDrop()). While an add runs, the window's Drag sets the effect to None and hides the overlay, so the cursor shows "no drop" instead of a drop that ends silently. docs/nfc.md's Adding says so.

Tested (Linux, .NET SDK 10.0.404), at c3a934cd:

  • dotnet build LongshotLauncher.slnx: 0 errors (Debug, and Release with -p:RestoreLockedMode=true as CI). One warning, AVLN5001 on BuildStepView.axaml's Watermark, a file this PR doesn't touch.
  • The whole tests/test_launcher_core.py --strict --longshot <Longshot main at f87557ae>: launcher core: 929 checks passed. No failure, so nothing to compare against main.
  • tests/test_release.py: 28 tests OK.
  • The description's testing section has a line for this run.

Not tested: no window was opened, so the NFC page, drag and drop (including the refused drop while adding) and adding a big folder still need a run on Windows and Linux. CI on c3a934cd is the next check.

Pushed 77867988 and c3a934cd on top of 2644cdc0, for the points of the second review (the request for changes on 2644cdc0) and to bring the branch up to date with main. main is merged in, not rebased; nothing was force-pushed. 0. **Main merged in (77867988).** The PR no longer merged cleanly: main's #52 (Hookshot settings and the NX2navi import) added a line at the same three places as this branch, the dialogs' data templates in `App/MainWindow.axaml`, the views in `App/Views/Views.cs` and the core checks' list in `tests/launcher_core/Program.cs`. Each conflict kept both lines; nothing else needed a hand. 1. **`LONGSHOT_NFC_DIR` on Linux (must, c3a934cd).** Let through, as suggested: `GamePlay.Environment` keeps `NfcTags.Variable` beside the `Dropped` test, so the game the launcher starts on Linux reads the same folder as the page; every other `LONGSHOT_*` variable is still dropped. A new check in `NfcChecks()` (next to the folder checks) gives `GamePlay.Environment(Platform.Linux, …)` `LONGSHOT_NFC_DIR`, a `LONGSHOT_NFC_DIRS` and `LONGSHOT_TOOLS`: the first is kept, the other two dropped, and Windows keeps it too. With the change taken out, that check fails. The README's environment row and docs/nfc.md now say the launcher passes it on to the game on both systems (a short paragraph under the *Either* row), and the relative-path paragraph says the game is started in the build's folder on both. 2. **Drop while adding (nit, c3a934cd).** `MainViewModel.AcceptsDrop` is now `page is FilesStepViewModel or NfcViewModel { Adding: false }`, and `SetAdding` raises it (`Main.RaiseAcceptsDrop()`). While an add runs, the window's `Drag` sets the effect to None and hides the overlay, so the cursor shows "no drop" instead of a drop that ends silently. docs/nfc.md's *Adding* says so. **Tested (Linux, .NET SDK 10.0.404), at c3a934cd:** - `dotnet build LongshotLauncher.slnx`: 0 errors (Debug, and Release with `-p:RestoreLockedMode=true` as CI). One warning, `AVLN5001` on `BuildStepView.axaml`'s `Watermark`, a file this PR doesn't touch. - The whole `tests/test_launcher_core.py --strict --longshot <Longshot main at f87557ae>`: `launcher core: 929 checks passed`. No failure, so nothing to compare against main. - `tests/test_release.py`: 28 tests OK. - The description's testing section has a line for this run. **Not tested:** no window was opened, so the NFC page, drag and drop (including the refused drop while adding) and adding a big folder still need a run on Windows and Linux. CI on c3a934cd is the next check.
HumanBean left a comment

Re-review of the whole PR against main at c3a934cd (main c5440787 merged in at 77867988), built and run here on Linux.

Resolved from the last review (the request for changes on 2644cdc0):

  • LONGSHOT_NFC_DIR on Linux: GamePlay.Environment keeps NfcTags.Variable and still drops every other LONGSHOT_* (LONGSHOT_NFC_DIRS too: the test is an exact key, not a prefix). The new check in NfcChecks() covers Linux and Windows. The README row, docs/nfc.md's paragraph under Either and the relative-path paragraph now match the code.
  • Drop while adding: AcceptsDrop is false while Adding, SetAdding raises it, and the window's Drag reads it on every DragOver, so the effect is None and the overlay hidden for the whole add. docs/nfc.md's Adding says so.
  • The merge: the three conflicts (MainWindow.axaml's dialog templates, Views.cs, the core checks' list in Program.cs) each keep both lines, and the merge changes nothing else (jj diff -r 77867988 shows only those three).

The rest holds up: the files are only ever added through Place (exists check, then AtomicFile), deletes are limited to .bin/.nfc names directly in the folder, the reader can't build 0x08/0x14, and the controller's answers and the .bin/.nfc parsing are bounded (size checked before reading, 1 MB cap on .nfc, page numbers checked, buffer capped at 4 KB).

Must change: adding a folder follows directory symlinks on Linux, so a symlink loop makes the walk effectively endless (inline on FilesUnder).

Nit: inline.

Tested (Linux, .NET SDK 10.0.404, at c3a934cd): dotnet build LongshotLauncher.slnx 0 errors (Debug, and Release with -p:RestoreLockedMode=true as CI; the one warning is AVLN5001 in BuildStepView.axaml, not this PR's). tests/test_launcher_core.py --strict --longshot <Longshot main at f87557a>: launcher core: 929 checks passed. tests/test_release.py: 28 OK. No window was opened.

CI: on c3a934cd only "Conventional Commit title" ran (success). "Compile and test" is skipped on every pull request by design (ci.yml: if: github.event_name != 'pull_request'), so the runs above are the only build of this head.

Description: "110 checks" and "NFC ONLY: 110 checks passed" are from 5c1c0366; there are more NFC checks now. Worth a word that those lines are from the first commit.

Re-review of the whole PR against main at c3a934cd (main c5440787 merged in at 77867988), built and run here on Linux. **Resolved from the last review** (the request for changes on 2644cdc0): - **`LONGSHOT_NFC_DIR` on Linux:** `GamePlay.Environment` keeps `NfcTags.Variable` and still drops every other `LONGSHOT_*` (`LONGSHOT_NFC_DIRS` too: the test is an exact key, not a prefix). The new check in `NfcChecks()` covers Linux and Windows. The README row, docs/nfc.md's paragraph under *Either* and the relative-path paragraph now match the code. - **Drop while adding:** `AcceptsDrop` is false while `Adding`, `SetAdding` raises it, and the window's `Drag` reads it on every `DragOver`, so the effect is None and the overlay hidden for the whole add. docs/nfc.md's *Adding* says so. - **The merge:** the three conflicts (`MainWindow.axaml`'s dialog templates, `Views.cs`, the core checks' list in `Program.cs`) each keep both lines, and the merge changes nothing else (`jj diff -r 77867988` shows only those three). The rest holds up: the files are only ever added through `Place` (exists check, then `AtomicFile`), deletes are limited to `.bin`/`.nfc` names directly in the folder, the reader can't build `0x08`/`0x14`, and the controller's answers and the `.bin`/`.nfc` parsing are bounded (size checked before reading, 1 MB cap on `.nfc`, page numbers checked, buffer capped at 4 KB). **Must change:** adding a folder follows directory symlinks on Linux, so a symlink loop makes the walk effectively endless (inline on `FilesUnder`). **Nit:** inline. **Tested** (Linux, .NET SDK 10.0.404, at c3a934cd): `dotnet build LongshotLauncher.slnx` 0 errors (Debug, and Release with `-p:RestoreLockedMode=true` as CI; the one warning is `AVLN5001` in `BuildStepView.axaml`, not this PR's). `tests/test_launcher_core.py --strict --longshot <Longshot main at f87557a>`: `launcher core: 929 checks passed`. `tests/test_release.py`: 28 OK. No window was opened. **CI:** on c3a934cd only "Conventional Commit title" ran (success). "Compile and test" is skipped on every pull request by design (`ci.yml`: `if: github.event_name != 'pull_request'`), so the runs above are the only build of this head. **Description:** "110 checks" and "NFC ONLY: 110 checks passed" are from 5c1c0366; there are more NFC checks now. Worth a word that those lines are from the first commit.
Core/NfcTags.cs Outdated
@ -0,0 +202,4 @@
public static IReadOnlyList<string> FilesUnder(string folder)
{
if (!Directory.Exists(folder)) return Array.Empty<string>();
var all = new EnumerationOptions { RecurseSubdirectories = true, IgnoreInaccessible = true, AttributesToSkip = FileAttributes.System };
Owner

On Linux RecurseSubdirectories follows symlinks to folders. I checked with .NET 10 here: a folder with one .. symlink is walked about 40 levels deep (until ELOOP), and with two such symlinks the walk grows as 2^depth and doesn't finish. That isn't exotic on Linux or a Steam Deck: every Wine/Proton prefix has dosdevices/z: -> /, so Add a folder on the home folder or a drive (the case review 1 asked to keep responsive) never ends. The window stays responsive, but Adding stays on with no way to cancel (leaving the page doesn't stop it), ToList() keeps growing, and the page takes no more adds or drops.

Smallest fix: AttributesToSkip = FileAttributes.System | FileAttributes.ReparsePoint. I checked that this stops the loop on Linux (symlinks report ReparsePoint there). It also skips a symlinked .bin, which seems fine for a copy; otherwise set a MaxRecursionDepth. Please add a check with a loop of two symlinks to the parent folder, on Linux only.

On Linux `RecurseSubdirectories` follows symlinks to folders. I checked with .NET 10 here: a folder with one `.. ` symlink is walked about 40 levels deep (until `ELOOP`), and with two such symlinks the walk grows as 2^depth and doesn't finish. That isn't exotic on Linux or a Steam Deck: every Wine/Proton prefix has `dosdevices/z: -> /`, so *Add a folder* on the home folder or a drive (the case review 1 asked to keep responsive) never ends. The window stays responsive, but `Adding` stays on with no way to cancel (leaving the page doesn't stop it), `ToList()` keeps growing, and the page takes no more adds or drops. Smallest fix: `AttributesToSkip = FileAttributes.System | FileAttributes.ReparsePoint`. I checked that this stops the loop on Linux (symlinks report `ReparsePoint` there). It also skips a symlinked `.bin`, which seems fine for a copy; otherwise set a `MaxRecursionDepth`. Please add a check with a loop of two symlinks to the parent folder, on Linux only.
Core/NfcTags.cs Outdated
@ -0,0 +265,4 @@
if (Same(target, file)) return (NfcTagOutcome.Same, name);
continue;
}
AtomicFile.Write(target, file);
Owner

Nit: the never-overwrite rule depends on the File.Exists above, and AtomicFile.Write then moves with overwrite: true. Today an overwrite needs two writers to choose the same name, and Scan a tag isn't turned off while Adding. So a scan saved on the window's thread while an add runs in Task.Run can, in theory, pick the same Scanned <UID>.bin. That's unlikely, but a move without overwrite (catch IOException, try the next number) would make the guarantee hold by construction.

Nit: the never-overwrite rule depends on the `File.Exists` above, and `AtomicFile.Write` then moves with `overwrite: true`. Today an overwrite needs two writers to choose the same name, and *Scan a tag* isn't turned off while `Adding`. So a scan saved on the window's thread while an add runs in `Task.Run` can, in theory, pick the same `Scanned <UID>.bin`. That's unlikely, but a move without overwrite (catch `IOException`, try the next number) would make the guarantee hold by construction.
fix(nfc): adding a folder doesn't go into links to folders; a copy never replaces a file, even one that came meanwhile
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 5s
921ac74678
- NfcTags.FilesUnder walked with RecurseSubdirectories, which follows symlinks to folders on Linux: a link back up (a Wine or
  Proton prefix's dosdevices/z: is /) made Add a folder on the home folder or a drive endless, with Adding stuck on. It now
  walks the folders itself and doesn't go into a folder that is a link (a symlink, or a junction on Windows: LinkTarget, so
  OneDrive's not-downloaded folders, reparse points that are no link, are still walked). A link to a file is still taken.
  A Linux check with two links back up to the folder, which never ends without this.
- Place checked that a name was free, then AtomicFile moved over whatever was there. AtomicFile.WriteNew moves without
  overwrite: a file that took the name since the check (a scan saved while an add runs) is kept, and the copy goes on to
  the next number. A check for WriteNew.
- docs/nfc.md says both.

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

Pushed 921ac746 on top of c3a934cd, one commit for the points of the last review (#49 (comment)). Not rebased, nothing force-pushed.

  1. Symlink loops in Add a folder (must). NfcTags.FilesUnder no longer uses RecurseSubdirectories. It walks the folders itself with a stack, and it doesn't go into a subfolder that is a link: ReparsePoint and a non-null LinkTarget, so a symlink, or a junction on Windows. I kept symlinked files rather than skipping every reparse point. Two reasons: a symlinked .bin still gets added as that file, and OneDrive's cloud-only folders are reparse points without a LinkTarget, so AttributesToSkip |= ReparsePoint would have skipped them on Windows. A new Linux-only check makes a folder with two links back up to it (inner/up -> .. and inner/up again -> <folder>) and a symlinked .bin. The walk has to finish within 20 s and give exactly inner/deep.bin, linked.bin, top.bin. With the link test removed, the check fails ("the walk ends"). docs/nfc.md's Add a folder… says links to folders aren't followed and links to files are.
  2. Never overwrite, by construction (nit). AtomicFile has a new WriteNew: the same write, but File.Move(tmp, path, overwrite: false). It returns false when the name is taken by then, and the existing file is kept. Place uses it: if a file appeared after the File.Exists check (a scan saved during an add), it's either the same bytes (already there) or the copy goes on to the next number. AtomicFile.Write is unchanged for its other callers. A check: WriteNew over an existing file returns false and leaves its bytes, it works on a free name, and no .tmp is left behind. docs/nfc.md says the rename never replaces a file.
  3. Description (nit). "110 checks" is now "117 checks at 921ac746 (115 on Windows: two are Linux only)". The "NFC ONLY: 110 checks passed" line, the Windows build line and the author's folder-of-folders run are now marked as being from 5c1c0366 or before 921ac746. The Linux run line now has this commit's numbers.

Tested (Linux, .NET SDK 10.0.404), at 921ac746:

  • dotnet build LongshotLauncher.slnx: 0 errors, Debug and Release with -p:RestoreLockedMode=true. The only warning is still AVLN5001 in BuildStepView.axaml.
  • The whole tests/test_launcher_core.py --strict --longshot <Longshot main at f87557ae>: launcher core: 932 checks passed. The NFC checks are 117 of them, counted with a counter in an uncommitted copy of Main.
  • tests/test_release.py: 28 tests OK.

Not tested: no window was opened. The NFC page, drag and drop, and Add a folder on a real big folder (a home folder with a Proton prefix, a OneDrive folder on Windows) still need a run. The OneDrive point comes from how the Files On-Demand folders are marked, not from a run on Windows.

Pushed 921ac746 on top of c3a934cd, one commit for the points of the last review (https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/49#issuecomment-16294). Not rebased, nothing force-pushed. 1. **Symlink loops in *Add a folder* (must).** `NfcTags.FilesUnder` no longer uses `RecurseSubdirectories`. It walks the folders itself with a stack, and it doesn't go into a subfolder that is a link: `ReparsePoint` and a non-null `LinkTarget`, so a symlink, or a junction on Windows. I kept symlinked files rather than skipping every reparse point. Two reasons: a symlinked `.bin` still gets added as that file, and OneDrive's cloud-only folders are reparse points without a `LinkTarget`, so `AttributesToSkip |= ReparsePoint` would have skipped them on Windows. A new Linux-only check makes a folder with two links back up to it (`inner/up -> ..` and `inner/up again -> <folder>`) and a symlinked `.bin`. The walk has to finish within 20 s and give exactly `inner/deep.bin`, `linked.bin`, `top.bin`. With the link test removed, the check fails ("the walk ends"). docs/nfc.md's *Add a folder…* says links to folders aren't followed and links to files are. 2. **Never overwrite, by construction (nit).** `AtomicFile` has a new `WriteNew`: the same write, but `File.Move(tmp, path, overwrite: false)`. It returns false when the name is taken by then, and the existing file is kept. `Place` uses it: if a file appeared after the `File.Exists` check (a scan saved during an add), it's either the same bytes (*already there*) or the copy goes on to the next number. `AtomicFile.Write` is unchanged for its other callers. A check: `WriteNew` over an existing file returns false and leaves its bytes, it works on a free name, and no `.tmp` is left behind. docs/nfc.md says the rename never replaces a file. 3. **Description (nit).** "110 checks" is now "117 checks at 921ac746 (115 on Windows: two are Linux only)". The "NFC ONLY: 110 checks passed" line, the Windows build line and the author's folder-of-folders run are now marked as being from 5c1c0366 or before 921ac746. The Linux run line now has this commit's numbers. **Tested (Linux, .NET SDK 10.0.404), at 921ac746:** - `dotnet build LongshotLauncher.slnx`: 0 errors, Debug and Release with `-p:RestoreLockedMode=true`. The only warning is still `AVLN5001` in `BuildStepView.axaml`. - The whole `tests/test_launcher_core.py --strict --longshot <Longshot main at f87557ae>`: `launcher core: 932 checks passed`. The NFC checks are 117 of them, counted with a counter in an uncommitted copy of `Main`. - `tests/test_release.py`: 28 tests OK. **Not tested:** no window was opened. The NFC page, drag and drop, and *Add a folder* on a real big folder (a home folder with a Proton prefix, a OneDrive folder on Windows) still need a run. The OneDrive point comes from how the Files On-Demand folders are marked, not from a run on Windows.
HumanBean left a comment

Re-review of 921ac746 (the delta on c3a934cd and what it touches), built and run here on Linux.

Resolved from the last review (#49 (comment)):

  • Symlink loops: the walk now ends. With RecurseSubdirectories = false, a symlinked folder appears in EnumerateDirectories with Directory, ReparsePoint and a LinkTarget, and isn't pushed; the new check covers two links back up. A file symlink can't make the walk loop, because files are only listed, never gone into. A file link that loops on itself or is dangling is listed, then refused when it's read (Add catches the IOException). The OneDrive reasoning holds: .NET's LinkTarget is non-null only for symlink and mount-point (junction) reparse tags and null for the cloud-file tags, so junctions and directory symlinks are skipped and Files On-Demand folders are walked. I couldn't run that on Windows; it's from the API's behaviour.
  • WriteNew: right on both systems. File.Move(..., overwrite: false) maps to MoveFileEx without MOVEFILE_REPLACE_EXISTING on Windows, and on Linux .NET uses link then unlink, which fails with EEXIST atomically. Here a move onto an existing file throws IOException, the target keeps its bytes and the source stays in place. The finally still removes the temp file. Place then reports already there or goes on to the next number, and Write's other callers are unchanged.

Must change: a symlinked .bin is listed but then refused, so "a link to a file is taken, as the file" (the FilesUnder comment, docs/nfc.md, the check's message, and the reason given for not skipping every reparse point) isn't true for .bin. Inline.

Tested (Linux, .NET SDK 10.0.404, at 921ac746): dotnet build LongshotLauncher.slnx 0 errors in Debug, and in Release with -p:RestoreLockedMode=true as CI (only AVLN5001, as before). tests/test_launcher_core.py --strict --longshot <Longshot main at f87557a>: launcher core: 932 checks passed. tests/test_release.py: OK. I also ran NfcTags.Add on a symlinked .bin in a scratch program (below). CI on 921ac746: only the title check runs on pull requests (success); "Compile and test" is skipped by design.

The description's testing section matches what I ran.

Re-review of 921ac746 (the delta on c3a934cd and what it touches), built and run here on Linux. **Resolved from the last review** (https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/49#issuecomment-16294): - **Symlink loops:** the walk now ends. With `RecurseSubdirectories = false`, a symlinked folder appears in `EnumerateDirectories` with `Directory, ReparsePoint` and a `LinkTarget`, and isn't pushed; the new check covers two links back up. A file symlink can't make the walk loop, because files are only listed, never gone into. A file link that loops on itself or is dangling is listed, then refused when it's read (`Add` catches the `IOException`). The OneDrive reasoning holds: .NET's `LinkTarget` is non-null only for symlink and mount-point (junction) reparse tags and null for the cloud-file tags, so junctions and directory symlinks are skipped and Files On-Demand folders are walked. I couldn't run that on Windows; it's from the API's behaviour. - **`WriteNew`:** right on both systems. `File.Move(..., overwrite: false)` maps to `MoveFileEx` without `MOVEFILE_REPLACE_EXISTING` on Windows, and on Linux .NET uses `link` then `unlink`, which fails with `EEXIST` atomically. Here a move onto an existing file throws `IOException`, the target keeps its bytes and the source stays in place. The `finally` still removes the temp file. `Place` then reports *already there* or goes on to the next number, and `Write`'s other callers are unchanged. **Must change:** a symlinked `.bin` is listed but then refused, so "a link to a file is taken, as the file" (the `FilesUnder` comment, docs/nfc.md, the check's message, and the reason given for not skipping every reparse point) isn't true for `.bin`. Inline. **Tested** (Linux, .NET SDK 10.0.404, at 921ac746): `dotnet build LongshotLauncher.slnx` 0 errors in Debug, and in Release with `-p:RestoreLockedMode=true` as CI (only `AVLN5001`, as before). `tests/test_launcher_core.py --strict --longshot <Longshot main at f87557a>`: `launcher core: 932 checks passed`. `tests/test_release.py`: OK. I also ran `NfcTags.Add` on a symlinked `.bin` in a scratch program (below). CI on 921ac746: only the title check runs on pull requests (success); "Compile and test" is skipped by design. The description's testing section matches what I ran.
Core/NfcTags.cs Outdated
@ -0,0 +153,4 @@
static byte[]? Bytes(string path, out string? problem)
{
problem = null;
var size = new FileInfo(path).Length;
Owner

new FileInfo(path).Length is the link's own size, not its target's (lstat), so a symlinked .bin fails the size test here. I tried it with .NET 10 on Linux: NfcTags.Add(nfc, ["src/linked.bin"]), where linked.bin -> src/real.bin (a valid 540-byte fake tag), gives Refused: it is 56 bytes, and a .bin dump is 532, 540 or 572, and List marks it the same way. A .nfc link gets through, because ReadAllBytes follows it. On Windows a file symlink's Length is 0, so it's refused there too.

The new check only tests that FilesUnder lists linked.bin, so it doesn't catch this. Either follow the link for the size (for example var info = new FileInfo(path); if (info.LinkTarget != null) info = (FileInfo?)info.ResolveLinkTarget(true) ?? info;, where a looping link throws IOException, which the callers already catch), or read the bytes and test their length. Then extend the check to Add the linked file and expect Same/Added. Or, if links aren't worth it, drop the claim from the comment, docs/nfc.md and the check.

`new FileInfo(path).Length` is the link's own size, not its target's (`lstat`), so a symlinked `.bin` fails the size test here. I tried it with .NET 10 on Linux: `NfcTags.Add(nfc, ["src/linked.bin"])`, where `linked.bin -> src/real.bin` (a valid 540-byte fake tag), gives `Refused: it is 56 bytes, and a .bin dump is 532, 540 or 572`, and `List` marks it the same way. A `.nfc` link gets through, because `ReadAllBytes` follows it. On Windows a file symlink's `Length` is 0, so it's refused there too. The new check only tests that `FilesUnder` lists `linked.bin`, so it doesn't catch this. Either follow the link for the size (for example `var info = new FileInfo(path); if (info.LinkTarget != null) info = (FileInfo?)info.ResolveLinkTarget(true) ?? info;`, where a looping link throws `IOException`, which the callers already catch), or read the bytes and test their length. Then extend the check to `Add` the linked file and expect `Same`/`Added`. Or, if links aren't worth it, drop the claim from the comment, docs/nfc.md and the check.
fix(nfc): a linked .bin is taken: its size is what is read through the link, not the link's own
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
4c77d3c60e
NfcTags.Bytes tested new FileInfo(path).Length, which for a link to a file is the link's own size (a symlink's on Linux, 0 on
Windows), so a linked .bin was listed but refused. It now reads at most one byte past the largest a dump can be (573 bytes
for a .bin, 1 MB and one for a .nfc), through the link, and tests the length of what was read: the size cap holds, for a
linked .nfc too, which had got past it. Same compares the same way. The Linux check with the looping links now adds what the
walk found and expects the linked .bin added, as a copy of the file it leads to; and a .bin larger than any dump is refused.

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

Pushed 4c77d3c6 on top of 921ac746, one commit for the last review (#49 (comment)). Not rebased, nothing force-pushed.

A linked .bin was refused (must). NfcTags.Bytes no longer looks at FileInfo.Length. It reads at most one byte past the largest a dump can be (573 bytes for a .bin, 1 MB plus one for a .nfc) through a new ReadAtMost, which opens the file and so follows a link to the file it leads to. It then tests the length of what it read. So a linked .bin is sized as its target, and the size cap still holds without reading a large file whole. It now also holds for a linked .nfc, which used to get past the 1 MB cap because the link's own size was tested. A .bin larger than any dump now says "it is more than 572 bytes, …", since only 573 bytes are read. Same compares the same way, so a name taken by a link in the NFC folder is compared by what the link leads to. A link that loops or leads nowhere throws IOException when opened, and Add/List already catch that.

Checks. The Linux check with the two looping links now also passes what the walk found to NfcTags.Add in a fresh folder. It expects deep.bin, linked.bin and top.bin all Added, with linked.bin a plain copy holding the target's bytes, not a link. With the old size test (FileInfo.Length) put back, it fails with Refused it is 75 bytes, …. A new check, on both systems, refuses a 600-byte .bin as "more than 572 bytes". The FilesUnder comment, docs/nfc.md ("a link to a file is taken as that file") and the check's messages are now true for .bin too, so they are unchanged.

Tested (Linux, .NET SDK 10.0.404), at 4c77d3c6:

  • dotnet build LongshotLauncher.slnx: 0 errors, Debug and Release with -p:RestoreLockedMode=true. The only warning is still AVLN5001 in BuildStepView.axaml.
  • The whole tests/test_launcher_core.py --strict --longshot <Longshot main at f87557ae>: launcher core: 934 checks passed, 119 of them NFC checks (116 on Windows, where three are skipped).
  • tests/test_release.py: 28 tests OK.
  • The description's counts and the Linux run line now match this commit.

Not tested: no window was opened, and nothing ran on Windows: a file symlink there (a Length of 0) is covered by the same read, by reasoning only.

Pushed 4c77d3c6 on top of 921ac746, one commit for the last review (https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/49#issuecomment-16332). Not rebased, nothing force-pushed. **A linked `.bin` was refused (must).** `NfcTags.Bytes` no longer looks at `FileInfo.Length`. It reads at most one byte past the largest a dump can be (573 bytes for a `.bin`, 1 MB plus one for a `.nfc`) through a new `ReadAtMost`, which opens the file and so follows a link to the file it leads to. It then tests the length of what it read. So a linked `.bin` is sized as its target, and the size cap still holds without reading a large file whole. It now also holds for a linked `.nfc`, which used to get past the 1 MB cap because the link's own size was tested. A `.bin` larger than any dump now says "it is more than 572 bytes, …", since only 573 bytes are read. `Same` compares the same way, so a name taken by a link in the NFC folder is compared by what the link leads to. A link that loops or leads nowhere throws `IOException` when opened, and `Add`/`List` already catch that. **Checks.** The Linux check with the two looping links now also passes what the walk found to `NfcTags.Add` in a fresh folder. It expects `deep.bin`, `linked.bin` and `top.bin` all `Added`, with `linked.bin` a plain copy holding the target's bytes, not a link. With the old size test (`FileInfo.Length`) put back, it fails with `Refused it is 75 bytes, …`. A new check, on both systems, refuses a 600-byte `.bin` as "more than 572 bytes". The `FilesUnder` comment, docs/nfc.md ("a link to a file is taken as that file") and the check's messages are now true for `.bin` too, so they are unchanged. **Tested (Linux, .NET SDK 10.0.404), at 4c77d3c6:** - `dotnet build LongshotLauncher.slnx`: 0 errors, Debug and Release with `-p:RestoreLockedMode=true`. The only warning is still `AVLN5001` in `BuildStepView.axaml`. - The whole `tests/test_launcher_core.py --strict --longshot <Longshot main at f87557ae>`: `launcher core: 934 checks passed`, 119 of them NFC checks (116 on Windows, where three are skipped). - `tests/test_release.py`: 28 tests OK. - The description's counts and the Linux run line now match this commit. **Not tested:** no window was opened, and nothing ran on Windows: a file symlink there (a `Length` of 0) is covered by the same read, by reasoning only.
HumanBean approved these changes 2026-11-14 02:06:15 +00:00
Dismissed
HumanBean left a comment

Re-review of 4c77d3c6 (the delta on 921ac746), built and run here on Linux.

Resolved from the last review (#49 (comment)): a linked .bin is now read through the link and added as a copy, and the extended loop check runs Add on it.

ReadAtMost is right:

  • Each request is min(16 KB, most + 1 - read), so it never reads past most + 1. A short read just loops, and EOF ends the loop.
  • A file that grows while it is read still yields at most most + 1 bytes, which the size test then refuses. A file that shrinks yields what is there.
  • Opening fails with IOException (not found, a dangling or looping link) or UnauthorizedAccessException, and Describe and Add already catch both.
  • Same reading bytes.Length + 1 makes a longer file unequal without reading all of it.
  • Parsing is still bounded: at most 573 bytes for a .bin, 1 MB + 1 for a .nfc.

Nit: inline (a FIFO named .bin); not blocking.

Tested (Linux, .NET SDK 10.0.404, at 4c77d3c6): dotnet build LongshotLauncher.slnx 0 errors in Debug, and in Release with -p:RestoreLockedMode=true as CI (only the old AVLN5001). tests/test_launcher_core.py --strict --longshot <Longshot main at f87557a>: launcher core: 934 checks passed. tests/test_release.py: 28 OK. CI on this head: the title check passed; "Compile and test" doesn't run on pull requests. Still not run by anyone: the page, drag and drop, and a big folder in a real window, as the description says.

Approving: nothing blocking is left from any of the three reviews.

Re-review of 4c77d3c6 (the delta on 921ac746), built and run here on Linux. **Resolved from the last review** (https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/49#issuecomment-16332): a linked `.bin` is now read through the link and added as a copy, and the extended loop check runs `Add` on it. `ReadAtMost` is right: - Each request is `min(16 KB, most + 1 - read)`, so it never reads past `most + 1`. A short read just loops, and EOF ends the loop. - A file that grows while it is read still yields at most `most + 1` bytes, which the size test then refuses. A file that shrinks yields what is there. - Opening fails with `IOException` (not found, a dangling or looping link) or `UnauthorizedAccessException`, and `Describe` and `Add` already catch both. - `Same` reading `bytes.Length + 1` makes a longer file unequal without reading all of it. - Parsing is still bounded: at most 573 bytes for a `.bin`, 1 MB + 1 for a `.nfc`. **Nit:** inline (a FIFO named `.bin`); not blocking. **Tested** (Linux, .NET SDK 10.0.404, at 4c77d3c6): `dotnet build LongshotLauncher.slnx` 0 errors in Debug, and in Release with `-p:RestoreLockedMode=true` as CI (only the old `AVLN5001`). `tests/test_launcher_core.py --strict --longshot <Longshot main at f87557a>`: `launcher core: 934 checks passed`. `tests/test_release.py`: 28 OK. CI on this head: the title check passed; "Compile and test" doesn't run on pull requests. Still not run by anyone: the page, drag and drop, and a big folder in a real window, as the description says. Approving: nothing blocking is left from any of the three reviews.
Core/NfcTags.cs Outdated
@ -0,0 +165,4 @@
/// The file's first most + 1 bytes at most (through a link, to the file it leads to): more than most when it is larger
static byte[] ReadAtMost(string path, int most)
{
Owner

Nit: opening the file now happens before any size test, so a FIFO named *.bin blocks in new FileStream until something writes to it. I checked: NfcTags.List on a folder holding mkfifo pipe.bin doesn't return. Before this commit a .bin FIFO was refused on its Length of 0 (a .nfc one already blocked). Reload runs List on the window's thread, so a FIFO in the NFC folder would freeze the page as it opens. That's very unlikely (zips can't carry FIFOs), so this isn't blocking. If you want to close it: resolve the link (ResolveLinkTarget(true)) and skip anything that isn't a regular file before opening, or do List in Task.Run like the adds.

Nit: opening the file now happens before any size test, so a FIFO named `*.bin` blocks in `new FileStream` until something writes to it. I checked: `NfcTags.List` on a folder holding `mkfifo pipe.bin` doesn't return. Before this commit a `.bin` FIFO was refused on its `Length` of 0 (a `.nfc` one already blocked). `Reload` runs `List` on the window's thread, so a FIFO in the NFC folder would freeze the page as it opens. That's very unlikely (zips can't carry FIFOs), so this isn't blocking. If you want to close it: resolve the link (`ResolveLinkTarget(true)`) and skip anything that isn't a regular file before opening, or do `List` in `Task.Run` like the adds.
Merge main into feat/nfc-tags: the translations (#47); the drop's two texts through Tr.T
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
7cde57e57c
main's catalogs hold step 1's "Drop your game file to check it", which this branch had moved from the view into
MainViewModel.DropText: both of its texts go through Tr.T, so the catalogs' entry has its source again (the check failed
on it as left over). The NFC page's own texts are not in the catalogs yet: they show in English.

Assisted-by: Claude Code
Co-Authored-By: Claude Fable 5.2 <[email protected]>
airdamien dismissed HumanBean's review 2026-11-14 02:53:38 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Author
First-time contributor

Merged main in (7cde57e5), not rebased, nothing force-pushed. main's translations (#47) conflicted at two places: the drop overlay's text in App/MainWindow.axaml (this branch's {Binding DropText} kept) and the README's table (both rows kept). MainViewModel.DropText's two texts now go through Tr.T, so the catalogs' "Drop your game file to check it" has its source again (scripts/translations.py said it was left over). The NFC page's own texts are not through Tr.T / {c:T} yet and are in no catalog: they show in English. I can do that here or in a follow-up, as you prefer. Built on Windows with warnings as errors; tests/test_launcher_core.py still stops in SelfUpdateChecks on this PC, as main's does.

Merged main in (7cde57e5), not rebased, nothing force-pushed. main's translations (#47) conflicted at two places: the drop overlay's text in `App/MainWindow.axaml` (this branch's `{Binding DropText}` kept) and the README's table (both rows kept). `MainViewModel.DropText`'s two texts now go through `Tr.T`, so the catalogs' "Drop your game file to check it" has its source again (`scripts/translations.py` said it was left over). The NFC page's own texts are not through `Tr.T` / `{c:T}` yet and are in no catalog: they show in English. I can do that here or in a follow-up, as you prefer. Built on Windows with warnings as errors; `tests/test_launcher_core.py` still stops in `SelfUpdateChecks` on this PC, as main's does.
Author
First-time contributor

The game's side of the 256 note (review 1185's should change, and #49 (comment)) is fixed in MagicBeanDev/Longshot#280 at 85d27e5e: the game now lists the first 256 tag files by name whatever order the folder gives them in, with a check that fails on the code before. It still counts every .bin / .nfc that is not a key_ file, dumps or not, as TooMany does. Once that pull request is in, TooManyText, NfcTags.Most's comment and docs/nfc.md can say "the first 256 by name" again; I have left them as they are until then, since they describe the game as merged.

The game's side of the 256 note (review 1185's *should change*, and https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/49#issuecomment-15451) is fixed in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/280 at 85d27e5e: the game now lists the first 256 tag files by name whatever order the folder gives them in, with a check that fails on the code before. It still counts every `.bin` / `.nfc` that is not a `key_` file, dumps or not, as `TooMany` does. Once that pull request is in, `TooManyText`, `NfcTags.Most`'s comment and docs/nfc.md can say "the first 256 by name" again; I have left them as they are until then, since they describe the game as merged.
Merge remote-tracking branch 'origin/main' into feat/nfc-tags
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
7465d19d0e
Owner

Please rebase!

Please rebase!
airdamien force-pushed feat/nfc-tags from 7465d19d0e
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
to b51fa96f44
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
2026-11-15 23:56:29 +00:00
Compare
Author
First-time contributor

Rebased onto main @ 67d8410, as asked: the two merge commits are gone, and the branch is its five commits on main (head b51fa96). Conflicts:

  • App/ViewModels/ViewModelBase.cs: main's PickFileAsync(string title, string[]? patterns) kept, with this branch's PickFilesAsync beside it.
  • Core/MakeGameCommand.cs: Environment keeps main's intelSideBySide and intelLongerLimits, and Linux still keeps LONGSHOT_NFC_DIR.
  • Core/AtomicFile.cs: main's Windows mutex around the rename (#71), with this branch's overwrite.
  • App/MainWindow.axaml, App/Views/Views.cs, README.md, CONTRIBUTING.md, tests/launcher_core/Program.cs: both sides kept.
  • The merge commit 7cde57e had put DropText's two texts through Tr.T; that is now in the commit that adds DropText.

Apart from that line, the branch's changes are the same as at 7465d19, compared line by line.

Built with warnings as errors (SDK 10.0.404, as global.json now asks). tests/test_launcher_core.py passes every check up to HomeBusySourceChecks, which stops on main too: #121 added && !deletingLeftovers to CanStartBuild, and the check still looks for the line without it.

Rebased onto main @ 67d8410, as asked: the two merge commits are gone, and the branch is its five commits on main (head b51fa96). Conflicts: - `App/ViewModels/ViewModelBase.cs`: main's `PickFileAsync(string title, string[]? patterns)` kept, with this branch's `PickFilesAsync` beside it. - `Core/MakeGameCommand.cs`: `Environment` keeps main's `intelSideBySide` and `intelLongerLimits`, and Linux still keeps `LONGSHOT_NFC_DIR`. - `Core/AtomicFile.cs`: main's Windows mutex around the rename (#71), with this branch's `overwrite`. - `App/MainWindow.axaml`, `App/Views/Views.cs`, `README.md`, `CONTRIBUTING.md`, `tests/launcher_core/Program.cs`: both sides kept. - The merge commit 7cde57e had put `DropText`'s two texts through `Tr.T`; that is now in the commit that adds `DropText`. Apart from that line, the branch's changes are the same as at 7465d19, compared line by line. Built with warnings as errors (SDK 10.0.404, as `global.json` now asks). `tests/test_launcher_core.py` passes every check up to `HomeBusySourceChecks`, which stops on main too: #121 added `&& !deletingLeftovers` to `CanStartBuild`, and the check still looks for the line without it.
airdamien force-pushed feat/nfc-tags from b51fa96f44
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
to 0414878272
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
2026-11-16 09:46:21 +00:00
Compare
Author
First-time contributor

Rebased onto main @ bfa2448 with no conflicts. It builds with -warnaserror, and tests/test_launcher_core.py passes all 1469 checks (the HomeBusySourceChecks failure that main also had is fixed on main now).

Rebased onto main @ bfa2448 with no conflicts. It builds with `-warnaserror`, and `tests/test_launcher_core.py` passes all 1469 checks (the HomeBusySourceChecks failure that main also had is fixed on main now).
airdamien force-pushed feat/nfc-tags from 0414878272
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
to ced2f7c0af
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
2026-11-16 14:41:57 +00:00
Compare
Author
First-time contributor

Rebased onto main @ 5d86f31 with no conflicts. It builds with -warnaserror, and tests/test_launcher_core.py passes all 1469 checks.

Rebased onto main @ 5d86f31 with no conflicts. It builds with `-warnaserror`, and `tests/test_launcher_core.py` passes all 1469 checks.
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/nfc-tags:airdamien-feat/nfc-tags'
git switch 'airdamien-feat/nfc-tags'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!49
No description provided.