fix(build): the pull request list follows the typed number, and the lookup waits for a pause in typing #339
No reviewers
Labels
No labels
area/build
area/install
area/mods
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!339
Loading…
Reference in a new issue
No description provided.
Delete branch "llun/LongshotLauncher:fix/pr-picker-follows-typed-number"
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?
With Channel: Pull request, typing a number in the box left the list under it on whatever PR was picked last: the box said
2728, the build line saidpr-2728-0b701b22, and the list still said#2240 · perf(vk): pin the render thre…. The lookup also started 275 ms after a keystroke and disabled the box while it ran, so a short pause in the middle of a number started a search and locked the box.What changed
The list follows the box (
src/game/autocheck.rs,src/game/jobs.rs,ui/build-files.slint):Game.pull-choice, which the launcher sets from what is in the box. It is never a different PR from the one the build line names.#2728 · <title>, in the same form as the list's rows. Opening the list highlights it when it is there. The build line appears at the same moment.releases::ask_why, one request, only in this case). The list then says #2611 is merged, not open, #1 is closed, not open, There is no pull request #999999 or #N is open but not listed yet. If the forge can't answer, it says #N is not an open pull request. Any other lookup failure says Could not look up …. A failed lookup of a picked PR shows the same reason, and a retry updates it. Once a PR is found, a later file-check failure leaves its row in place. The status line below gives the full sentence, for example Longshot has no pull request #999999. This replaces the old This pull request is no longer open., which was shown for every one of these cases.Waiting for a pause in typing (
src/game/autocheck.rs,ui/text-field.slint):TYPING). The delay counts from the last keystroke, not from when the check was scheduled. Other changes still settle for 275 ms.Game.search-now, using the newTextField.focus-left). A pick from the list waits only the 275 ms.autocheck::currentcheck, and the latest number is looked up next. A slow search for27can't overwrite2728.jobs::deliver(the worker's result handler, moved out of its closure so it can be tested) applies that check before the list or the build line change.Other:
releases::Sourcegainslabel, andreleases::pull_labelbuilds the list's rows and the found row the same way.scripts/translations.pyvalidates all 15.docs/pull-requests.mdexplains how the box and the list find a PR.Related: #338 reports an "open" PR #292 as closed. Longshot's #292 is in fact merged. With this change the launcher says #292 is merged, not open instead of the generic message. This doesn't close that issue until the reporter confirms which PR they meant.
Testing
Tested on Windows 11 (25H2), with a debug build of this branch run against a throwaway launcher home (
LONGSHOT_LAUNCHER_HOME, an empty stand-in.nup, update checks off). The installed launcher and its data weren't touched, and no game build was started. The PR lookup finishes before anything reads the game files. Before and after screenshots are in the first comment.27, a 0.5 s pause, then28): the list showed Looking for #2728…, with no search during the pause. About 0.9 s after the last key it showed#2728 · fix(audio): a stere…withpr-2728-0b701b22. That is the same build the bug report showed under the wrong row.27and waited 1 s, so its search was running (Channel greyed out). Then I typed28. The box still took the keys, and the result was #2728. #27's result never appeared.2611, Enter started the search within 0.4 s. The list said #2611 is merged, not open, with no build line.999999, then a click elsewhere, searched at once. The list said There is no pull request #999999, and the status said Longshot has no pull request #999999.pr-2240-5adb7753.typing_waits_for_a_pause_and_other_changes_do_not: the delay is 800–1000 ms and counts from the last keystroke. Other changes wait 275 ms.the_list_follows_the_box: empty, typed, typed back to a shown number, and picked.a_number_beanstalk_does_not_list_says_why_it_is_not_open: the found row and the build line agree. A number not in the list givesNotOpen. The forge's merged, closed, open and missing answers each map to their reason.the_pull_request_list_shows_the_typed_number_and_a_stale_lookup_never_wins: a realMainWindowin its own process, like the existing update-and-play test. A lookup of27returns after the box reads2728, and the list, build line and review stay unchanged. Then2728's result sets both. A merged number, a missing one, an invalid one, typing back, a pick and an empty box each show their row.cargo fmt --checkandcargo clippy --locked --all-targets -- -D warningspassed.python -I scripts/translations.pypassed: Validated 15 launcher catalogs.python -I tests/test_launcher_core.pygave 186 passed, 3 ignored and 10 failed. The 10 failures are the folders, Steam library, recovery, registry, home and storage tests that also fail onmainon this Windows PC (the same 10 as in #334). None of them is in code this change touches. The 4 new tests are among the 186. All 46 Tooling release tests (test_release.py) passed.Still to test: nothing for this change. Linux uses the same Slint and Rust code, and the Test Farm has nothing to add here.
Measurements
Risks
Small:
TextFieldgains afocus-leftcallback. Other text fields don't handle it.releases::Source. Whichever merges second needs a one-line merge.🤖 Generated with Claude Code
Before (nightly): 2728 typed, the build line says pr-2728-0b701b22, the list still shows #2240.
After (this branch): the list shows #2728's own row, agreeing with the build line.
After, a merged pull request (Enter pressed): the list says why, no build line.
WIP: fix(build): the pull request list follows the typed number, and the lookup waits for a pause in typingto fix(build): the pull request list follows the typed number, and the lookup waits for a pause in typing@review
Recommendation: Approve. The change addresses the mismatched PR row and the reported typing interruption, with a Windows run demonstrating both. The remaining cases affect the accuracy or availability of the new list feedback but do not prevent a player from using the status line or retrying. Recommend approval; not approved on the forge.
The launcher follows a typed or selected pull request in the list, waits for a pause before looking it up, and explains why unlisted requests cannot be built. It adds state and a forge request for unlisted numbers; some error states do not yet update the list as described.
Should fix (3): not blocking, but worth doing before merging.
src/game/jobs.rs:175: A lookup failure does not replace a row that was picked from the list with its reason. (more on the line) Do: Distinguish a row shown before lookup from a result already displayed for that lookup, and replace the picked row when resolution fails.src/game/autocheck.rs:271: A failure before the worker starts leaves the list saying that the lookup is in progress. (more on the line) Do: Update the list on synchronous check failure as well, or defer showing the lookup state until the worker actually starts.ui/build-files.slint:244: The new lookup feedback is hidden when the trusted pull-request list is empty. (more on the line) Do: Show the current choice or lookup result even when there are no selectable rows, with an appropriately disabled or separate list control.@fixcan do L1, L2 and L3.Checks: Still running:
CI / Rust formatting, lint and tests (pull_request),CI / Release packages and stable upgrades (pull_request).More: does it help, other systems, switches, what was read
Does it help: Yes. The reported Windows 11 run showed the row and build line agreeing for #2728, and an edit during an earlier lookup did not let its result overwrite the later number. The run also exercised Enter, focus loss, a merged request, a missing request and a list pick.
Other systems: The changed UI and lookup paths run on Windows and Linux; the reported interactive run was on Windows. The change does not alter the game, its build protocol, saves, audio or rendering. The forge request is made only after Beanstalk returns a list without the requested number.
Switches: The test adds LONGSHOT_TEST_PR_LIST as an internal subprocess marker; it is unset by default and is not a player setting.
Reviewed:
95265b73bdagainst6d574b8cc2: Read AGENTS.md and CONTRIBUTING.md, the commit log and diff, autocheck.rs, jobs.rs, releases.rs, catalog.rs, the changed UI and surrounding wizard and dropdown logic. Skimmed actions.rs, the translation changes and recorded runs. No review checklist or pull request template was present. Some unchanged portions of the larger changed files were skimmed.; nothing run (a code review).Checked and fine:
Testing: No commands from the project were run, as requested. The author reports a Windows interactive run and passing formatting, Clippy and translation checks; the two CI checks are still running.
Overlaps and merge order: #271 also changes releases::Source; whichever merges second will need to reconcile that field.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@ -149,6 +268,7 @@ pub(super) fn schedule(ui: &MainWindow, home: &Path, work: &SharedWork, retry: b}state.check.attempted = true;state.check.active = Some(revision);state.check.typed_at = None;L2 (should fix): A failure before the worker starts leaves the list saying that the lookup is in progress.
When: With a source path selected that fails validated_source, schedule shows “Looking for #N…” and wizard::check returns an error synchronously. The status is updated, but no worker calls deliver to replace the list text.
Do: Update the list on synchronous check failure as well, or defer showing the lookup state until the worker actually starts.
@ -158,0 +172,4 @@Ok(Progress::Review(source)) if !source.label.is_empty() => {Some(source.label.clone())}Err(error) if work.pull_shown.as_deref() != Some(number.as_str()) => {L1 (should fix): A lookup failure does not replace a row that was picked from the list with its reason.
When: If a player picks a cached list row and the PR has since merged or closed, pull_shown already equals the box text. The error guard skips the new reason, so the list still presents the old open-PR row while the status reports the failure.
Do: Distinguish a row shown before lookup from a result already displayed for that lookup, and replace the picked row when resolution fails.
@ -240,2 +241,4 @@accepted(_) => { Game.search-now(); }focus-left => { Game.search-now(); }}if root.pull && Game.pulls.length > 0: Dropdown {L3 (should fix): The new lookup feedback is hidden when the trusted pull-request list is empty.
When: If catalog loading fails or no trusted PR is listed, Game.pulls is empty and the dropdown is not created. A typed number can still be looked up, but its found row or failure reason is never displayed there.
Do: Show the current choice or lookup result even when there are no selectable rows, with an appropriately disabled or separate list control.
@fix
Recommendation: Approve. The list follows the entered pull request, and the reported Windows run shows that stale lookups do not replace the current selection. The follow-up preserves a resolved row during file-check failures while updating lookup errors. Recommend approval; not approved on the forge.
What
@fixchangedI changed this pull request: the new head is
df88c1ef50. I edited its description to match the change.Changed
Nothing was built or run: the checks run again on the new head.
Players see the selected pull request or a specific lookup failure, and can keep typing while a lookup runs. The change adds state and UI logic to distinguish lookup results from later file checks.
Checks: they run again on this head; a failure shows on the pull request.
More: does it help, other systems, switches, what was read
Does it help: Yes: the reported Windows run showed #2728 with its matching build line after typing in two bursts, and an older #27 lookup did not overwrite it. The typing delay increases from 275 ms to 900 ms; Enter and focus loss start the lookup immediately.
Other systems: The lookup and UI logic are shared by Windows and Linux. The reported interactive run was on Windows; no Linux run is reported. A missing Beanstalk entry can cause one additional Forgejo request.
Switches: None.
Reviewed:
df88c1ef50against6d574b8cc2: Read AGENTS.md, CONTRIBUTING.md, src/game/autocheck.rs, ui/game-model.slint, ui/text-field.slint and docs/pull-requests.md. Read the relevant changes and surrounding portions of src/game/jobs.rs and ui/build-files.slint; other changed code and translations were skimmed. No review checklist or pull request template was present at the expected paths.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no commands from the project or tests were run. The description reports Windows UI testing, formatting, Clippy and translation validation; 10 core-test failures are reported as also occurring on main. CI has not run on this head.
Overlaps and merge order: The description identifies open PR #271 as touching releases::Source; whichever merges second will need a merge adjustment.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@ -158,0 +174,4 @@Ok(Progress::Review(source)) if !source.label.is_empty() => {work.pull_found = true;Some(source.label.clone())}L4 (should fix): A retry that fails with a different lookup error retains the previous failure in the list.
When: If a lookup first fails because the service is unavailable, pull_resolved becomes true. After Try again, a closed PR can return its closed reason, but the list still says it could not be looked up while the status line reports the new reason.
Do: Distinguish a completed successful lookup from a previous lookup failure, and replace a previous failure when a retry returns a new lookup error.
@fix
There is nothing for an edit to fix on this pull request.
Automated fix by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@fix
I didn't change this pull request: what is left needs the author.
Left for the author
For the author (no edit does these)
CI / Release packages and stable upgrades (pull_request)fails on this head and passes on the base branch: Failing after 55s.Nothing was pushed.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.