Skip to content

Commit b22d808

Browse files
oz-agentwarp-agent
andcommitted
Add cell-exact rendered-row coverage for the two-breadcrumb (depth-3) level
Renders the spec's depth-3 reference level (root -> researcher -> crawler, anchored on crawler with two breadcrumb chips) through the full degradation ladder and asserts full-line equality at T0/T1/T2/T3/T4/T5. The ladder holds with two chips at every tier for the reference tree: the T4/T5 prefix costs 17 cells (leading 2 + two marker chips + glyph-only anchor + divider) and both children still fit at 50 columns, so no boundary retuning was needed. A live two-breadcrumb capture is not producible from this environment: the run's orchestration depth budget is 2, so a grandchild receives no run_agents tool and depth-3 conversations cannot exist client-side. The attempt and its blocker are documented in the PR's verification media. Co-Authored-By: Warp Agent <agent@warp.dev>
1 parent c680530 commit b22d808

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

crates/warp_tui/src/orchestration_tab_bar_tests.rs

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,43 @@ fn drilled_snapshot() -> TuiOrchestrationSnapshot {
6666
}
6767
}
6868

69+
/// The spec's depth-3 reference level: drilled into `crawler`
70+
/// (root → researcher → crawler), so the bar carries TWO breadcrumb chips —
71+
/// one back to the root and one to the parent (PRODUCT.md "Drilled into
72+
/// crawler, depth 2" mockup).
73+
fn depth_three_snapshot() -> TuiOrchestrationSnapshot {
74+
let root = AIConversationId::new();
75+
let researcher = AIConversationId::new();
76+
let crawler = AIConversationId::new();
77+
let fetch_a = AIConversationId::new();
78+
let fetch_b = AIConversationId::new();
79+
let children = vec![
80+
child(fetch_a, "fetch-a", 0, None),
81+
child(fetch_b, "fetch-b", 1, None),
82+
];
83+
TuiOrchestrationSnapshot {
84+
root_conversation_id: root,
85+
anchor_conversation_id: crawler,
86+
anchor_label: "crawler".to_owned(),
87+
anchor_status: Some(ConversationStatus::InProgress),
88+
anchor_navigable: true,
89+
breadcrumbs: vec![
90+
TuiOrchestrationBreadcrumb {
91+
conversation_id: root,
92+
label: ORCHESTRATOR_TAB_LABEL.to_owned(),
93+
},
94+
TuiOrchestrationBreadcrumb {
95+
conversation_id: researcher,
96+
label: "researcher".to_owned(),
97+
},
98+
],
99+
selected_conversation_id: crawler,
100+
children,
101+
page_anchor: Some(fetch_a),
102+
reveal_selected: true,
103+
}
104+
}
105+
69106
/// A flag-off flat snapshot: root anchored, no breadcrumbs, no rollups.
70107
fn flat_snapshot() -> TuiOrchestrationSnapshot {
71108
let root = AIConversationId::new();
@@ -158,6 +195,40 @@ fn t4_row_keeps_marker_only_breadcrumb_glyph_anchor_and_badge_marker() {
158195
});
159196
}
160197

198+
#[test]
199+
fn depth_three_row_renders_two_breadcrumbs_through_the_ladder() {
200+
App::test((), |mut app| async move {
201+
app.update(|ctx| {
202+
ctx.add_singleton_model(|_| Appearance::mock());
203+
let snapshot = depth_three_snapshot();
204+
// T0 (≥ 96): both chips at full labels — the spec's depth-2 mockup
205+
// rendered for real (inter-tab gaps come from the bar's actual
206+
// accounting).
207+
let t0 =
208+
" Agents: ‹ orchestrator ‹ researcher ● crawler | ● fetch-a ● fetch-b";
209+
assert_eq!(render_line(&snapshot, 100, ctx), format!("{t0:<100}"));
210+
// T1 (< 96): both chips cap at 8 cells and keep distinct labels.
211+
let t1 =
212+
" Agents: ‹ orche... ‹ resea... ● crawler | ● fetch-a ● fetch-b";
213+
assert_eq!(render_line(&snapshot, 90, ctx), format!("{t1:<90}"));
214+
// T2 (< 84): the leading collapses; two capped chips still fit.
215+
let t2 = " ‹ orche... ‹ resea... ● crawler | ● fetch-a ● fetch-b";
216+
assert_eq!(render_line(&snapshot, 80, ctx), format!("{t2:<80}"));
217+
// T3 (< 72): both chips collapse to their markers; the anchor
218+
// keeps its label. Two `‹` cells preserve the two ascent targets.
219+
let t3 = " ‹ ‹ ● crawler | ● fetch-a ● fetch-b";
220+
assert_eq!(render_line(&snapshot, 70, ctx), format!("{t3:<70}"));
221+
// T4 (< 64): glyph-only anchor; the whole two-chip prefix costs 17
222+
// cells and both children still fit at 60 columns.
223+
let t4 = " ‹ ‹ ● | ● fetch-a ● fetch-b";
224+
assert_eq!(render_line(&snapshot, 60, ctx), format!("{t4:<60}"));
225+
// T5 (< 56): same row — the ladder holds with two chips down to
226+
// the narrowest tier for the spec's reference tree.
227+
assert_eq!(render_line(&snapshot, 50, ctx), format!("{t4:<50}"));
228+
});
229+
});
230+
}
231+
161232
#[test]
162233
fn ladder_variants_attach_only_to_the_multi_level_presentation() {
163234
App::test((), |mut app| async move {

0 commit comments

Comments
 (0)