Skip to content

feat: title bar with application menus, and no white flash on startup - #21

Merged
FabioHAraujo merged 1 commit into
mainfrom
feat/title-bar
Oct 24, 2026
Merged

FabioHAraujo merged 1 commit into
mainfrom
feat/title-bar

Conversation

@FabioHAraujo

Copy link
Copy Markdown
Contributor

Closes #20. Same approach as LowBloat/LowNotes#86 and LowBloat/LowNotes#88.

Startup: the main window starts hidden (visible: false). Once the page has painted it calls window_painted with the body background as #rrggbb; the native window and webview take that color (so resizing never uncovers white) and the window is shown. Theme changes call it again. window.rs shows the window after five seconds if the page never reports.

Windows and Linux: decorations: false and a title bar in the theme: logo, File / Query / View / Help menus (the UI kit's DropdownMenu), the active tab and connection in the middle, and minimize / maximize-restore / close. The bar is a drag region (double click toggles maximize). Alt or F10 focuses the menus; left/right move between them.

  • File: new query (Ctrl+T), new connection, import connections, run SQL file, close tab (Ctrl+W), quit
  • Query: run statement (Ctrl+Enter), run script (F5), stop, commit, rollback, auto-commit
  • View: dark theme, AI agents
  • Help: documentation, release notes, report a problem, check for updates (reports "up to date"), about

macOS: tauri.macos.conf.json keeps native decorations with titleBarStyle: Overlay; the menus go to the global menu bar with the standard Edit and Window menus. Not tested on a Mac.

New permissions: window minimize, toggle-maximize, close, start-dragging; process:allow-exit.

Verified

  • Native Windows debug build with the embedded frontend: traced the window state at 1 ms resolution over four launches. The window is never shown before the page paints; in one launch out of four it was visible at its restored size for ~14 ms before tao applied the maximize (in LowNotes four launches out of four were clean). Restore, drag, double-click maximize and the Query menu work.
  • Browser dev mock (?demo): menus, keyboard navigation between menus.
  • bun run check, bun test (new src/lib/app-menu.test.ts, including that the macOS window config differs only in its title bar), bun run build, cargo fmt --check, clippy with -D warnings.

@FabioHAraujo FabioHAraujo mentioned this pull request Oct 24, 2026
The main window starts hidden and is shown once the page has painted,
with the page background behind the webview (window_painted); a native
fallback shows it after five seconds.

Windows and Linux lose the native frame for a title bar in the
interface's theme: File, Query, View and Help menus built on the UI
kit's DropdownMenu, the active tab and connection, and minimize,
maximize and close buttons. The bar is a drag region; Alt or F10 moves
to the menus and the arrows move between them. macOS keeps its traffic
lights (tauri.macos.conf.json) and gets the same menus in the menu bar.

Closes #20
@FabioHAraujo
FabioHAraujo merged commit 4fd49d0 into main Oct 24, 2026
15 checks passed
@FabioHAraujo
FabioHAraujo deleted the feat/title-bar branch October 24, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Title bar with application menus and no white flash on startup

1 participant