Expanded items under Quick Access collapse when the window regains focus

オープン
#9,235 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript
領域
frontend

調査の方向性

Start by tracing the visibilitychange handler in account-panel/dist/panels/AccountPanel/index.js to ensureCorrectSubscriptionNodes in out/app/index.js, then read resetAndRefreshChildren() in explorer-panel. Reproduce the focus change with expanded Quick Access items and check how child view models are rebuilt. Done means expanded descendants remain open after returning to the window, without breaking refreshes after subscription changes.

索引モデルが issue の本文から書いたものです。

説明

Storage Explorer Version

1.47.1

Regression From

No response

Architecture

x64

Storage Explorer Build Number

20261106.18

Platform

Windows

OS Version

Windows 11

Bug Description

When I switch away from Storage Explorer and come back, everything I expanded under Quick Access collapses. The Quick Access node stays expanded, but the containers and folders inside it close every time the window regains focus. Attached Blob, Queue, Table and File services seem to lose their expanded state in the same way.

Analysis (from the shipped JS bundles)
  • account-panel/dist/panels/AccountPanel/index.js registers:
    document.addEventListener("visibilitychange", () => {
      const hidden = document.webkitHidden;
      hidden ? Host.executeFunction("StorageExplorer.TopLevelNodes.ensureCorrectSubscriptionNodes") : vm.refresh();
    });
    
  • In out/app/index.js, StorageExplorer.TopLevelNodes.ensureCorrectSubscriptionNodes unconditionally runs
    QuickAccessManager.instance.refreshQuickAccessNode() and ResourceTree.refreshChildren(...) on all attached service nodes.
  • refreshQuickAccessNode() → ResourceTree.refreshChildren(["Azure.QuickAccess"]) + expand(["Azure.QuickAccess"]).
  • In explorer-panel, resetAndRefreshChildren() disposes the child group view model and builds a new one, carrying over only the parent's own isExpanded() state. Descendant expansion state is lost.

So a visibility change that isn't a user action triggers a full rebuild of Quick Access, which loses the user's expansion state.

Suggested fixes
  • Only run ensureCorrectSubscriptionNodes when subscription/account selection actually changed (or only when the user leaves the Account panel, not on window-level visibility changes); and/or
  • Make resetAndRefreshChildren() preserve and restore the expansion state of descendants (e.g. by node UID) after reloading.
Workaround

Locally removing the refreshQuickAccessNode() call from ensureCorrectSubscriptionNodes in out/app/index.js stops the collapse (tested on 1.47.1). This confirms the call is the cause. With that change, Quick Access no longer auto-refreshes after subscription changes.

Resource Types

Quick Access - Storage Accounts

Authentication Method

Sign in

Connection Type

Sign in (subscription)

Steps to Reproduce
  1. Pin a storage account or container to Quick Access.
  2. Expand the item and some of its children (e.g. Blob Containers → a container).
  3. Switch to another application (or minimize Storage Explorer), then return.
Actual Experience

Quick Access stays expanded, but every item underneath it collapses. Attached Blob/Queue/Table/File service nodes appear to lose their child state in the same way.

Expected Experience

The Quick Access tree keeps its expansion state.

Additional Context

No response

主要言語
言語のデータがありません
スター
458
フォーク
92
平均マージ
17時間 57分
マージ済み PR(30日)
4

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/AzureStorageExplorer のほかの issue

microsoft/AzureStorageExplorer の issue をすべて見る

似ている issue

Web Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。