0
Fork 0
mirror of https://github.com/zeronsh/comet.git synced 2026-11-16 18:57:19 +00:00
comet/docs/media/new-project-path
Alexandre V.L 77a3c0ff1b
New project: type a folder's path, with ⇥ completion (#998)
* New project: type a folder's path, with ⇥ completion

Adding a project meant walking to its folder one crumb at a time, even
when its path was known. The trail can now be typed into, like a file
manager's address bar:

- ⌘L, the pen at the end of the trail, or a click on the trail's empty
  end turns it into a path field: the open folder's path, spelled from ~
  under home, selected.
- ⇥ completes the folder under the caret from the device's listing,
  previewed as a ghost. ↵ opens the path and gives the trail back; ⌘↵
  opens it and adds it as a project. Esc gives the trail back and keeps
  New project open.
- A folder pasted from the file manager becomes the path.
- A path that doesn't open keeps the field and says why ("No folder at
  ~/…", "~/x isn't a folder"); the list below it doesn't change.
- Relative paths start from the open folder. On Windows devices \dir
  and /dir start from the drive's root, D:dir from D:\, //nas/share is
  a share; elsewhere a backslash escapes, as in a shell.

Tab and Shift+Tab now stay in the palette while it's open: the search's
⇥ used to move focus behind it as well.

The new-project-path-fixture example runs the production Shell against
an engine served over IPC, drives the flow with window events, checks
the palette and the engine's project registry, and writes the stills
and recording in docs/media/new-project-path.

* New project typed-path demo media for the PR (screenshots + recording)

The new-project-path-fixture example's output: eight stills (full window
and palette crop each), the MP4 recording, a GIF encoded from it, and
the run's 16 passing checks. README.md says how they were made.
History 2026-10-24 19:39:30 +00:00
..
01-path-field-on-device-palette.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
01-path-field-on-device.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
02-completion-ghost-palette.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
02-completion-ghost.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
03-completed-path-palette.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
03-completed-path.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
04-project-added-palette.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
04-project-added.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
05-crumbs-with-edit-palette.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
05-crumbs-with-edit.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
06-path-field-selected-palette.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
06-path-field-selected.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
07-edited-path-opened-palette.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
07-edited-path-opened.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
08-missing-folder-palette.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
08-missing-folder.png New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
new-project-path.gif New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
new-project-path.mp4 New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
README.md New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00
result.txt New project: type a folder's path, with ⇥ completion (#998) 2026-10-24 19:39:30 +00:00

New project: typed path

Captured on macOS on 2026-10-24 from commit 3a71e34a (on 1ec71a31). The fixture runs the production Shell against a real engine assembled in process and served over IPC, listing a scratch home at /tmp/zeron-demo/ana. It registers no agent harness, so no installed agent CLI starts, and it passes ListDrives through a filter that keeps the boot volume only, so the Locations step doesn't show the capturing Mac's other disks. Frames come from the window's own renderer (render_to_image), not an OS screen recording.

Build and run:

cargo build -p zeron-ui --example new-project-path-fixture --features project-path-fixture
target/debug/examples/new-project-path-fixture <output>

Executable: target/debug/examples/new-project-path-fixture; SHA256 a36346ab8d504c261ab37e395181c96df1c0ae1c0a7baebd410725cd042b6794. Every step is a window key or mouse event; typed text goes through the focused field's input handler. The run passed its 16 checks of the palette state and the engine's project registry, Esc through the window's real key dispatch included (result.txt; a failed check exits 1).

This folder is the fixture's output as written, plus new-project-path.gif (12 fps, 960 px, encoded from the MP4 with ffmpeg). Each still is the full window, <name>.png, and the palette area, <name>-palette.png (600 × 560 pt at 2×):

  • 01-path-field-on-device: ⌘L on the device list opens the path field on the highlighted device, prefilled with ~/.
  • 02-completion-ghost: ~/co previews de from the device's listing; ⇥ completes it to ~/code/.
  • 03-completed-path: ⇥ per segment reaches ~/code/opensource/zeron/.
  • 04-project-added: ⌘↵ opened and added it; the app lands on the new project.
  • 05-crumbs-with-edit: while browsing, the pen sits at the trail's end and the footer offers ⌘L.
  • 06-path-field-selected: the pen turns the trail into the open folder's path, ~/code/work/, selected.
  • 07-edited-path-opened: da and ⇥ give ~/code/work/dashboard/; ↵ opens it and the trail comes back.
  • 08-missing-folder: a typo keeps the field and says why; the list below it doesn't change.

These captures validate rendering and the keyboard and mouse flow against a real engine's ListFolders and createSpace on the local device. Remote devices (targetDeviceId) and Windows paths are covered by unit tests, not captures.

Validation: cargo test -p zeron-ui --lib -- pickers:: shell::spaces:: (137 passed; Esc and Tab are dispatched through a drawn window, and fail without their fixes); cargo clippy -p zeron-ui --lib --tests --example new-project-path-fixture --features project-path-fixture (no findings on changed lines); rustfmt on the changed hunks.