feat(maestro): abbreviate paths in spawn dialog recent-dir picker
ci / rust (push) Failing after 1m43s
ci / rust (push) Failing after 1m43s
The working-directory picker showed raw absolute paths (`/home/naps62/...`), unlike the sidebar tree which collapses home to `~` and shrinks leading segments to initials. Reuse the sidebar's abbreviation so both read the same: `/home/naps62/git.naps.pt/naps62/maestro` → `~/g/n/maestro`, with the full path kept in the row tooltip and submitted verbatim. - types.ts: hoist `abbreviateFolderName` (+ a local `escapeHtml`) here so both the sidebar and spawn dialog share one implementation (catalog.ts imports spawn.ts, so the helper can't live in catalog without a cycle). - catalog.ts: import the shared helper instead of its own copy. - spawn.ts: abbreviate each recent-dir row via `abbreviateFolderName(abbreviateCwd(...))`. - styles.css: dim the collapsed stem in the picker too (`.recent-dir .folder-stem`). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+4
-2
@@ -756,8 +756,10 @@ textarea {
|
||||
}
|
||||
|
||||
/* Earlier path segments collapse to their initial; the trailing segment (the
|
||||
one that actually names the dir) stays full. Dim the collapsed prefix. */
|
||||
.folder-name .folder-stem {
|
||||
one that actually names the dir) stays full. Dim the collapsed prefix. Shared
|
||||
by the sidebar tree and the spawn dialog's recent-directory picker. */
|
||||
.folder-name .folder-stem,
|
||||
.recent-dir .folder-stem {
|
||||
color: var(--faint);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user