mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-09-30 20:49:41 +02:00
fix(run-menu): let recent-session rows use the width the menu was given
PR #274 lifted the Run menu's 250px cap to `calc(100vw - 24px)` so a recent-session row would have room for its worktree pill and parent path. The rows never took it: `.run-mode-history` is a block scroller, so its <button> rows are shrink-to-fit and stayed at ~250px inside a 1376px menu, leaving ~1100px of empty dropdown and no space for `.hist-dir`'s `flex: 1` + `text-align: right` to expand into. Rows now fill the menu, and the menu is capped at the 760px one full row actually costs rather than the whole window. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4465,8 +4465,12 @@ body.touch-device .terminal-container .xterm .xterm-helper-textarea {
|
||||
menu itself and a viewport-wide drawer there would cover the composer. */
|
||||
@media (min-width: 769px) {
|
||||
.run-mode-menu {
|
||||
/* Bounded, not viewport-wide. `100vw - 24px` spanned the whole window while
|
||||
every row stayed shrink-to-fit at ~250px (see below), so the menu grew by
|
||||
~1100px of dead space. 760px is what one full row costs: name + worktree
|
||||
pill + parent path + timestamp. */
|
||||
max-width: none;
|
||||
width: calc(100vw - 24px);
|
||||
width: min(760px, calc(100vw - 24px));
|
||||
}
|
||||
.run-mode-history {
|
||||
/* More rows are worth showing once each one is legible. */
|
||||
@@ -4542,6 +4546,12 @@ body.touch-device .terminal-container .xterm .xterm-helper-textarea {
|
||||
simply pinned the menu at its max-width. */
|
||||
.run-mode-history .run-mode-option {
|
||||
max-width: 100%;
|
||||
/* `.run-mode-history` is a block scroller, not a flex container, so these
|
||||
<button> rows are shrink-to-fit and ignore the menu's width. Without this
|
||||
the `flex: 1` + `text-align: right` on `.hist-dir` below have nothing to
|
||||
expand into: the path never right-aligns and widening the menu only adds
|
||||
empty space to its right. */
|
||||
width: 100%;
|
||||
}
|
||||
/* Recent-session row: identity first, path last.
|
||||
The row reads <folder> [⑂ worktree · branch] <parent path> <time>
|
||||
|
||||
Reference in New Issue
Block a user