S010: tabs, split view, breadcrumb, history, places sidebar and config

Shell with one folder model per pane, back/forward/up history, editable
breadcrumb with folder completion, draggable pill tabs, places with
bookmarks in places.toml, session restore and a status bar.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-18 14:37:15 -06:00
commit a1647a662d

View file

@ -92,5 +92,12 @@ One entry per session, newest last, ≤ 15 lines: done, verified how, not done,
- Not done: navigation slide and live motion not watched (no event loop offscreen; S035); `tunal --screenshot` in the grid view shows one column until S010 keeps the Shell alive in its screenshot path. Screenshot env `TUNAL_VIEW=grid` added.
- Later: a live switch to reduced motion during a change leaves its leaving rows until the next change; entering rows interrupted mid-growth jump to full height; grid thumbnails (S018) go in `GridCell`.
## S010 — Tabs, split view, breadcrumbs, history and places
- Done: `config.rs` (`$XDG_CONFIG_HOME/tunal/<name>.toml`, `load` with defaults, atomic `save`/`store`; `Settings { restore_session, show_sidebar }`, `Session { tabs: [{ panes: [uri], active }], current }` saved on window close). `shell/`: `Shell::attach(ui, locations, tabs, blocking)` owns tabs (rows in opening order + `slot`), one `Pane` per view (`pane.rs`: own `FolderModel`, back/forward stacks, `open_travel` into/up/back/forward, deliver by pane id), split toggle (F3, new pane active), active pane header; `path.rs` crumbs (Home stands in for its path, `File system`, `Trash`), typed paths (`~`, `..`, relative, any `scheme://`), folder completion off-thread; `places.rs` (home + `user-dirs.dirs` + Trash, bookmarks in `places.toml` with rename/move/remove menu and dialog, collapsed sections; `Places::set_section(Section::Devices|Network, Vec<Place>)` for later plans, `#[expect(dead_code)]` until used). UI `ui/shell/{tab-bar,toolbar,breadcrumb,pane,sidebar,status-bar}.slint`; MainWindow is per pane now (D-034). Mouse back/forward via the winit event hook (`unstable-winit-030`). `StateLayer` gained `pointer`, `moved`, `mouse-x`, `pressed-x`. `tunal [<dir>…] [--split a b]`.
- Open a URI in a new tab: `Shell::open_tab(vec![uri]); show_current()` (private; add a `pub fn` when a plan needs it from outside the shell).
- Verified: workspace build, clippy -D warnings, fmt --check, literal grep empty; looked at light + dark 1200x760 with two tabs, split view and sidebar, restored session (3 tabs, bookmarks, collapsed section), breadcrumb editing with completion list. Temporary uncommitted hook in a scratch copy: history (into/up/back/forward/crumb), typed paths, completion of 5 inputs, select-all status, tab new/move/cycle/close, split, bookmarks add (deduped)/move/rename/remove, session + places files written and read back; real key and pointer events through the window: Ctrl+T/W/Tab, Ctrl+L + typing + Enter/Esc, Alt+arrows, F3, F9, middle-click close, drag tab to front, click empty breadcrumb, place and crumb clicks.
- Not done: mouse back/forward buttons not exercised (winit only; no live window). Tab and section motion not watched (software renderer ignores `transform-*`; screenshots are single frames). Completion list delivery needs the event loop (logic and list checked separately). A closed tab vanishes at once; the others slide over.
- Later: tab bar scrolling past the minimum width; drag-reorder bookmarks in the sidebar; per-place glyph on tabs (Music shows a plain folder); Backspace to go up.
## Later
-