luxe 0.1.5: a provider picker, model ids, and a guided review that says less
The dock's provider row opens a list of providers, and the model picker opens on the provider in use, with tab to widen it; signing in opens it on the provider just signed in to. Models go by their id unless config names them, and the model row wears its maker's mark. The guided review's guide prompt is shorter, the pull request brief shows the start of the description with the rest behind p, its commits drop the Luxe-review and Luxe-revision lines, and the weakened-gates signal is gone. luxe update reruns the installer it was installed with, in place of luxe-cli-update. The preview's FILE tab reads files the session changed outside the project, and only those. Smaller fixes: bash headers are highlighted, the preview loses a blank row, the launcher divider sits inside its frame, and the phone app's top bar is clear of iOS's blur. rustls-webpki 0.103.16 and webpki-roots 1.0.10 fix RUSTSEC-2026-0381 and RUSTSEC-2026-0382, and vite 8.3.4 fixes GHSA-587h-7wmj-h5pm, GHSA-698v-4r3x-3vcv and GHSA-r825-w8mm-5pxw.
This commit is contained in:
@@ -212,7 +212,9 @@ fn test_conversation_is_borderless_and_separate_from_composer() {
|
||||
assert!(!top.contains("Conversation"));
|
||||
|
||||
assert!(row_text(&buffer, h - 4, w).trim_start().starts_with('╭'), "composer outline missing");
|
||||
assert!(row_text(&buffer, h - 5, w).trim().is_empty(), "conversation gap missing");
|
||||
let activity = row_text(&buffer, h - 5, w);
|
||||
assert!(activity.trim().ends_with("build"), "the mode button leads the row: {activity:?}");
|
||||
assert!(row_text(&buffer, h - 6, w).trim().is_empty(), "conversation gap missing");
|
||||
assert!(
|
||||
row_text(&buffer, h - 2, w).trim_start().starts_with('╰'),
|
||||
"composer should touch statusline"
|
||||
|
||||
@@ -509,10 +509,11 @@ fn a_copy_is_confirmed_above_the_prompt_and_bound_to_the_terminal_copy_chords()
|
||||
// Flush to the composer's own right margin, and wearing a bold accent on a background so it
|
||||
// catches an eye on its way to the prompt.
|
||||
assert_eq!(buffer[(width - 2, toast)].bg, chip, "the chip runs to the inset right edge");
|
||||
let start = text.find('\u{f0c5}').expect("the clipboard glyph") as u16;
|
||||
// Columns, not bytes: the mode button's icon shares the row
|
||||
let start = column_of(&text, "\u{f0c5}");
|
||||
assert_eq!(buffer[(start, toast)].bg, chip);
|
||||
assert_ne!(buffer[(start - 2, toast)].bg, chip, "and stops there");
|
||||
let label = text.find("Copied").expect("the label") as u16;
|
||||
let label = column_of(&text, "Copied");
|
||||
assert!(buffer[(label, toast)].modifier.contains(ratatui::style::Modifier::BOLD));
|
||||
assert_eq!(buffer[(label, toast)].fg, app.theme_styles.accent.fg.expect("the accent"));
|
||||
|
||||
|
||||
@@ -262,6 +262,27 @@ fn a_narrow_peek_gives_the_diff_the_whole_column() {
|
||||
assert!(!whole.contains("has to wait its turn"), "and the transcript waits: {whole}");
|
||||
}
|
||||
|
||||
/// A peek in the transcript's place runs down to the activity row: its footer is already ruled off,
|
||||
/// so the blank row that sets the activity apart from a transcript would only be a gap.
|
||||
#[test]
|
||||
fn a_narrow_peek_runs_down_to_the_activity_row() {
|
||||
let path = "src/module00/file00.rs";
|
||||
let (width, height) = (110u16, 24);
|
||||
let backend = test_backend(width, height);
|
||||
let (mut app, mut rx) = create_app_with_engine();
|
||||
app.update(Msg::TerminalResized { width, height });
|
||||
app.dock.hide();
|
||||
app.workspace = Some(changed_workspace("peek-activity-gap", 2));
|
||||
open_changes_with(&mut app, &mut rx, path, Some(one_hunk_file(path)));
|
||||
|
||||
let buffer = render_app(&mut app, &backend);
|
||||
let composer_top = (0..height)
|
||||
.find(|&y| row_text(&buffer, y, width).trim_start().starts_with('╭'))
|
||||
.expect("the composer's top border");
|
||||
let above_activity = row_text(&buffer, composer_top - 2, width);
|
||||
assert!(!above_activity.trim().is_empty(), "{}", buffer_to_string(&buffer));
|
||||
}
|
||||
|
||||
/// A pane with room for two readable columns draws two; one without draws the unified list. Nobody
|
||||
/// has to ask for it, which is why the width test has to be conservative rather than eager.
|
||||
#[test]
|
||||
|
||||
@@ -219,24 +219,47 @@ fn clicking_the_dock_review_changes_affordance_opens_review() {
|
||||
}
|
||||
}
|
||||
|
||||
/// Clicking the dock's model row opens the model picker (plan B3): in the wide layout the
|
||||
/// Clicking the dock's model row opens the model picker on the models: in the wide layout the
|
||||
/// statusline hides and MODEL telemetry relocates into the dock footer as a clickable row.
|
||||
#[test]
|
||||
fn clicking_the_dock_model_row_opens_the_model_picker() {
|
||||
use crossterm::event::{MouseButton, MouseEvent, MouseEventKind};
|
||||
let (width, height) = (160, 40);
|
||||
let backend = test_backend(width, height);
|
||||
use luxe_tui::model_picker::PickerStart;
|
||||
let message = click_dock_row("test-model-xyz");
|
||||
let opened = matches!(message, Msg::OpenModelPicker(PickerStart::Models));
|
||||
assert!(opened, "the model row opens the picker on the models, got {message:?}");
|
||||
}
|
||||
|
||||
/// The provider row is its own target, opening on the providers rather than on the models.
|
||||
#[test]
|
||||
fn clicking_the_dock_provider_row_opens_the_providers() {
|
||||
use luxe_tui::model_picker::PickerStart;
|
||||
let message = click_dock_row("test-provider-abc");
|
||||
let opened = matches!(message, Msg::OpenModelPicker(PickerStart::Providers));
|
||||
assert!(opened, "the provider row opens the picker on the providers, got {message:?}");
|
||||
}
|
||||
|
||||
/// An app wide enough to show the dock, on `test-model-xyz` from `test-provider-abc`.
|
||||
fn app_on_test_model(width: u16, height: u16) -> App {
|
||||
let mut app = create_app();
|
||||
app.update(Msg::TerminalResized { width, height });
|
||||
app.workspace = Some(empty_workspace("dock-model-click"));
|
||||
app.status.model = "test-model-xyz".into();
|
||||
app.status.provider = "test-provider-abc".into();
|
||||
app.status.context_window = 128_000;
|
||||
app.status.context_pct = 10.0;
|
||||
app
|
||||
}
|
||||
|
||||
/// The message a click on the dock row showing `text` sends.
|
||||
fn click_dock_row(text: &str) -> Msg {
|
||||
use crossterm::event::{MouseButton, MouseEvent, MouseEventKind};
|
||||
let (width, height) = (160, 40);
|
||||
let backend = test_backend(width, height);
|
||||
let mut app = app_on_test_model(width, height);
|
||||
let buffer = render_app(&mut app, &backend);
|
||||
let row = (0..height)
|
||||
.find(|&y| row_text(&buffer, y, width).contains("test-model-xyz"))
|
||||
.expect("the model row renders in the dock footer");
|
||||
.find(|&y| row_text(&buffer, y, width).contains(text))
|
||||
.unwrap_or_else(|| panic!("{text} renders in the dock"));
|
||||
let click = MouseEvent {
|
||||
kind: MouseEventKind::Down(MouseButton::Left),
|
||||
column: 5,
|
||||
@@ -244,10 +267,8 @@ fn clicking_the_dock_model_row_opens_the_model_picker() {
|
||||
modifiers: KeyModifiers::NONE,
|
||||
};
|
||||
match route_mouse(&mut app, &click) {
|
||||
RouteAction::Msg(message) => {
|
||||
assert!(matches!(*message, Msg::OpenModelPicker), "the model row opens the picker")
|
||||
}
|
||||
other => panic!("expected an open-model-picker message, got {other:?}"),
|
||||
RouteAction::Msg(message) => *message,
|
||||
other => panic!("expected a message, got {other:?}"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ fn a_finished_login_walks_into_the_model_picker_inside_the_surface() {
|
||||
let buffer = render_app(&mut app, &backend);
|
||||
let screen: String = buffer.content.iter().map(|cell| cell.symbol()).collect();
|
||||
assert!(screen.contains("Select model"), "{screen}");
|
||||
assert!(screen.contains("GPT-5.6"), "{screen}");
|
||||
assert!(screen.contains("gpt-5.6"), "{screen}");
|
||||
// What the login had to say rides along as the picker's opening line, and with no model
|
||||
// chosen for the reader, the line asks them to choose one.
|
||||
assert!(screen.contains("Signed in to OpenAI"), "{screen}");
|
||||
|
||||
Reference in New Issue
Block a user