feat: add new directory option to file tree menu#12057
Conversation
Co-Authored-By: Oz <oz-agent@warp.dev> Co-Authored-By: oz-for-x[bot] <284697482+oz-for-x[bot]@users.noreply.github.com>
|
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 |
There was a problem hiding this comment.
Overview
This PR adds a New directory action to the local Project Explorer directory context menu and wires it into the existing pending-edit create flow with unit coverage.
Concerns
- A failed directory creation can leave the dummy directory row in the tree after the pending edit has already been cleared.
- This is a user-facing context-menu and file-tree behavior change, but the PR description does not include screenshots or a screen recording demonstrating the flow end to end. Please attach visual evidence for the menu item, inline edit state, successful creation, and cancellation/error behavior.
Verdict
Found: 0 critical, 2 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
Remove transient create placeholders when file or directory creation fails so the Project Explorer tree does not retain stale rows after filesystem errors. Add regression coverage for duplicate-directory creation failures. Co-Authored-By: Oz <oz-agent@warp.dev>
Move create-result blocks out of match scrutinees so the failed placeholder cleanup path satisfies clippy::blocks_in_conditions. Co-Authored-By: Oz <oz-agent@warp.dev>
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review 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 |
There was a problem hiding this comment.
Overview
This PR adds a Project Explorer directory context-menu action, inline pending-edit handling for directory creation, and unit coverage for the new action and failure cleanup.
Concerns
- The successful directory-create path clones the placeholder directory state instead of updating the selected placeholder item before rebuilding, so selection preservation can look up the stale
new_directorypath and leaveselected_itempointing at the wrong row. - The successful directory-create path rebuilds the flattened item list without notifying the view, which can delay repainting the newly created directory until another event occurs.
Verdict
Found: 0 critical, 2 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
Update create placeholders in-place after successful filesystem creation so selection preservation and immediate repaint use the final path. Add coverage for selection after creating a directory. Co-Authored-By: Oz <oz-agent@warp.dev>
|
/oz-review |
|
I'm re-reviewing this pull request in response to a review 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 |
There was a problem hiding this comment.
Overview
This PR adds a New directory action to the local Project Explorer directory context menu, wires it through the pending inline-edit flow, creates the directory on disk, updates the in-memory file tree, and adds focused unit coverage. The PR description includes screenshots and manual UI verification for the user-facing behavior.
Concerns
None. I did not find material correctness, security, or spec-drift issues in the annotated diff. spec_context.md reports that no approved or repository spec context was found for this PR.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz


Closes #12056
Summary
New directoryitem next toNew filein the local Project Explorer directory context menu.Validation
./script/formatcargo test -p warp new_directorycargo clippy -p warp --lib --tests -- -D warningsNotes
cargo clippy --workspace --all-targets --all-features --tests -- -D warnings, but it could not complete in this environment because the privatewarp-channel-configgenerator was unavailable over SSH, leaving release-bundlestable_config.json/preview_config.jsonfiles ungenerated.UI verification evidence
JJruPDJq2Y2vWIxA8pvAYX, checkout/workspace/warp.a52b2247f5db8184d340d0be17d076bf96f91c87on branchoz-agent/implement-issue-12056.cargo test -p warp new_directorypassed after installing missing sandboxprotocdependency: 3 passed, 0 failed, 4842 filtered out.cargo build -p warp --bin warppassed./tmp/warp-pr12057-ui-recheckusing the staging API key environment variable.parentshowedNew fileandNew directoryat the top, followed bycd to directory,Open in new tab,Reveal in file manager,Rename,Delete,Attach as context,Copy path, andCopy relative path.New directoryopened a focused inline child row underparent; enteringui_created_dirand pressing Enter created the directory and refreshed the tree.New directoryagain, entering existingduplicate_dir, and pressing Enter removed the inline placeholder; the originalduplicate_dirremained unchanged and no stale duplicate row remained.New directoryagain and pressing Escape with an empty editor removed the placeholder with no ghost row.