Skip to content

I can refresh the Explorer when it's out of date #332

Description

@a-team-app

Context

The Explorer reads a folder's children once, when it's expanded, so after a git switch, a build or a script in another terminal it still lists deleted files and misses new ones, with no way to fix it short of collapsing the folder or restarting. This slice gives the user a dependable manual refresh. Pitch: #292.

Acceptance criteria

  • Delete a file and create another in an expanded folder from another terminal, then run Refresh explorer from the command palette (Ctrl+E): the tree shows the new file and no longer shows the deleted one.
  • The same works from the mnemonic leader: Ctrl+Space then re.
  • Changes in a nested expanded folder (not just the top one) show up after one refresh.
  • Every folder that was expanded before the refresh is still expanded after it; collapsed folders stay collapsed.
  • The selection stays on the same file after a refresh. If that file was deleted, the selection moves to its neighbour, as it does after Delete in the Explorer.
  • The tree doesn't scroll unless it has to keep the selection visible.
  • If an expanded folder was itself deleted, the refresh drops it from the tree without an error.
  • Refresh explorer appears in Settings › Keyboard Shortcuts with no default key, and a key bound to it there works.

Tests

  • The command re-reads every expanded folder: added, removed and renamed entries, at the root and nested.
  • Expansion state preserved across a refresh; collapsed folders not re-read.
  • Selection kept by path; falls to the neighbour when its entry is gone; handled when the selected folder or an expanded ancestor was deleted.
  • Mnemonic re registered and the prefix-free guard still passes.
  • Command has no default binding.

Out of scope

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-team:devClaimed by the a-team Dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions