Skip to content

Rewrite/tauri svelte#310

Merged
Splode merged 65 commits intomainfrom
rewrite/tauri-svelte
Mar 2, 2026
Merged

Rewrite/tauri svelte#310
Splode merged 65 commits intomainfrom
rewrite/tauri-svelte

Conversation

@Splode
Copy link
Owner

@Splode Splode commented Mar 2, 2026

Complete Rewrite — Electron → Tauri 2 + Rust + Svelte 5

Pomotroid has been rebuilt from the ground up. The Electron + Vue.js stack has been replaced with a fully native Tauri 2 application backed by Rust and a Svelte 5 frontend, resulting in a drastically smaller footprint, faster startup, and no Chromium dependency.

Timer

  • Drift-correcting engine — Rust timer thread uses std::time::Instant with a fixed tick schedule; eliminates the cumulative drift that plagued the web-worker approach
  • Sleep / wake handling — timer pauses automatically on OS sleep and resumes from the correct position on wake; no missed rounds
  • Round sequencing — configurable work / short-break / long-break cycle with independent auto-start per round type
  • Skip and round reset — skip to the next round or restart only the current round at any time, regardless of timer state
  • Session recording — every completed round is written to SQLite with type, duration, and completion status

Statistics

  • Dedicated stats window with three tabs:
    • Today — work and break round counts, total focus time, hourly breakdown chart
    • This Week — daily bar chart for the past seven days, current consecutive-day streak
    • All Time — 52-week heatmap (GitHub-style contribution calendar), lifetime session totals
  • Charts use pure SVG; no external charting library
  • Chart and heatmap colours are derived from the active theme
  • Stats update live when a round completes — no manual refresh needed

Themes & Appearance

  • 37 bundled themes including Pomotroid (dark), Pomotroid Light, Dracula, Nord, Tokyo Night, Gruvbox, Solarized, GitHub, One Dark, Rose Piné (3 variants), Catppuccin (4 variants), Synthwave, Ayu, Everforest, Kanagawa, Monokai, Night Owl, and more
  • Auto light / dark mode — follows the OS prefers-color-scheme preference automatically; separate theme pickers for light and dark
  • Custom theme hot-reload — drop a JSON theme file into the user themes folder and it appears instantly without a restart
  • Theme colours propagate throughout the full UI and into the tray icon arc

Localization

  • 7 languages — English, Spanish, French, German, Japanese, Chinese (Simplified), and Portuguese
  • Auto-detects OS language on first launch; can be overridden manually in Settings
  • All UI strings, settings labels, and notification messages are translated
  • Locale-aware date and time formatting throughout (Intl.DateTimeFormat, reactive to language changes)
  • Built with Paraglide JS v2 — compile-time, type-safe, tree-shakable message functions

Audio

  • Configurable alert cues for work rounds, short breaks, and long breaks
  • Custom audio — replace any of the three alert cues with your own file via a file picker
  • Tick sounds — independently toggleable for work and break rounds
  • Volume control — global volume slider (0–100)
  • All audio runs on a dedicated thread via rodio; playback is guaranteed even when the window is hidden to the tray

System Tray

  • Dynamic tray icon — a progress arc rendered with tiny-skia sweeps clockwise from 12 o'clock, coloured by round type (work / short break / long break)
  • Countdown mode — optional inverted arc that fills from full to empty instead of empty to full
  • Pause indicator — two vertical bars drawn over the icon when the timer is paused
  • Tray menu — Show and Exit actions; left-clicking the icon toggles window visibility
  • Minimise to tray and close to tray are independently configurable

Global Shortcuts

  • Four actions — toggle (start / pause / resume), reset, skip, restart round
  • Platform defaultsControl+F1–F4 on Windows and Linux; Command+Shift+1–4 on macOS
  • Fully rebindable in Settings; supports modifier combinations and function keys
  • Shortcuts work when the window is hidden to the tray

macOS

  • Global shortcuts via Accessibility — shortcuts use the macOS Accessibility API; a contextual notice in Settings guides through granting permission with a direct link to System Settings
  • Native window style — overlay titlebar with macOS-native traffic-light controls
  • Platform-aware defaults — tray settings hidden on macOS where they are not applicable; shortcut defaults use Command instead of Control

Desktop Notifications

  • Native OS notifications on round completion via tauri-plugin-notification
  • Linux uses notify-send (libnotify) to avoid D-Bus session bus conflicts
  • Notifications include round type and duration

WebSocket Integration

  • Opt-in local WebSocket server (default off) for stream overlays and external integrations
  • Listens on ws://127.0.0.1:<port> (localhost only); default port 1314
  • Broadcasts roundChange events with full timer state; clients can query current state with getState
  • Port is configurable; enable / disable at runtime from Settings → Advanced

Diagnostics & Logging

  • Rotating log file written to the OS log directory (5 MB max, keeps one backup)
  • Structured log entries for all major events — timer state changes, settings loads, audio playback, shortcut registration, round completions
  • Panics are captured to the log before the process terminates
  • Verbose logging toggle in Settings → Advanced switches between INFO and DEBUG level
  • Open Log Folder button in Settings → About for quick access

Settings

26 configurable values across seven sections — Timer, Appearance, Notifications, Audio, Shortcuts, Advanced, and About. All settings are persisted to SQLite and take effect immediately without a restart (except WebSocket port).

Breaking Changes

  • Settings are no longer stored in user-preferences.json. All preferences reset to defaults on first launch after upgrading from v0.x.
  • The minimum OS requirement follows Tauri 2 system minimums: Windows 10+, macOS 10.13+, Linux with GTK 3.24+.
  • Custom theme JSON files from v0.x are fully compatible — no changes needed.

Splode and others added 30 commits February 22, 2026 09:32
Rewrites the project using Tauri, Rust, and Svelte, aiming for increase
performance and reliability.
Add GitHub Actions jobs for macOS (universal binary: Intel + Apple Silicon)
and Windows (NSIS installer) alongside the existing Linux job. Also update
push triggers to include claude/** branches.

https://claude.ai/code/session_01PLBp3X8raT8KcKDTDoHXDH
…KovJ

ci: add macOS and Windows build targets
- Add support for window resizing. Users can either maximize/restore the
  window using window controls, or resize the window using handles. At a
  small size, the window size is constrained and a minimal UI is shown.
- Introduce a dedicated settings window to support the resizing change,
  and to provide space for future settings.
- Allow users to select custom audio files to use for Work, Short Break,
  and Long Break audio alerts.
- Allow the current round to be reset without resetting all rounds.
- Calculate toggle track and button color based on theme colors for
  better contrast.
- Allow users to select between Auto, Light, and Dark theme modes. Auto
  (default) determines if a dark or light theme should be used,
  depending on the user's current system mode.
- Migrate legacy "theme" value to default Pomotroid theme for backward
  compatability.
- Add openspec files for project documentation.
- Adds localization support via Paraglide for 5 initial languages
  (English, French, Spanish, German, Japanese).
- Default Auto option attempts to derive locale from system
  configuration.
feat: Add localization support.
- Adds support for logging application runtime information to files for
  enhanced debugging.
- Adds option for setting verbose log level.
- Update theme document reference in README.
- Create version string during compile, CI/CD.
- Attempt to detect Accessibility permissions on macOS. Provide user
  message with link if false.
- Seed macOS specific shortcut defaults.
- Remove migrations--not yet needed.
- Add dedicated statistics window for statistics visualization.
- Visualize stats for daily, weekly, and yearly ranges.
- Add DB queries for stats.
- Add localizations for stats.
- Update contributing doc with various instructions.
- Update default branch name in GitHub workflows.
- Move localization files and update inlang config.
@Splode Splode merged commit abb7a96 into main Mar 2, 2026
8 checks passed
@Splode Splode deleted the rewrite/tauri-svelte branch March 2, 2026 21:50
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.

2 participants