Skip to content

feat(titlebar): show the CodeNomad mark instead of the window title - #1102

Merged
pascalandr merged 1 commit into
devfrom
feat/titlebar-logo
Oct 22, 2026
Merged

pascalandr merged 1 commit into
devfrom
feat/titlebar-logo

Conversation

@pascalandr

Copy link
Copy Markdown
Contributor

Summary

  • The main window's custom title bar (Windows and Linux) shows the new CN mark instead of the text "CodeNomad" before its menus. The Preferences window keeps its text title.
  • NativeTitlebar gains an optional logo prop: it renders packages/ui/src/images/CodeNomad-Mark.svg (the mark from images/CodeNomad-Icon.svg cropped to its bounds) 24 px high, centred in the 36 px bar, with the title as alt so the accessible name stays "CodeNomad".
  • The image is draggable={false} so pressing it still moves the window, and it hides below 640 px like the title did.
  • BUILD.md lists the cropped asset beside its source.

Validation

  • npm run typecheck --workspace @codenomad/ui: pass.
  • Screenshots of the real NativeTitlebar at 1x and 2x in dark and light themes: mark 24×45.5 px at y=6 in the 36 px bar, alt="CodeNomad", Preferences title unchanged.

The main window's custom title bar on Windows and Linux showed the text
"CodeNomad" before its menus. It now shows the new CN mark, so the
brand reads as a logo next to File, Edit, View, Window and Help. The
Preferences window keeps its text title.

NativeTitlebar gains an optional logo prop: when set, it renders
packages/ui/src/images/CodeNomad-Mark.svg (the mark from
images/CodeNomad-Icon.svg cropped to its bounds) 24 px high, centred in the 36 px bar, with the
title as its alt text so the accessible name stays "CodeNomad". The
image is not draggable, so pressing it still moves the window instead
of starting an image drag, and it hides below 640 px like the title
did. BUILD.md lists the cropped asset beside its source.

Validated with the UI typecheck and screenshots of the real
NativeTitlebar at 1x and 2x in dark and light themes (mark 24x45.5 px,
alt "CodeNomad", Preferences title unchanged).
@pascalandr

Copy link
Copy Markdown
Contributor Author

Review

Zero findings (P0–P3) on commit 3b7e77b82.

  • Passed npm run typecheck --workspace @codenomad/ui and node --import tsx --test tests/browser/view-menu-electron.test.ts (1 test).
  • Temporary Chromium checks rendered the actual NativeTitlebar: logo loaded at 24 px in the 36 px bar, accessible image name remained “CodeNomad”, Preferences retained text, the brand hid at 640 px, and mocked Electron/Tauri dispatch preserved double-click/maximize, Tauri drag initiation, and menu isolation. Native OS dragging was reviewed in code rather than exercised manually.
  • Verified identical SVG shapes/colors and browser-measured bounds, including the circle stroke: everything fits the cropped viewBox. A production Vite asset build confirmed inline SVG delivery inside JavaScript; checked desktop/server loading, CSP configuration, and PWA precaching without finding a conflict.
  • Checked styling/i18n/documentation rules and searched UI tests, automation code/skills, development docs, and user help. No title-text dependency or affected help description requiring an update was found.

File-size note: packages/ui/src/App.tsx is approximately 913 lines; this PR changes one call site there.

@pascalandr
pascalandr merged commit dc6b0e7 into dev Oct 22, 2026
13 of 14 checks passed
@pascalandr
pascalandr deleted the feat/titlebar-logo branch October 22, 2026 17:12
pascalandr added a commit that referenced this pull request Oct 22, 2026
## Summary

- The title-bar mark from #1102 goes from 24 px to **20 px** high, at
the owner's request: 8 px of margin above and below it in the 36 px bar,
closer to the weight of the menu labels.
- Only `.native-titlebar-logo` height changes; the brand container still
centres it vertically.

## Validation

- Screenshot of the real `NativeTitlebar` at 20 px in dark and light
themes, 1x and 2x: mark 20×38 px at y=8 in the 36 px bar.
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.

1 participant