[Fix] Don't get a freshly cloned repo stuck in a loading state in project explorer#9998
[Fix] Don't get a freshly cloned repo stuck in a loading state in project explorer#9998moirahuang merged 4 commits intomasterfrom
Conversation
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
| Some(state.entry.clone()) | ||
| } | ||
| Some(IndexedRepoState::Pending) => { | ||
| // Repo is being (re-)indexed. Keep whatever entry |
There was a problem hiding this comment.
i debated removing this comment and the comment below but i think they are actually helpful in explaining the decision here to prevent future regressions
There was a problem hiding this comment.
Overview
This PR keeps existing project-explorer entries while repository metadata is pending so freshly cloned repositories do not flash back to a loading state during lazy-loaded-to-indexed transitions.
Concerns
register_and_refresh_lazy_loaded_directorynow preserves any non-empty existing entry whenever the metadata lookup returns no entry, including failed or untracked paths, which can leave stale children visible instead of resetting the root.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
| // prior lazy-loaded index that is now being upgraded to a full git | ||
| // repo). Overwriting with an empty entry causes the tree to flash | ||
| // back to a loading state during the Pending → Indexed transition. | ||
| let has_children = root_dir |
There was a problem hiding this comment.
entry == None also covers failed or untracked paths, such as a deleted directory, so using child count preserves stale children; gate this preservation on IndexedRepoState::Pending instead.
There was a problem hiding this comment.
this is fair, going tot update
…ject explorer (warpdotdev#9998) ## Description Fixes warpdotdev#9846 by making sure we don't overwrite with an empty entry if we have a lazy loaded index. ## Linked Issue warpdotdev#9846 - [x] The linked issue is labeled `ready-to-spec` or `ready-to-implement`. - [x] Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes). ## Screenshots / Videos https://www.loom.com/share/0213603002f84250b6366d99cb938a5c ## Testing Locally tested: https://www.loom.com/share/0213603002f84250b6366d99cb938a5c ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode <!-- ## Changelog Entries for Stable The entries below will be used when constructing a soft-copy of the stable release changelog. Leave blank or remove the lines if no entry in the stable changelog is needed. Entries should be on the same line, without the `{{` `}}` brackets. You can use multiple lines, even of the same type. The valid suffixes are: * NEW-FEATURE: for new, relatively sizable features. Features listed here will likely have docs / social media posts / marketing launches associated with them, so use sparingly. * IMPROVEMENT: for new functionality of existing features. * BUG-FIX: for fixes related to known bugs or regressions. * IMAGE: the image specified by the URL (hosted on GCP) will be added to Dev & Preview releases. For Stable releases, see the pinned doc in the #release Slack channel. * OZ: Oz-related updates. Use `CHANGELOG-OZ`. At most 4 Oz updates are shown in-app per release. CHANGELOG-NEW-FEATURE: {{text goes here...}} CHANGELOG-IMPROVEMENT: {{text goes here...}} CHANGELOG-BUG-FIX: {{text goes here...}} CHANGELOG-BUG-FIX: {{more text goes here...}} CHANGELOG-IMAGE: {{GCP-hosted URL goes here...}} CHANGELOG-OZ: {{text goes here...}} -->
…ject explorer (warpdotdev#9998) ## Description Fixes warpdotdev#9846 by making sure we don't overwrite with an empty entry if we have a lazy loaded index. ## Linked Issue warpdotdev#9846 - [x] The linked issue is labeled `ready-to-spec` or `ready-to-implement`. - [x] Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes). ## Screenshots / Videos https://www.loom.com/share/0213603002f84250b6366d99cb938a5c ## Testing Locally tested: https://www.loom.com/share/0213603002f84250b6366d99cb938a5c ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode <!-- ## Changelog Entries for Stable The entries below will be used when constructing a soft-copy of the stable release changelog. Leave blank or remove the lines if no entry in the stable changelog is needed. Entries should be on the same line, without the `{{` `}}` brackets. You can use multiple lines, even of the same type. The valid suffixes are: * NEW-FEATURE: for new, relatively sizable features. Features listed here will likely have docs / social media posts / marketing launches associated with them, so use sparingly. * IMPROVEMENT: for new functionality of existing features. * BUG-FIX: for fixes related to known bugs or regressions. * IMAGE: the image specified by the URL (hosted on GCP) will be added to Dev & Preview releases. For Stable releases, see the pinned doc in the #release Slack channel. * OZ: Oz-related updates. Use `CHANGELOG-OZ`. At most 4 Oz updates are shown in-app per release. CHANGELOG-NEW-FEATURE: {{text goes here...}} CHANGELOG-IMPROVEMENT: {{text goes here...}} CHANGELOG-BUG-FIX: {{text goes here...}} CHANGELOG-BUG-FIX: {{more text goes here...}} CHANGELOG-IMAGE: {{GCP-hosted URL goes here...}} CHANGELOG-OZ: {{text goes here...}} -->
…ject explorer (warpdotdev#9998) ## Description Fixes warpdotdev#9846 by making sure we don't overwrite with an empty entry if we have a lazy loaded index. ## Linked Issue warpdotdev#9846 - [x] The linked issue is labeled `ready-to-spec` or `ready-to-implement`. - [x] Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes). ## Screenshots / Videos https://www.loom.com/share/0213603002f84250b6366d99cb938a5c ## Testing Locally tested: https://www.loom.com/share/0213603002f84250b6366d99cb938a5c ## Agent Mode - [x] Warp Agent Mode - This PR was created via Warp's AI Agent Mode <!-- ## Changelog Entries for Stable The entries below will be used when constructing a soft-copy of the stable release changelog. Leave blank or remove the lines if no entry in the stable changelog is needed. Entries should be on the same line, without the `{{` `}}` brackets. You can use multiple lines, even of the same type. The valid suffixes are: * NEW-FEATURE: for new, relatively sizable features. Features listed here will likely have docs / social media posts / marketing launches associated with them, so use sparingly. * IMPROVEMENT: for new functionality of existing features. * BUG-FIX: for fixes related to known bugs or regressions. * IMAGE: the image specified by the URL (hosted on GCP) will be added to Dev & Preview releases. For Stable releases, see the pinned doc in the #release Slack channel. * OZ: Oz-related updates. Use `CHANGELOG-OZ`. At most 4 Oz updates are shown in-app per release. CHANGELOG-NEW-FEATURE: {{text goes here...}} CHANGELOG-IMPROVEMENT: {{text goes here...}} CHANGELOG-BUG-FIX: {{text goes here...}} CHANGELOG-BUG-FIX: {{more text goes here...}} CHANGELOG-IMAGE: {{GCP-hosted URL goes here...}} CHANGELOG-OZ: {{text goes here...}} -->
Cherry-picked from upstream: - fix: highlight C++ header extensions (warpdotdev#9388) - Run executable shell scripts in the terminal (warpdotdev#9503) - Revert schema generator binary recompilation fix (warpdotdev#9676) - Remove stray backticks from Windows installer README (warpdotdev#9691) - Fix chord shortcuts on Windows non-Latin keyboard layouts (warpdotdev#9476) - Scroll output with Page Up/Down from prompt (warpdotdev#9624) - Respect Markdown Viewer setting for .md links in AI rules/facts panel (warpdotdev#9699) - fix: disable reset grid checks for restored blocks on Windows (warpdotdev#9987) - add RedirectionGuard=no to windows-installer.iss (warpdotdev#9863) - Windows quake mode window correctly sized (warpdotdev#9891) - fix: update rand to 0.9.4 (GHSA-cq8v-f236-94qc) (warpdotdev#10060) - Fix diff button when Show code review button toggle is off (warpdotdev#9600) - Fix freshly cloned repo stuck in loading state (warpdotdev#9998) - Fix terminal text selection not auto-scrolling when dragging (warpdotdev#9448) - Resolve conflict markers from 3f0ac51 and edac651
Description
Fixes #9846 by making sure we don't overwrite with an empty entry if we have a lazy loaded index.
Linked Issue
#9846
ready-to-specorready-to-implement.Screenshots / Videos
https://www.loom.com/share/0213603002f84250b6366d99cb938a5c
Testing
Locally tested: https://www.loom.com/share/0213603002f84250b6366d99cb938a5c
Agent Mode