Skip to content

Commit f8b57e1

Browse files
Merge pull request #350 from tom-james-watson/feat/1.4.0
Implement a whole bunch of new stuff
2 parents 1ab7a9d + 58fa1f2 commit f8b57e1

File tree

128 files changed

+19926
-28802
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+19926
-28802
lines changed

.eslintignore

Lines changed: 0 additions & 15 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

109
**Describe the bug**
1110
A clear and concise description of what the bug is.
1211

1312
**To Reproduce**
1413
Steps to reproduce the behavior:
14+
1515
1. Go to '...'
1616
2. Click on '....'
1717
3. Scroll down to '....'
@@ -24,7 +24,8 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Specs:**
27-
- OS version: [e.g. macOS 11.6]
27+
28+
- OS version: [e.g. macOS 11.6]
2829

2930
**Additional context**
3031
Add any other context about the problem here.

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
ci:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: "22"
21+
cache: "npm"
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Run TypeScript check
27+
run: npm run typecheck
28+
29+
- name: Run linting
30+
run: npm run lint
31+
32+
- name: Check code formatting
33+
run: npm run format-check
34+
35+
- name: Build project
36+
run: npm run build

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ node_modules
1616
release
1717
app/main/dist
1818
app/renderer/dist
19+
dist
1920

2021
# dotenv
2122
.env
23+
24+
.claude

.prettierignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Built code
2+
dist/
3+
release/
4+
app/main/dist/
5+
app/renderer/dist/
6+
7+
# Dependencies
8+
node_modules/
9+
10+
# Generated files
11+
*.min.js
12+
*.min.css
13+
14+
# Package files
15+
package-lock.json

.prettierrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

CLAUDE.md

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
Cross-platform Electron desktop app for managing periodic breaks. Runs as system tray application with notifications and fullscreen overlays.
8+
9+
## Architecture
10+
11+
### Main Process (`app/main/`)
12+
13+
- **Entry Point**: `index.ts`
14+
- **Core Logic**: `lib/` directory:
15+
- `breaks.ts` - Break scheduling and management
16+
- `ipc.ts` - Inter-process communication handlers
17+
- `store.ts` - Settings persistence
18+
- `tray.ts` - System tray integration
19+
- `windows.ts` - Window management
20+
- `notifications.ts` - Native notifications
21+
- `auto-launch.ts` - Auto-startup
22+
23+
### Renderer Process (`app/renderer/`)
24+
25+
- **Entry Point**: `index.tsx`
26+
- **Components**: React components (Break, Settings, etc.)
27+
- **Styling**: CSS with Tailwind CSS
28+
- **Sounds**: Audio files for notifications
29+
- **Preload**: `preload.js` - Secure IPC bridge
30+
- **Fonts**: Inter font bundled in `public/fonts/`
31+
32+
### Types (`app/types/`)
33+
34+
- Shared TypeScript definitions for IPC, settings, breaks
35+
36+
## Common Development Commands
37+
38+
### Development
39+
40+
```bash
41+
npm run dev # Start development server with hot reload
42+
START_MINIMIZED=true npm run dev # Start development without auto-focus
43+
```
44+
45+
### Building
46+
47+
```bash
48+
npm run build # Build both main and renderer processes
49+
npm run build-main # Build main process only
50+
npm run build-renderer # Build renderer process only
51+
```
52+
53+
### Production
54+
55+
```bash
56+
npm run start # Start production build
57+
DEBUG_PROD=true npm run start # Start production with debugging
58+
```
59+
60+
### Code Quality
61+
62+
```bash
63+
npm run lint # Run ESLint
64+
npm run typecheck # Run TypeScript compiler check
65+
npm run format-check # Check code formatting
66+
npm run format # Fix code formatting
67+
```
68+
69+
### Testing
70+
71+
```bash
72+
npm test # Run tests
73+
```
74+
75+
### Packaging
76+
77+
```bash
78+
npm run package # Package for current platform
79+
npm run package-all # Package for all platforms
80+
npm run package-mac # Package for macOS
81+
npm run package-win # Package for Windows
82+
npm run package-linux # Package for Linux
83+
```
84+
85+
## Key Technologies
86+
87+
- **Electron** - Desktop application framework
88+
- **React 19** - UI framework for renderer process with new JSX transform
89+
- **TypeScript 5.8** - Primary language
90+
- **shadcn/ui** - Modern UI component library with Radix UI primitives
91+
- **Tailwind CSS** - Utility-first CSS framework for styling
92+
- **Inter Font** - Typography font bundled locally (WOFF2 format)
93+
- **Framer Motion** - Animation library for smooth transitions
94+
- **Vite** - Frontend build tool and dev server for renderer process
95+
- **Webpack 5** - Module bundler for main process
96+
- **electron-store** - Settings persistence
97+
- **Howler.js** - Audio playback
98+
- **moment.js** - Date/time handling
99+
100+
## IPC Communication
101+
102+
Typed IPC system in `app/types/ipc.ts` with handlers in `app/main/lib/ipc.ts`:
103+
104+
- Settings management
105+
- Break control
106+
- Sound playback
107+
- Window management
108+
109+
## Settings Architecture
110+
111+
electron-store with TypeScript interfaces in `app/types/settings.ts`:
112+
113+
- Break intervals and duration
114+
- Working hours
115+
- Sound preferences
116+
- Notification settings
117+
118+
## Build System
119+
120+
- **Main Process**: Webpack 5
121+
- **Renderer Process**: Vite
122+
- Babel + TypeScript
123+
- React Fast Refresh
124+
- TypeScript `skipLibCheck: true`
125+
126+
## Recent Updates
127+
128+
### UI and Styling
129+
130+
- **shadcn/ui** - Modern component library with Radix UI primitives
131+
- **Tailwind CSS** - Utility-first CSS framework
132+
- **Inter font** - Bundled locally (WOFF2)
133+
- **Enhanced button interactions** - Improved hover/active states
134+
135+
### Animation System
136+
137+
- **framer-motion** - Replaced react-spring
138+
- `motion.div` components for break windows
139+
- **Smooth progress** - 50ms notification, 100ms break window updates
140+
- Fixed infinite loops with functional state updates
141+
142+
### Window Management
143+
144+
- **Dynamic notification sizing** - 450px-550px based on enabled buttons
145+
- **Circular progress border** - Around Start button
146+
- **Multi-screen sync** - Break starts synchronized across displays
147+
- Timer cleanup prevents hot reload flickering
148+
149+
### Dependencies
150+
151+
- **React 19** - New JSX transform
152+
- **TypeScript 5.8**
153+
- **Framer Motion**
154+
- **Vite**
155+
156+
### Development Experience
157+
158+
- tsconfig.json excludes node_modules
159+
- Improved hot reloading
160+
161+
## Development Workflow
162+
163+
**IMPORTANT**: Always run after non-trivial changes:
164+
165+
```bash
166+
npm run format && npm run lint && npm run typecheck
167+
```

0 commit comments

Comments
 (0)