Commit c61ad5b
authored
Include .yml and .markdown in Drive import file picker (#9400)
### Description
The Warp Drive import flow lets users pick workflow (YAML) and notebook
(Markdown) files. The picker uses `FileType::Yaml` and
`FileType::Markdown` from `warpui_core::platform::file_picker`, which
previously listed only `yaml` and `md`. That doesn't match what the
importer is willing to ingest:
-
[`app/src/drive/import/nodes.rs`](https://github.com/warpdotdev/warp/blob/main/app/src/drive/import/nodes.rs)
(`TryFrom<&Path> for FileType`) accepts both `.yaml` and `.yml` for
workflows.
-
[`warp_util::file_type::is_markdown_file`](https://github.com/warpdotdev/warp/blob/main/crates/warp_util/src/file_type.rs)
recognises both `.md` and `.markdown` (`MARKDOWN_EXTENSIONS`).
- The import modal's helper text in `modal_body.rs` already advertises
`"md, yaml, yml"` to users.
The result: a user can drag-and-drop a `.yml` workflow or `.markdown`
notebook 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::Image` alone — 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
- Added two unit tests covering both extensions for `FileType::Yaml` and
`FileType::Markdown`.
- `cargo fmt -p warpui_core -- --check`
- Couldn't run the full `cargo nextest` locally (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
- Warp Drive import file picker now lists `.yml` and `.markdown` files
in addition to `.yaml` and `.md`.
---------
Co-authored-by: anshul-garg27 <anshul-garg27@users.noreply.github.com>
Co-authored-by: anshul-garg27 <13553550+anshul-garg27@users.noreply.github.com>1 parent 4dddda6 commit c61ad5b
2 files changed
Lines changed: 17 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments