fix: restore neutral separators between Console commands
Verify Tessera GUI / verify (push) Failing after 7m15s

This commit is contained in:
2026-10-20 20:26:27 +08:00
parent 098fe45129
commit 9d3f766275
2 changed files with 22 additions and 8 deletions
+2 -1
View File
@@ -183,7 +183,8 @@ expressions use the same VM and globals dictionary across submissions. There is
Expression/Script selector. The current prompt, submitted commands and results
share one scrollable surface, with no separate input box, editor splitter or Run
toolbar. Typing appears at the prompt immediately; Enter executes it and the result
appears directly below. Shift-Enter inserts a newline. Input focus uses a text caret,
appears directly below. Shift-Enter inserts a newline. Each command and its result
are followed by a thin neutral horizontal separator. Input focus uses a text caret,
without a blue field border or hover fill. The prompt, history and caret share the
same scroll offset; typing and cursor navigation reveal the current insertion point.
Create objects with bare assignment or `let`, then render them when ready:
+20 -7
View File
@@ -794,8 +794,14 @@ impl Painter {
let count = (area.height / ROW).ceil() as usize + 2;
for (i, line) in lines.iter().enumerate().skip(first).take(count) {
let y = area.y + 5.0 + i as f32 * ROW - s.y;
if line.divider {
self.fill(Rect::new(area.x, y, area.width, 1.0), self.ui.theme.accent);
if let Some(divider) = line.divider {
self.fill(
Rect::new(area.x, y, area.width, 1.0),
match divider {
Divider::Accent => self.ui.theme.accent,
Divider::Neutral => BORDER,
},
);
}
let paint = Rect::new(area.x, y, area.width, ROW);
if let Some(action) = &line.action {
@@ -855,16 +861,21 @@ impl Painter {
struct Line {
value: String,
color: Color,
divider: bool,
divider: Option<Divider>,
selected: bool,
action: Option<Action>,
}
#[derive(Clone, Copy)]
enum Divider {
Accent,
Neutral,
}
impl Line {
fn new(value: impl Into<String>, color: Color) -> Self {
Self {
value: value.into(),
color,
divider: false,
divider: None,
selected: false,
action: None,
}
@@ -1059,7 +1070,7 @@ pub fn build(
format!("#{} {} {} {}", r.id, r.timestamp, r.origin, kind),
MUTED,
);
title.divider = true;
title.divider = Some(Divider::Accent);
title.action = Some(Action::Request(r.id));
lines.push(title);
}
@@ -1085,7 +1096,9 @@ pub fn build(
} else {
lines.push(Line::new(" Executing…", MUTED));
}
lines.push(Line::new("", MUTED));
let mut separator = Line::new("", MUTED);
separator.divider = Some(Divider::Neutral);
lines.push(separator);
}
if lines.is_empty() {
multiline(
@@ -1585,7 +1598,7 @@ fn request_details(out: &mut Vec<Line>, r: &Exchange) {
] {
out.push(Line::new("", MUTED));
let mut l = Line::new(title, MUTED);
l.divider = true;
l.divider = Some(Divider::Accent);
out.push(l);
multiline(
out,