Skip to content

feat: set window title to reflect selected note#17

Merged
j4rviscmd merged 1 commit intomainfrom
feat/window-title
Mar 22, 2026
Merged

feat: set window title to reflect selected note#17
j4rviscmd merged 1 commit intomainfrom
feat/window-title

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

  • Display "Scripta - {note title}" in the native window title bar, updating dynamically when the user switches notes or after auto-save completes
  • Uses Tauri's getCurrentWindow().setTitle() API with proper stale closure guards and error handling
  • Falls back to "Scripta - Untitled" when no note is selected

Changes

  • src/App.tsx: Add useEffect that watches selectedNoteId and refreshKey to update the window title via Tauri Window API
  • src-tauri/capabilities/default.json: Add core:window:allow-set-title permission

Test plan

  • Select a note and verify the window title updates to "Scripta - {title}"
  • Edit the heading of a note and verify the title updates after auto-save
  • Delete all notes and verify the title shows "Scripta - Untitled"
  • Create a new note and verify the title shows "Scripta - Welcome to Scripta"

🤖 Generated with Claude Code

Display "Scripta - {note title}" in the window title bar, updating
dynamically when the user switches notes or after auto-save completes.
Uses Tauri's getCurrentWindow().setTitle() API with proper stale
closure guards and error handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@j4rviscmd j4rviscmd added the enhancement New feature or request label Mar 22, 2026
@j4rviscmd j4rviscmd merged commit 05bd7af into main Mar 22, 2026
@j4rviscmd j4rviscmd deleted the feat/window-title branch March 22, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant