VectorCraft on the craft UI framework (#8800)

VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.

About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.

Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
This commit is contained in:
BFlat
2026-11-24 08:25:24 +07:00
committed by GitHub
parent ce5af98dd5
commit 6f37bd839c
947 changed files with 152318 additions and 262736 deletions
+6 -4
View File
@@ -321,11 +321,13 @@ fn mcp(args: &[String], safe_mode: bool) -> Result<(), String> {
Box::new(accepting_grants(with_stores(Headless::with_document()), allow_grants))
} else if let Some(addr) = connect {
// Explicit address: fail loudly if the app isn't there.
Box::new(Remote::connect(&addr).map_err(|e| format!("cannot connect to {addr}: {e}"))?)
let token = vectorcraft_mcp::control_token()?;
Box::new(Remote::connect(&addr, &token).map_err(|e| format!("cannot connect to {addr}: {e}"))?)
} else {
match Remote::connect(DEFAULT_ADDR) {
Ok(r) => Box::new(r),
Err(_) => Box::new(with_stores(Headless::with_document())),
// No token or no app listening: the headless session answers instead.
match vectorcraft_mcp::control_token().ok().and_then(|token| Remote::connect(DEFAULT_ADDR, &token).ok()) {
Some(r) => Box::new(r),
None => Box::new(with_stores(Headless::with_document())),
}
};
eprintln!("vectorcraft-cli: MCP server on stdio ({})", backend.describe());