Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# AGENTS.md - AI Assistant Codebase Guide

**Last Updated:** 2026-08-13
**Version:** 2.7.0
**Last Updated:** 2026-09-18
**Version:** 2.8.0

Timetraked is a React 18 + TypeScript time tracking PWA for freelancers and consultants, with dual storage (localStorage guest mode and optional Supabase cloud sync).

Expand All @@ -13,7 +13,7 @@ Timetraked is a React 18 + TypeScript time tracking PWA for freelancers and cons

## Documentation

- After completing a feature, bug fix, or security fix, automatically run the doc-sync workflow to update CLAUDE.md, CHANGELOG.md, and README/README-EXT.md.
- After completing a feature, bug fix, or security fix, automatically run the doc-sync workflow to update CHANGELOG.md, README.md, README-EXT.md, and AGENTS.md.
- Use `feat:` / `fix:` / `security:` prefixes on PRs to trigger releases.

## Testing & Verification
Expand Down Expand Up @@ -104,7 +104,7 @@ After implementing changes, run lint and tests before considering a task complet
| Layer | Technology |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| UI Framework | React 18 + TypeScript 5.9 |
| Build | Vite 5 + SWC |
| Build | Vite 6 + SWC |
| Routing | React Router 6 |
| Styling | Tailwind CSS 4 + Radix UI + shadcn/ui |
| Icons | Radix Icons (primary), Lucide (fallback) |
Expand Down Expand Up @@ -161,7 +161,8 @@ export const MyComponent = () => {
| `src/pages/Clients.tsx` | Thin page wrapper around `ClientManagement` (route `/clients`) |
| `src/services/localStorageService/clients.ts` | Client persistence module for guest mode (versioned localStorage blob) |
| `supabase/migrations/20260530_clients.sql` | `clients` table + RLS + one-time backfill from distinct project clients |
| `src/components/AppSidebar.tsx` | Collapsible sidebar nav (Planning/Manage/Reports groups); reads page title/actions from `PageTitleContext`; footer has sync, auth, export |
| `src/components/AppSidebar.tsx` | Collapsible sidebar nav (Planning/Manage/Reports groups); reads page title/actions from `PageTitleContext`; footer has print button, sync status, and auth |
| `src/components/SyncStatus.tsx` | Footer status indicator showing sync state (connected/syncing/unsaved) with refresh button |
| `src/contexts/PageTitleContext.tsx` | `PageTitleProvider` — holds title, badge, actions state for the sidebar header |
| `src/contexts/page-title-context.ts` | Context object + default value + `PageTitleContextType` interface |
| `src/hooks/usePageTitle.ts` | `usePageTitle()` hook — consumed by `PageLayout` (write) and sidebar header (read) |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Desktop build migrated from Electron to Tauri 2 — the native shell is now a Rust binary (`src-tauri/`) instead of a bundled Chromium + Node process, cutting installer size and removing the Node main-process attack surface entirely. `src/lib/tauriElectronApiShim.ts` bridges `window.electronAPI` onto Tauri's `invoke`/`listen`, so `useElectronBackup.ts`, `useElectronMenuActions.ts`, and `electron.d.ts` needed no changes and keep their historical names. Disk backups, the native app menu, and the quit-flush handshake are now Rust modules (`backup.rs`, `menu.rs`, `quit_flush.rs`); auto-updates are now frontend-driven and Ed25519-signed via `tauri-plugin-updater` (`src/lib/tauriUpdater.ts`) instead of `electron-updater`. New scripts `pnpm tauri`/`pnpm tauri:dev`/`pnpm tauri:build` replace the old `electron:*` scripts; `.github/workflows/tauri-release.yml` replaces `electron-release.yml`. `electron/`, `vite.electron.config.ts`, and all Electron npm dependencies are removed
— `src-tauri/` (new), `src/lib/tauriElectronApiShim.ts` (new), `src/lib/tauriUpdater.ts` (new), `.github/workflows/tauri-release.yml` (new), `package.json`, `electron/` (removed), `vite.electron.config.ts` (removed), `.github/workflows/electron-release.yml` (removed)
- Sidebar layout refactored from inset to floating variant with icon-only collapsible mode; SyncStatus moved into sidebar footer menu and simplified to show only icons (no text labels); added Print button to footer menu
— `src/components/AppSidebar.tsx`, `src/components/SyncStatus.tsx`
- `ClientSheet` and `CategorySheet` migrated from hand-rolled `useState`-per-field forms (duplicated reset-on-open `useEffect`, duplicated `isSaving` try/finally, no per-field validation) to React Hook Form + Zod, matching the pattern `ProjectSheet` already used. Both now show inline field-level error messages instead of relying on HTML5 `required`; `ClientSheet`'s contact email field gained real email-format validation
— `src/components/ClientSheet.tsx`, `src/components/CategorySheet.tsx`
- Archived-day task editing moved from a separate modal (`TaskEditInArchiveDialog`) to inline expandable rows (`ArchivedTaskRow`) within `ArchiveEditDialog`, and the whole-day Edit/view toggle was replaced with always-editable form fields plus a per-row expand — Save/Cancel are enabled whenever any staged edit (day fields or task rows) differs from the saved day, rather than only after entering a dedicated edit mode. Also fixed a rounding inconsistency where the day's end time was rounded to the nearest 15 minutes but the last task's end time was not, leaving a gap between the two; the last task's end time is now rounded to match, both when staging edits and when displaying the resting (unedited) state, via a shared `roundToNearest15Minutes` helper moved to `src/utils/timeUtil.ts`
Expand Down
26 changes: 24 additions & 2 deletions README-EXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,20 @@ For the main overview, see [README.md](README.md).

### Daily Workflow

**Evening:**

1. Click "End Day" on the Tasks page (or the Dashboard) when finished.
2. Review your day summary (total time, revenue, task breakdown).
3. Click "Post Time to Archive" to save permanently.

**Ongoing:**

- View archived days on the **Archive** page.
- Manage projects and rates via **Archive → Projects**.
- Customize categories on the **Categories** page.
- Export data via **Archive → Export**.
- Print your current day's tasks via the Print button in the sidebar footer (web/PWA and Tauri desktop).

**Morning:**

1. Click "Start Day" on the dashboard to begin tracking. The app navigates to the **Tasks** page automatically.
Expand Down Expand Up @@ -87,6 +101,13 @@ New Task uses a plain `N` rather than `Cmd/Ctrl+N` in the web/PWA build because

On the Tauri desktop build, `Cmd/Ctrl+S`/`Cmd/Ctrl+K` are native menu accelerators (File/View menus, built in Rust) dispatched to the frontend as a `menu:action` event; New Task keeps the native `Cmd/Ctrl+N` accelerator there too, since a native app menu doesn't have the browser's reservation. `?` has no native accelerator but works identically on both platforms since it isn't intercepted by the OS menu layer.

### Sidebar Footer

The sidebar footer contains two key elements:

- **Sync Status** — shows sync state (connected/syncing/unsaved) with a refresh button. In guest mode or when changes are saved, it shows a checkmark; when unsaved changes exist, it shows a warning icon and prompts to save. Clicking triggers a manual sync to Supabase.
- **Print** — triggers `window.print()` for quick printing of the current day's tasks and summary.

### Project Management

1. Navigate to **Settings → Manage Projects** (or **Archive → Projects**).
Expand Down Expand Up @@ -191,6 +212,8 @@ Task descriptions support **GitHub Flavored Markdown (GFM)**:

**Native-Like Experience:** Standalone window, app icon, splash screen on launch.

**Sidebar Footer:** Floating sidebar variant with icon-only collapse; footer contains Sync Status (refresh button with state indicators) and Print button for quick printing.

---

## Authentication & Storage
Expand Down Expand Up @@ -289,7 +312,7 @@ See [docs/AUTHENTICATION.md](docs/AUTHENTICATION.md) and [docs/SECURITY.md](docs
| Category | Technology |
| ------------ | ------------------------------------------- |
| UI Framework | React 18 + TypeScript 5.9 |
| Build | Vite 5 + SWC |
| Build | Vite 6 + SWC |
| Routing | React Router 6 |
| Styling | Tailwind CSS 4 + Radix UI + shadcn/ui |
| Icons | Radix Icons (primary), Lucide (fallback) |
Expand Down Expand Up @@ -359,7 +382,6 @@ localStorage OR Supabase

```javascript
NetworkFirst: Supabase API calls (fresh data preferred)
CacheFirst: Google Fonts (static assets)
Precache: App shell (HTML, CSS, JS, icons)
```

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ A Progressive Web App (PWA) for time tracking built with React, TypeScript, and
- **Backdated Entry Creation** — log work for past days directly from the Archive page via "Add Past Entry"
- **CSV Import** — bring in existing time data from other tools
- **Weekly Report** — AI-generated work summaries (standup, client, or retrospective tone)
- **Keyboard Shortcuts** — `N` new task, `Cmd/Ctrl+S` save, `Cmd/Ctrl+K` command palette, `?` for the shortcuts help dialog (web and Tauri desktop; the desktop app's native menu also offers `Cmd/Ctrl+N` for new task)
- **Keyboard Shortcuts** — `N` new task, `Cmd/Ctrl+S` save, `Cmd/Ctrl+K` command palette, `?` for the shortcuts help dialog (web and Tauri desktop; the desktop app's native menu also offers `Cmd/Ctrl+N` for new task); the sidebar footer now includes a Print button for quick printing
- **No Account Required** — full functionality with local storage; optional cloud sync via Supabase
- **Self-Hosted SQL Backend** — optionally run against your own PostgreSQL or MySQL database instead of Supabase or local storage (see [docs/SQL_BACKEND.md](docs/SQL_BACKEND.md))
- **PWA** — installable on desktop/mobile
Expand Down
Loading
Loading