fix(harmonyos): refresh sidebar sessions without loading flicker - #2991
Merged
bobleer merged 1 commit intoSep 12, 2026
Merged
Conversation
Refresh disclosed workspace session lists when opening or restoring the sidebar and when refreshing devices, while preserving lazy workspace loading. Keep cached lists and previously loaded empty lists visible during refresh. Scope in-flight requests to their account, device, and connection generation. Publish current-workspace snapshots through the session controller and prevent older refresh or pagination responses from replacing newer lists. Add regression coverage for cache retention, empty results, concurrent refresh coalescing, and stale account, connection, and session-list responses.
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.
Summary
Refresh HarmonyOS sidebar session lists when the sidebar opens or is restored and when the user presses the refresh button. Cached lists, including previously loaded empty lists, refresh without a loading row. Workspace expansion retains its existing lazy-loading behavior.
Type and Areas
Type: Bug fix
Areas: Native HarmonyOS controller, sidebar/session state, focused regression tests.
Motivation / Impact
After the phone loaded a workspace, a session created on Desktop could remain absent from the phone's sidebar. Cached rows prevented another list request, and the refresh button only updated device presence.
The sidebar now refreshes the selected online device's disclosed workspaces, retaining cached rows, selection, and disclosure state. Current-workspace results also update the session controller. Requests are coalesced, and stale account, connection, refresh, or pagination responses cannot overwrite newer snapshots.
Verification
node scripts/check-harmonyos-architecture.mjs: passed.git diff --check: passed.node scripts/check-git-object-sizes.mjs --base origin/main --head HEAD: passed for all 12 changed blobs.DeviceDirectoryUnit.test.etsand theRemoteSessionControllersuite inRemoteControllersUnit.test.ets: 40/40 passed using a temporary harness with platform APIs mocked. The real list implementations and checked-in test bodies were executed.hvigorw --mode module -p product=default -p module=entry@default assembleHap --no-daemon: passed in WSL with the installed HarmonyOS toolchain. Verified build inputs, HAP ZIP integrity, ArkTS bytecode, AArch64 library, and Windows handoff SHA-256.hvigorw --mode module -p module=entry@default -p ohos.test.type=LocalTest test --no-daemon: the SDK runner stalled at its Linux execution stage; this is not counted as a passing native test run.Reviewer Notes
Checklist