Skip to content

feat: history/undo + menu bar popover — v0.5.1 - #8

Merged
ColeMei merged 7 commits into
mainfrom
feat/undo-menubar
Jul 10, 2026
Merged

feat: history/undo + menu bar popover — v0.5.1#8
ColeMei merged 7 commits into
mainfrom
feat/undo-menubar

Conversation

@ColeMei

@ColeMei ColeMei commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 2 of the GUI plan: the shared history log becomes actionable, and the menu-bar quick-access popover (prototype variants 1d/2b) ships.

History & undo

  • CLI set/export/import now record into ~/Library/Application Support/openwith/history.json (source cli); core import_associations records each applied set (source import), so every mutation path is logged
  • New openwith history (relative dates, -n, --json) and openwith undo — reverts the most recent set, refuses if the default drifted since the event (--force overrides), and records the revert itself

Menu bar

  • Tray icon (default on) toggling a transparent popover under the menu bar: type an extension → current default → Change → picker with CURRENT badge; Recent Changes with per-entry Undo; drop a file to look it up; Open main window / Quit footer
  • Global shortcut ⌥⌘O; popover hides on blur / Escape
  • Settings "Show in menu bar" and "Launch at login" (tauri-plugin-autostart) are now live, synced to real system state at startup
  • Backend AppsCache shared across windows so popover lookups skip the multi-second rescan

Verification

  • fmt --check / clippy -D warnings / 21 tests / tsc && vite build all green
  • End-to-end: openwith set md TextEditopenwith history shows it → openwith undoopenwith current md back to Typora
  • Cross-app: the CLI's set events appeared in the GUI popover's Recent Changes with working Undo (screenshot-verified), satisfying the plan's Phase 2 check

ColeMei added 7 commits July 10, 2026 12:08
set/export/import now append to the shared history log; openwith history
lists recent events (-n, --json), openwith undo reverts the most recent
set with drift protection (--force to override).
Ports prototype variants 1d/2b: tray icon opens a popover (extension
lookup with picker, Recent Changes with per-entry Undo, open-main/quit
footer), global shortcut ⌥⌘O, hide on blur. Backend gains an apps cache
so popover lookups skip the rescan, plus picker/recent-changes commands.
'Show in menu bar' (default on) and 'Launch at login' (autostart plugin)
settings are now functional.
Menu bar icons should be template images so macOS recolors them for
light/dark bars and the pressed state; the glyph is the logo's
document-with-arrow motif simplified for 22pt (SVG source alongside).
Popover shadow drops from the prototype's mock-scale 18/50 to a
native-feeling 6/22.
Undo semantics per the prototype's dUndo: the reverted event is marked
undone and the revert recorded as is_undo. Recent Changes (popover) is
an undo stack — entries disappear when undone, nothing is appended; the
Profiles HISTORY panel becomes the full ledger and now includes sets and
reverts (fixing set-history being menu-bar-only). CLI undo skips
consumed events. mark_undone matches on new-handler and undoable state
so same-second timestamp collisions can't leave an event eternally
re-undoable (regression test included).
@ColeMei
ColeMei merged commit d3b570f into main Jul 10, 2026
1 check passed
@ColeMei
ColeMei deleted the feat/undo-menubar branch July 10, 2026 02:40
@ColeMei ColeMei added the enhancement New feature or request label Jul 10, 2026
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