From 82a50dad1b2dca0a2fd64c4332c59a901af987e7 Mon Sep 17 00:00:00 2001 From: justinjohn0306 Date: Mon, 19 Oct 2026 17:53:24 +0530 Subject: [PATCH 1/4] M7: a preference to start on the Home screen (#857) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Launching opens a new empty file, which then has to be closed to get back to Home. Preferences ▸ "Start on the Home screen" (`pref.startOnHome {on?}`, off by default) starts the desktop app on Home instead. Files named on the command line and recovered files still open. Co-Authored-By: Claude Opus 5.5 --- apps/figcraft/src/main.rs | 4 ++-- crates/engine/src/cmd/view.rs | 1 + crates/engine/src/lib.rs | 3 +++ crates/ui-egui/locales/de.toml | 2 ++ crates/ui-egui/locales/en.toml | 1 + crates/ui-egui/locales/es.toml | 2 ++ crates/ui-egui/locales/fi.toml | 2 ++ crates/ui-egui/locales/fr.toml | 2 ++ crates/ui-egui/locales/ja.toml | 2 ++ crates/ui-egui/locales/ko.toml | 2 ++ crates/ui-egui/locales/nl.toml | 2 ++ crates/ui-egui/locales/pt-BR.toml | 2 ++ crates/ui-egui/locales/sv.toml | 2 ++ crates/ui-egui/locales/zh-Hans.toml | 2 ++ crates/ui-egui/src/dialogs.rs | 3 +++ docs/mcp.md | 2 ++ 16 files changed, 32 insertions(+), 2 deletions(-) diff --git a/apps/figcraft/src/main.rs b/apps/figcraft/src/main.rs index 1bba81e8..e98f9373 100644 --- a/apps/figcraft/src/main.rs +++ b/apps/figcraft/src/main.rs @@ -194,9 +194,9 @@ fn main() -> eframe::Result { session.live.links = figcraft_collab_net::links::system(); session.invite_links_startup(); // A first run (no settings kept yet, nothing to open) starts on the home screen, with its - // tips and templates; later runs start in a new file. + // tips and templates; later runs start in a new file unless the preference says Home. let first_run = svc.prefs.is_none() && args.join.is_none(); - if session.docs.is_empty() && !first_run { + if session.docs.is_empty() && !first_run && !session.prefs.start_on_home { let _ = session.execute("file.new", &json!({})); } // The interface language from the first frame on, and for the message when the window can't diff --git a/crates/engine/src/cmd/view.rs b/crates/engine/src/cmd/view.rs index 69b938e9..bdf67339 100644 --- a/crates/engine/src/cmd/view.rs +++ b/crates/engine/src/cmd/view.rs @@ -371,6 +371,7 @@ pub fn specs() -> Vec { spec!("pref.numberKeysOpacity", "Use number keys for opacity", "{on?}", false, |s, p| pref(s, p, |x| &mut x.number_keys_opacity)), spec!("pref.reduceMotion", "Reduce motion", "{on?}", false, |s, p| pref(s, p, |x| &mut x.reduce_motion)), spec!("pref.autoSave", "Save files automatically", "{on?}", false, |s, p| pref(s, p, |x| &mut x.auto_save)), + spec!("pref.startOnHome", "Start on the Home screen", "{on?}", false, |s, p| pref(s, p, |x| &mut x.start_on_home)), spec!("pref.nudge", "Nudge amount", "{small?, big?}", false, |s, p| { s.prefs.nudge_small = num(p, "small").unwrap_or(s.prefs.nudge_small).clamp(0.01, 1000.0); s.prefs.nudge_big = num(p, "big").unwrap_or(s.prefs.nudge_big).clamp(0.01, 10000.0); diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index 312c2e87..4653253f 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -633,6 +633,8 @@ pub struct Prefs { /// Files that have a path are saved by themselves a few seconds after they change (the app's /// timer; off: only File ▸ Save writes them). pub auto_save: bool, + /// The desktop app starts on the Home screen instead of in a new file. + pub start_on_home: bool, /// `figcraft://` invite links open this app (`collab.registerLinks`); `None`: on for installed /// builds, off for development builds. pub invite_links: Option, @@ -699,6 +701,7 @@ impl Default for Prefs { user_name: cmd::comment::DEFAULT_AUTHOR.into(), reduce_motion: false, auto_save: false, + start_on_home: false, invite_links: None, plugins: Vec::new(), plugin_settings: BTreeMap::new(), diff --git a/crates/ui-egui/locales/de.toml b/crates/ui-egui/locales/de.toml index 07669c1a..c5d7dc7e 100644 --- a/crates/ui-egui/locales/de.toml +++ b/crates/ui-egui/locales/de.toml @@ -1102,6 +1102,7 @@ status = "draft — needs native review" "Save as" = "Speichern unter" "Save as preset…" = "Als Vorgabe speichern…" "Save files automatically" = "Dateien automatisch speichern" +"Start on the Home screen" = "Mit Start beginnen" "Save version {key}" = "Version speichern {key}" "Saved" = "Gespeichert" "Saved {name}" = "{name} gespeichert" @@ -1923,6 +1924,7 @@ status = "draft — needs native review" "plugins.manage" = "Plugins verwalten…" "plugins.runLast" = "Letztes Plugin ausführen" "pref.autoSave" = "Dateien automatisch speichern" +"pref.startOnHome" = "Mit Start beginnen" "pref.highlightHover" = "Ebenen beim Überfahren hervorheben" "pref.keepTool" = "Werkzeug nach Verwendung ausgewählt lassen" "pref.language" = "Sprache der Benutzeroberfläche" diff --git a/crates/ui-egui/locales/en.toml b/crates/ui-egui/locales/en.toml index 17f6b4c5..26f10def 100644 --- a/crates/ui-egui/locales/en.toml +++ b/crates/ui-egui/locales/en.toml @@ -1298,6 +1298,7 @@ name = "English" "Start from a blank canvas" = "Start from a blank canvas" "Start from a template" = "Start from a template" "Start on path" = "Start on path" +"Start on the Home screen" = "Start on the Home screen" "Start point" = "Start point" "Start sharing" = "Start sharing" "Start sharing with the Share button, then pass on the code it gives" = "Start sharing with the Share button, then pass on the code it gives" diff --git a/crates/ui-egui/locales/es.toml b/crates/ui-egui/locales/es.toml index d054e222..1a73816e 100644 --- a/crates/ui-egui/locales/es.toml +++ b/crates/ui-egui/locales/es.toml @@ -1155,6 +1155,7 @@ status = "draft — needs native review" "Run" = "Ejecutar" "Run {label}" = "Ejecutar {label}" "Save files automatically" = "Guardar archivos automáticamente" +"Start on the Home screen" = "Empezar en Inicio" "Search templates" = "Buscar plantillas" "See all templates" = "Ver todas las plantillas" "Select layers and they space themselves as their content changes" = "Selecciona capas y se espaciarán solas cuando cambie su contenido" @@ -2023,6 +2024,7 @@ status = "draft — needs native review" "plugins.manage" = "Gestionar plugins…" "plugins.runLast" = "Ejecutar el último plugin" "pref.autoSave" = "Guardar archivos automáticamente" +"pref.startOnHome" = "Empezar en Inicio" "pref.highlightHover" = "Resaltar capas al pasar el cursor" "pref.keepTool" = "Mantener la herramienta tras usarla" "pref.language" = "Idioma de la interfaz" diff --git a/crates/ui-egui/locales/fi.toml b/crates/ui-egui/locales/fi.toml index 602574d7..6a47a8f2 100644 --- a/crates/ui-egui/locales/fi.toml +++ b/crates/ui-egui/locales/fi.toml @@ -1162,6 +1162,7 @@ status = "draft — needs native review" "Save as" = "Tallenna nimellä" "Save as preset…" = "Tallenna esiasetuksena…" "Save files automatically" = "Tallenna tiedostot automaattisesti" +"Start on the Home screen" = "Aloita Aloitus-näkymästä" "Save version {key}" = "Tallenna versio {key}" "Saved" = "Tallennettu" "Saved {name}" = "Tallennettu: {name}" @@ -2024,6 +2025,7 @@ status = "draft — needs native review" "plugins.manage" = "Hallitse liitännäisiä…" "plugins.runLast" = "Suorita viimeisin liitännäinen" "pref.autoSave" = "Tallenna tiedostot automaattisesti" +"pref.startOnHome" = "Aloita Aloitus-näkymästä" "pref.highlightHover" = "Korosta tasot osoitettaessa" "pref.keepTool" = "Pidä työkalu valittuna käytön jälkeen" "pref.language" = "Käyttöliittymän kieli" diff --git a/crates/ui-egui/locales/fr.toml b/crates/ui-egui/locales/fr.toml index 5edf1a62..947281a2 100644 --- a/crates/ui-egui/locales/fr.toml +++ b/crates/ui-egui/locales/fr.toml @@ -1157,6 +1157,7 @@ status = "draft — needs native review" "Save as" = "Enregistrer sous" "Save as preset…" = "Enregistrer comme préréglage…" "Save files automatically" = "Enregistrer les fichiers automatiquement" +"Start on the Home screen" = "Démarrer sur l’Accueil" "Save version {key}" = "Enregistrer une version {key}" "Saved" = "Enregistré" "Saved {name}" = "{name} enregistré" @@ -2012,6 +2013,7 @@ status = "draft — needs native review" "plugins.manage" = "Gérer les plugins…" "plugins.runLast" = "Exécuter le dernier plugin" "pref.autoSave" = "Enregistrer les fichiers automatiquement" +"pref.startOnHome" = "Démarrer sur l’Accueil" "pref.highlightHover" = "Mettre en évidence les calques au survol" "pref.keepTool" = "Garder l’outil sélectionné après usage" "pref.language" = "Langue de l’interface" diff --git a/crates/ui-egui/locales/ja.toml b/crates/ui-egui/locales/ja.toml index def8ebc4..ed71e671 100644 --- a/crates/ui-egui/locales/ja.toml +++ b/crates/ui-egui/locales/ja.toml @@ -1146,6 +1146,7 @@ status = "draft — needs native review" "Save as" = "名前を付けて保存" "Save as preset…" = "プリセットとして保存…" "Save files automatically" = "ファイルを自動保存" +"Start on the Home screen" = "起動時にホームを表示" "Save version {key}" = "バージョンを保存 {key}" "Saved" = "保存済み" "Saved {name}" = "{name} を保存済み" @@ -1996,6 +1997,7 @@ status = "draft — needs native review" "plugins.manage" = "プラグインを管理…" "plugins.runLast" = "最後のプラグインを実行" "pref.autoSave" = "ファイルを自動保存" +"pref.startOnHome" = "起動時にホームを表示" "pref.highlightHover" = "ホバー時にレイヤーをハイライト" "pref.keepTool" = "使用後もツールを選択したままにする" "pref.language" = "インターフェースの言語" diff --git a/crates/ui-egui/locales/ko.toml b/crates/ui-egui/locales/ko.toml index 3e191623..43c9a22e 100644 --- a/crates/ui-egui/locales/ko.toml +++ b/crates/ui-egui/locales/ko.toml @@ -1096,6 +1096,7 @@ status = "draft — needs native review" "Save as" = "다른 이름으로 저장" "Save as preset…" = "프리셋으로 저장…" "Save files automatically" = "파일 자동 저장" +"Start on the Home screen" = "홈에서 시작" "Save version {key}" = "버전 저장 {key}" "Saved" = "저장됨" "Saved {name}" = "{name} 저장됨" @@ -1914,6 +1915,7 @@ status = "draft — needs native review" "plugins.manage" = "플러그인 관리…" "plugins.runLast" = "마지막 플러그인 실행" "pref.autoSave" = "파일 자동 저장" +"pref.startOnHome" = "홈에서 시작" "pref.highlightHover" = "마우스를 올리면 레이어 강조" "pref.keepTool" = "사용 후에도 도구 선택 유지" "pref.language" = "인터페이스 언어" diff --git a/crates/ui-egui/locales/nl.toml b/crates/ui-egui/locales/nl.toml index 8d8cac68..0e28ad9c 100644 --- a/crates/ui-egui/locales/nl.toml +++ b/crates/ui-egui/locales/nl.toml @@ -1162,6 +1162,7 @@ status = "draft — needs native review" "Save as" = "Opslaan als" "Save as preset…" = "Opslaan als preset…" "Save files automatically" = "Bestanden automatisch opslaan" +"Start on the Home screen" = "Starten op Home" "Save version {key}" = "Versie opslaan {key}" "Saved" = "Opgeslagen" "Saved {name}" = "{name} opgeslagen" @@ -2023,6 +2024,7 @@ status = "draft — needs native review" "plugins.manage" = "Plugins beheren…" "plugins.runLast" = "Laatste plugin uitvoeren" "pref.autoSave" = "Bestanden automatisch opslaan" +"pref.startOnHome" = "Starten op Home" "pref.highlightHover" = "Lagen markeren bij aanwijzen" "pref.keepTool" = "Gereedschap geselecteerd houden na gebruik" "pref.language" = "Interfacetaal" diff --git a/crates/ui-egui/locales/pt-BR.toml b/crates/ui-egui/locales/pt-BR.toml index d970db14..625599f7 100644 --- a/crates/ui-egui/locales/pt-BR.toml +++ b/crates/ui-egui/locales/pt-BR.toml @@ -1095,6 +1095,7 @@ status = "draft — needs native review" "Save as" = "Salvar como" "Save as preset…" = "Salvar como predefinição…" "Save files automatically" = "Salvar arquivos automaticamente" +"Start on the Home screen" = "Começar no Início" "Save version {key}" = "Salvar versão {key}" "Saved" = "Salvo" "Saved {name}" = "{name} salvo" @@ -1913,6 +1914,7 @@ status = "draft — needs native review" "plugins.manage" = "Gerenciar plugins…" "plugins.runLast" = "Executar o último plugin" "pref.autoSave" = "Salvar arquivos automaticamente" +"pref.startOnHome" = "Começar no Início" "pref.highlightHover" = "Destacar camadas ao passar o cursor" "pref.keepTool" = "Manter a ferramenta selecionada após o uso" "pref.language" = "Idioma da interface" diff --git a/crates/ui-egui/locales/sv.toml b/crates/ui-egui/locales/sv.toml index d57bb25a..3593e2cd 100644 --- a/crates/ui-egui/locales/sv.toml +++ b/crates/ui-egui/locales/sv.toml @@ -1144,6 +1144,7 @@ name = "Svenska" "Run" = "Kör" "Run {label}" = "Kör {label}" "Save files automatically" = "Spara filer automatiskt" +"Start on the Home screen" = "Börja på Start" "Search templates" = "Sök mallar" "See all templates" = "Se alla mallar" "Select layers and they space themselves as their content changes" = "Markera lager så fördelar de avståndet själva när innehållet ändras" @@ -2004,6 +2005,7 @@ name = "Svenska" "plugins.manage" = "Hantera plugin-program…" "plugins.runLast" = "Kör senaste plugin" "pref.autoSave" = "Spara filer automatiskt" +"pref.startOnHome" = "Börja på Start" "pref.highlightHover" = "Framhäv lager vid hovring" "pref.keepTool" = "Behåll verktyget markerat efter användning" "pref.language" = "Gränssnittsspråk" diff --git a/crates/ui-egui/locales/zh-Hans.toml b/crates/ui-egui/locales/zh-Hans.toml index a90c1c03..e4a52a68 100644 --- a/crates/ui-egui/locales/zh-Hans.toml +++ b/crates/ui-egui/locales/zh-Hans.toml @@ -1097,6 +1097,7 @@ status = "draft — needs native review" "Save as" = "另存为" "Save as preset…" = "存储为预设…" "Save files automatically" = "自动保存文件" +"Start on the Home screen" = "启动时显示主页" "Save version {key}" = "保存版本 {key}" "Saved" = "已保存" "Saved {name}" = "已保存 {name}" @@ -1915,6 +1916,7 @@ status = "draft — needs native review" "plugins.manage" = "管理插件…" "plugins.runLast" = "运行上一个插件" "pref.autoSave" = "自动保存文件" +"pref.startOnHome" = "启动时显示主页" "pref.highlightHover" = "悬停时高亮图层" "pref.keepTool" = "使用后保持工具选中" "pref.language" = "界面语言" diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 448501ab..5b1888a0 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -223,6 +223,9 @@ pub fn show(app: &mut FigApp, ctx: &Context) { if !cfg!(target_arch = "wasm32") && crate::widgets::checkbox(ui, prefs.auto_save, tr("Save files automatically")) { toggles.push("pref.autoSave"); } + if !cfg!(target_arch = "wasm32") && crate::widgets::checkbox(ui, prefs.start_on_home, tr("Start on the Home screen")) { + toggles.push("pref.startOnHome"); + } for c in toggles { app.run(c, json!({})); } diff --git a/docs/mcp.md b/docs/mcp.md index c5ffe99f..90cc75f5 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -419,6 +419,8 @@ on; `key` resolves keys the way the canvas does. Commands behind keys: accessibility setting turns it on too). Prototype transitions still play. - `pref.autoSave {on?}`: files that have a path save themselves a few seconds after they change (off by default; the desktop app's timer does it, so scripts still call `file.save`). +- `pref.startOnHome {on?}`: the desktop app starts on the Home screen instead of in a new file + (off by default; files named on the command line still open). - `pref.language {language: system|en|cs|ru|es|es-419|fr|de|pt-BR|ja|ko|zh-Hans|…}`: the app's interface language, applied live ("system": - `pref.language {language: system|en|es|es-419|fr|de|pt-BR|ja|ko|sv|zh-Hans|…}`: the app's interface language, applied live ("system": the OS or browser language; a language without a catalog shows English). Command ids, labels and From 22ef4fdd99596d7ba095fac6de9ad7accd2b9ec1 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Tue, 20 Oct 2026 00:13:45 +0700 Subject: [PATCH 2/4] #874: locale entries in sorted position --- crates/ui-egui/locales/de.toml | 4 ++-- crates/ui-egui/locales/es.toml | 4 ++-- crates/ui-egui/locales/fi.toml | 4 ++-- crates/ui-egui/locales/fr.toml | 4 ++-- crates/ui-egui/locales/ja.toml | 4 ++-- crates/ui-egui/locales/ko.toml | 4 ++-- crates/ui-egui/locales/nl.toml | 4 ++-- crates/ui-egui/locales/pt-BR.toml | 4 ++-- crates/ui-egui/locales/sv.toml | 4 ++-- crates/ui-egui/locales/zh-Hans.toml | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/crates/ui-egui/locales/de.toml b/crates/ui-egui/locales/de.toml index c5d7dc7e..c2ea2e6e 100644 --- a/crates/ui-egui/locales/de.toml +++ b/crates/ui-egui/locales/de.toml @@ -1102,7 +1102,6 @@ status = "draft — needs native review" "Save as" = "Speichern unter" "Save as preset…" = "Als Vorgabe speichern…" "Save files automatically" = "Dateien automatisch speichern" -"Start on the Home screen" = "Mit Start beginnen" "Save version {key}" = "Version speichern {key}" "Saved" = "Gespeichert" "Saved {name}" = "{name} gespeichert" @@ -1225,6 +1224,7 @@ status = "draft — needs native review" "Start ascending from / stop descending at" = "Aufwärts zählen ab / abwärts zählen bis" "Start from a blank canvas" = "Mit einer leeren Arbeitsfläche beginnen" "Start on path" = "Anfang auf dem Pfad" +"Start on the Home screen" = "Mit Start beginnen" "Start point" = "Startpunkt" "Start sharing" = "Teilen starten" "Starting to share…" = "Teilen wird gestartet…" @@ -1924,7 +1924,6 @@ status = "draft — needs native review" "plugins.manage" = "Plugins verwalten…" "plugins.runLast" = "Letztes Plugin ausführen" "pref.autoSave" = "Dateien automatisch speichern" -"pref.startOnHome" = "Mit Start beginnen" "pref.highlightHover" = "Ebenen beim Überfahren hervorheben" "pref.keepTool" = "Werkzeug nach Verwendung ausgewählt lassen" "pref.language" = "Sprache der Benutzeroberfläche" @@ -1934,6 +1933,7 @@ status = "draft — needs native review" "pref.reduceMotion" = "Bewegung reduzieren" "pref.renameDuplicates" = "Duplizierte Ebenen umbenennen" "pref.showDimensions" = "Abmessungen an Objekten anzeigen" +"pref.startOnHome" = "Mit Start beginnen" "pref.userName" = "Ihr Name in Kommentaren" "proto.action.add" = "Prototyp-Aktion hinzufügen" "proto.action.move" = "Prototyp-Aktion neu anordnen" diff --git a/crates/ui-egui/locales/es.toml b/crates/ui-egui/locales/es.toml index 1a73816e..2a61b974 100644 --- a/crates/ui-egui/locales/es.toml +++ b/crates/ui-egui/locales/es.toml @@ -1155,7 +1155,6 @@ status = "draft — needs native review" "Run" = "Ejecutar" "Run {label}" = "Ejecutar {label}" "Save files automatically" = "Guardar archivos automáticamente" -"Start on the Home screen" = "Empezar en Inicio" "Search templates" = "Buscar plantillas" "See all templates" = "Ver todas las plantillas" "Select layers and they space themselves as their content changes" = "Selecciona capas y se espaciarán solas cuando cambie su contenido" @@ -1300,6 +1299,7 @@ status = "draft — needs native review" "Start from a blank canvas" = "Empieza con un lienzo en blanco" "Start from a template" = "Empieza con una plantilla" "Start on path" = "Inicio en el trazado" +"Start on the Home screen" = "Empezar en Inicio" "Start point" = "Punto inicial" "Start sharing" = "Empezar a compartir" "Start sharing with the Share button, then pass on the code it gives" = "Empieza a compartir con el botón Compartir y pasa el código que te da" @@ -2024,7 +2024,6 @@ status = "draft — needs native review" "plugins.manage" = "Gestionar plugins…" "plugins.runLast" = "Ejecutar el último plugin" "pref.autoSave" = "Guardar archivos automáticamente" -"pref.startOnHome" = "Empezar en Inicio" "pref.highlightHover" = "Resaltar capas al pasar el cursor" "pref.keepTool" = "Mantener la herramienta tras usarla" "pref.language" = "Idioma de la interfaz" @@ -2034,6 +2033,7 @@ status = "draft — needs native review" "pref.reduceMotion" = "Reducir movimiento" "pref.renameDuplicates" = "Renombrar capas duplicadas" "pref.showDimensions" = "Mostrar dimensiones en los objetos" +"pref.startOnHome" = "Empezar en Inicio" "pref.userName" = "Tu nombre en los comentarios" "proto.action.add" = "Añadir acción de prototipo" "proto.action.move" = "Reordenar acción de prototipo" diff --git a/crates/ui-egui/locales/fi.toml b/crates/ui-egui/locales/fi.toml index 6a47a8f2..783395d8 100644 --- a/crates/ui-egui/locales/fi.toml +++ b/crates/ui-egui/locales/fi.toml @@ -1162,7 +1162,6 @@ status = "draft — needs native review" "Save as" = "Tallenna nimellä" "Save as preset…" = "Tallenna esiasetuksena…" "Save files automatically" = "Tallenna tiedostot automaattisesti" -"Start on the Home screen" = "Aloita Aloitus-näkymästä" "Save version {key}" = "Tallenna versio {key}" "Saved" = "Tallennettu" "Saved {name}" = "Tallennettu: {name}" @@ -1301,6 +1300,7 @@ status = "draft — needs native review" "Start from a blank canvas" = "Aloita tyhjältä piirtoalueelta" "Start from a template" = "Aloita mallista" "Start on path" = "Aloituskohta polulla" +"Start on the Home screen" = "Aloita Aloitus-näkymästä" "Start point" = "Alkupiste" "Start sharing" = "Aloita jakaminen" "Start sharing with the Share button, then pass on the code it gives" = "Aloita jakaminen Jaa-painikkeella ja välitä sen antama koodi" @@ -2025,7 +2025,6 @@ status = "draft — needs native review" "plugins.manage" = "Hallitse liitännäisiä…" "plugins.runLast" = "Suorita viimeisin liitännäinen" "pref.autoSave" = "Tallenna tiedostot automaattisesti" -"pref.startOnHome" = "Aloita Aloitus-näkymästä" "pref.highlightHover" = "Korosta tasot osoitettaessa" "pref.keepTool" = "Pidä työkalu valittuna käytön jälkeen" "pref.language" = "Käyttöliittymän kieli" @@ -2035,6 +2034,7 @@ status = "draft — needs native review" "pref.reduceMotion" = "Vähennä liikettä" "pref.renameDuplicates" = "Nimeä monistetut tasot uudelleen" "pref.showDimensions" = "Näytä objektien mitat" +"pref.startOnHome" = "Aloita Aloitus-näkymästä" "pref.userName" = "Nimesi kommenteissa" "proto.action.add" = "Lisää prototyyppitoiminto" "proto.action.move" = "Muuta prototyyppitoimintojen järjestystä" diff --git a/crates/ui-egui/locales/fr.toml b/crates/ui-egui/locales/fr.toml index 947281a2..ea20ab10 100644 --- a/crates/ui-egui/locales/fr.toml +++ b/crates/ui-egui/locales/fr.toml @@ -1157,7 +1157,6 @@ status = "draft — needs native review" "Save as" = "Enregistrer sous" "Save as preset…" = "Enregistrer comme préréglage…" "Save files automatically" = "Enregistrer les fichiers automatiquement" -"Start on the Home screen" = "Démarrer sur l’Accueil" "Save version {key}" = "Enregistrer une version {key}" "Saved" = "Enregistré" "Saved {name}" = "{name} enregistré" @@ -1294,6 +1293,7 @@ status = "draft — needs native review" "Start from a blank canvas" = "Commencer avec un canevas vide" "Start from a template" = "Commencer avec un modèle" "Start on path" = "Début sur le tracé" +"Start on the Home screen" = "Démarrer sur l’Accueil" "Start point" = "Point de départ" "Start sharing" = "Commencer le partage" "Start sharing with the Share button, then pass on the code it gives" = "Commencez à partager avec le bouton Partager, puis communiquez le code qu’il donne" @@ -2013,7 +2013,6 @@ status = "draft — needs native review" "plugins.manage" = "Gérer les plugins…" "plugins.runLast" = "Exécuter le dernier plugin" "pref.autoSave" = "Enregistrer les fichiers automatiquement" -"pref.startOnHome" = "Démarrer sur l’Accueil" "pref.highlightHover" = "Mettre en évidence les calques au survol" "pref.keepTool" = "Garder l’outil sélectionné après usage" "pref.language" = "Langue de l’interface" @@ -2023,6 +2022,7 @@ status = "draft — needs native review" "pref.reduceMotion" = "Réduire les animations" "pref.renameDuplicates" = "Renommer les calques dupliqués" "pref.showDimensions" = "Afficher les dimensions sur les objets" +"pref.startOnHome" = "Démarrer sur l’Accueil" "pref.userName" = "Votre nom dans les commentaires" "proto.action.add" = "Ajouter une action de prototype" "proto.action.move" = "Réordonner l’action de prototype" diff --git a/crates/ui-egui/locales/ja.toml b/crates/ui-egui/locales/ja.toml index ed71e671..0f617b6f 100644 --- a/crates/ui-egui/locales/ja.toml +++ b/crates/ui-egui/locales/ja.toml @@ -1146,7 +1146,6 @@ status = "draft — needs native review" "Save as" = "名前を付けて保存" "Save as preset…" = "プリセットとして保存…" "Save files automatically" = "ファイルを自動保存" -"Start on the Home screen" = "起動時にホームを表示" "Save version {key}" = "バージョンを保存 {key}" "Saved" = "保存済み" "Saved {name}" = "{name} を保存済み" @@ -1283,6 +1282,7 @@ status = "draft — needs native review" "Start from a blank canvas" = "空白のキャンバスから始める" "Start from a template" = "テンプレートから始める" "Start on path" = "パス上の開始位置" +"Start on the Home screen" = "起動時にホームを表示" "Start point" = "始点" "Start sharing" = "共有を開始" "Start sharing with the Share button, then pass on the code it gives" = "共有ボタンで共有を開始し、表示されたコードを相手に伝える" @@ -1997,7 +1997,6 @@ status = "draft — needs native review" "plugins.manage" = "プラグインを管理…" "plugins.runLast" = "最後のプラグインを実行" "pref.autoSave" = "ファイルを自動保存" -"pref.startOnHome" = "起動時にホームを表示" "pref.highlightHover" = "ホバー時にレイヤーをハイライト" "pref.keepTool" = "使用後もツールを選択したままにする" "pref.language" = "インターフェースの言語" @@ -2007,6 +2006,7 @@ status = "draft — needs native review" "pref.reduceMotion" = "動きを減らす" "pref.renameDuplicates" = "複製したレイヤーの名前を変更" "pref.showDimensions" = "オブジェクトに寸法を表示" +"pref.startOnHome" = "起動時にホームを表示" "pref.userName" = "コメントに表示する名前" "proto.action.add" = "プロトタイプのアクションを追加" "proto.action.move" = "プロトタイプのアクションの順序を変更" diff --git a/crates/ui-egui/locales/ko.toml b/crates/ui-egui/locales/ko.toml index 43c9a22e..a96a0991 100644 --- a/crates/ui-egui/locales/ko.toml +++ b/crates/ui-egui/locales/ko.toml @@ -1096,7 +1096,6 @@ status = "draft — needs native review" "Save as" = "다른 이름으로 저장" "Save as preset…" = "프리셋으로 저장…" "Save files automatically" = "파일 자동 저장" -"Start on the Home screen" = "홈에서 시작" "Save version {key}" = "버전 저장 {key}" "Saved" = "저장됨" "Saved {name}" = "{name} 저장됨" @@ -1219,6 +1218,7 @@ status = "draft — needs native review" "Start ascending from / stop descending at" = "오름차순 시작 값 / 내림차순 끝 값" "Start from a blank canvas" = "빈 캔버스로 시작" "Start on path" = "패스 시작 위치" +"Start on the Home screen" = "홈에서 시작" "Start point" = "시작점" "Start sharing" = "공유 시작" "Starting to share…" = "공유를 시작하는 중…" @@ -1915,7 +1915,6 @@ status = "draft — needs native review" "plugins.manage" = "플러그인 관리…" "plugins.runLast" = "마지막 플러그인 실행" "pref.autoSave" = "파일 자동 저장" -"pref.startOnHome" = "홈에서 시작" "pref.highlightHover" = "마우스를 올리면 레이어 강조" "pref.keepTool" = "사용 후에도 도구 선택 유지" "pref.language" = "인터페이스 언어" @@ -1925,6 +1924,7 @@ status = "draft — needs native review" "pref.reduceMotion" = "동작 줄이기" "pref.renameDuplicates" = "복제한 레이어 이름 바꾸기" "pref.showDimensions" = "개체에 치수 표시" +"pref.startOnHome" = "홈에서 시작" "pref.userName" = "댓글에 표시할 이름" "proto.action.add" = "프로토타입 액션 추가" "proto.action.move" = "프로토타입 액션 순서 변경" diff --git a/crates/ui-egui/locales/nl.toml b/crates/ui-egui/locales/nl.toml index 0e28ad9c..cf861d2a 100644 --- a/crates/ui-egui/locales/nl.toml +++ b/crates/ui-egui/locales/nl.toml @@ -1162,7 +1162,6 @@ status = "draft — needs native review" "Save as" = "Opslaan als" "Save as preset…" = "Opslaan als preset…" "Save files automatically" = "Bestanden automatisch opslaan" -"Start on the Home screen" = "Starten op Home" "Save version {key}" = "Versie opslaan {key}" "Saved" = "Opgeslagen" "Saved {name}" = "{name} opgeslagen" @@ -1301,6 +1300,7 @@ status = "draft — needs native review" "Start from a blank canvas" = "Begin vanaf een leeg canvas" "Start from a template" = "Begin met een sjabloon" "Start on path" = "Begin op het pad" +"Start on the Home screen" = "Starten op Home" "Start point" = "Startpunt" "Start sharing" = "Delen starten" "Start sharing with the Share button, then pass on the code it gives" = "Begin met delen via de knop Delen en geef daarna de code door die je krijgt" @@ -2024,7 +2024,6 @@ status = "draft — needs native review" "plugins.manage" = "Plugins beheren…" "plugins.runLast" = "Laatste plugin uitvoeren" "pref.autoSave" = "Bestanden automatisch opslaan" -"pref.startOnHome" = "Starten op Home" "pref.highlightHover" = "Lagen markeren bij aanwijzen" "pref.keepTool" = "Gereedschap geselecteerd houden na gebruik" "pref.language" = "Interfacetaal" @@ -2034,6 +2033,7 @@ status = "draft — needs native review" "pref.reduceMotion" = "Beweging verminderen" "pref.renameDuplicates" = "Gedupliceerde lagen hernoemen" "pref.showDimensions" = "Afmetingen op objecten tonen" +"pref.startOnHome" = "Starten op Home" "pref.userName" = "Je naam in reacties" "proto.action.add" = "Prototypeactie toevoegen" "proto.action.move" = "Volgorde van prototypeactie wijzigen" diff --git a/crates/ui-egui/locales/pt-BR.toml b/crates/ui-egui/locales/pt-BR.toml index 625599f7..721ebf64 100644 --- a/crates/ui-egui/locales/pt-BR.toml +++ b/crates/ui-egui/locales/pt-BR.toml @@ -1095,7 +1095,6 @@ status = "draft — needs native review" "Save as" = "Salvar como" "Save as preset…" = "Salvar como predefinição…" "Save files automatically" = "Salvar arquivos automaticamente" -"Start on the Home screen" = "Começar no Início" "Save version {key}" = "Salvar versão {key}" "Saved" = "Salvo" "Saved {name}" = "{name} salvo" @@ -1218,6 +1217,7 @@ status = "draft — needs native review" "Start ascending from / stop descending at" = "Contar para cima a partir de / para baixo até" "Start from a blank canvas" = "Comece com uma tela em branco" "Start on path" = "Início no caminho" +"Start on the Home screen" = "Começar no Início" "Start point" = "Ponto inicial" "Start sharing" = "Começar a compartilhar" "Starting to share…" = "Começando a compartilhar…" @@ -1914,7 +1914,6 @@ status = "draft — needs native review" "plugins.manage" = "Gerenciar plugins…" "plugins.runLast" = "Executar o último plugin" "pref.autoSave" = "Salvar arquivos automaticamente" -"pref.startOnHome" = "Começar no Início" "pref.highlightHover" = "Destacar camadas ao passar o cursor" "pref.keepTool" = "Manter a ferramenta selecionada após o uso" "pref.language" = "Idioma da interface" @@ -1924,6 +1923,7 @@ status = "draft — needs native review" "pref.reduceMotion" = "Reduzir movimento" "pref.renameDuplicates" = "Renomear camadas duplicadas" "pref.showDimensions" = "Mostrar dimensões nos objetos" +"pref.startOnHome" = "Começar no Início" "pref.userName" = "Seu nome nos comentários" "proto.action.add" = "Adicionar ação de protótipo" "proto.action.move" = "Reordenar ação de protótipo" diff --git a/crates/ui-egui/locales/sv.toml b/crates/ui-egui/locales/sv.toml index 3593e2cd..183a5381 100644 --- a/crates/ui-egui/locales/sv.toml +++ b/crates/ui-egui/locales/sv.toml @@ -1144,7 +1144,6 @@ name = "Svenska" "Run" = "Kör" "Run {label}" = "Kör {label}" "Save files automatically" = "Spara filer automatiskt" -"Start on the Home screen" = "Börja på Start" "Search templates" = "Sök mallar" "See all templates" = "Se alla mallar" "Select layers and they space themselves as their content changes" = "Markera lager så fördelar de avståndet själva när innehållet ändras" @@ -1287,6 +1286,7 @@ name = "Svenska" "Start from a blank canvas" = "Börja med en tom arbetsyta" "Start from a template" = "Börja med en mall" "Start on path" = "Början på banan" +"Start on the Home screen" = "Börja på Start" "Start point" = "Startpunkt" "Start sharing" = "Börja dela" "Start sharing with the Share button, then pass on the code it gives" = "Börja dela med knappen Dela och skicka sedan vidare koden du får" @@ -2005,7 +2005,6 @@ name = "Svenska" "plugins.manage" = "Hantera plugin-program…" "plugins.runLast" = "Kör senaste plugin" "pref.autoSave" = "Spara filer automatiskt" -"pref.startOnHome" = "Börja på Start" "pref.highlightHover" = "Framhäv lager vid hovring" "pref.keepTool" = "Behåll verktyget markerat efter användning" "pref.language" = "Gränssnittsspråk" @@ -2015,6 +2014,7 @@ name = "Svenska" "pref.reduceMotion" = "Minska rörelse" "pref.renameDuplicates" = "Byt namn på duplicerade lager" "pref.showDimensions" = "Visa dimensioner på objekt" +"pref.startOnHome" = "Börja på Start" "pref.userName" = "Ditt namn i kommentarer" "proto.action.add" = "Lägg till prototypåtgärd" "proto.action.move" = "Ändra ordning på prototypåtgärd" diff --git a/crates/ui-egui/locales/zh-Hans.toml b/crates/ui-egui/locales/zh-Hans.toml index e4a52a68..5383c041 100644 --- a/crates/ui-egui/locales/zh-Hans.toml +++ b/crates/ui-egui/locales/zh-Hans.toml @@ -1097,7 +1097,6 @@ status = "draft — needs native review" "Save as" = "另存为" "Save as preset…" = "存储为预设…" "Save files automatically" = "自动保存文件" -"Start on the Home screen" = "启动时显示主页" "Save version {key}" = "保存版本 {key}" "Saved" = "已保存" "Saved {name}" = "已保存 {name}" @@ -1220,6 +1219,7 @@ status = "draft — needs native review" "Start ascending from / stop descending at" = "升序起点 / 降序终点" "Start from a blank canvas" = "从空白画布开始" "Start on path" = "路径起点" +"Start on the Home screen" = "启动时显示主页" "Start point" = "起点" "Start sharing" = "开始分享" "Starting to share…" = "正在开始分享…" @@ -1916,7 +1916,6 @@ status = "draft — needs native review" "plugins.manage" = "管理插件…" "plugins.runLast" = "运行上一个插件" "pref.autoSave" = "自动保存文件" -"pref.startOnHome" = "启动时显示主页" "pref.highlightHover" = "悬停时高亮图层" "pref.keepTool" = "使用后保持工具选中" "pref.language" = "界面语言" @@ -1926,6 +1925,7 @@ status = "draft — needs native review" "pref.reduceMotion" = "减少动态效果" "pref.renameDuplicates" = "重命名副本图层" "pref.showDimensions" = "在对象上显示尺寸" +"pref.startOnHome" = "启动时显示主页" "pref.userName" = "评论中显示的名字" "proto.action.add" = "添加原型操作" "proto.action.move" = "调整原型操作顺序" From 9877b8e6cce1da2da20d44f8e39464b764efcc29 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Tue, 20 Oct 2026 00:13:46 +0700 Subject: [PATCH 3/4] #874: test that the Start on the Home screen preference persists (old settings read off) --- crates/engine/src/cmd/view.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/crates/engine/src/cmd/view.rs b/crates/engine/src/cmd/view.rs index bdf67339..b8a2569c 100644 --- a/crates/engine/src/cmd/view.rs +++ b/crates/engine/src/cmd/view.rs @@ -523,3 +523,24 @@ pub fn specs() -> Vec { #[allow(dead_code)] fn unused(_: NodeId) {} + +#[cfg(test)] +mod start_on_home_tests { + use serde_json::json; + + use crate::Session; + + #[test] + fn start_on_home_is_a_preference_that_persists() { + let mut s = Session::new(); + assert!(!s.prefs.start_on_home); + assert_eq!(s.execute("pref.startOnHome", &json!({})).unwrap()["on"], true); + assert!(s.prefs.start_on_home); + // Saved with the other preferences and read back; older settings files without it read as off. + let saved: crate::Prefs = serde_json::from_value(serde_json::to_value(&s.prefs).unwrap()).unwrap(); + assert!(saved.start_on_home); + assert_eq!(s.execute("pref.startOnHome", &json!({"on": false})).unwrap()["on"], false); + let old: crate::Prefs = serde_json::from_value(json!({"theme": "dark"})).unwrap(); + assert!(!old.start_on_home); + } +} From 21d5090db2d3ea08eaddd840e775a6cbb56b8011 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Tue, 20 Oct 2026 00:13:47 +0700 Subject: [PATCH 4/4] #874: --control starts in a new file whatever the preference (control callers expect a document), with a test --- apps/figcraft/src/main.rs | 25 ++++++++++++++++++++++--- docs/mcp.md | 3 ++- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/apps/figcraft/src/main.rs b/apps/figcraft/src/main.rs index e98f9373..00856c5d 100644 --- a/apps/figcraft/src/main.rs +++ b/apps/figcraft/src/main.rs @@ -193,10 +193,8 @@ fn main() -> eframe::Result { // default, never a build from source unless asked). session.live.links = figcraft_collab_net::links::system(); session.invite_links_startup(); - // A first run (no settings kept yet, nothing to open) starts on the home screen, with its - // tips and templates; later runs start in a new file unless the preference says Home. let first_run = svc.prefs.is_none() && args.join.is_none(); - if session.docs.is_empty() && !first_run && !session.prefs.start_on_home { + if session.docs.is_empty() && opens_new_file(first_run, session.prefs.start_on_home, port.is_some()) { let _ = session.execute("file.new", &json!({})); } // The interface language from the first frame on, and for the message when the window can't @@ -268,6 +266,14 @@ fn main() -> eframe::Result { result } +/// With nothing to open, whether the window starts in a new file rather than on the home screen. +/// A first run (no settings kept yet) shows the home screen's tips and templates, and later runs +/// start in a new file unless the preference asks for Home, which `--control` overrides: its +/// callers expect a document to act on. +fn opens_new_file(first_run: bool, start_on_home: bool, control: bool) -> bool { + !first_run && (!start_on_home || control) +} + fn desktop_title_bar() -> figcraft_ui_egui::TitleBar { use figcraft_ui_egui::TitleBar; if cfg!(target_os = "macos") { TitleBar::Inset } else { TitleBar::Custom } @@ -292,3 +298,16 @@ mod linux_window_tests { assert_eq!(viewport.decorations, Some(false)); } } + +#[cfg(test)] +mod start_tests { + use super::opens_new_file; + + #[test] + fn the_home_preference_starts_on_home_except_for_control_callers() { + assert!(opens_new_file(false, false, false), "a new file by default"); + assert!(!opens_new_file(false, true, false), "Home when the preference asks"); + assert!(opens_new_file(false, true, true), "--control still starts with a document"); + assert!(!opens_new_file(true, false, false), "a first run shows the home screen"); + } +} diff --git a/docs/mcp.md b/docs/mcp.md index 90cc75f5..fb94dabf 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -420,7 +420,8 @@ on; `key` resolves keys the way the canvas does. Commands behind keys: - `pref.autoSave {on?}`: files that have a path save themselves a few seconds after they change (off by default; the desktop app's timer does it, so scripts still call `file.save`). - `pref.startOnHome {on?}`: the desktop app starts on the Home screen instead of in a new file - (off by default; files named on the command line still open). + (off by default; files named on the command line still open, and `--control` starts in a new + file anyway, so control callers have a document). - `pref.language {language: system|en|cs|ru|es|es-419|fr|de|pt-BR|ja|ko|zh-Hans|…}`: the app's interface language, applied live ("system": - `pref.language {language: system|en|es|es-419|fr|de|pt-BR|ja|ko|sv|zh-Hans|…}`: the app's interface language, applied live ("system": the OS or browser language; a language without a catalog shows English). Command ids, labels and