feat(app): Tauri commands open_data_dir / check_for_updates / restart_app (#176 sub-task 3)#206
Merged
Dewinator merged 2 commits intoMay 3, 2026
Conversation
…_app + version (#176 sub-task 3) Implements ticket 3 of `docs/native-tauri-shell-spike.md` "Suggested follow-up issues" — the four invokable surface primitives the dashboard webview cannot do via plain HTTP (decision 2 of the spike). Commands (all #[tauri::command], invoke()-able from the webview AND wired into the tray menu): - `open_data_dir()` — opens the resolved AppLocalData/mycelium/ in Finder (macOS), Explorer (Windows), or xdg-open (Linux). Reuses the ResolvedDataDir state cached in setup() so no path resolution per call. - `check_for_updates()` — emits an `updates:check-requested` event for now and returns a "not-yet-wired" string. Sub-task 4 (`tauri-plugin- updater`) replaces the body without changing the signature, so the dashboard banner can already wire its onClick to this command today. - `restart_app()` — calls `app.restart()`. The existing RunEvent::ExitRequested handler kills the sidecar; setup() respawns it on the next boot. - `get_app_version()` — returns `package_info().version` so the dashboard doesn't need a /version HTTP endpoint just for the about-screen. Tray menu grows from 2 → 4 items: Show / Hide window, Open data dir, Check for updates, Quit. Tray-body click still toggles window visibility. Capability set: adds `core:event:allow-emit` for the updates:check-requested event. (Tauri 2.11 has no separate restart permission — `core:default` covers it.) Validation: `cargo check` green on rustc 1.95.0, Tauri 2.11.0, tauri-plugin-shell 2.3.5. No Node-side changes. Stacked on #203 (Tauri scaffold) — auto-retargets to main once #203 lands. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3 tasks
Dewinator
added a commit
that referenced
this pull request
May 4, 2026
…sks 1/2/3-most/4/5/7-core landed The 09024a2 (tick 103) snapshot is two days stale: 9 of the 9 PRs in its "recommended merge order" have merged, plus #197/#198/#201/#202/#203/#204/ #205/#206/#207 landed in the same window. Refresh the doc that "is the canonical entry point for the native-app initiative" so a fresh reader does not get a 79-tick-old picture. Concrete changes: - Phase line: "spike phase complete · gated on PR-queue drain" → "implementation underway · sub-tasks 1, 2, 3 (most), 4, 5, 7 (core) landed; 5 PRs open, ~26 h Reed-lag since #202–#207". - End-state installer list: ".dmg / .msi / .AppImage" → ".pkg / .msi / .AppImage", with the 2026-05-04 epic-body decision (.pkg, not .dmg) cited. - Sub-task table: legend (✅ landed, 🔄 PR open, ⏳ spike-only) plus per-row PR status reflecting the current main: - Row 1 picks up #204 (79-migration walk as CI gate). - Row 3 picks up #202, #203, #206, #207 as landed and #208–#211 as open. Row was "_none yet_". - Row 4 / 5 reframed as "inherent" (PGlite is one WASM binary; node-llama-cpp ships per-platform bindings). - Row 7 picks up #205 (Docker → PGlite migration helpers core). - New "DbClient sub-story" subsection: 22 services touch Supabase directly on main; 2 in flight (Skills, SwarmPin); 20 remain after the open stack lands. Pattern: one service per PR. - "Recommended merge order — open PR queue (9 deep)" section replaced with "Open PR queue (5 deep, all CLEAN+MERGEABLE)" — the 9 it documented have all merged. - "Post-drain implementation gate" → "Post-stack implementation gate": parallel tracks (DbClient long-tail of 20 services + the sub-tasks 6/8/9 release-pipeline triangle on tauri-plugin-updater per #207). Doc-only, zero risk, direct-to-main per the standing rule for this file shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Dewinator
added a commit
that referenced
this pull request
May 5, 2026
… 6 status The "Aktiver Code-Bestand" inventory was one merge-wave behind the canonical native-app-track.md (refreshed in d0fc6ec on 2026-05-04): - #206 (Tauri commands open_data_dir / check_for_updates / restart_app + tray menu) — landed, but missing from CLAUDE.md. - #207 (tauri-plugin-updater wired to GitHub Releases latest.json) — landed, but missing from CLAUDE.md, AND sub-task 6 was still listed as fully verbleibend even though the consumer-side updater is live. Empirical reality on main today: - Sub-tasks 1, 2, 3 (scaffold + commands), 4, 5, 6 (updater-plugin app-side), 7 (core) are implemented. - Sub-task 6 verbleibend collapses to its CI half — publishing latest.json + signed installers — which is paired with sub-task 8 per docs/native-app-track.md row 6 ("⏳ spike landed, CI release pipeline pending"). - Sub-task 3 closes fully once #208 (sidecar bundling) merges. Doc-only, zero risk, direct-to-main per the standing rule for this file shape (precedent: d0fc6ec, ec8a088, f9acd10, 1962f9d). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements ticket 3 of
docs/native-tauri-shell-spike.md"Suggested follow-up issues" — the four primitives the dashboard webview cannot do via plain HTTP (decision 2 of the spike).Stacked on #203 (the Tauri scaffold). Will auto-retarget to
mainonce #203 lands.Commands
All four are
#[tauri::command]— invokable from the webview viainvoke()AND wired into the tray menu:open_data_dir()check_for_updates()updates:check-requestedevent; returns hint string. Body replaced bytauri-plugin-updaterin sub-task 4 — signature stablerestart_app()app.restart(); sidecar killed via existing ExitRequested handler, respawned by setup()get_app_version()package_info().version— saves the dashboard one HTTP endpointTray menu
Grows from 2 → 4 items: Show / Hide window • Open data dir • Check for updates • Quit. Tray-body click still toggles window visibility.
Capabilities
Adds
core:event:allow-emitfor theupdates:check-requestedevent. (Tauri 2.11 has no separate restart-permission;core:defaultcovers it.)Validation
No Node-side changes.
Test plan
cd app/src-tauri && cargo check— greencargo tauri dev— tray menu shows 4 items; clicking "Open data dir" opens Finder at~/Library/Application Support/mycelium/Related
MYCELIUM_DATA_DIRhonoured)🤖 Generated with Claude Code