WIP: [pr-feature][startup] Preload window: remember an unfinished preload and say what is left (DARNER_PRELOAD_RESUME, off by default) #140
Loading…
Reference in a new issue
No description provided.
Delete branch "Jesper-A/Darner:up-preload-resume"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Contributor role (optional)
What it changes
Refs #128 (step 1 of the plan in that issue: "a partial mark or remaining count").
Today a preload that is stopped early (Play now, Quit, or a preload process that fails) leaves no trace. The next start opens the window again with no hint of how far the last one got.
New switch
DARNER_PRELOAD_RESUME=1, off by default. With it on:warmed/<hash>.partialbeside the usual mark (temporary file, then rename). It holds the step, the count done, the count of the step, and whether the preload's last line ("N of N in the pipeline library in S s") was seen.Honest limits:
apps/darner/src/preload_ui.rscode.Files:
apps/darner/src/preload_resume.rs(new),preload_ui.rs,play.rs,main.rs,locales/en.json,locales/zh-CN.json, a README table row, adocs/findings.mdnote.How it was tested
a948451a4(one commit on57dea7f23, currentmainwhen written).cargo test --locked -p darner --bin darner preload: 11 passed, 1 ignored (a window demo).cargo clippy --workspace --all-targets --locked -- -D warnings: clean.cargo xtask policy: ok.cargo clippy --workspace --all-targets --all-features --locked -- -D warnings, andcargo test --workspace --locked(full). There is no CI upstream, so nothing else has checked this.a_record_that_saw_the_end_writes_the_mark_and_another_opens_the_window).preload_neededdecides (play.rs~2556); not tested, may print once needlessly.Spec dependence
Likely general: the change is in the launcher and the preload window, with no GPU dependence. Untested in the game on any hardware.
Checklist
main.docs/asset-policy.md.Checked for overlap
apps/darner/src/play.rs(so a rebase may be needed): #132, #130, #80, #75, #59, #36, #16, #12, #9;locales/en.json: #80, #75, #47. Related issue: #128.Drafted with AI assistance (Claude Code).
[pr-feature][startup] WIP: Preload window: remember an unfinished preload and say what is left (DARNER_PRELOAD_RESUME, off by default)to WIP: [pr-feature][startup] Preload window: remember an unfinished preload and say what is left (DARNER_PRELOAD_RESUME, off by default)WIP: [pr-feature][startup] Preload window: remember an unfinished preload and say what is left (DARNER_PRELOAD_RESUME, off by default)to [pr-feature][startup] Preload window: remember an unfinished preload and say what is left (DARNER_PRELOAD_RESUME, off by default)[pr-feature][startup] Preload window: remember an unfinished preload and say what is left (DARNER_PRELOAD_RESUME, off by default)to WIP: [pr-feature][startup] Preload window: remember an unfinished preload and say what is left (DARNER_PRELOAD_RESUME, off by default)Second-opinion review: no bug found. Only a record that saw the final library save line skips the window,
preload_neededstill falls through to the empty-library check, records go through temp file + rename, and a partial record is ignored. It has unit tests only, so hold until it has been run in game (a preload stopped with Play now and Quit, then the next start). Merging it after #153 and #184 resolves the play.rs and preload_ui.rs conflicts once.Both requested interruption paths passed on the unmodified PR head
a948451a4593(Windows 11 build 28000, i5-13600KF, RTX 4070 Ti SUPER, driver 617.14). I built the release executable with locked dependencies and used the actual preload window.DARNER_PRELOAD_RESUME=1, I clicked Quit at 28/35 shader files. Darner exited normally before gameplay. The saved record readstep=1, done=28, total=35, finished=0.0in a fresh profile. That process exited normally and created no partial record.This covers the two buttons and the English file-count hint on the submitted head. The failed-child path, completed-library shortcut and Chinese layout remain untested here.
This is the first in-game run of this PR, thanks @akimfomin.
On the unmodified head
a948451a4, it settles two items: the record is written on a real Quit and a real Play now, and the next start shows "resuming: 7 files were left" (28 of 35) both times. That meets the maintainer's hold condition (a preload stopped with Play now and Quit, then the next start) for the English file-count text. Your control with the switch set to 0 wrote no record.Still open: a preload process that fails, the shortcut for a record that saw the library saved, the zh-CN window text width, and the extra "preload incomplete" line printed before
preload_neededdecides. None of these were part of your run.Drafted with AI assistance (Claude Code).
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.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.