Stop the shell asserting things that are not true
The footer was rebuilt on a real ledger two commits ago. The rest of the shell was never audited the same way, and a multi-agent pass over it found the same class of defect everywhere else: - A sidebar card reading "Buzz · lumbridgecode / connected · signed identity" in the success colour. lumbridge-buzz is not a dependency of this binary. - A saved host "amd-server", and a WORKTREES section with five entries and a working selector, backed by a lumbridge-git crate that does not exist. - A first-run workspace of six panes announcing "Codex · runtime / metal · Tailscale SSH", "Claude Code · UI / MacBook Air · local" and a Pi pane on a saved host. Every one of them was a /bin/sh, and the machine names were this developer's. - A declared "Pi · spark-1 · laguna-s-2.1" usage profile with no probe of any kind behind it. Declaring a profile promises the gap is real; that one could never be filled. - FOOTER_CENTER = "Codex · ChatGPT subscription · 62% window remaining", rendered by the Floem shell. Decision 0013 names that exact form as the thing that must never be shown. - The header's PTY count painted green unconditionally, so "0/5 LIVE PTYS" read as success. runtime_rows already had the right rule three hundred lines away. - A browser panel describing itself as "An isolated system-web-engine surface" on the chooser screen where you pick it. There is no web engine in this build. First run is now three real local shells, and a pane claims a harness when one has actually been launched into it. The seed mapping stays for when that is possible. Also removes the only unsafe block in the shell: a test set LUMBRIDGE_*_PROBE through the environment, which needs unsafe under edition 2024 and silently disabled both probes for every other test in the binary. Replaced with UsageFeedOptions passed to start_with. Clippy pedantic on the spike goes 79 -> 15 against root CI's -D warnings, so graduating it into the workspace is not gated on a warning cleanup. The four remaining too_many_lines are the render split, which the sidebar work needs to do anyway. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
219c674aea
commit
834b73e831
@@ -36,18 +36,26 @@ impl PanelKind {
|
||||
pub(crate) const fn description(self) -> &'static str {
|
||||
match self {
|
||||
Self::Terminal => "A real local shell with its own runtime actor",
|
||||
Self::Browser => "An isolated system-web-engine surface",
|
||||
// Not a web engine. There is no browser in this build; the panel
|
||||
// renders a placeholder surface and says so.
|
||||
Self::Browser => "A placeholder surface. No web engine is embedded yet",
|
||||
Self::Markdown => "Local notes, plans, and architecture",
|
||||
Self::Review => "Repository changes and approval boundaries",
|
||||
}
|
||||
}
|
||||
|
||||
/// What a newly created panel is pointed at.
|
||||
///
|
||||
/// Every one of these used to name a specific machine — this developer's,
|
||||
/// as it happens. A panel's target is whatever it was actually launched
|
||||
/// against, and a new panel has been launched against nothing but the
|
||||
/// local shell.
|
||||
const fn default_target(self) -> &'static str {
|
||||
match self {
|
||||
Self::Terminal => "metal · local runtime",
|
||||
Self::Browser => "isolated system web engine",
|
||||
Self::Markdown => "lumbridge-code · local document",
|
||||
Self::Review => "lumbridge-code · working tree",
|
||||
Self::Terminal => "local shell",
|
||||
Self::Browser => "no surface attached",
|
||||
Self::Markdown => "local document",
|
||||
Self::Review => "working tree",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,49 +104,26 @@ pub(crate) struct PanelRegistry {
|
||||
|
||||
impl Default for PanelRegistry {
|
||||
fn default() -> Self {
|
||||
Self::seeded()
|
||||
Self::first_run()
|
||||
}
|
||||
}
|
||||
|
||||
impl PanelRegistry {
|
||||
pub(crate) fn seeded() -> Self {
|
||||
/// The workspace a first run opens with.
|
||||
///
|
||||
/// Three real local shells and nothing else. This used to seed six panes
|
||||
/// announcing "Codex · runtime / metal · Tailscale SSH", "Claude Code · UI
|
||||
/// / `MacBook` Air · local" and a Pi pane on a saved host — none of which
|
||||
/// existed. Every one was a `/bin/sh`. A pane claims a harness when one has
|
||||
/// actually been launched into it, and until then it is a terminal.
|
||||
///
|
||||
/// Three, not one: `visible_panel_count` branches at 1100 px and 2800 px,
|
||||
/// so a single-panel default renders one pane on an ultrawide.
|
||||
pub(crate) fn first_run() -> Self {
|
||||
let seeds = [
|
||||
(
|
||||
PanelKind::Terminal,
|
||||
"Codex · runtime",
|
||||
"metal · Tailscale SSH",
|
||||
SeedPane::CodexRuntime,
|
||||
),
|
||||
(
|
||||
PanelKind::Terminal,
|
||||
"Claude Code · UI",
|
||||
"MacBook Air · local",
|
||||
SeedPane::ClaudeUi,
|
||||
),
|
||||
(
|
||||
PanelKind::Terminal,
|
||||
"Pi · docs",
|
||||
"amd-server · OpenSSH",
|
||||
SeedPane::PiDocs,
|
||||
),
|
||||
(
|
||||
PanelKind::Markdown,
|
||||
"Architecture.md",
|
||||
"lumbridge-code · worktree",
|
||||
SeedPane::Architecture,
|
||||
),
|
||||
(
|
||||
PanelKind::Browser,
|
||||
"Preview · ACP docs",
|
||||
"isolated system web engine",
|
||||
SeedPane::AcpPreview,
|
||||
),
|
||||
(
|
||||
PanelKind::Review,
|
||||
"Changes · lumbridge-runtime",
|
||||
"metal · worktree remote-runtime",
|
||||
SeedPane::RuntimeReview,
|
||||
),
|
||||
(PanelKind::Terminal, "Terminal 1", "local shell", None),
|
||||
(PanelKind::Terminal, "Terminal 2", "local shell", None),
|
||||
(PanelKind::Terminal, "Terminal 3", "local shell", None),
|
||||
];
|
||||
let panels = seeds
|
||||
.into_iter()
|
||||
@@ -149,7 +134,7 @@ impl PanelRegistry {
|
||||
title: title.to_owned(),
|
||||
target: target.to_owned(),
|
||||
attached: index < 5,
|
||||
seed: Some(seed),
|
||||
seed,
|
||||
})
|
||||
.collect();
|
||||
Self {
|
||||
@@ -335,7 +320,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn dynamic_panels_receive_monotonic_ids_and_insert_beside_selection() {
|
||||
let mut registry = PanelRegistry::seeded();
|
||||
let mut registry = PanelRegistry::first_run();
|
||||
let browser = registry.create(PanelKind::Browser);
|
||||
let terminal = registry.create(PanelKind::Terminal);
|
||||
assert_eq!(browser, PanelId(7));
|
||||
@@ -347,7 +332,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn identity_and_detached_state_round_trip_without_reuse() {
|
||||
let mut registry = PanelRegistry::seeded();
|
||||
let mut registry = PanelRegistry::first_run();
|
||||
let created = registry.create(PanelKind::Markdown);
|
||||
assert!(registry.detach(created));
|
||||
let json = registry.to_json().unwrap();
|
||||
@@ -358,7 +343,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn detach_preserves_panel_and_reattach_restores_same_identity() {
|
||||
let mut registry = PanelRegistry::seeded();
|
||||
let mut registry = PanelRegistry::first_run();
|
||||
let id = registry.create(PanelKind::Terminal);
|
||||
assert!(registry.detach(id));
|
||||
assert!(registry.panel(id).is_some());
|
||||
|
||||
Reference in New Issue
Block a user