feat(progress): a Progress page that follows the save, and ticks a line as the game would #366

Open
neotoxic wants to merge 21 commits from neotoxic/LongshotLauncher:feat/lenses into main
Contributor

Players ask what is left to find in their save and what they can do right now. This adds a Progress page to the launcher: the 100 % of the remake, read from the save, chapter by chapter or area by area, with what each thing needs. It is the tracker of Lenses of Truth (0.2.0), built in.

What it does

  • A Progress tab follows the latest save live, the copy a running game writes included. By chapter or by area, a search, "only what is feasible" and "also show what is done".
  • A save's details show that slot's progress the same way.
  • Edit (off by default, game closed only, from a save's details): a click on the mark of a feasible line marks it done in the save, with what the game gives for it (the reward or content, rupees within the wallet, a Piece of Heart that makes a heart at four, a quest moved on). There is no going back: a line done or not feasible yet cannot be ticked. The file is copied to progress-backups first (a backup never replaces another), then written through a temporary file; a game using the save refuses the edit.

The catalogue

assets/progress/catalogue.tsv holds 439 lines: chapter, area, names and how to get each thing (English and French text; keywords and kinds in English), the "done" test, the "feasible" tests and the effects. Like src/players/caption.rs, it holds save field identifiers (hashes of their names), facts and our own text: no game file and no save. Every line was checked against the game's data (what each place holds, what each event gives and asks for); what only playing can settle is listed in Lenses of Truth's docs/in-game-checks.md. "Feasible" looks at what the player can get, not what they hold right now.

Files

  • src/progress/ (new): catalogue and save reading, the checks, complete (the effects); page.rs, the page; tests.rs, synthetic saves only.
  • ui/progress.slint (new), ui/saves.slint (the details), ui/main.slint (the tab), src/players/mod.rs (slot_file, latest_progress, saves_idle), assets/lang/*.json (the labels, 15 catalogs).

Testing

  • cargo fmt --check, cargo clippy --all-targets clean; cargo test progress: 11 tests (catalogue reading, feasible paths, each effect, keys kept sorted, a key list cut short, no going back, a backup never replaced, either of two fields).
  • python -I scripts/translations.py: 15 catalogs validated.
  • On this Windows PC, 12 tests outside this change (folders, registry, storage, steam) fail on main (6ae8497) as well: not touched here.
  • In the launcher (screenshots below, a test profile with copies of real saves): the tab, both views, Edit, a line ticked and read back.
  • Not checked: an edited save loaded in the game through the launcher.

🤖 Generated with Claude Code

Players ask what is left to find in their save and what they can do right now. This adds a Progress page to the launcher: the 100 % of the remake, read from the save, chapter by chapter or area by area, with what each thing needs. It is the tracker of [Lenses of Truth](https://github.com/neotoxicfr/lenses-of-truth) (0.2.0), built in. ## What it does - **A Progress tab** follows the latest save live, the copy a running game writes included. By chapter or by area, a search, "only what is feasible" and "also show what is done". - **A save's details** show that slot's progress the same way. - **Edit** (off by default, game closed only, from a save's details): a click on the mark of a feasible line marks it done in the save, **with what the game gives for it** (the reward or content, rupees within the wallet, a Piece of Heart that makes a heart at four, a quest moved on). There is no going back: a line done or not feasible yet cannot be ticked. The file is copied to `progress-backups` first (a backup never replaces another), then written through a temporary file; a game using the save refuses the edit. ## The catalogue `assets/progress/catalogue.tsv` holds 439 lines: chapter, area, names and how to get each thing (English and French text; keywords and kinds in English), the "done" test, the "feasible" tests and the effects. Like `src/players/caption.rs`, it holds save field identifiers (hashes of their names), facts and our own text: **no game file and no save**. Every line was checked against the game's data (what each place holds, what each event gives and asks for); what only playing can settle is listed in Lenses of Truth's [docs/in-game-checks.md](https://github.com/neotoxicfr/lenses-of-truth/blob/main/docs/in-game-checks.md). "Feasible" looks at what the player can get, not what they hold right now. ## Files - `src/progress/` (new): catalogue and save reading, the checks, `complete` (the effects); `page.rs`, the page; `tests.rs`, synthetic saves only. - `ui/progress.slint` (new), `ui/saves.slint` (the details), `ui/main.slint` (the tab), `src/players/mod.rs` (`slot_file`, `latest_progress`, `saves_idle`), `assets/lang/*.json` (the labels, 15 catalogs). ## Testing - `cargo fmt --check`, `cargo clippy --all-targets` clean; `cargo test progress`: 11 tests (catalogue reading, feasible paths, each effect, keys kept sorted, a key list cut short, no going back, a backup never replaced, either of two fields). - `python -I scripts/translations.py`: 15 catalogs validated. - On this Windows PC, 12 tests outside this change (folders, registry, storage, steam) fail on `main` (6ae8497) as well: not touched here. - In the launcher (screenshots below, a test profile with copies of real saves): the tab, both views, Edit, a line ticked and read back. - Not checked: an edited save loaded in the game through the launcher. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
A save's details said « This build does not report story, chest or heart-piece completion. » They now list, chapter
by chapter, everything a 100 % walkthrough counts (429 lines: the story, side quests, minigames, trades, chests,
Pieces of Heart, Great Fairies, magic beans, Big Poes, Gold Skulltulas), what each gives and needs, and whether the
save is ready for it: done, feasible now, or not yet. The side panel lists the chapters with their counts, the current
one marked; « Everything missing so far » gathers what is left up to it. A search and « only what is feasible » narrow
the list; the file is read again when the game writes it.

With Edit on, a line's mark ticks or unticks it in the save: refused while a game uses that save, the slot's
progress.sav first copied to « progress-backups » in the launcher's folder, written through a temporary file, and read
back. It sets the flag the line reads and nothing else (the hint says so).

What to do comes from assets/progress/catalogue.tsv, written by hand in French and English with the MurmurHash3 of
the game's field names, like players::caption: no game file, no save. Tests use synthetic saves. The labels are in the
15 catalogs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A save's details showed that slot only, so a player wanting to follow a game while playing had nothing that moved.
The new Progress tab follows the latest save, the copy a running game writes (save-work) included: the slot whose
caption the game dated last, read again when it changes. It only reads.

Both views sort by chapter or by area (the areas in story order, each shown kind by kind, what is done or feasible
first; with no area picked, the one Link is in). Editing stays in a save's details, and is off while the launcher
runs a game (Game.playing), besides the refusal when a game uses the save.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The sort was two buttons that swapped their style, and options appeared and vanished with the view, so the row moved
under the pointer. The search is the launcher's TextField, the sort its Dropdown (By chapter / By area); « Also show
what is done » is greyed where it does not apply instead of hidden; the edit hint keeps one line. A line done is no
longer clickable, and the writer refuses to untick: no going back on a save.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Marking a line set its flag only: a chest opened left its content out, a quest at its last step had none of what its
scenes write. A line now carries its effects (catalogue column 11): the chest's content through the game's item
table (a bundle, rupees within the wallet held, a bag that fills, a dungeon's map or keys), a Gold Skulltula's token,
four Pieces of Heart making a heart, and for a quest each step's scene writes from where the save is (flags, items,
cutscenes, never a step back). The effects are worked out outside the launcher from the game's event flows and item
table and kept as hashes and numbers, like the tests.

A line is only ever marked done, never undone, and only once it is feasible: the catalogue's needs now include the
game's own quest prerequisites and the lasting conditions its scenes check (a new « pas » test for « not »), and a Big
Poe needs an empty bottle. complete() refuses a line done or not feasible, and must read the line back done.

Checked outside the repository on twelve real saves (every feasible line) and on a whole game played line by line
from the first chapter to the last: the game's rules (quest prerequisites, scene flags, chest contents, Gold Skulltula
tokens) find nothing amiss, and the bytes the launcher writes match the checking tool's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The hint took one or two lines with the language and the result of a change added a line of its own, so the list
moved under the pointer between two clicks. One block, three lines high, shows the hint or what the last change did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Seen in game: a Gold Skulltula and a Piece of Heart marked done were back. The game writes the key list sorted; a key
appended at its end was ignored when the save loaded, and gone from the next save the game wrote. complete() sorts
the list before writing it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Seen in game: killing a Gold Skulltula writes its key and its key + 2, and the area map counts it by the second. A
Skulltula marked done had the first only, so the map of its area did not count it. Its effects now add both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Same catalogue fix as Lenses of Truth: the game writes a Gold Skulltula's two keys, the id and + 2 or - 2; the
catalogue keeps the smaller so the pair is always « key, key + 2 ».

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Seen in game: in the tree by the pond, a roll drops it, at any age; the guides had it in the ruin at night with the
boomerang.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Same catalogue change as Lenses of Truth: the game starts with Link a child, so it is left out of the needs shown.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The remake puts the ranch and the lake on the Hyrule Field map, but the game
counts them as their own areas (IsVisitLocation.LonLonRanch / LakeHylia). The
14 ranch and lake lines of the catalogue now use their own area.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each line of the catalogue was checked against the decoded game files: 190
of 429 had at least one error (tracked field, place, condition, reward or
text) and are corrected, each by a game file. Conditions ask for what the
player can get rather than what they hold right now, and a line no longer
asks for what it gives itself. A test may read either of two fields
(« A/B », the same chest seen from two maps). Filling a bottle needs no empty
one any more: a Big Poe is sold and its bottle empties again. New lines:
the eight Heart Containers, the potion shop's empty bottle, the Giant's
Knife, the bean seller, the rolling Goron and the Lost Woods target.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two lines ticked in the same second wrote their backups under the same name,
the second over the first. Backups are now named to the millisecond and
created as new files only, a number added when the name is taken; the
temporary file is removed if the save cannot be replaced. Found by the
CodeRabbit review of the same code in Lenses of Truth.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(progress): review fixes: the edit follows the save shown, keyboard and controller, honest messages
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
081826e42f
From a review of the branch in CodeRabbit's manner:
- the details of a save may move to another slot (a copy sorted first): the
  progress follows it, so an edit goes to the save whose title is shown;
- a line's mark is a button, reached by the keyboard and a controller as the
  chapter rows are, not by the mouse only;
- the Progress tab says « No save yet » for a profile without saves, and the
  error when the folder cannot be read, instead of « cannot be read yet »;
- a game started outside the launcher refuses the edit with « Close the game
  first. », not with the save transfer's message;
- the game's working copy counts as the latest save only while a game uses
  it: save-work stays on disk once the game is closed;
- a key list that starts inside the table (a damaged file) is not read, where
  ticking a line used to stop the launcher;
- comments and four labels no code shows any more, one saying the opposite of
  what the edit does, are gone.

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

Screenshots (test profile with copies of real saves, English):

The Progress tab, by chapter
By area
A save's details, Edit on
A line ticked: done and read back, the backup named

Screenshots (test profile with copies of real saves, English): ![The Progress tab, by chapter](https://git.magicbean.dev/attachments/429a1763-57f5-4469-a9be-5c9dfaf2d811) ![By area](https://git.magicbean.dev/attachments/95998334-3ba0-4616-b45a-c88450f1799c) ![A save's details, Edit on](https://git.magicbean.dev/attachments/f279cfa5-e37d-4e91-bd0b-41a62736c297) ![A line ticked: done and read back, the backup named](https://git.magicbean.dev/attachments/15f589a8-5fc8-4ddd-91a1-e18a59c31b33)
Member

Possibly related, for context:

  • PR #186 feat(saves): a Progress view per slot shows what a save has and is missing, and edits it with a backup first — Merged prior per-slot progress reader/editor; this PR adds a separate built-in catalogue and live tracker.
  • PR #253 feat(saves): show read-only per-slot thumbnails, location, era, progress stats, and full date/time — Open save-preview changes also touch saves progress UI and related player code.
Possibly related, for context: - PR #186 feat(saves): a Progress view per slot shows what a save has and is missing, and edits it with a backup first — Merged prior per-slot progress reader/editor; this PR adds a separate built-in catalogue and live tracker. - PR #253 feat(saves): show read-only per-slot thumbnails, location, era, progress stats, and full date/time — Open save-preview changes also touch saves progress UI and related player code.
fix(progress): the catalogue and the code in English
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
ea48978610
The catalogue's keywords and kinds were French words (« pas », « parmi »,
« cle », « #chapitre », « #lieu », « histoire », « coffre »…), and two kinds of
labels were French text in the code. The catalogue now reads « not »,
« oneof », « key », « #chapter », « #place » and English kinds; the kinds and
« Story » / « Side quests » are translated by the launcher's catalogs in all
15 languages instead of a French/English pair; the comments and the test
data are in English. The French names and notes of the catalogue stay:
they are the French interface.

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

On the two related pull requests:

  • #186 was mooki's Progress view in the .NET launcher, built on Longshot's save editor tools; the port to Rust and Slint (#284) did not carry it over, and main has no progress view today. This brings one back, with its own built-in catalogue and the effects of each line, so it needs no tool from a Longshot release.
  • #253 (Jer9's slot previews) touches the same files (src/players, ui/saves.slint). Both apply cleanly on main today; whichever is merged second gets rebased on the other.
On the two related pull requests: - #186 was mooki's Progress view in the .NET launcher, built on Longshot's save editor tools; the port to Rust and Slint (#284) did not carry it over, and `main` has no progress view today. This brings one back, with its own built-in catalogue and the effects of each line, so it needs no tool from a Longshot release. - #253 (Jer9's slot previews) touches the same files (`src/players`, `ui/saves.slint`). Both apply cleanly on `main` today; whichever is merged second gets rebased on the other.
The Skulltula in the lone tree southeast of Lon Lon Ranch (object
2177746409373494989, at 71 167 264) was filed under Lon Lon Ranch. It
sits outside both Lon Lon Ranch location areas and inside the Hyrule
Field one, so the Zone view listed it under the ranch while Link was in
the field, and completing the line marked the ranch as visited instead
of the field.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(progress): the ruins Gold Skulltula needs the Boomerang or the Hookshot
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
370ac604a8
The Skulltula in the ruins southwest of Lon Lon Ranch sits about 8 m up
(2730878115209290675, at -147 159 268), out of reach of the sword. It was
listed as doable with no item; checked in game: it needs the Boomerang as
a child or the Hookshot as an adult.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(progress): the Lon Lon tower chest and the windmill quest, checked in game
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
806f7015fd
- Tower chest (ruins southwest of Lon Lon Ranch, 17445672702269453589):
  it sits about 11 m up and is reached with the Hookshot, as an adult.
  It was listed as doable with no item.
- The windmill and the well: the quest starts by learning the Song of
  Storms, which only an adult can do, with an ocarina. It was offered to
  a child without the song. The Song of Storms itself cannot be the
  condition, since this line is what gives it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(progress): Goron maze right chest, field Business Scrub, Zora grotto text
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
62f33668f3
- Goron City maze, right chest: every free side is a silver rock
  (Obj_LiftRock_B_01, the hammer bounces off it), so it needs the Silver
  (or Golden) Gauntlets, as an adult; it was listed with bombs only.
- Hyrule Field Business Scrub Piece of Heart: the scrub checks the word
  on the tree, which can only be read as an adult; the line now needs
  the Master Sword besides bombs.
- Zora's River open grotto chest: "bombs · or as an adult" was split
  between the condition and the description; it now reads "bombs (or as
  an adult)".

Seen in game by a player.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(progress): Death Mountain Crater needs the Goron Tunic
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Rust formatting, lint and tests (pull_request) Has been cancelled
CI / Release packages and stable upgrades (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
c235846a57
A player could not stay in the crater without the Goron Tunic, yet every
crater line was offered as soon as Zelda's Letter was held. The crater's
access now needs the Master Sword and the Goron Tunic, for all its
lines, including those whose conditions were checked one by one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Member
@review
BeanBot left a comment

Recommendation: Request changes. The editor can mark heart rewards as collected without granting them, and the catalogue contains identifiers taken from game data despite the repository’s prohibition on material made from game files. Save replacement also has a race with a newly started game.

Adds a chapter and area tracker and an optional save editor. The tracker gives players a useful view of progress, but the editor can produce incorrect saves and its game-derived catalogue conflicts with repository rules.

Blocking (3): must change before merging.

  1. L1 assets/progress/catalogue.tsv:73: These heart-piece effects mark the reward collected without adding the Piece of Heart. (more on the line) Do: Apply the appropriate heart-piece reward effects for both lines and add tests using the actual catalogue entries.
  2. L2 assets/progress/catalogue.tsv:58: The catalogue includes game-derived object keys and effects, contrary to the repository’s rule against committing anything made from game files. (more on the line) Do: Remove the game-derived material from the repository and use a permitted source or derive the required data locally on the player’s PC.
  3. L3 src/progress/page.rs:113: The running-game check is only a snapshot and does not protect the subsequent read and replacement. (more on the line) Do: Coordinate editing and game startup with a shared save lock held through replacement, including external game starts that use the profile.

Should fix (2): not blocking, but worth doing before merging.

  • L4 src/progress/page.rs:183: Changing the followed file retains the previous file’s parsed save if the new file cannot yet be read. (more on the line) Do: Clear the cached save and area when the file changes; retain the old reading only when retrying the same file.
  • L5 docs/saves.md: The save documentation still says the Progress view is read-only and that story and chest completion require a game report. When: A player looking up save behavior is told editing is unavailable even though this change adds an editor and backups. Do: Document the tracker, editor, backup location and game-closed restriction.

Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)

  • L6 src/progress/page.rs:110: The edited save has not been checked in the game. (more on the line) Do: On a disposable local save, edit representative chest, heart-piece and quest lines, launch Longshot through the launcher, and verify the rewards and subsequent save persist.

@fix can do L1, L2, L3, L4 and L5.

Checks: Still running: 5 checks.

More: does it help, other systems, switches, what was read

Does it help: Unproven: screenshots show the launcher views and an edit read back by the launcher, but the PR says an edited save was not loaded in the game through the launcher.

Other systems: The save writer affects both Windows and Linux and files subsequently loaded by Longshot. Synthetic tests check the writer’s own interpretation, but do not establish that the game accepts its output or grants each reward. The live view also reads the game’s working copy and caption.

Switches: The Edit control is off when a save is opened and is unavailable while the launcher reports the game playing. No environment or build switches are added.

Reviewed: c235846a57 against 6ae84979a2: Read AGENTS.md, CONTRIBUTING.md, docs/saves.md, the commit log, changed Rust progress files and Slint progress view, and the relevant save process checks and caption reader. Reviewed the remaining code changes and skimmed the catalogue and translations; the catalogue’s individual game facts were not independently verified. No review checklist or pull request template was present at the named paths.; nothing run (a code review).

Checked and fine:

  • Backups use create_new and do not replace an earlier backup with the same name.
  • The synthetic tests cover sorted keys, truncated key lists, feasibility and several effect types.
  • The PR includes screenshots and the commits include AI-assistance trailers.

Testing: No code or tests were run, as requested. The author reports synthetic tests and launcher screenshots; CI is still running.

Overlaps and merge order: #253 also changes save details and player files; the author says whichever merges second should be rebased.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The editor can mark heart rewards as collected without granting them, and the catalogue contains identifiers taken from game data despite the repository’s prohibition on material made from game files. Save replacement also has a race with a newly started game. Adds a chapter and area tracker and an optional save editor. The tracker gives players a useful view of progress, but the editor can produce incorrect saves and its game-derived catalogue conflicts with repository rules. **Blocking (3)**: must change before merging. 1. **L1** `assets/progress/catalogue.tsv:73`: These heart-piece effects mark the reward collected without adding the Piece of Heart. (more on the line) **Do:** Apply the appropriate heart-piece reward effects for both lines and add tests using the actual catalogue entries. 2. **L2** `assets/progress/catalogue.tsv:58`: The catalogue includes game-derived object keys and effects, contrary to the repository’s rule against committing anything made from game files. (more on the line) **Do:** Remove the game-derived material from the repository and use a permitted source or derive the required data locally on the player’s PC. 3. **L3** `src/progress/page.rs:113`: The running-game check is only a snapshot and does not protect the subsequent read and replacement. (more on the line) **Do:** Coordinate editing and game startup with a shared save lock held through replacement, including external game starts that use the profile. **Should fix (2)**: not blocking, but worth doing before merging. - **L4** `src/progress/page.rs:183`: Changing the followed file retains the previous file’s parsed save if the new file cannot yet be read. (more on the line) **Do:** Clear the cached save and area when the file changes; retain the old reading only when retrying the same file. - **L5** `docs/saves.md`: The save documentation still says the Progress view is read-only and that story and chest completion require a game report. *When:* A player looking up save behavior is told editing is unavailable even though this change adds an editor and backups. **Do:** Document the tracker, editor, backup location and game-closed restriction. **Testing before merging (1)** (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation) - **L6** `src/progress/page.rs:110`: The edited save has not been checked in the game. (more on the line) **Do:** On a disposable local save, edit representative chest, heart-piece and quest lines, launch Longshot through the launcher, and verify the rewards and subsequent save persist. `@fix` can do L1, L2, L3, L4 and L5. **Checks:** Still running: 5 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven: screenshots show the launcher views and an edit read back by the launcher, but the PR says an edited save was not loaded in the game through the launcher. **Other systems:** The save writer affects both Windows and Linux and files subsequently loaded by Longshot. Synthetic tests check the writer’s own interpretation, but do not establish that the game accepts its output or grants each reward. The live view also reads the game’s working copy and caption. **Switches:** The Edit control is off when a save is opened and is unavailable while the launcher reports the game playing. No environment or build switches are added. **Reviewed:** c235846a57de against 6ae84979a256: Read AGENTS.md, CONTRIBUTING.md, docs/saves.md, the commit log, changed Rust progress files and Slint progress view, and the relevant save process checks and caption reader. Reviewed the remaining code changes and skimmed the catalogue and translations; the catalogue’s individual game facts were not independently verified. No review checklist or pull request template was present at the named paths.; nothing run (a code review). **Checked and fine:** - Backups use create_new and do not replace an earlier backup with the same name. - The synthetic tests cover sorted keys, truncated key lists, feasibility and several effect types. - The PR includes screenshots and the commits include AI-assistance trailers. **Testing:** No code or tests were run, as requested. The author reports synthetic tests and launcher screenshots; CI is still running. **Overlaps and merge order:** #253 also changes save details and player files; the author says whichever merges second should be rebased. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -0,0 +55,4 @@
#stat PouchData.Obj_Heart_Piece.StockNum 1374459827
#stat PouchData.Item_Token_Gold.StockNum 74668408
#stat PlayerStatus.CurrentRupee 2809733591
0 Story Le réveil de Link ║║Forêt Kokiri : trouver l'épée kokiri dans le labyrinthe et acheter le bouclier mojo pour que Mido laisse passer enum 863135899 1471695344 1275749364 Link Wakes Up ║║Kokiri Forest: find the Kokiri Sword in the maze and buy the Deku Shield so that Mido lets you through KokiriForest story from 863135899 398436934 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; step 863135899 398436934 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; from 863135899 3949112793 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; step 863135899 3949112793 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; step 863135899 3949112793 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; from 863135899 240843480 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; step 863135899 240843480 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; step 863135899 240843480 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; from 863135899 1871805950 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; set 1345285354 0 ; set 4092436840 1 ; set 2054504804 1 ; step 863135899 1871805950 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; step 863135899 1871805950 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; from 863135899 1275749364 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; set 2590024800 1 ; step 863135899 1275749364 1471695344,398436934,3949112793,240843480,1871805950,1275749364 ; step 2104978273 3592842818 1471695344,398436934,3592842818,3957372343,3051307979,1466071034,3576369172,1275749364 ; step 863135899 1275749364 1471695344,398436934,3949112793,240843480,1871805950,1275749364
Member

L2 (blocking): The catalogue includes game-derived object keys and effects, contrary to the repository’s rule against committing anything made from game files.

When: The commits describe checking decoded game files and retain object identifiers and effects worked out from the game’s event flows and item table. Those derived values are committed in this catalogue.

Do: Remove the game-derived material from the repository and use a permitted source or derive the required data locally on the player’s PC.

**L2** (blocking): The catalogue includes game-derived object keys and effects, contrary to the repository’s rule against committing anything made from game files. *When:* The commits describe checking decoded game files and retain object identifiers and effects worked out from the game’s event flows and item table. Those derived values are committed in this catalogue. **Do:** Remove the game-derived material from the repository and use a permitted source or derive the required data locally on the player’s PC.
@ -0,0 +70,4 @@
3 HyruleField Skulltula d'or : grotte à bombes entre les arbres ║enfant : bombes, boomerang ; ou adulte : bombes ou masse des titans, grappin║Grotte à bombes entre les arbres de la plaine gs 12007978132755687032 bool 2789154349 0/bool 2999220442 0/bool 2525649529 0;bool 2135745421 0|bool 2789154349 0/bool 2999220442 0/bool 2525649529 0/bool 1915219928 0;bool 4288212312 0/bool 950969275 0;bool 2061733467 0 Gold Skulltula: Bomb Grotto Between the Trees ║as a child: bombs, Boomerang; or as an adult: bombs or Megaton Hammer, Hookshot║Bomb grotto between the trees of the field skulltula key 12007978132755687032 ; key 12007978132755687034 ; set 1805882622 1 ; set 3645371615 1 ; stock 74668408 1 max:100 ; set 3718673355 1
0 HyruleField Coffre de la grotte aux Effrois Rubis violet║chant des tempêtes║Jouer le chant des tempêtes sur le trou couvert de feuilles près de l'entrée de Cocorico, puis vaincre les 2 Effrois : le coffre apparaît bool 2020938610 0 bool 725212495 0 ReDead Grotto Chest Purple Rupee║Song of Storms║Play the Song of Storms on the leaf-covered hole near the Kakariko Village entrance, then defeat the 2 ReDeads: the chest appears chest set 2020938610 1 ; stock 2809733591 50 bag:3036877200=1000,3509980648=500,3068502949=200|base:99 ; set 3718673355 1
0 LakeHylia Coffre de la grotte Rubis rougeâ•‘â•‘ bool 3390613229 0 Grotto Chest Red Rupeeâ•‘â•‘ chest set 3390613229 1 ; stock 2809733591 20 bag:3036877200=1000,3509980648=500,3068502949=200|base:99 ; set 913802800 1
0 LakeHylia Fragment de cœur : l'étang de pêche ║║Pêcher un gros poisson à l'étang du lac Hylia bool 4052295534 0 Piece of Heart: Fishing Pond ║║Catch a big fish at the Lake Hylia fishing pond heart set 4052295534 1 ; set 4052295534 1 ; set 1906656605 1 ; set 913802800 1
Member

L1 (blocking): These heart-piece effects mark the reward collected without adding the Piece of Heart.

When: Ticking Fishing Pond sets its completion flag, so it reads back as done, but none of its effects increments the heart-piece counter or creates a heart. The Lab Diving Test at line 402 has the same omission.

Do: Apply the appropriate heart-piece reward effects for both lines and add tests using the actual catalogue entries.

**L1** (blocking): These heart-piece effects mark the reward collected without adding the Piece of Heart. *When:* Ticking Fishing Pond sets its completion flag, so it reads back as done, but none of its effects increments the heart-piece counter or creates a heart. The Lab Diving Test at line 402 has the same omission. **Do:** Apply the appropriate heart-piece reward effects for both lines and add tests using the actual catalogue entries.
@ -0,0 +107,4 @@
/// Marks line `index` done in `file`, with what the game gives for it (there is no going back): no game using it, the
/// file copied to the launcher's "progress-backups" folder first, then written through a temporary file. Returns the
/// backup.
fn write(home: &Path, file: &Path, index: i32, done: bool) -> Result<PathBuf> {
Member

L6 (should fix): The edited save has not been checked in the game.

When: The launcher can read back its own output even if Longshot rejects a changed field or does not grant the intended reward.

Do: On a disposable local save, edit representative chest, heart-piece and quest lines, launch Longshot through the launcher, and verify the rewards and subsequent save persist.

**L6** (should fix): The edited save has not been checked in the game. *When:* The launcher can read back its own output even if Longshot rejects a changed field or does not grant the intended reward. **Do:** On a disposable local save, edit representative chest, heart-piece and quest lines, launch Longshot through the launcher, and verify the rewards and subsequent save persist.
@ -0,0 +110,4 @@
fn write(home: &Path, file: &Path, index: i32, done: bool) -> Result<PathBuf> {
anyhow::ensure!(done, "a line done cannot be undone");
// a game started outside the launcher: refused with the edit's own words, not the transfer's
crate::players::saves_idle(file).map_err(|_| anyhow!("Close the game first."))?;
Member

L3 (blocking): The running-game check is only a snapshot and does not protect the subsequent read and replacement.

When: If another Longshot process starts after saves_idle returns and loads the slot before the rename, the editor reports success while the game is using the old state; its later save can overwrite the edit.

Do: Coordinate editing and game startup with a shared save lock held through replacement, including external game starts that use the profile.

**L3** (blocking): The running-game check is only a snapshot and does not protect the subsequent read and replacement. *When:* If another Longshot process starts after saves_idle returns and loads the slot before the rename, the editor reports success while the game is using the old state; its later save can overwrite the edit. **Do:** Coordinate editing and game startup with a shared save lock held through replacement, including external game starts that use the profile.
@ -0,0 +180,4 @@
false,
)
};
if file != s.file {
Member

L4 (should fix): Changing the followed file retains the previous file’s parsed save if the new file cannot yet be read.

When: When the latest save changes to a working copy that is temporarily incomplete, reload changes s.file but keeps s.save and returns on the failed read. The tab continues showing the previous slot’s progress until the new file becomes readable.

Do: Clear the cached save and area when the file changes; retain the old reading only when retrying the same file.

**L4** (should fix): Changing the followed file retains the previous file’s parsed save if the new file cannot yet be read. *When:* When the latest save changes to a working copy that is temporarily incomplete, reload changes s.file but keeps s.save and returns on the failed read. The tab continues showing the previous slot’s progress until the new file becomes readable. **Do:** Clear the cached save and area when the file changes; retain the old reading only when retrying the same file.
fix(progress): minigame heart pieces, the save lock while editing, a new file drops the old reading
Some checks are pending
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Blocked by required conditions
CI / Rust formatting, lint and tests (pull_request) Blocked by required conditions
CI / Release packages and stable upgrades (pull_request) Blocked by required conditions
PR title / Conventional Commit title (pull_request) Blocked by required conditions
a1cf6f3ae1
Review of #366 (BeanBot, L1 L3 L4 L5).

- L1: Fishing Pond and the Lab Diving Test set their completion flag but
  gave no Piece of Heart: the minigame's code hands it over, no scene does,
  so the catalogue had nothing to copy. Both lines now give one piece. A
  test checks that every Piece of Heart line gives exactly one; it fails on
  the previous catalogue (Fishing Pond).
- L3: editing holds the profile's save lock (the one every save transfer
  takes) from the first check to the replacement, so no import, copy or
  other edit runs meanwhile, and looks for the game again just before the
  file is replaced. A Longshot started outside the launcher in that moment
  cannot be seen: the game does not take the lock (same as for transfers).
- L4: when the followed file changes, the save and area read from the
  previous one are dropped, even if the new file cannot be read yet.
- L5: docs/saves.md describes the Progress page, Edit, the backups in
  progress-backups/, and the game-closed rule.

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

Thanks for the review. a1cf6f3 addresses L1, L3, L4 and L5:

  • L1: Fishing Pond and the Lab Diving Test now give their Piece of Heart (the minigame's code hands it over, no scene does, so the catalogue had nothing to copy). A new test checks that every Piece of Heart line gives exactly one; it fails on the previous catalogue.
  • L3: editing holds the profile's save lock (the one save transfers take) from the first check to the replacement, and looks for the game again just before replacing the file. A Longshot started outside the launcher in that moment still cannot be seen, since the game does not take the lock; this is the same as for save transfers, and docs/saves.md says to start the game after the change.
  • L4: changing the followed file drops the previous save and area, even when the new file cannot be read yet.
  • L5: docs/saves.md now describes the Progress page, Edit, the backups and the game-closed rule.
  • L6: not done yet. I'll edit a throwaway save (a chest, a Piece of Heart, a quest), load it in Longshot through the launcher, and report back.

@llun, a question on L2 before I change anything there. The catalogue holds no game files and no content taken from them: no text, models or assets. What it does hold are numbers that identify things in a save: the murmur3 hashes of save field names, and the placement IDs of chests and Gold Skulltulas. It also holds what the game writes when a line is done. Names, places and conditions are written by hand. Do these identifiers count as "made from game files" for this repository?

If they do, I see two ways:

  1. The launcher downloads the catalogue from a separate repository (the one Lenses of Truth uses) instead of shipping it.
  2. The launcher builds the catalogue on the player's PC from their own game files. That is a much larger change, and the repository would still need to say which object each line is about.

Which would you prefer, or is the current form acceptable?

Thanks for the review. a1cf6f3 addresses L1, L3, L4 and L5: - **L1**: Fishing Pond and the Lab Diving Test now give their Piece of Heart (the minigame's code hands it over, no scene does, so the catalogue had nothing to copy). A new test checks that every Piece of Heart line gives exactly one; it fails on the previous catalogue. - **L3**: editing holds the profile's save lock (the one save transfers take) from the first check to the replacement, and looks for the game again just before replacing the file. A Longshot started outside the launcher in that moment still cannot be seen, since the game does not take the lock; this is the same as for save transfers, and docs/saves.md says to start the game after the change. - **L4**: changing the followed file drops the previous save and area, even when the new file cannot be read yet. - **L5**: docs/saves.md now describes the Progress page, Edit, the backups and the game-closed rule. - **L6**: not done yet. I'll edit a throwaway save (a chest, a Piece of Heart, a quest), load it in Longshot through the launcher, and report back. @llun, a question on **L2** before I change anything there. The catalogue holds no game files and no content taken from them: no text, models or assets. What it does hold are numbers that identify things in a save: the murmur3 hashes of save field names, and the placement IDs of chests and Gold Skulltulas. It also holds what the game writes when a line is done. Names, places and conditions are written by hand. Do these identifiers count as "made from game files" for this repository? If they do, I see two ways: 1. The launcher downloads the catalogue from a separate repository (the one Lenses of Truth uses) instead of shipping it. 2. The launcher builds the catalogue on the player's PC from their own game files. That is a much larger change, and the repository would still need to say which object each line is about. Which would you prefer, or is the current form acceptable?
Member

@neotoxic, thanks for asking before changing anything. On L2:

  • The hashes of save field names are fine to ship. The launcher already does: src/players/caption.rs reads the caption's flags by them, and Longshot's game/flags.h names flags the same way.
  • The placement IDs of chests and Gold Skulltulas, and what the game writes when a line is done, should be built on the player's PC from their own game files (your option 2), not shipped or downloaded. #186 did it that way: it ran Longshot's save editor (MagicBeanDev/Longshot#1401), which reads those lists from the player's romfs.
@neotoxic, thanks for asking before changing anything. On L2: - **The hashes of save field names are fine to ship.** The launcher already does: `src/players/caption.rs` reads the caption's flags by them, and Longshot's `game/flags.h` names flags the same way. - **The placement IDs of chests and Gold Skulltulas, and what the game writes when a line is done, should be built on the player's PC from their own game files** (your option 2), not shipped or downloaded. #186 did it that way: it ran Longshot's save editor (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1401), which reads those lists from the player's romfs.
Owner

I will run this locally and provide feedback

I will run this locally and provide feedback
Some checks are pending
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Blocked by required conditions
CI / Rust formatting, lint and tests (pull_request) Blocked by required conditions
CI / Release packages and stable upgrades (pull_request) Blocked by required conditions
PR title / Conventional Commit title (pull_request) Blocked by required conditions
This pull request has changes conflicting with the target branch.
  • assets/lang/de.json
  • assets/lang/es.json
  • assets/lang/fr.json
  • assets/lang/it.json
  • assets/lang/ja.json
  • assets/lang/ko.json
  • assets/lang/nl.json
  • assets/lang/pl.json
  • assets/lang/pt-BR.json
  • assets/lang/ru.json
  • assets/lang/zh-Hans.json
  • assets/lang/zh-Hant.json
  • ui/widgets.slint
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/lenses:neotoxic-feat/lenses'
git switch 'neotoxic-feat/lenses'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 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!366
No description provided.