Skip to content

fix: Tauri global-shortcut panic + CI trigger on develop#1

Merged
ajianaz merged 2 commits into
developfrom
fix/tauri-config-global-shortcut
Jul 11, 2026
Merged

fix: Tauri global-shortcut panic + CI trigger on develop#1
ajianaz merged 2 commits into
developfrom
fix/tauri-config-global-shortcut

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Fixes

1. Global-shortcut panic on startup

thread 'main' panicked at src/lib.rs:312:10:
error while running DrawOver application: PluginInitialization("global-shortcut", "Error deserialaling 'plugins.global-shortcut' within your Tauri configuration: invalid type: map, expected unit")

Root cause: plugins.global-shortcut in tauri.conf.json was set to {} (empty map). Tauri 2's global-shortcut plugin expects NO config entry in tauri.conf.json — it's registered programmatically via builder().plugin().

Fix: Remove the global-shortcut key from plugins.

2. Duplicate devUrl

Two devUrl entries (5173 and 1420). Removed the wrong one (5173).

3. CI workflow only triggered on main

Added develop to push and pull_request triggers.

ajianaz added 2 commits July 11, 2026 23:45
Tauri plugin global-shortcut expects no config in tauri.conf.json.
It's registered programmatically via builder().plugin().
Also: removed duplicate devUrl line (5173 vs 1420).
- Remove plugins.global-shortcut from tauri.conf.json (causes panic:
  'invalid type: map, expected unit')
- Remove duplicate devUrl (5173 vs 1420)
- CI workflow: trigger on develop branch too
@ajianaz ajianaz merged commit dba107a into develop Jul 11, 2026
3 checks passed
ajianaz added a commit that referenced this pull request Jul 11, 2026
* fix: black screen + overlay window geometry + drawing capture

Root causes fixed:
- tauri.conf.json: fullscreen:true + transparent:true on macOS forced
  opaque black backing layer. Switch to fullscreen:false + maximized:false.
- skipTaskbar:false so overlay window can receive keyboard focus.
- capabilities: add set-ignore-cursor-events, set-position, set-size,
  current-monitor permissions (were missing -> click-through + geometry
  calls silently failed).
- lib.rs show_overlay(): explicitly position window to current monitor
  origin+size (fixes maximized/center conflict leaving window at -240,30),
  re-assert always-on-top, log results.
- lib.rs do_toggle_draw_mode(): switch activation policy Regular<->Accessory
  so the overlay can become key window and capture mouse while drawing.
- lib.rs: add debug logging for shortcut registration/toggle.
- +page.svelte: add manual toggle button + debug overlay (work-in-progress
  while global shortcut capture is unreliable without Accessibility perm),
  sync initial draw mode from backend via is_draw_mode.

Known issue: global shortcut Option+Shift+D not reaching app from physical
keyboard (likely needs Accessibility/Input Monitoring permission). Manual
toggle button added as workaround during dev.

Follows PR #1 on develop.

* feat: vertical toolbar with lucide icons + keyboard shortcuts

- Toolbar: vertical layout, docked right-center on first paint, draggable.
- Replace emoji icons with @lucide/svelte (Pen, Highlighter, Eraser, Undo2,
  Trash2, X).
- Hover reveals keyboard shortcut badge on each tool button.
- Remove debug overlay + dev toggle button from +page.svelte.
- Add FAB (floating action button) bottom-right to enter draw mode.
- Keyboard shortcuts: Esc=exit, P/H/E=tool, Cmd+Z=undo.
- Startup click-through disabled so manual controls stay clickable.

* fix: startup show+focus window + lucide icons in toolbar

- Startup: set_activation_policy(Regular) + show + set_focus + geometry +
  always_on_top so overlay is frontmost and clickable immediately.
- Keep click-through OFF on exit-draw-mode so FAB/tray can re-enter.
- Toolbar: replace emoji icons with @lucide/svelte (Pen, Highlighter, Eraser,
  Undo2, Trash2, X) at size=16. No logic changes.
- Dev logging in toggle_draw_mode command for debugging phantom events.

* revert: kembali ke state working (emoji toolbar) + startup click-through false

Rollback semua perubahan UI/lucide yang bikin toolbar hilang & click gagal.
Kembali ke commit 7b2be16 state (emoji icons, debug overlay, toggle button)
+ startup click-through false (fix yang membuat drawing bisa dipakai).

* fix: disable global shortcut (phantom toggle) + log toggle command

Shortcut global Alt+Shift+D memicu toggle berulang tanpa input user,
membatalkan klik tombol manual. Disable selama dev.

* checkpoint: working drawing state

Kondisi working (drawing jalan):
- startup: apply_click_through(false) + activation policy Regular
- do_toggle: show_overlay() geometry, exit keep clickable + Regular
- shortcut global disabled (phantom toggle)
- UI: emoji toolbar + debug overlay + toggle button
- page.svelte: pdown/strokes counter di debug untuk tracing pointer events

* docs: add AGENT.md dengan aturan no-AI-attribution

* fix: clippy collapsible_match + let_unit_value (App vs AppHandle)

- show_overlay: collapse nested if let Ok+Some menjadi if let Ok(Some(monitor))
- startup: hapus let _ = pada app.set_activation_policy (App::method return
  unit, AppHandle::method return Result). do_toggle tetap pakai let _ = karena
  app: &AppHandle -> Result.
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