T39: review round 2: a hidden session whose row turns to waiting marks it until shown, though it went on within the same output, so one output marks as two would; a change of herdr's records draws the view again, so an open hover follows them though the state holds

This commit is contained in:
ZacharyZhang-NY committed 2026-10-17 15:41:39 -04:00
1 parent 31de5e44ef
commit 3aaeb36bd1
5 files changed
+20 -19

No files matched your search

+11 -1
View File
@@ -4,7 +4,7 @@ use gpui::{Context, SharedString, SystemNotification};
use super::{
notify::{self, Ask, CLOSES, Notice},
status::{self, State, Status},
status::{self, Record, State, Status},
view::{TerminalEvent, TerminalView},
};
use crate::{
@@ -133,6 +133,16 @@ impl TerminalView {
changed
}
/// herdr's agents in place of the last ones; an open hover reads them, so the view draws again.
pub(super) fn agents(&mut self, agents: &[(String, Record)], cx: &mut Context<Self>) {
if self.records.herdr(agents) {
if self.restate(cx) {
self.tell_state(cx);
}
cx.notify();
}
}
/// Posts the state its row shows when it turned to waiting, done or error.
pub(super) fn tell_state(&mut self, cx: &mut Context<Self>) {
let body = match self.records.shown() {