Skip to content

[Fix] Don't get a freshly cloned repo stuck in a loading state in project explorer#9998

Merged
moirahuang merged 4 commits intomasterfrom
moira/debug-file-tree
May 5, 2026
Merged

[Fix] Don't get a freshly cloned repo stuck in a loading state in project explorer#9998
moirahuang merged 4 commits intomasterfrom
moira/debug-file-tree

Conversation

@moirahuang
Copy link
Copy Markdown
Contributor

Description

Fixes #9846 by making sure we don't overwrite with an empty entry if we have a lazy loaded index.

Linked Issue

#9846

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • 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

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@cla-bot cla-bot Bot added the cla-signed label May 3, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 3, 2026

@moirahuang

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Some(state.entry.clone())
}
Some(IndexedRepoState::Pending) => {
// Repo is being (re-)indexed. Keep whatever entry
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@moirahuang moirahuang requested a review from alokedesai May 3, 2026 23:08
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_directory now 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

Comment thread app/src/code/file_tree/view.rs Outdated
// 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fair, going tot update

@moirahuang moirahuang merged commit 5d8507e into master May 5, 2026
24 checks passed
@moirahuang moirahuang deleted the moira/debug-file-tree branch May 5, 2026 00:08
wolverine2k pushed a commit to wolverine2k/warp that referenced this pull request May 5, 2026
…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...}}
-->
Leejaywell pushed a commit to Leejaywell/warp that referenced this pull request May 5, 2026
…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...}}
-->
Leejaywell pushed a commit to Leejaywell/warp that referenced this pull request May 5, 2026
…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...}}
-->
Leejaywell added a commit to Leejaywell/warp that referenced this pull request May 5, 2026
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File tree sidebar does not load when opened immediately after cloning a repository

2 participants