Pular para o conteúdo

Product Name in Desktop Title Bar

desktop-apps specs/desktop-apps/title-bar.kmd

Como exibir o nome do produto na barra de título de apps desktop Koder (Linux/macOS/Windows). Define formato canônico, casos de tela, sufixos (Untitled, dirty marker), e proibições.

Quando esta spec se aplica

Todos os triggers

Corpo da especificação

Spec — Product Name in Desktop Title Bar

Applicability

Any Koder product (koder-*) that ships a desktop GUI — Flutter desktop, GTK, Qt, Electron, etc. Does not apply to mobile-only, web-only, or CLI products.

Required Behavior

The product's name must appear in the window title bar of the main window.

Implementation

  • Set the window title via the native framework's window API.
    • Kroma (go-forward): the winit backend sets the title at window creation (engines/sdk/kroma/src/window_titlebar.rs + the run_app winit setup); pass appName as the window title. Custom-decoration drag/double-click per title-bar-double-click.kmd.
    • Legacy (Flutter, migrating): windowManager.setTitle(appName) and, additionally, MaterialApp(title: appName).
  • Use the constant appName defined in lib/core/constants.dart of the product, e.g.:
    const String appName = 'Koder Video';
    

Deterministic Audit Checks

A checker can verify:

  1. lib/core/constants.dart (or equivalent) exports an appName string constant.
  2. The main window creation code passes appName to the title bar setter (Kroma: the winit window builder in window_titlebar.rs/run_app).
  3. MaterialApp(title: ...) uses appName (Flutter legacy only — Flutter sunset).

Referências