fix(sidebar): give the tab rows a width that resolves

The rows, their group blocks and the scroll area all ask for `w_full`, and
a percentage is only a width while some box above it has a real one. The
column inside the rail declared `size_full`, which is another percentage:
on the passes that size that column from its content there was nothing for
any of them to resolve against, so every row fell back to hugging the
longest tab name and the active row's capsule stopped well short of the
rail's edge.

Hand that column real pixels instead. The rail is `w(px(width))` and layout
is border-box, so its content is one pixel narrower because of the right
border. With a definite width there, the whole chain below resolves — which
also makes the same trick on `workspace_head` redundant, though it is left
in place as a harmless explicit width.

`w_full` on the scroll area itself is the second half: a stretched width
sizes it the same but not definitely, and the rows inside need a definite
one to be a percentage of.
This commit is contained in:
l0ng-ai
2026-08-16 19:05:53 +08:00
parent 0295a98915
commit 95305d50dd
+11 -1
View File
@@ -145,6 +145,7 @@ impl Tty7App {
.track_scroll(&self.sidebar_scroll)
.flex_1()
.min_h_0()
.w_full()
.overflow_y_scroll()
.px_1()
.py_1p5()
@@ -1132,8 +1133,17 @@ impl Tty7App {
.border_color(cx.theme().sidebar_border)
.child(backing)
.child(
// Real pixels, not `size_full`: the rail's own width is a
// definite `px`, but a percentage off it is still a percentage,
// and on the passes that size this column from its content it
// resolves against nothing. Everything below asks for `w_full`
// — the tab rows, their group blocks, the scroll area — so one
// unresolved link here collapsed the whole chain and every row
// fell back to hugging the longest tab name. Border-box takes
// the rail's 1px right border off the content width.
v_flex()
.size_full()
.w(px(width - 1.))
.h_full()
.child(crate::ui::app::title_bar_drag(
controls.id("sidebar-titlebar-drag"),
"sidebar-titlebar-drag",