Repository navigation
fix(hub): wait for the observed app state after open and close requests - #100
Merged
Merged
Conversation
Rescans no longer blank the installed list, and each app now shows an opening or closing state until a rescan confirms the change, the request fails, or a 15 s timeout warns that it could not be confirmed.
…tices Both the header close action and the inner close button collapse the expanded row. Local app notices keep the card spacing below them.
1 of 7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked issue
None. The maintainer found this bug while using the hub on Windows, and no issue was opened.
Type of change
type:bugtype:featuretype:docstype:refactortype:breaking-changetype:choretype:testSummary
When you opened or closed an installed app from My apps, its card briefly went back to the old state and the list jumped. There were two causes:
refreshAppscleared every installation observation before it rescanned. Every card became "unknown", dropped out of the installed list, then came back.actionBusyflag was cleared as soon as the native command resolved. A resolved command only means the request was accepted, and no event fires when a process starts or exits.Now each app keeps an Opening… or Closing… state, with the DS
Spinner, until a rescan observes the change. Closing an app also collapses its expanded row.Changes
apps/hub/src/App.tsxapps/hub/src/App.tsxactionBusy, so only the affected app's controls are disabled. While a request waits, the hub rescans every 1.5 s.apps/hub/src/App.tsxstillRunning, when the running state cannot be observed, or after 15 s with a warning. A response from a request that a newer one replaced is ignored.apps/hub/src/App.tsxapps/hub/src/local-apps/view.tsx,apps/hub/src/style.cssapps/hub/src/i18n/messages.jsonappControl.opening,appControl.closingandappControl.confirmTimeout, in Spanish and English.apps/hub/src/App.test.tsxTest evidence
Run from
apps/hubunless noted:npm test: 44 files, 602 tests passed.npx tsc --noEmit -p .: clean.npx biome checkon the touched files: no new warnings. ThenoNonNullAssertionandnoImportantStyleswarnings were already there.npm run ds:doctor: 0 errors, 0 warnings.npm run test:ds-adoption: 8 passed.cargo.exe build) served by Vite: the maintainer confirmed the open and close flow, then asked for the notice spacing and the row collapse included here.Risks and follow-ups
refreshAppsis shared with window focus, install completion, Refresh apps and registry-departure rescans. These now keep stale data on screen during a scan instead of blanking it. Scan ordering is still guarded byscanId.scripts/check.sh --windowswas not run, because no Rust code changed.Review notes
pendingSettledandstartPending/endPendinginApp.tsx.AI assistance
el Gentleman (Claude) diagnosed the cause, wrote the code and tests, and ran the checks. The maintainer tested the result on Windows and owns the final decision.