Include .yml and .markdown in Drive import file picker#9400
Include .yml and .markdown in Drive import file picker#9400bnavetta merged 2 commits intowarpdotdev:masterfrom
Conversation
The Warp Drive import file picker filters by `FileType::Yaml` and `FileType::Markdown`, but only the canonical extensions were listed (`yaml`, `md`). The import flow itself accepts the alternate forms: - `app/src/drive/import/nodes.rs` treats both `.yaml` and `.yml` as workflow files. - `is_markdown_file` (warp_util) recognizes both `.md` and `.markdown` as notebook files. - The import modal's helper text already advertises "md, yaml, yml". So a user can drag-and-drop a `.yml` workflow or a `.markdown` notebook and it imports fine, but the picker hides those files. Aligning the picker filter with what the importer accepts.
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I approved this pull request. No matching stakeholder was found for the changed files, so no human reviewers were requested. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR expands the Drive import file picker extension filters so YAML accepts .yaml/.yml and Markdown accepts .md/.markdown, aligning picker behavior with the importer and adding focused unit coverage.
Concerns
- No blocking correctness, security, or maintainability concerns found in the changed lines.
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
| } | ||
|
|
||
| #[cfg(test)] | ||
| mod tests { |
There was a problem hiding this comment.
Per repo conventions, could you put this in a file_picker_tests.rs file alongside this one? You can then use a #[path] attribute to add that file as the test module.
|
Left a comment on test structure, but the core change looks good! |
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Anshul Garg.
|
|
@bnavetta thanks! Moved the tests to |
|
I'm checking this implementation PR for association with a likely matching ready issue. Powered by Oz |
e969c17 to
0a5f74c
Compare
Description
The Warp Drive import flow lets users pick workflow (YAML) and notebook (Markdown) files. The picker uses
FileType::YamlandFileType::Markdownfromwarpui_core::platform::file_picker, which previously listed onlyyamlandmd. That doesn't match what the importer is willing to ingest:app/src/drive/import/nodes.rs(TryFrom<&Path> for FileType) accepts both.yamland.ymlfor workflows.warp_util::file_type::is_markdown_filerecognises both.mdand.markdown(MARKDOWN_EXTENSIONS).modal_body.rsalready advertises"md, yaml, yml"to users.The result: a user can drag-and-drop a
.ymlworkflow or.markdownnotebook and it imports cleanly, but the file picker filter hides those same files when they click "Choose files…". This change brings the picker in line with what the rest of the import path already accepts.I left
FileType::Imagealone — that one has a separate user-facing contract (the theme creator body explicitly says "(.png, .jpg)"), so broadening it would need its own design decision.Testing
FileType::YamlandFileType::Markdown.cargo fmt -p warpui_core -- --checkcargo nextestlocally (Metal toolchain not available on this machine), the change is well-scoped to a const-array literal so risk is low.Server API
No server changes.
Agent Mode
Not applicable.
Changelog Entries
.ymland.markdownfiles in addition to.yamland.md.