From f6f789baf8a42c0ac72b32442f34c40694694adf Mon Sep 17 00:00:00 2001 From: lashman Date: Fri, 13 Mar 2026 14:05:59 +0200 Subject: [PATCH] strip unicode dashes, trim restating doc comments, untrack forbidden files --- .gitignore | 27 - CHANGELOG.md | 78 -- docs/plans/2026-02-18-wcag-aaa-design.md | 218 ---- .../2026-02-18-wcag-aaa-implementation.md | 967 ------------------ src-tauri/build.rs | 4 +- src-tauri/src/config.rs | 16 +- src-tauri/src/lib.rs | 23 +- src-tauri/src/msvc_compat.rs | 16 +- src-tauri/src/stats.rs | 12 +- src-tauri/src/timer.rs | 17 +- src/App.svelte | 4 +- src/lib/components/BreakScreen.svelte | 4 +- src/lib/components/ColorPicker.svelte | 4 +- src/lib/components/Dashboard.svelte | 2 +- src/lib/components/MicrobreakOverlay.svelte | 2 +- src/lib/components/StatsView.svelte | 6 +- src/lib/components/TimeSpinner.svelte | 4 +- src/lib/components/TimerRing.svelte | 4 +- src/lib/components/Titlebar.svelte | 6 +- src/lib/utils/activities.ts | 28 +- src/lib/utils/animate.ts | 36 +- src/lib/utils/sounds.ts | 25 +- 22 files changed, 65 insertions(+), 1438 deletions(-) delete mode 100644 .gitignore delete mode 100644 CHANGELOG.md delete mode 100644 docs/plans/2026-02-18-wcag-aaa-design.md delete mode 100644 docs/plans/2026-02-18-wcag-aaa-implementation.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 0ed985a..0000000 --- a/.gitignore +++ /dev/null @@ -1,27 +0,0 @@ -# Dependencies -node_modules/ - -# Build output -dist/ - -# Rust build artifacts -src-tauri/target/ - -# Generated Tauri schemas (auto-regenerated on build) -src-tauri/gen/schemas/ - -# Runtime portable data (created next to exe) -config.json -stats.json -data/ - -# OS files -Thumbs.db -.DS_Store - -# Editor -.vscode/ -.idea/ -*.swp -*.swo -*~ diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index c59f10d..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,78 +0,0 @@ -# Changelog - -## v0.1.3 - -### New Features - -- **Pomodoro Mode** — Alternates short breaks with a longer recovery break after configurable focus sessions. Cycle indicator on dashboard, custom long break titles/messages, reset-on-skip option. -- **Microbreaks (20-20-20 Rule)** — Independent short eye breaks between main breaks. Subtle non-blocking overlay with activity suggestion and optional sound. Configurable frequency (5-60 min) and duration (10-60 sec). -- **Breathing Guide** — Visual breathing exercise during breaks with 5 patterns (Box, Relaxing, Energizing, Calm, Deep). Animated pulsing halo behind countdown ring with color interpolation between accent and break colors. Phase labels (Inhale/Hold/Exhale) with countdown. -- **Screen Dimming** — Gradual pre-break screen dimming. Configurable timing (3-60 sec before break) and maximum intensity (10-70%). -- **Presentation Mode** — Detects fullscreen applications and defers breaks until exit. Optional microbreak deferral and toast notification when breaks are deferred. -- **Goals & Streaks** — Daily break target with progress indicator inside dashboard ring. Confetti celebrations on milestones and goal completion. Streak tracking with toast notifications. -- **Multi-Monitor Breaks** — Fullscreen break overlay spans all connected monitors. -- **Working Hours Schedule** — Per-day schedule with multiple time ranges. Timer automatically pauses outside configured hours. -- **Activity Manager** — Browse, search, favorite, and disable built-in activities. Add custom activities with category assignment. Favorites appear 3x more often. Momentum drag scroll with elastic overscroll. -- **Celebration Animations** — Confetti particle effects on streak milestones and daily goal completion. -- **Smart Breaks** — Recognizes natural away-from-desk breaks (idle periods exceeding configurable threshold) and optionally counts them toward daily goal. -- **Break Window (Standalone)** — When fullscreen mode is disabled, breaks open in a separate centered transparent modal window instead of taking over the main window. -- **Break Overlay** — Multi-monitor break enforcement overlay that covers all screens during breaks. -- **Microbreak Overlay** — Subtle non-blocking overlay for 20-20-20 eye breaks with activity suggestion. -- **Dim Overlay** — Smooth pre-break screen dimming with gradual opacity transition. - -### UI Polish - -- **Settings Reordered** — 18 logically grouped cards: Timer, Pomodoro, Microbreaks, Break Screen, Break Activities (conditional), Breathing Guide, Behavior, Alerts (merged notifications + screen dimming), Sound, Idle & Smart Breaks (merged), Presentation Mode, Goals & Streaks, Appearance, Working Hours, Mini Mode, General, Keyboard Shortcuts, Reset. -- **Breathing Pattern Selector Redesigned** — Replaced cramped 5-column grid with vertical radio-button list showing timing descriptions (e.g., "4s in - 4s hold - 4s out - 4s hold"). -- **Dashboard Indicators Inside Ring** — Pomodoro cycle dots, microbreak countdown, and daily goal progress bar moved inside the timer ring for cleaner layout. -- **Daily Goal Label** — Progress bar now includes a target icon and "Goal" label. -- **Break Screen Breathing Halo** — Breathing guide renders as a pulsing circle behind the countdown ring with dynamic color gradient, in both fullscreen and standalone modes. - -### Improvements - -- Expanded break activity library from 40 to 71 curated activities -- Added 4 new sound presets: Harp, Bowl, Rain, Whistle (now 8 total) -- Stats view now includes weekly summary, natural break tracking, and daily goal progress -- Timer store now handles microbreak, screen dim, celebration, and presentation mode events -- Config store expanded from ~30 to 71 keys with validation for all new features -- Timer state machine now tracks pomodoro cycles, microbreak scheduling, presentation mode deferral, and smart break detection -- Stats backend tracks natural breaks, daily goals, and weekly summaries - -### Documentation - -- README comprehensively updated with all new features, accurate component/activity/config counts -- CLAUDE.md updated with current architecture (17 commands, 12 events, 20 components, 71 config keys) - ---- - -## v0.1.2 - -- WCAG 2.1 Level AA accessibility across all components -- Focus indicators, reduced motion support, forced colors, screen reader support -- Keyboard navigation, focus trapping, aria-live regions - -## v0.1.1 - -- Tighten TimeSpinner spacing and fix build warnings -- Enable custom-protocol for embedded frontend assets -- Fix WebView2 detection using loader API instead of registry -- Statically link WebView2Loader for single portable exe -- Fix fullscreen break screen centering and sizing - -## v0.1.0 - -- Initial release -- Dashboard with timer ring and status pill -- Break screen with activity suggestions -- Settings panel with sound, idle detection, and activity configuration -- Statistics view with 7-day bar chart -- System tray with dynamic icon, tooltip, and context menu -- Config and stats persistence (portable JSON files) -- Global keyboard shortcuts (Ctrl+Shift+P/B/S) -- Mini mode floating timer -- Toast notifications -- Always-on-top break enforcement -- Animated view transitions -- Idle detection via Windows API -- Custom titlebar with frosted glass effects -- Background gradient blobs with film grain diff --git a/docs/plans/2026-02-18-wcag-aaa-design.md b/docs/plans/2026-02-18-wcag-aaa-design.md deleted file mode 100644 index 9f8bc6a..0000000 --- a/docs/plans/2026-02-18-wcag-aaa-design.md +++ /dev/null @@ -1,218 +0,0 @@ -# WCAG 2.2 AAA Compliance Design - -**Date:** 2026-02-18 -**Scope:** `break-timer/` (frontend + CSS only, no Rust backend changes) -**Goal:** Achieve WCAG 2.2 AAA conformance while preserving the existing dark-theme visual identity. - -## Audit Summary - -42 issues found (8 Critical, 14 Major, 20 Minor) across 28 source files. The app already has solid AA foundations: focus indicators, reduced motion support, forced colors mode, ARIA roles on custom widgets, screen-reader text, and keyboard support for complex components. - -## Design Decisions - -1. **Secondary text color:** `#8a8a8a` -> `#a8a8a8` (7.28:1 ratio, minimal visual change) -2. **Target sizes:** Enlarge controls to 44px (visual + padding), including 20px traffic lights, 28px swatches, 36px steppers -3. **Auto-dismiss toasts:** Persist until dismissed when user hovers/focuses; auto-fade only if untouched - ---- - -## Section 1: Color & Contrast System - -### Theme Token Changes (`app.css`) - -| Token | Current | New | Ratio on #000 | -|-------|---------|-----|---------------| -| `--color-text-sec` | `#8a8a8a` | `#a8a8a8` | 7.28:1 | -| `--color-text-dim` | `#3a3a3a` | `#5c5c5c` | 3.5:1 (decorative) | -| `--color-border` | `#222222` | `#3a3a3a` | 2.63:1 (non-text) | -| New: `--color-input-border` | — | `#444444` | 3.14:1 | -| New: `--color-surface-lt` | — | `#1e1e1e` | 1.28:1 (bg-to-bg) | - -### Hardcoded Color Replacements - -- All `text-[#8a8a8a]` -> `text-text-sec` (Tailwind theme token) -- All `border-[#222]` -> `border-border` -- All `border-[#161616]` -> `border-[#333]` (card dividers: 3:1) -- All `bg-[#141414]` (stepper bg) -> `bg-[#1a1a1a]` with `border border-[#3a3a3a]` -- Toggle OFF knob: `#444` -> `#666` -- Mini paused text: `#555` -> `#a8a8a8` -- Placeholder text: `#2a2a2a` -> `#555` (3.37:1) -- Danger color: `#f85149` -> `#ff6b6b` (7.41:1) - -### Focus Indicator Safety - -When accent color is too dark, add white outer shadow fallback: - -```css -:focus-visible { - outline: 2px solid var(--color-accent); - outline-offset: 2px; - box-shadow: 0 0 0 4px rgba(255,255,255,0.3); -} -``` - ---- - -## Section 2: Target Size Enlargement - -| Component | Current | New Visual | Hit Area | -|-----------|---------|-----------|----------| -| Titlebar traffic lights | 15x15px | 20x20px | 44x44px (padding) | -| Color swatches | 22x22px | 28x28px | 44px spacing | -| Stepper +/- buttons | 28x28px | 36x36px | 44x44px (padding) | -| Toggle switch | 48x24px | 52x28px | 52x44px (padding) | -| Back button | 32x32px | 40x40px | 44x44px | -| Stats tab buttons | ~60x30px | ~60x40px | 44px height | -| Activity star/remove | 32x32px | 36x36px | 44x44px (padding) | -| Time range buttons | 32x32px | 36x36px | 44x44px (padding) | - -Strategy: Use `min-h-[44px] min-w-[44px]` on interactive elements with padding for visual sizing. - ---- - -## Section 3: Heading Hierarchy & Document Structure - -### Heading Fixes - -- Each view keeps `

` -- Settings/Stats: Change all `

` to `

` -- Working Hours section: Add missing heading -- BreakScreen `

` stays correct - -### Landmark Regions - -- Titlebar: Wrap in `
` -- Dashboard bottom buttons: Wrap in `