Skip to content

Native menu bar (slice 1: wiring, file associations, PR check) - #15

Closed
cjthompson wants to merge 5 commits into
GRVYDEV:mainfrom
cjthompson:feat/native-menu-bar-impl
Closed

cjthompson wants to merge 5 commits into
GRVYDEV:mainfrom
cjthompson:feat/native-menu-bar-impl

Conversation

@cjthompson

Copy link
Copy Markdown

Adds the first three steps of the native menu bar plan (docs/plans/native-menu-bar.md):

  • Static menus and menu-action wiring — new src-tauri/src/menu.rs builds every menu (File / Edit / View / Window / Help) with platform gating; menu://action events route to the frontend via onMenuAction; the global keydown effect in App.tsx is removed.
  • Markdown file associations — bundle.fileAssociations declares .md / .markdown / .mdx as Viewer, with text/markdown and the daringfireball UTI so macOS offers Marky as Open With and Linux .desktop files carry the right MimeType.
  • PR check workflow — .github/workflows/check.yml runs cargo test on ubuntu-22.04 and macos-latest so Linux-only compile failures surface at PR time instead of at v* tag push.

Slice 1 lands 3 of 9 plan steps. Remaining: Rescan/Close Folder, Open Recent submenus, menu enabled state, Print/Reveal/Open With, Export HTML/Markdown, and Linux verification.

Verified on the integration branch (feat/native-menu-bar-impl at 31a8568): cargo test 38/38 passing; pnpm test 32 passing / 5 failing — same 5 pre-existing failures on main (markdown.test.ts, theme.test.tsx), no regression.

🤖 Generated with Claude Code

cjthompson and others added 5 commits September 30, 2026 13:04
…viewer

Adds bundle.fileAssociations for .md / .markdown / .mdx with role Viewer
and text/markdown MIME so macOS offers Marky as Open With and Linux
.desktop files carry the right MimeType.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Adds .github/workflows/check.yml running cargo test on ubuntu-22.04
and macos-latest so Linux-only compile failures show up at PR time
instead of at v* tag push.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Implements the static menu structure (File / Edit / View / Window / Help),
platform-gated app menu, accelerators, and the menu://action listener
that replaces the global keydown effect. Adds menu.rs and folders.ts
with placeholders (TODO(#00N)) so dependent tasks can fill them in.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: Claude Code <noreply@anthropic.com>
@cjthompson cjthompson closed this Sep 30, 2026
cjthompson pushed a commit to cjthompson/marky that referenced this pull request Sep 30, 2026
…RVYDEV#15)

- SourceView renders the full source as a CodeMirror editor. Edit mode
  makes it editable; Read mode keeps it view-only. Cmd+F CodeMirror
  search is wired through searchKeymap in lib/codemirror.ts.
- extractHeadings returns the 1-based source line of each heading, so
  the TOC can scroll Source view alongside rendered view.
- Toolbar view toggle and View Source View (CmdOrCtrl+/) added; the
  menu item lives next to Edit Mode in the View submenu.
cjthompson pushed a commit to cjthompson/marky that referenced this pull request Sep 30, 2026
GRVYDEV#15)

Combines:
- GRVYDEV#14 inline block editing via CodeMirror 6
- GRVYDEV#15 full-document Source view and line-tagged headings
cjthompson added a commit to cjthompson/marky that referenced this pull request Sep 30, 2026
Squash of feat/native-menu-bar-impl — steps 2-6 of
docs/plans/native-menu-bar.md:

- Rescan Folder (⇧⌘R) and Close Folder (⇧⌘W) for the active file's
  folder (folderForPath + rescan_folder command)
- Open Recent ▸ and Open Recent Folder ▸ submenus (≤10 entries + Clear
  Menu; refresh_recent wired through read_file and add_folder)
- Print… (⌘P) with print-only CSS for clean PDF export
- Reveal in Finder / Show in File Manager (⌥⌘R)
- Open With… (⌥⌘O, macOS only) — picker starts in /Applications
- Export ▸ HTML… (⌥⌘E) and Export ▸ Markdown Copy… (⇧⌘S)

Conflicts resolved against main@8fb9666 (edit-mode GRVYDEV#14/GRVYDEV#15):
- src/App.tsx: combined folderForPath / exportHtml / sourceEdit imports
- src/components/Viewer.tsx: combined 'relative' (block-editor) with
  'print:h-auto print:overflow-visible' on the scroller

Verified: cargo test 57/57; pnpm test 85 pass / 1 skip.

Co-Authored-By: Claude Code <noreply@anthropic.com>
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