luxe update and /update, editable question answers, and a version bump owed once per release

- luxe update and /update update Luxe with the command for however it was installed (cargo or
  Homebrew), run one program at a time with the terminal attached, then check that the luxe on
  PATH is the new version. Luxe never downloads or replaces its own binary. The start screen says
  "Update available · /update".
- A question's typed answer edits at its caret: arrows, word jumps, Home, End and Delete work,
  and up and down move through a wrapped answer before leaving it.
- The version check owes a bump once per release: the version on main is the next release, and
  only a released one (a v-tag) has to move.
- Dependency updates arrive through the sync, so Dependabot and the weekly jobs no longer run here.
This commit is contained in:
Evan Whittaker
2026-10-17 14:14:27 -05:00
parent 0e84deb59c
commit bf86df5098
41 changed files with 794 additions and 355 deletions

View File

@@ -381,6 +381,34 @@ fn the_mode_command_on_the_start_screen_stays_on_it() {
assert!(matches!(actions.as_slice(), [Action::SetMode(mode)] if mode == "plan"), "{actions:?}");
}
/// `/update` on the start screen leaves Luxe for the CLI's update, which needs the terminal, and
/// starts no session on the way out.
#[test]
fn the_update_command_on_the_start_screen_leaves_to_update() {
let (tx, mut rx) = mpsc::channel(100);
let mut app = App::new(tx, KeyMap::defaults(), Default::default());
app.enter_dashboard(crate::dashboard::DashboardState::new(Vec::new()));
let update = crate::commands::CommandRegistry::all().parse_slash("/update").expect("it");
app.handle_dashboard_outcome(crate::dashboard::DashOutcome::RunCommand(update));
let mut exit = crate::main_loop::TuiExit::Quit;
crate::main_loop::collect_exit_for_tests(&mut app, &mut exit);
assert_eq!(exit, crate::main_loop::TuiExit::Update);
assert!(app.should_quit);
assert!(rx.try_recv().is_err(), "no session started for it");
}
/// From a session, `/update` typed in the composer leaves the same way.
#[test]
fn the_update_command_in_a_session_leaves_to_update() {
let (tx, _rx) = mpsc::channel(100);
let mut app = App::new(tx, KeyMap::defaults(), Default::default());
app.editor.insert_text("/update");
app.update(Msg::Key(KeyEvent::new(KeyCode::Enter, KeyModifiers::NONE)));
let mut exit = crate::main_loop::TuiExit::Quit;
crate::main_loop::collect_exit_for_tests(&mut app, &mut exit);
assert_eq!(exit, crate::main_loop::TuiExit::Update);
}
/// Setup's answers reach the reader's file one key at a time, and skipping writes a file that
/// chooses nothing, so the first run asks once.
#[tokio::test]