ui: File › New starts an empty model (file.new, #144); an unknown sample name opens the samples (#200)

file.new replaces the session with an empty one: no design, mesh, definitions, results or
journal, nothing to save, the undo history empty. The File menu and Cmd/Ctrl+N run it, asking
first over unsaved changes. A sample name the app does not know (a typo, an old ?sample= link)
opens the samples to choose from, and the status names it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-15 11:07:46 -04:00
1 parent 92b6225a72
commit 0625125ed7
7 files changed
+81 -5

No files matched your search

+2 -1
View File
@@ -585,7 +585,8 @@ pub static CATALOGUE: &[Capability] = &[
// ---- Tools ----
// Renaming starts from a definition's item menu (Rename…); the search finds it here too.
ready_more("model.info", "Model Info", Tools, "Model", "Node and element counts and the model summary", &["model.rename"]),
ready("file.open", "Open Model", Tools, "File", "Open a .fieldcraft model"),
// New starts from the File menu; the search finds it here too.
ready_more("file.open", "Open Model", Tools, "File", "Open a .fieldcraft model", &["file.new"]),
ready("file.sample", "Samples", Tools, "File", "Open a sample model, ready to solve"),
ready("file.save", "Save", Tools, "File", "Save the model to its .fieldcraft file"),
ready("file.save_as", "Save As", Tools, "File", "Save the model to a new .fieldcraft file"),