give the status-bar context slot a flexible share

StatusbarHost laid every item at intrinsic width, so once the focused-pane
context line grew long (a model/mode/context/skills summary) the row's
content exceeded the bar width and overflowed instead of letting the slot
shrink. Add an opt-in flex factor to StatusItemContribution; the host wraps
flex>0 items in Flexible(loose) so they yield width when the bar is tight,
and the marquee then receives a bounded viewport and scrolls. Drops the
fixed maxWidth cap on the pane-context item.

T-160.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-05-30 13:04:59 +02:00
co-authored by Claude
parent 4761b5c12d
commit 7b9861a097
7 changed files with 144 additions and 12 deletions
+8
View File
@@ -61,6 +61,7 @@ class StatusItemContribution extends ContributionPoint {
required this.build,
this.priority = 0,
this.listenable,
this.flex = 0,
});
@override
@@ -68,6 +69,13 @@ class StatusItemContribution extends ContributionPoint {
final WidgetBuilder build;
final int priority;
final Listenable? listenable;
/// When > 0, the status bar wraps this item in
/// `Flexible(flex: flex, fit: FlexFit.loose)` so it yields width when the
/// bar is tight and any contained [ClideMarquee] can scroll (T-160).
/// Defaults to 0 (intrinsic/non-flex). Only meaningful for left-side items
/// (priority < 100); right-side items are always intrinsic-width.
final int flex;
}
/// A button in the main toolbar.