Skip to content

Enhancement for Custom Title Bar and general improved App behavior#36

Merged
jonax1337 merged 26 commits into
mainfrom
enhancement/title-bar-actions
Jan 10, 2026
Merged

Enhancement for Custom Title Bar and general improved App behavior#36
jonax1337 merged 26 commits into
mainfrom
enhancement/title-bar-actions

Conversation

@jonax1337
Copy link
Copy Markdown
Owner

This pull request introduces several user interface enhancements and improvements to database management in the password manager app. The main changes include new dialogs for "About" and "Open Recent Database", a more feature-rich custom title bar with menus, and improved tracking of recent databases throughout the app.

UI Enhancements

  • Added a new About page (app/about/page.tsx) and an interactive AboutDialog component (components/AboutDialog.tsx) to provide information about the app, its features, tech stack, and links to GitHub and issue reporting. [1] [2] [3]
  • Introduced the OpenRecentDialog component to allow users to view, select, and remove recently opened databases in a dedicated dialog.

Custom Title Bar Improvements

  • Refactored CustomTitleBar to support multiple dropdown menus (File, Edit, View, Help), including actions for creating a new database, opening recent databases, undo/redo, search, and accessing the About dialog. Recent databases are now listed in the File menu with quick open functionality. [1] [2] [3] [4] [5] [6] [7]

Recent Database Tracking

  • Improved recent database tracking by adding calls to addRecentDatabase whenever a database is created or opened, including in CreateDatabaseDialog and QuickUnlockScreen. [1] [2] [3] [4] [5]

These changes collectively improve the user experience by making key features and information more accessible, and by streamlining database management workflows.

…o custom title bar

- Add File menu with New Database, Open Recent, Save, and Close Database options
- Add Edit menu with Undo/Redo functionality (Ctrl+Z/Ctrl+Y shortcuts)
- Add View menu with Toggle Search option
- Add Help menu with About dialog
- Implement undo/redo system using new useUndoRedo hook
- Add OpenRecentDialog component for quick access to recent databases
- Add recent database tracking via addRecentDatabase calls
- Add addToHistory prop to EntryList, EntryListItem, and GroupTree components
- Implement undo/redo tracking for entry creation, deletion, and favorite toggle operations
- Implement undo/redo tracking for group creation, rename, and move operations
- Implement undo/redo tracking for entry move operations between groups
- Add findGroupByName utility function to locate groups by name and parent UUID
- Set global __addToHistory on window object
…databases

- Remove OpenRecentDialog component and related state/handlers from MainApp
- Add DropdownMenuSub components to CustomTitleBar for inline recent databases submenu
- Load recent databases on mount using getRecentDatabases and store in local state
- Implement openDatabaseInNewInstance function to open databases in new app instances via shell
- Display recent database filenames with truncation and full path tooltips
…ment toggle behavior for search

- Add data-tauri-drag-region to app icon, title text, right controls container, and menu separator
- Simplify database path splitting regex to handle both forward and backslashes
- Change onToggleSearch to toggle search visibility instead of only opening
- Clear search when toggling off via onToggleSearch handler
…n for new instance spawning

- Move openDatabaseInNewInstance logic from CustomTitleBar to lib/tauri.ts
- Add open_database_in_new_instance Tauri command to spawn new app instances via std::process::Command
- Replace shell plugin usage with invoke call to new Tauri command
- Rename openDatabaseInNewInstance to handleOpenDatabase in CustomTitleBar for clarity
- Register open_database_in_new_instance command in main.rs invoke_handler
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds significant UI enhancements to the password manager, including a custom title bar with multi-level dropdown menus (File, Edit, View, Help), an About dialog/page, recent database tracking, and an experimental undo/redo system. The changes aim to improve the user experience by making key features more accessible through menu actions and keyboard shortcuts.

Changes:

  • Added custom title bar menus with File (New/Open Recent/Save/Close), Edit (Undo/Redo), View (Toggle Search), and Help (About) options
  • Implemented recent database tracking in localStorage with UI integration in the File menu
  • Added undo/redo functionality for database operations (create/delete/move entries and groups)
  • Created About dialog and dedicated About page to display app information

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 25 comments.

Show a summary per file
File Description
src-tauri/tauri.conf.json Added shell permissions and about window capability
src-tauri/src/main.rs Registered new open_database_in_new_instance command
src-tauri/src/commands/database.rs Implemented command to spawn new app instance with database path
lib/window.ts Added openAboutWindow function for About page
lib/tauri.ts Added TypeScript binding for opening database in new instance
lib/storage.ts Implemented recent databases tracking functions (add, get, clear)
components/main-app/index.tsx Integrated undo/redo, menu handlers, and CreateDatabaseDialog
components/main-app/hooks/useUndoRedo.ts New hook implementing undo/redo history management
components/main-app/hooks/useKeyboardShortcuts.ts Added keyboard shortcuts for new features (Ctrl+W, Ctrl+N, Ctrl+Z, Ctrl+Y)
components/group-tree/utils.ts Added findGroupByName helper function for undo operations
components/group-tree/types.ts Added addToHistory prop for undo/redo integration
components/group-tree/index.tsx Integrated undo/redo tracking for group operations
components/entry-list/types.ts Added addToHistory prop for undo/redo integration
components/entry-list/index.tsx Integrated undo/redo tracking for entry create/delete
components/entry-list/EntryListItem.tsx Added undo/redo tracking for favorite toggle
components/UnlockScreen.tsx Added recent database tracking on unlock
components/QuickUnlockScreen.tsx Added recent database tracking on quick unlock
components/OpenRecentDialog.tsx New dialog component for viewing/managing recent databases (unused)
components/CustomTitleBar.tsx Expanded with multi-level dropdown menus and new actions
components/CreateDatabaseDialog.tsx Added recent database tracking on create
components/AboutDialog.tsx New dialog component showing app information
components/About.tsx New full-page About component with app details
app/about/page.tsx New Next.js page for About window

Comment thread components/main-app/index.tsx Outdated
Comment thread components/OpenRecentDialog.tsx Outdated
Comment thread components/main-app/hooks/useKeyboardShortcuts.ts Outdated
Comment thread lib/window.ts
Comment thread lib/storage.ts
Comment thread components/About.tsx Outdated
Comment thread components/entry-list/EntryListItem.tsx
Comment thread components/group-tree/index.tsx Outdated
Comment thread components/main-app/index.tsx Outdated
Comment thread components/main-app/index.tsx Outdated
jonax1337 and others added 4 commits January 10, 2026 21:46
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 10, 2026

@jonax1337 I've opened a new pull request, #37, to work on those changes. Once the pull request is ready, I'll request review from you.

jonax1337 and others added 12 commits January 10, 2026 21:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: jonax1337 <25123834+jonax1337@users.noreply.github.com>
…tabase is already open

- Add openedInNewInstance parameter to CreateDatabaseDialog onSuccess callback
- Add hasOpenDatabase prop to CreateDatabaseDialog to detect if database is currently open
- Import openDatabaseInNewInstance from lib/tauri in CreateDatabaseDialog
- Implement conditional logic: open new database in new instance if database already open, otherwise open in current instance
- Update handleNewDatabaseSuccess
- Remove handleCopyPassword function and its dependencies (selectedEntryForCopy, toast)
- Remove handlePaste function
- Remove onCopy and onPaste props from child component
Remove non-functional handlePaste placeholder
Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 10, 2026

@jonax1337 I've opened a new pull request, #38, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits January 10, 2026 21:11
… valid KDBX files

Co-authored-by: jonax1337 <25123834+jonax1337@users.noreply.github.com>
…file

Co-authored-by: jonax1337 <25123834+jonax1337@users.noreply.github.com>
Copilot AI and others added 3 commits January 10, 2026 21:14
Co-authored-by: jonax1337 <25123834+jonax1337@users.noreply.github.com>
Validate recent database paths before display and auto-cleanup stale entries
@jonax1337 jonax1337 merged commit bc9e14b into main Jan 10, 2026
4 checks passed
@jonax1337 jonax1337 deleted the enhancement/title-bar-actions branch January 10, 2026 21:37
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.

3 participants