"A label is a window's name that never changes. The title is a costume it can swap any time."
Static Windows in Config
The app.windows array in tauri.conf.json declares windows that exist from launch. Each entry sets the initial title, size, and behavior — and critically, a label. The default scaffold gives you one window labeled main. You can add more (a splash, a persistent toolbar) right here, no Rust needed, and they'll open with the app.
Label = Identity, Title = Display
Don't confuse the two. The label is a stable, unique string id — main, settings, splash — that never changes and is how every API refers to the window: get_webview_window("settings"), emit_to("settings", …). The title is the human text in the title bar; it can change at runtime and isn't unique. Identify windows by label, always. Targeting by title is a bug waiting to happen.
Config vs Code: When to Use Which
Use config for windows that always exist (your main window). Use runtime creation for windows that depend on user action or data (a document window per open file, a settings window only when requested). A common pattern: declare main in config, create everything else in Rust. You can even declare a window in config but start it hidden, then show() it when ready — handy for a splash-then-main sequence.