luxe 0.1.4: remembered models, wheel-driven lists, and a steadier phone app

- luxe starts on the model you last chose in this project, then the last one anywhere. Signing in
  opens the model picker instead of choosing for you.
- Every list in a modal takes the mouse wheel and a draggable scrollbar.
- The phone app shows reasoning in full, stays put while you read back through a long session, and
  shows a question's answer on its card.
- On Windows, luxe update replaces the running luxe, and a signed-in install no longer sees setup
  again.
- The file tree no longer shows "engine busy" in a large project, loop output is easier to follow,
  and the name is written lowercase.

The CHANGELOG has the full list.
This commit is contained in:
Evan Whittaker
2026-10-20 13:51:34 -05:00
parent 6184aa21fb
commit a0666d6c81
591 changed files with 4926 additions and 2942 deletions

View File

@@ -3,7 +3,7 @@ name = "luxe-lsp"
version.workspace = true
edition.workspace = true
license.workspace = true
description = "Language-server client and offline code graph for Luxe: diagnostics, navigation, and blast radius"
description = "Language-server client and offline code graph for luxe: diagnostics, navigation, and blast radius"
repository.workspace = true
homepage.workspace = true
@@ -11,7 +11,7 @@ homepage.workspace = true
# Provides a generic LSP client (rust-analyzer first).
[dependencies]
luxe-core = { path = "../luxe-core", version = "0.1.3" }
luxe-core = { path = "../luxe-core", version = "0.1.4" }
thiserror = { workspace = true }
tracing = { workspace = true }
serde = { workspace = true }

View File

@@ -9,7 +9,7 @@
//!
//! A shard also records the [`EXTRACTOR_VERSION`] that wrote it, because a matching content hash
//! only says the file is unchanged, not that today's extractor would read it the same way. Writes
//! are atomic, so a second Luxe in the same project never reads a torn shard.
//! are atomic, so a second luxe in the same project never reads a torn shard.
use super::extract::FileGraph;
use serde::{Deserialize, Serialize};

View File

@@ -89,7 +89,7 @@ mod tests {
}
}
/// The layout that broke it: `mod tests;` pointing at a sibling file. Luxe lays five of its own
/// The layout that broke it: `mod tests;` pointing at a sibling file. luxe lays five of its own
/// modules out this way, so the miss was never exotic.
#[test]
fn a_sibling_tests_module_is_test_code() {

View File

@@ -32,7 +32,7 @@ pub struct ServerEntry {
/// A language is not a server, and the two drift apart. TypeScript 7 is the native port: it
/// ships no `tsserver.js`, so `typescript-language-server` — at every version — fails its
/// handshake with "Could not find a valid TypeScript installation", and the language service
/// moved to `tsc --lsp`. One hardcoded command turns that into "Luxe has no TypeScript
/// moved to `tsc --lsp`. One hardcoded command turns that into "luxe has no TypeScript
/// support"; a list turns it into a fallback nobody has to notice.
///
/// Ordered most-preferred first, and tried on a *failed handshake*, not merely a missing
@@ -90,7 +90,7 @@ pub struct ServerEntryPatch {
impl ServerEntryPatch {
/// Apply this patch over the shipped entry for the same language, if there is one.
///
/// Returns `None` for a patch that names a language Luxe does not ship *and* omits `command`,
/// Returns `None` for a patch that names a language luxe does not ship *and* omits `command`,
/// which is the one combination that cannot produce a launchable server.
pub fn apply(self, base: Option<&ServerEntry>) -> Option<ServerEntry> {
let base = base.cloned().unwrap_or_default();
@@ -125,7 +125,7 @@ impl ServerRegistry {
/// Add default server entries for the common languages from the bundled `default-lsp-servers
/// .json`. Shipping them as DATA (not hardcoded) lets users inspect + copy the defaults, and
/// built-in + user config share one schema and code path. Servers are external binaries the
/// user installs; Luxe only knows how to launch + detect them.
/// user installs; luxe only knows how to launch + detect them.
fn add_defaults(&mut self) {
// Compile-time-embedded and covered by `default_servers_bundle_parses` — a genuine
// invariant, so a parse failure is a build-time bug, never a runtime path.

View File

@@ -146,7 +146,7 @@ fn an_explicitly_empty_field_overrides_rather_than_inherits() {
#[test]
fn a_new_language_needs_a_command_and_says_so_when_it_lacks_one() {
let mut registry = ServerRegistry::new();
// Languages Luxe does not ship, so there is nothing for a patch to inherit a command from.
// Languages luxe does not ship, so there is nothing for a patch to inherit a command from.
// Asserted rather than assumed: this test read `lua` as unshipped until the day it was.
for unshipped in ["elixir", "cobol"] {
assert!(!registry.is_supported(unshipped), "{unshipped} must not be a built-in here");

View File

@@ -148,7 +148,7 @@ impl WorkspaceLspClient {
for rejected in registry.merge_patches(custom) {
tracing::warn!(
language = %rejected,
"lsp-servers.json entry needs a `command`: Luxe ships no default for this language"
"lsp-servers.json entry needs a `command`: luxe ships no default for this language"
);
}
Self::over(registry)

View File

@@ -45,7 +45,7 @@ impl WorkspaceLspClient {
None => Tried::Absent,
};
};
// Worth an `info`: it is the one case where the program Luxe ran came from the tree
// Worth an `info`: it is the one case where the program luxe ran came from the tree
// being edited rather than from the machine, and a reader should be able to find that
// out from a normal run rather than by reasoning about it.
if luxe_core::program::project_local(root, &candidate.command).as_deref()

View File

@@ -218,7 +218,7 @@ const FIXTURE_SERVER: &str = "luxe-fixture-project-server";
/// A project that installed its own language server, as npm leaves one.
///
/// The binary is a shell script that exits immediately, so the handshake always fails — which
/// is the point: what is under test is which path Luxe *chose to launch*, and the recorded
/// is the point: what is under test is which path luxe *chose to launch*, and the recorded
/// failure names it.
fn project_with_its_own_server(tag: &str) -> tempfile::TempDir {
let dir = project_dir(tag);
@@ -286,7 +286,7 @@ async fn a_project_server_is_refused_by_name_when_it_is_not_allowed() {
/// Allowed, the same binary is the one launched.
///
/// It fails its handshake, which is what the fixture is for: the failure quotes the command,
/// so it is evidence of *which* copy Luxe ran rather than of the server working.
/// so it is evidence of *which* copy luxe ran rather than of the server working.
#[tokio::test]
async fn an_allowed_project_server_is_the_one_launched() {
let root_dir = project_with_its_own_server("allowed");

View File

@@ -4,7 +4,7 @@ use super::*;
/// A server that starts, complains on stderr, and stops.
///
/// The commonest real shape of a broken language server, and the one Luxe reported worst: a
/// The commonest real shape of a broken language server, and the one luxe reported worst: a
/// version-manager shim that resolves on `PATH` and then refuses to run. `mise ERROR No version is
/// set for shim: pyright-langserver` and rustup's `error: infinite recursion detected` are both
/// this, and both were reported as `initialize timed out after 30s` — after waiting the full 30

View File

@@ -43,16 +43,16 @@ fn text(result: &ToolResultData) -> String {
}
}
/// A tool result as the model receives it: its text, and whether Luxe called the call a failure.
/// A tool result as the model receives it: its text, and whether luxe called the call a failure.
fn answer(result: &ToolResultData) -> (bool, String) {
(result.is_error, text(result))
}
/// Whether Luxe declined the request by naming the server that would not run.
/// Whether luxe declined the request by naming the server that would not run.
///
/// A host is entitled to have no *working* server for a language even though one resolves on
/// `PATH` — a version-manager shim with no version set is exactly that, and [`have`] cannot see
/// it. Luxe failing the call and naming the server, in the server's own words, is this contract
/// it. luxe failing the call and naming the server, in the server's own words, is this contract
/// holding rather than breaking. What must never pass is the silent empty answer, which a reader
/// cannot tell apart from "your file is fine".
fn declined(failed: bool, out: &str, server: &str) -> bool {

View File

@@ -32,7 +32,7 @@ async fn real_ts_diagnostics_and_symbols() {
let diag = LspDiagnosticsTool::new(service);
let cx = ctx(&dir);
// Which server answers depends on the host, and all three outcomes are Luxe working. A
// Which server answers depends on the host, and all three outcomes are luxe working. A
// TypeScript 5.x tsserver pushes the type error; TypeScript 7's native LSP pushes nothing at
// all and has to be *asked* for it; a host with neither gets a refusal naming the servers that
// would not run. The one result that is a defect is a bare "No diagnostics", which says the
@@ -52,7 +52,7 @@ async fn real_ts_diagnostics_and_symbols() {
});
eprintln!("TS DIAG:\n{out}");
if !out.contains("ERROR") {
eprintln!("no usable TypeScript server on this host, and Luxe said so — nothing to check");
eprintln!("no usable TypeScript server on this host, and luxe said so — nothing to check");
}
}
@@ -92,7 +92,7 @@ async fn real_pyright_diagnostics_and_symbols() {
});
eprintln!("PY DIAG:\n{reported}");
if !reported.contains("ERROR") {
eprintln!("pyright cannot run on this host, and Luxe said so — skipping the rest");
eprintln!("pyright cannot run on this host, and luxe said so — skipping the rest");
return;
}
@@ -138,7 +138,7 @@ async fn real_gopls_diagnostics_and_symbols() {
});
eprintln!("GO DIAG:\n{reported}");
if !reported.contains("ERROR") {
eprintln!("gopls cannot run on this host, and Luxe said so — skipping the rest");
eprintln!("gopls cannot run on this host, and luxe said so — skipping the rest");
return;
}
@@ -167,7 +167,7 @@ struct Case {
///
/// Definition is asked from here rather than from the symbol's own name: servers disagree
/// about answering "go to definition" when you are already standing on it (clangd returns
/// nothing, tsserver returns the definition), and that disagreement is not Luxe's to assert.
/// nothing, tsserver returns the definition), and that disagreement is not luxe's to assert.
/// A call site is the question every server answers the same way — and it exercises the
/// line/character path, which the `symbol` shorthand does not.
call_site: (u32, u32),
@@ -177,10 +177,10 @@ struct Case {
/// Drive one language's server through definition, references and hover.
///
/// The contract asserted is Luxe's, not the server's: **navigate, or say why not.** A server that
/// The contract asserted is luxe's, not the server's: **navigate, or say why not.** A server that
/// cannot answer is a real situation — a `typescript-language-server` with no usable `typescript`
/// to drive answers everything with nothing, and a version-manager shim resolves on `PATH` and
/// then refuses to run at all — and the failure that matters is Luxe passing either off as "no
/// then refuses to run at all — and the failure that matters is luxe passing either off as "no
/// definition exists". Any of the three is a pass; a bare empty answer is not.
async fn navigates(case: Case) {
if !have(case.server) {
@@ -483,6 +483,6 @@ async fn real_svelte_diagnostics_land_on_the_component_line() {
"the error belongs to line 3 of the component, not of the generated module:\n{out}"
);
} else {
eprintln!("no usable Svelte server on this host, and Luxe said so — nothing to check");
eprintln!("no usable Svelte server on this host, and luxe said so — nothing to check");
}
}