Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
668 commits
Select commit Hold shift + click to select a range
b2984ca
Enhance SearchResults and SearchDeleteButtons with data refresh mecha…
MayGo Mar 7, 2025
07dd4a4
Add LiveViewOverlay component for real-time timeline interaction
MayGo Mar 7, 2025
efa5abe
Fix type safety and improve error handling in various components
MayGo Mar 7, 2025
b7221bd
Refactor table button props and improve type safety
MayGo Mar 7, 2025
cb0e05a
v3.22.19
MayGo Mar 7, 2025
3daf4d4
Merge pull request #313 from MayGo/issues/282
MayGo Mar 7, 2025
f8516a2
Refactor OnlineChart tooltip and improve time utility types
MayGo Mar 7, 2025
8cb0d88
Add "ago" time to MainTimelineChart tooltip
MayGo Mar 7, 2025
a0960ee
Merge pull request #314 from MayGo/issues/187
MayGo Mar 7, 2025
f470868
3.22.20
MayGo Mar 7, 2025
3bee709
Remove LiveViewOverlay - thinking something better
MayGo Mar 9, 2025
1cbb884
use vite
MayGo Mar 9, 2025
9ef8420
Migrate from Knex/Objection to Drizzle ORM
MayGo Mar 9, 2025
ab83737
Refactor and improve error handling in background jobs and settings
MayGo Mar 9, 2025
1a5c01a
Update database schema and date handling for Drizzle ORM migration
MayGo Mar 9, 2025
3268132
Refactor date handling and database schema for Drizzle ORM
MayGo Mar 9, 2025
1963fb4
Refactor date handling to use timestamp in TrackItemRaw and related s…
MayGo Mar 9, 2025
2e41b76
Enhance database migration and initialization for Drizzle ORM
MayGo Mar 9, 2025
2ba0e9c
Optimize database performance and schema with Drizzle ORM
MayGo Mar 9, 2025
7ce38db
Enhance database performance with type-safe prepared statements
MayGo Mar 10, 2025
cb70eed
Remove unnecessary logging in track-item-service
MayGo Mar 10, 2025
a8c78e6
Refactor search functionality and data handling
MayGo Mar 10, 2025
c92538e
3.22.21
MayGo Mar 10, 2025
714e3a9
Update TrackItemTable prop name from total to sumTotal
MayGo Mar 10, 2025
b1a67c6
Refactor database and service layer to remove prepared statements and…
MayGo Mar 10, 2025
e9567c4
Merge branch 'update-sqlite' into vite-electron
MayGo Mar 10, 2025
c918678
Migrate project to Vite and Electron Renderer plugin
MayGo Mar 10, 2025
14b30fb
Add electron-rebuild to postinstall script for better-sqlite3 compati…
MayGo Mar 10, 2025
bc2d340
Improve settings service and configuration handling
MayGo Mar 10, 2025
dff59e4
Improve app shutdown and resource cleanup
MayGo Mar 10, 2025
e08787b
Refactor TrayList component with improved item key generation
MayGo Mar 10, 2025
d16caf9
Refactor track item service with type-safe task name filtering
MayGo Mar 10, 2025
62d66c3
Enhance useTrayData hook with running log item tracking
MayGo Mar 10, 2025
f8e6270
Modify log item retrieval to fetch first chunk of log items
MayGo Mar 10, 2025
b85de09
Refactor TrayList component with improved item key generation
MayGo Mar 10, 2025
c698277
Enhance useTrayData hook with running log item tracking
MayGo Mar 10, 2025
0063ac6
Refactor TrayAppPage and useTrayData hook
MayGo Mar 10, 2025
066faaa
v3.22.22
MayGo Mar 10, 2025
ba7d336
Merge branch 'master' into vite-electron
MayGo Mar 10, 2025
4fafa0b
Merge pull request #315 from MayGo/update-sqlite
MayGo Mar 10, 2025
054eb2f
Add fs-extra and its type definitions to project dependencies
MayGo Mar 10, 2025
a1e0ee5
Add unit tests for electron background services and jobs
MayGo Mar 10, 2025
5aa4d87
Remove unused TrackItemType import from track-item-test-data
MayGo Mar 10, 2025
c607b9c
Add Vitest configuration and unit tests for BackgroundUtils
MayGo Mar 10, 2025
02c8d89
Add Vitest configuration and mocks for Electron background services
MayGo Mar 11, 2025
1c7511c
Add comprehensive test utilities and background service tests
MayGo Mar 11, 2025
3c6650e
Refactor test setup and theme utilities
MayGo Mar 11, 2025
aacc443
Refactor OnlineChart utility tests and improve time calculation
MayGo Mar 11, 2025
9051c40
Add test coverage and SonarCloud configuration for Electron and Client
MayGo Mar 11, 2025
afcf74a
Merge branch 'master' into vite-electron
MayGo Mar 11, 2025
28daf45
Update Sentry and Electron dependencies, refactor preload script
MayGo Mar 11, 2025
85e6e92
type
MayGo Mar 11, 2025
6651dee
Switch from Drizzle ORM with Better SQLite3 to LibSQL client
MayGo Mar 11, 2025
e652082
Set timezone for Vitest tests in Electron and Client projects
MayGo Mar 11, 2025
a556345
Update background service test to use LibSQL client
MayGo Mar 11, 2025
7ab7969
3.23.0
MayGo Mar 11, 2025
87eba5d
Merge pull request #316 from MayGo/vite-electron
MayGo Mar 11, 2025
11c8885
Update GitHub Actions workflow for macOS builds
MayGo Mar 11, 2025
a62eacf
Update Electron package.json to use dist-electron for client preparation
MayGo Mar 11, 2025
a09a5c6
Update Sentry and Electron dependencies, refactor preload script
MayGo Mar 11, 2025
0be36b7
Update Electron build configuration and bump version
MayGo Mar 11, 2025
2672b77
Update Electron build configuration to include shared directory
MayGo Mar 11, 2025
e4806f3
Update track item service to use descending order for queries
MayGo Mar 11, 2025
ac0ea3a
Refactor service imports to use Drizzle queries directory
MayGo Mar 11, 2025
6d45a65
Refactor project structure and reorganize Electron source files
MayGo Mar 11, 2025
03705dd
Add ErrorBoundary component and integrate across application routes
MayGo Mar 12, 2025
f1ca825
Improve log item retrieval and sorting in track item service
MayGo Mar 12, 2025
e19d237
"version": "3.23.3",
MayGo Mar 12, 2025
8783651
Bump Electron package version to 3.23.4
MayGo Mar 12, 2025
58b0437
3.23.4
MayGo Mar 12, 2025
448c718
Merge branch 'master' into main-logic-refactor
MayGo Mar 12, 2025
ee25fcb
Remove AppSettingService and migrate functionality
MayGo Mar 12, 2025
71e9fa2
Refactor background jobs to use functional approach
MayGo Mar 12, 2025
2db284c
Replace Node.js EventEmitter with EventEmitter3
MayGo Mar 12, 2025
2dd179e
Move background job modules to correct directory
MayGo Mar 12, 2025
d110caf
remove old files
MayGo Mar 12, 2025
bccb80a
Implement idle and power state monitoring
MayGo Mar 12, 2025
15da264
3.23.5
MayGo Mar 12, 2025
11bd2b7
Refactor background job initialization and add new state watchers
MayGo Mar 12, 2025
00c591f
Refactor track item management and enhance logging functionality
MayGo Mar 12, 2025
e4b1475
Add unit tests for watchAndSetAppTrackItem functionality
MayGo Mar 12, 2025
80358fa
Enhance unit tests for track item management
MayGo Mar 13, 2025
e7994d9
Add utility functions and enhance test coverage for track items
MayGo Mar 13, 2025
69ebcb4
Enhance visualization and logging in track item tests
MayGo Mar 13, 2025
4f6bdcd
Add state change utility and enhance test synchronization
MayGo Mar 13, 2025
65cf61d
Refactor test utilities and enhance state change handling
MayGo Mar 13, 2025
39f4766
Refactor ColorPicker component for improved color handling
MayGo Mar 14, 2025
d28ef99
3.23.6
MayGo Mar 14, 2025
3f8398c
remove description
MayGo Mar 14, 2025
667e3a7
kofi
MayGo Mar 14, 2025
0310da5
Merge branch 'master' into main-logic-refactor
MayGo Mar 14, 2025
7f836f8
Add color utility and enhance track item handling in tests
MayGo Mar 14, 2025
22599bb
Refactor track item handling and introduce new query functions
MayGo Mar 14, 2025
e8ff8fd
Add color management and enhance test utilities
MayGo Mar 14, 2025
eb8244e
Refactor track item management and enhance test utilities
MayGo Mar 14, 2025
6ea51bc
Refactor track item management and reorganize file structure
MayGo Mar 14, 2025
948c618
Refactor app track item management in tests
MayGo Mar 14, 2025
dc62f65
Enhance logging and error handling in tray data and settings service
MayGo Mar 14, 2025
b7b0988
Refactor track item database operations and enhance logging
MayGo Mar 14, 2025
0ae61e4
Fix type handling in log track item reference and refactor track item…
MayGo Mar 14, 2025
496c517
Fix almostMidnight function to return the correct time by subtracting…
MayGo Mar 14, 2025
b99ff7e
Update track item tests and database logic for accurate date handling
MayGo Mar 15, 2025
b3c10ac
Refactor log track item handling and update tests for state transitions
MayGo Mar 15, 2025
eb77867
Refactor log item handling and enhance data validation
MayGo Mar 15, 2025
c6a5568
Enhance useInterval hook to support immediate execution
MayGo Mar 15, 2025
88a197e
Refactor background job cleanup and enhance track item removal logic
MayGo Mar 15, 2025
1d1c376
Remove obsolete background service and utility files
MayGo Mar 15, 2025
329062a
Add dependency on sonarcloud for build job in GitHub Actions workflow
MayGo Mar 15, 2025
c381dd6
Merge pull request #321 from MayGo/main-logic-refactor
MayGo Mar 15, 2025
1a8786f
3.24.0
MayGo Mar 15, 2025
c3dff48
Update electron-builder configuration and package.json for architectu…
MayGo Mar 15, 2025
3de12be
Add architecture-specific file paths for macOS in electron-builder co…
MayGo Mar 15, 2025
272c9ca
Remove 'universal' architecture support from macOS targets in electro…
MayGo Mar 15, 2025
ed2a1cd
Remove architecture-specific file paths and electron-rebuild dependen…
MayGo Mar 15, 2025
d0936ab
upd
MayGo Mar 15, 2025
c61b7aa
Merge pull request #322 from MayGo/issues/296
MayGo Mar 15, 2025
5dc6cef
3.24.1
MayGo Mar 15, 2025
5c3f462
Merge branch 'master' of https://github.com/MayGo/tockler
MayGo Mar 15, 2025
c2b8dd8
Enhance build workflow and electron-builder configuration for archite…
MayGo Mar 15, 2025
0472bb9
Enhance GitHub Actions workflow for macOS dependency management
MayGo Mar 15, 2025
85f556f
Refactor GitHub Actions workflow to use Python 3 for macOS builds
MayGo Mar 15, 2025
0689bf8
Enhance GitHub Actions workflow with concurrency and timeout settings
MayGo Mar 15, 2025
bc43231
Update Electron dependencies and enhance ongoing track item retrieval
MayGo Mar 15, 2025
4e445c6
Refactor TrackItemTable components and introduce default sorting
MayGo Mar 16, 2025
18e972b
Enhance Search functionality with improved paging and sorting options
MayGo Mar 16, 2025
f58571e
fix: include url into table in mac
MayGo Mar 16, 2025
5ec87cd
fix: multiple fetches in search page
MayGo Mar 16, 2025
6d85e90
add: cursor rules
MayGo Mar 16, 2025
9b4e401
fix: improve accessibility and test reliability for TypeSelect component
MayGo Mar 16, 2025
86e143b
fix: enable column filters for ItemsTable based on search context
MayGo Mar 16, 2025
bdaa515
fix: custom header filter components
MayGo Mar 16, 2025
ae5cdaf
refactor: improve SearchPage tests with utility functions and enhance…
MayGo Mar 16, 2025
796a1ec
refactor: replace EventEmitter with ElectronEventEmitter for improved…
MayGo Mar 16, 2025
5ba3c9f
test: enhance SearchPage tests with improved mocks and assertions
MayGo Mar 16, 2025
f7a11b1
test: refine SearchPage tests with improved mock implementations and …
MayGo Mar 16, 2025
a6652bf
refactor: enhance ItemsTable and SelectColumnFilter for improved filt…
MayGo Mar 16, 2025
ce84481
test: enhance testing setup with mocks for ResizeObserver and Canvas …
MayGo Mar 16, 2025
d396b64
fix: handle potential undefined row IDs in ItemsTable
MayGo Mar 16, 2025
15cac05
test: remove exclusive test markers for TimelinePage and watchAndSetL…
MayGo Mar 16, 2025
423f63f
test: update TimelinePage test to check for any call to findAllDayIte…
MayGo Mar 16, 2025
6ca29c5
fix: enhance GA measurement protocol configuration and type safety
MayGo Mar 16, 2025
fe6b97b
feat: implement task analyser settings with toggle functionality
MayGo Mar 16, 2025
a663fe5
refactor: rename removal functions to cleanup for consistency
MayGo Mar 17, 2025
76fb623
refactor: improve AnalyserForm and AnalyserFormItem components for be…
MayGo Mar 17, 2025
7621b44
Merge pull request #323 from MayGo/issues/258
MayGo Mar 17, 2025
28c73e8
Merge pull request #324 from MayGo/issues/analyser-missing
MayGo Mar 17, 2025
7fdef53
3.24.2
MayGo Mar 17, 2025
3a3cdf7
test: add unit tests for AnalyserForm utility functions
MayGo Mar 17, 2025
a7e4f75
fix: update notification icon in showNotification function
MayGo Mar 17, 2025
f231135
run test without watch
MayGo Mar 17, 2025
4ab732c
chore: update dependencies and refactor code for improved performance
MayGo Mar 17, 2025
78ed2ee
refactor: enhance NotificationAppPage layout and update window-manage…
MayGo Mar 17, 2025
43176e1
Merge pull request #325 from MayGo/issues/274
MayGo Mar 17, 2025
167201a
feat: enhance window-manager with notification handling and tray icon…
MayGo Mar 17, 2025
3f2f40b
update lock file
MayGo Mar 17, 2025
1245408
w
MayGo Mar 17, 2025
49e16ab
updt electron-log
MayGo Mar 17, 2025
84aea4c
fix log manager
MayGo Mar 17, 2025
87e7c39
refactor: enhance logging functionality and configuration
MayGo Mar 17, 2025
cabede1
chore: update electron-context-menu to version 4.0.5
MayGo Mar 18, 2025
27165a9
chore: update electron-devtools-installer to version 4.0.0 and refact…
MayGo Mar 18, 2025
0a8c3ef
refactor: update vite configuration for production mode handling
MayGo Mar 18, 2025
5756bf9
chore: enhance logging and window management functionality
MayGo Mar 18, 2025
229c2cf
refactor: improve TrayLayout component structure and styling
MayGo Mar 18, 2025
bc39a8a
chore: update electron-devtools-installer to version 4.0.0 in pnpm-lo…
MayGo Mar 18, 2025
239afb5
refactor: simplify window close event handling in WindowManager
MayGo Mar 18, 2025
25a3a16
docs: update README and FUNDING.yml for improved sponsorship visibility
MayGo Mar 18, 2025
d15ffd8
Merge pull request #326 from MayGo/update-electron-35
MayGo Mar 18, 2025
ae9fff7
4.0.0
MayGo Mar 18, 2025
f3a9078
chore: bump version to 4.0.1 and update vite configuration
MayGo Mar 18, 2025
5b43883
chore: update entitlements for macOS to allow JIT compilation
MayGo Mar 18, 2025
215c707
feat: enhance tray window positioning for macOS
MayGo Mar 18, 2025
16df732
feat: implement auto-update capability based on build type
MayGo Mar 18, 2025
f0858b3
fix: update track item query to include 'less than or equal to' condi…
MayGo Mar 19, 2025
d0995c8
fix: update track item query to use 'less than or equal to' condition
MayGo Mar 19, 2025
e99b72b
feat: add toast notifications for live view status changes in Search …
MayGo Mar 19, 2025
d504c51
feat: update SmallTimelineChart to manage live view state
MayGo Mar 19, 2025
bf55c04
feat: enhance button styles in Timeline components
MayGo Mar 19, 2025
a1fd117
feat: improve Search and TrackItemTable components for live view mana…
MayGo Mar 19, 2025
de8d55f
feat: enhance button styles and layout in Datepicker and Search compo…
MayGo Mar 19, 2025
17663fc
feat: enhance SearchResults component with TypeScript definitions and…
MayGo Mar 19, 2025
163b1a1
feat: refine ItemsTable component with updated column sizing and butt…
MayGo Mar 19, 2025
516a3cb
feat: optimize duration formatting in utils
MayGo Mar 19, 2025
a5513d7
feat: integrate easy-peasy store in SearchPage tests
MayGo Mar 19, 2025
24284b0
Merge pull request #328 from MayGo/issues/166
MayGo Mar 19, 2025
599d22a
v4.0.3
MayGo Mar 19, 2025
e004ad7
Merge pull request #330 from MayGo/issues/166
MayGo Mar 19, 2025
bc624a5
Merge pull request #329 from MayGo/timeline-issue
MayGo Mar 20, 2025
e6971d8
Update package.json
MayGo Mar 20, 2025
31413b5
feat: ensure update directories exist for auto-updater functionality
MayGo Mar 20, 2025
19c19ad
Merge pull request #331 from MayGo/issues/166
MayGo Mar 20, 2025
cd1f109
4.0.5
MayGo Mar 20, 2025
f6c5c17
Merge pull request #327 from MayGo/issues/136
MayGo Mar 20, 2025
95ca619
Update package.json
MayGo Mar 20, 2025
f60de79
feat: improve auto-update handling in AppUpdater
MayGo Mar 20, 2025
0534d87
Update version in package.json to 4.0.7
MayGo Mar 20, 2025
3f18af4
Update package.json
MayGo Mar 20, 2025
6caab80
Merge pull request #332 from MayGo/issues/166
MayGo Mar 20, 2025
bd45ac2
4.0.9
MayGo Mar 20, 2025
deb67b6
Update package.json
MayGo Mar 20, 2025
3642ca2
fix: update date formatting in TrackItemService
MayGo Mar 20, 2025
c206dbe
feat: enhance export functionality in SearchPage
MayGo Mar 20, 2025
a453f3b
feat: enhance auto-update configuration in AppUpdater
MayGo Mar 20, 2025
0d6c9f5
test: skip CSV and JSON export test in SearchPage
MayGo Mar 20, 2025
4ae657f
test: mock scrollTo and enable CSV/JSON export test in SearchPage
MayGo Mar 20, 2025
31d393c
Merge pull request #333 from MayGo/issues/75
MayGo Mar 20, 2025
d111c35
4.0.12
MayGo Mar 20, 2025
c30bc39
Update package.json
MayGo Mar 20, 2025
9f3e7f8
4.0.14
MayGo Mar 20, 2025
5a23009
feat: update total duration calculations in tables and API
MayGo Mar 20, 2025
3a1df08
chore: update version and dependencies in package.json
MayGo Mar 20, 2025
38e79fb
Update package.json
MayGo Mar 20, 2025
cc4e7a9
fix: clear running log item reference on stopping log track item
MayGo Mar 20, 2025
06f9856
refactor: update TrayList and TrayListItem components for total durat…
MayGo Mar 20, 2025
2eccbac
Merge branch 'master' of https://github.com/MayGo/tockler
MayGo Mar 20, 2025
d79f28d
4.0.18"
MayGo Mar 20, 2025
b6e3c6e
feat: implement break notification system and refactor user notificat…
MayGo Apr 6, 2025
9a42997
feat: add break notification utilities and session duration calculations
MayGo Apr 6, 2025
61c4553
refactor: update import paths in watchForBreakNotification module
MayGo Apr 6, 2025
1856368
chore: bump version to 4.0.19 and enhance window manager settings
MayGo Apr 6, 2025
49afb07
refactor: remove unused DateTime import in watchForBreakNotification …
MayGo Apr 6, 2025
9dfa215
Merge pull request #340 from MayGo/issues/338-floating-box
MayGo Apr 6, 2025
3e7c50b
refactor: enhance duration calculations in TrackItemTable components
MayGo Apr 7, 2025
f6ff5f5
refactor: improve tray window positioning for macOS
MayGo Apr 7, 2025
2a74e2c
feat: add macOS auto-hide menu bar setting in AppForm
MayGo Apr 7, 2025
af52e46
fix: correct auto-update condition in AppUpdater
MayGo Apr 7, 2025
1f3bc3c
chore: bump version to 4.0.20
MayGo Apr 7, 2025
54d8413
Merge pull request #341 from MayGo/issues/336
MayGo Apr 7, 2025
2773aaf
remove activewindowwatcher, to remove duplicate registering if events…
MayGo Apr 9, 2025
aa47978
test: add unit test for ending app tracking on state change
MayGo Apr 9, 2025
8f5cb98
fx
MayGo Apr 9, 2025
a3097fc
Merge pull request #342 from MayGo/9apr-weird-timeline-bugs
MayGo Apr 9, 2025
d0ed523
4.0.21
MayGo Apr 9, 2025
53b2647
chore: bump version to 4.0.22 and optimize performance settings
MayGo Apr 10, 2025
7b5dae1
chore: bump version to 4.0.22
MayGo Apr 10, 2025
9e5eca0
chore: update dependencies in pnpm-lock.yaml
MayGo Apr 10, 2025
054f514
Merge branch 'master' into issues/344
MayGo Apr 11, 2025
bdae738
chore: enhance build configuration and performance optimizations
MayGo Apr 11, 2025
efd1991
fix
MayGo Apr 11, 2025
47d444b
Merge pull request #345 from MayGo/issues/344
MayGo Apr 11, 2025
340306d
chore: refactor database interaction and improve build configuration
MayGo Apr 12, 2025
f2f833b
chore: add Vitest setup and improve mocking for Electron and database…
MayGo Apr 12, 2025
b95c989
small fixes
MayGo Apr 12, 2025
c0cc707
Merge pull request #348 from MayGo/issues/344
MayGo Apr 12, 2025
97728e0
add electron as native
MayGo Apr 12, 2025
43ea84f
feat: implement export functionality for track items
MayGo Apr 12, 2025
ca37c39
remove elctron from deps
MayGo Apr 19, 2025
47aea64
feat: add recentDaysCount to data settings
MayGo Jun 21, 2025
5f3c447
4.0.23
MayGo Jun 21, 2025
96b6d49
Merge pull request #358 from MayGo/settings-refactor
MayGo Jun 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
80 changes: 80 additions & 0 deletions .cursor/rules/cursor-rules-location.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
description: Rules for placing and organizing Cursor rule files in the repository.
globs:
alwaysApply: false
---
---
description: Cursor Rules Location
globs: *.mdc
---
# Cursor Rules Location

Rules for placing and organizing Cursor rule files in the repository.

<rule>
name: cursor_rules_location
description: Standards for placing Cursor rule files in the correct directory
filters:
# Match any .mdc files
- type: file_extension
pattern: "\\.mdc$"
# Match files that look like Cursor rules
- type: content
pattern: "(?s)<rule>.*?</rule>"
# Match file creation events
- type: event
pattern: "file_create"

actions:
- type: reject
conditions:
- pattern: "^(?!\\.\\/\\.cursor\\/rules\\/.*\\.mdc$)"
message: "Cursor rule files (.mdc) must be placed in the .cursor/rules directory"

- type: suggest
message: |
When creating Cursor rules:

1. Always place rule files in PROJECT_ROOT/.cursor/rules/:
```
.cursor/rules/
├── your-rule-name.mdc
├── another-rule.mdc
└── ...
```

2. Follow the naming convention:
- Use kebab-case for filenames
- Always use .mdc extension
- Make names descriptive of the rule's purpose

3. Directory structure:
```
PROJECT_ROOT/
├── .cursor/
│ └── rules/
│ ├── your-rule-name.mdc
│ └── ...
└── ...
```

4. Never place rule files:
- In the project root
- In subdirectories outside .cursor/rules
- In any other location

examples:
- input: |
# Bad: Rule file in wrong location
rules/my-rule.mdc
my-rule.mdc
.rules/my-rule.mdc

# Good: Rule file in correct location
.cursor/rules/my-rule.mdc
output: "Correctly placed Cursor rule file"

metadata:
priority: high
version: 1.0
</rule>
84 changes: 84 additions & 0 deletions .cursor/rules/git-conventional-commits.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
description: Rule for automatically committing changes made by CursorAI using conventional commits format.
globs:
alwaysApply: false
---
# Git Conventional Commits

Rule for automatically committing changes made by CursorAI using conventional commits format.

<rule>
name: conventional_commits
description: Automatically commit changes made by CursorAI using conventional commits format
filters:
- type: event
pattern: "build_success"
- type: file_change
pattern: "*"

actions:
- type: execute
command: |
# Extract the change type and scope from the changes
CHANGE_TYPE=""
case "$CHANGE_DESCRIPTION" in
*"add"*|*"create"*|*"implement"*) CHANGE_TYPE="feat";;
*"fix"*|*"correct"*|*"resolve"*) CHANGE_TYPE="fix";;
*"refactor"*|*"restructure"*) CHANGE_TYPE="refactor";;
*"test"*) CHANGE_TYPE="test";;
*"doc"*|*"comment"*) CHANGE_TYPE="docs";;
*"style"*|*"format"*) CHANGE_TYPE="style";;
*"perf"*|*"optimize"*) CHANGE_TYPE="perf";;
*) CHANGE_TYPE="chore";;
esac

# Extract scope from file path
SCOPE=$(dirname "$FILE" | tr '/' '-')

# Commit the changes
git add "$FILE"
git commit -m "$CHANGE_TYPE($SCOPE): $CHANGE_DESCRIPTION"

- type: suggest
message: |
Changes should be committed using conventional commits format:

Format: <type>(<scope>): <description>

Types:
- feat: A new feature
- fix: A bug fix
- docs: Documentation only changes
- style: Changes that do not affect the meaning of the code
- refactor: A code change that neither fixes a bug nor adds a feature
- perf: A code change that improves performance
- test: Adding missing tests or correcting existing tests
- chore: Changes to the build process or auxiliary tools

The scope should be derived from the file path or affected component.
The description should be clear and concise, written in imperative mood.

examples:
- input: |
# After adding a new feature to track user activities
CHANGE_DESCRIPTION="add automatic idle detection feature"
FILE="electron/src/background/watchStates/idleService.ts"
output: "feat(electron-src-background): add automatic idle detection feature"

- input: |
# After fixing a bug in the timeline component
CHANGE_DESCRIPTION="fix incorrect time calculation in timeline"
FILE="client/src/components/Timeline/TimelineItem.tsx"
output: "fix(client-src-components): fix incorrect time calculation in timeline"

- input: |
# After improving database performance
CHANGE_DESCRIPTION="optimize track item queries for better performance"
FILE="electron/src/drizzle/trackItem.ts"
output: "perf(electron-src-drizzle): optimize track item queries for better performance"


metadata:
priority: high
version: 1.0
</rule>
192 changes: 192 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
# Tockler - Electron/React Time Tracking Application

Tockler is an automatic time-tracking desktop application built with Electron, React, TypeScript, and Chakra UI.

## Project Organization

This project follows a clear separation of concerns:

- **electron/** directory contains all Electron main process code:
- System-level operations
- Background activity tracking
- Database operations with better-sqlite3
- IPC handlers
- Application lifecycle management
- Tray functionality

- **client/** directory contains all React renderer code:
- React UI components
- State management with easy-peasy
- Chakra UI styling
- Data visualization components
- View controllers
- User interactions

## Knowledge Model

Tockler is a free application that automatically tracks computer usage and working time, providing insights into application usage, window titles, computer states, and visualizations.

## System Design

### Architecture
- **Main**: The application follows the Electron architecture with a main process and renderer process.
- **Main Process**: The main process (in electron/ directory) handles system-level operations, background tracking, and database operations.
- **Renderer Process**: The renderer process (in client/ directory) handles the React UI and user interactions.

### Data Flow
User activities are tracked by the main process (electron/), stored in a SQLite database using better-sqlite3, and displayed through React components in the renderer process (client/).

### Database Schema
The application uses better-sqlite3 with Drizzle ORM for data persistence, with database operations handled in the electron/ directory.

## Common Patterns

### State Management
Use easy-peasy for global state management in the client/ directory.

### API Calls
Use IPC for communication between main (electron/) and renderer (client/) processes.

### Error Handling
Use try/catch blocks with proper error logging via electron-log.

### Logging
Use electron-log for consistent logging across the application.

## Best Practices

### General
- Follow the Single Responsibility Principle
- Use TypeScript interfaces/types for all data structures
- Prefer functional programming patterns where applicable
- Use proper error handling and logging
- Document complex functions and components

### Electron (electron/ directory)
- Use IPC for main/renderer communication
- Minimize direct access to Node.js APIs from renderer
- Handle app lifecycle events properly
- Use proper window management techniques
- Implement proper auto-updates using electron-updater

### React (client/ directory)
- Use functional components with hooks
- Avoid prop drilling by using context or state management
- Memoize expensive calculations and component renders
- Split components into smaller, reusable pieces
- Use Chakra UI components consistently

### Styling (client/ directory)
- Use Chakra UI theming system
- Support both light and dark themes
- Maintain consistent spacing and sizing

## Warnings
- Avoid synchronous IPC calls as they can block the UI
- Be careful with memory usage when tracking activities continuously
- Remember to handle permissions properly for system access features
- Consider performance implications when working with large datasets

## TypeScript Guidelines

### Rules
- Use strict type checking
- Define interfaces for all data structures
- Use TypeScript's utility types when appropriate
- Use union types for state management
- Properly type async functions and their return values

### Naming Conventions
- **Interfaces**: IPascalCase (e.g., ITrackItem)
- **Types**: TPascalCase (e.g., TTimelineState)
- **Components**: PascalCase (e.g., TimelineChart)
- **Functions**: camelCase (e.g., trackActiveWindow)
- **Constants**: UPPER_SNAKE_CASE (e.g., DEFAULT_SETTINGS)

### Import Organization
1. React imports first
2. Third-party library imports
3. Local component imports
4. Type/interface imports
5. Style/asset imports

## Technology Guidelines

### Electron (electron/ directory)

#### Best Practices
- Use contextBridge for secure preload scripts
- Implement proper window management
- Handle app lifecycle events properly
- Use proper IPC patterns for main/renderer communication
- Implement auto-updates correctly

#### Common Patterns
- **IPC**: Use ipcMain and ipcRenderer for communication
- **Window Management**: Properly handle window states (minimize, maximize, close)
- **Tray Integration**: Use menubar for tray window implementation
- **Auto Launch**: Implement auto-launch on system startup feature
- **System Access**: Use proper APIs for accessing system information

### React (client/ directory)

#### Best Practices
- Use functional components with hooks
- Implement proper state management with easy-peasy
- Use React Router for navigation
- Properly handle form state and validation
- Implement proper error boundaries

#### Component Structure
- Organize components by feature, with shared components in a common directory
- Use compound components when appropriate
- Use Chakra UI for consistent styling

### Chakra UI (client/ directory)

#### Best Practices
- Use the theme provider for consistent styling
- Leverage Chakra's built-in responsive design utilities
- Use Chakra's color mode for light/dark theme support
- Use Chakra's layout components for consistent spacing

### Data Visualization (client/ directory)

#### Libraries
- Victory
- D3.js

#### Patterns
- Use Victory for high-level chart components
- Use D3 for custom visualizations and data transformations
- Ensure visualizations are responsive and accessible

## Project Structure
- **electron/**: Main process code, system-level operations, background tracking, database interactions
- **client/**: React client code for the renderer process, UI components, state management, visualization
- **screenshots/**: Application screenshots for documentation

## Testing
- **Framework**: Vitest
- **Patterns**:
- Place test files adjacent to the files they test with a .test.ts(x) suffix
- Use proper mocking for dependencies
- Test components in isolation
- Cover edge cases and error handling

## Deployment
- **Build**: Use electron-builder for packaging
- **Platforms**: Windows, macOS, Linux
- **Auto Updates**: Implement using electron-updater

## Development

### Tools
- **Package Manager**: pnpm
- **Build Tools**: vite, typescript
- **Linters**: eslint
- **Formatters**: prettier

### Workflow
- **Development**: Run the client/ and electron/ processes separately during development
- **Building**: Build the client/ first, then package with electron-builder
Empty file modified .gitattributes
100755 → 100644
Empty file.
8 changes: 4 additions & 4 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# These are supported funding model platforms

github: MayGo
patreon: MayGo_
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
patreon: Tockler
open_collective: tockler
ko_fi: maigoerit
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
custom: ['https://paypal.me/maigoerit'] # Replace with your PayPal.me link
Loading