TUI hosts sessions: new-session form, named worktrees, resume, faster permissions
- Use the terminal's own colors and background; the key bar and the Needs-you panel wrap, fixed-width panels shrink on narrow terminals. - Sessions run on threads of the TUI (tui/host.rs), capped by the profile's `workers`; quitting asks for `yes` and suspends them. New `suspend` command keeps the state so a session can be resumed. - `N` opens a new-session form: machine, name, --after, a named branch or worktree (place.rs; never deleted by orch), and a "keep for a PR" option. - `u` resumes suspended sessions and ones whose process died. - `A` allows identical permission requests across sessions, `P` saves an allow rule to the profile with toml_edit (comments kept). - Fix clippy lint in report.rs so tests/all.sh passes; add GLOSSARY.md. Includes the already staged `orch init` work (init.rs, example profile). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5a80bc9fe1
commit
cfb735cdb3
22 files changed
+1623
-115
No files matched your search
+16
-26
@@ -17,24 +17,24 @@ const BOX_H: u16 = 5;
|
||||
|
||||
pub fn draw(f: &mut Frame, g: &GoalView, h: &Header, checks_running: bool, dec_sel: usize) {
|
||||
let area = f.area();
|
||||
f.render_widget(
|
||||
Block::new().style(Style::new().bg(theme::BG).fg(theme::TEXT)),
|
||||
area,
|
||||
);
|
||||
let key_lines = theme::key_lines(&KEYS, area.width);
|
||||
let [head, goal, body, keys] = Layout::vertical([
|
||||
Constraint::Length(1),
|
||||
Constraint::Length(4),
|
||||
Constraint::Fill(1),
|
||||
Constraint::Length(1),
|
||||
Constraint::Length(key_lines.len() as u16),
|
||||
])
|
||||
.areas(area);
|
||||
f.render_widget(header(h, head.width as usize), head);
|
||||
goal_box(f, goal, g);
|
||||
let [left, right] =
|
||||
Layout::horizontal([Constraint::Fill(1), Constraint::Length(56)]).areas(body);
|
||||
let [left, right] = Layout::horizontal([
|
||||
Constraint::Fill(1),
|
||||
Constraint::Length(theme::capped(body, 56, 45)),
|
||||
])
|
||||
.areas(body);
|
||||
left_box(f, left, g, dec_sel);
|
||||
acceptance_box(f, right, g, checks_running);
|
||||
f.render_widget(key_bar(), keys);
|
||||
f.render_widget(Paragraph::new(key_lines), keys);
|
||||
}
|
||||
|
||||
fn header(h: &Header, width: usize) -> Line<'static> {
|
||||
@@ -288,21 +288,11 @@ fn acceptance_box(f: &mut Frame, area: Rect, g: &GoalView, running: bool) {
|
||||
f.render_widget(Paragraph::new(lines), inner);
|
||||
}
|
||||
|
||||
fn key_bar() -> Line<'static> {
|
||||
let mut v = vec![Span::raw(" ")];
|
||||
for (k, what) in [
|
||||
("esc", "back"),
|
||||
("e", "edit goal"),
|
||||
("+", "add check"),
|
||||
("R", "run all checks"),
|
||||
("j/k", "select decision"),
|
||||
("v", "veto decision"),
|
||||
] {
|
||||
v.push(Span::styled(
|
||||
format!(" {k} "),
|
||||
Style::new().fg(theme::BG).bg(theme::DIM),
|
||||
));
|
||||
v.push(Span::styled(format!(" {what} "), fg(theme::DIM)));
|
||||
}
|
||||
Line::from(v)
|
||||
}
|
||||
const KEYS: [(&str, &str); 6] = [
|
||||
("esc", "back"),
|
||||
("e", "edit goal"),
|
||||
("+", "add check"),
|
||||
("R", "run all checks"),
|
||||
("j/k", "select decision"),
|
||||
("v", "veto decision"),
|
||||
];
|
||||
Reference in new issue
Block a user