Commit Graph
25 Commits
Author SHA1 Message Date
Keith SmithandClaude Sonnet 5 c454423d4d Sync offline cache on every page load, not just every 2 minutes
Online-side mutations (e.g. deleting a tag) only update the server, not
IndexedDB, so a throttled background sync could leave the offline cache
stale for up to two minutes. Going offline in that window resurrected
deleted/stale data (e.g. a deleted tag reappearing). Removing the throttle
so every real page load pulls fresh state keeps the offline cache in
sync with whatever was just done online.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 08:36:49 -06:00
Keith SmithandClaude Sonnet 5 bde7be454b Show overdue styling on tasks in offline mode
renderTaskItem() never applied the "overdue" CSS class at all, so
overdue tasks in offline mode looked like any other task instead of
getting the red highlight/due-date treatment they get online. Adds
isTaskOverdue(), mirroring Task.is_overdue, applied the same way
_task_item.html does it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 00:15:22 -06:00
Keith SmithandClaude Sonnet 5 373bfe6a6e Backfill data missed by devices with a pre-tag-sync token
/api/sync/ only returns rows changed since a device's last sync token.
Any device that synced before tag/time-entry syncing existed already
has a token from that era; pre-existing tags untouched since then were
never "changed since" that token and so were permanently invisible to
that device, even after tag syncing shipped. Adds a sync_format_version
check that ignores the stored token and forces exactly one full resync
per device when it detects an old-format token, backfilling anything
that was missed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 00:15:14 -06:00
Keith SmithandClaude Sonnet 5 3fbab2b831 Add sidebar Tags section to offline mode
Offline mode had tag chips and per-task tag assignment, but was
missing the dashboard sidebar's Tags section entirely: filtering the
task list by tag, per-tag task counts, and tag create/rename/delete.
Ports that section over (reusing the same tag modal pattern as the
online create/edit flow), combinable with the existing status filters
the same way it works online.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 00:05:39 -06:00
Keith SmithandClaude Sonnet 5 ae9ab596bb Refresh the page automatically after a pending offline sync completes
The real dashboard is server-rendered before any client JS runs, so
the first page load after reconnecting always reflects the pre-sync
database state -- the background sync then completes silently, but
nothing told that already-rendered page to update. A task created
offline would appear to vanish until the next navigation happened to
load fresh data. runBackgroundSync() now reports whether it pushed
pending changes, and both places that trigger it automatically reload
the page when it did.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 00:05:27 -06:00
Keith SmithandClaude Sonnet 5 a6f227e931 Bring offline mode to full parity with the online dashboard
Fixes subtasks appearing flattened into the main task list (missing
parent filter), and adds everything else needed for full offline
functionality: tag chips/assignment/creation, full field editing
(description, due time, recurrence presets), time tracking with a
live-updating timer, and properly nested subtasks -- all queued
locally and synced via the existing /api/sync/ protocol.

The offline page now reuses the real dashboard's app-layout/header/
sidebar/detail-pane structure instead of a bespoke layout, with an
amber-tinted header and banner so it's unmistakable which mode you're
in. The detail panel mirrors _task_detail.html's fields and actions.

Also fixes a real backend gap this feature depends on: apply_conflict_data()
in sync/views.py silently no-op'd on time_entry conflicts. And computes
duration_seconds client-side on merge, since TimeEntrySyncSerializer
doesn't include it in the wire format at all.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 23:45:43 -06:00
Keith SmithandClaude Sonnet 5 fc045a0c4b Match dashboard filter/sort behavior in offline task app
The offline task app was showing every cached task including completed
ones, with no sorting -- unlike the online dashboard, which hides
completed tasks by default and sorts by due date. Ports the same
filter tabs (All/Today/Upcoming/Overdue/Completed) and sort options
(due date asc/desc, priority high/low) from tasks/views.py's
DashboardView so offline mode isn't a degraded view.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 23:20:27 -06:00
Keith SmithandClaude Sonnet 5 19697fbc01 Treat 5xx navigation responses as offline in the service worker
fetch() only rejects on true network failures, not bad status codes,
so a reverse proxy (Nginx Proxy Manager) returning 502/503 while the
app server itself is down was passed through as-is instead of falling
back to the offline experience. Now a >=500 response is treated the
same as a network error.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 23:07:59 -06:00
Keith SmithandClaude Sonnet 5 922d4d1bf2 Add offline task CRUD, phase 1 (PWA)
Lets users create, edit, and complete tasks with no network connection,
queued locally in IndexedDB and replayed via the existing /api/sync/
protocol once back online -- the same protocol the native Android app
already uses, with zero backend changes. The service worker now routes
the dashboard's offline fallback to a small client-rendered task app
instead of the generic "you're offline" page; every other route keeps
the generic fallback.

Conflicts (server row touched elsewhere since last sync) auto-resolve
as "local wins" rather than surfacing a resolution UI. Scope is title/
status/priority/due-date only -- tags, subtasks, time tracking, and
recurrence editing offline are out of scope for this phase.

Also adds the first real test coverage for sync/views.py (previously
untested): new-item creation, soft-delete-bypasses-conflict-check,
conflict detection/discarding, and both resolve_conflict paths.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 23:01:47 -06:00
Keith SmithandClaude Sonnet 5 7e905a0566 Add Web Push notifications (PWA)
Wires up the previously-scaffolded VAPID/DeviceToken infrastructure end
to end: browser subscription flow on the Profile page's existing "Push
Notifications" toggle, a service worker push/notificationclick handler,
and server-side sending from the daily task digest. Also broadens that
digest's eligibility query so push-only users (email notifications off)
aren't silently skipped, and adds `generate_vapid_keys` since the pinned
py-vapid's own key generator is broken against current cryptography.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 22:30:56 -06:00
Keith SmithandClaude Sonnet 5 30c61351de Make the web app installable as a PWA (Tier 1: app shell + offline fallback)
Adds a manifest, service worker, and branded icons so the site can be
installed to a home screen/desktop, plus an offline fallback page so a
dropped connection shows something friendlier than the browser's default
error. Icons are rasterized from the existing favicon.svg mark via
rsvg-convert. The manifest and service worker are served through small
Django views (not raw static files) so their asset URLs pick up
WhiteNoise's content-hashed filenames in prod/selfhosted, and the service
worker is served from the site root so its scope covers the whole app.

Does not include true offline task data or Web Push notifications --
those are tracked separately as larger follow-up projects.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-04 22:03:12 -06:00
Keith SmithandClaude Sonnet 5 70dcc1f001 Add custom recurrence patterns (day-of-week, nth-weekday, day-of-month)
Recurring tasks were locked to fixed daily/weekly/biweekly/monthly/yearly
intervals. The `custom` recurrence type and `recurrence_rule` field already
existed in the model and API docs, but RRULE evaluation was a TODO stub
that silently fell back to weekly, and no UI exposed the option.

Implements real RRULE parsing via dateutil.rrule, and adds a builder UI
(day-of-week checkboxes for weekly, day-of-month or Nth-weekday for
monthly) so users can express patterns like "every other Wednesday" or
"every second Tuesday" without hand-writing RRULE strings.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 18:12:15 -06:00
Keith SmithandClaude Sonnet 5 a2bc5de205 Default task sort to due date instead of raw model order
The "Default" option cleared the sort param and fell back to the
model's Meta.ordering (sort_order, -priority, due_date, created_at),
which read as broken/unsorted to users. Default is now due date
(earliest first), matching the existing due_date sort option.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 16:55:17 -06:00
Keith Smith 53180a9469 Disable self-registration by default 2026-04-15 17:42:40 -06:00
Keith SmithandClaude Sonnet 4.5 8db9f99701 CRITICAL FIX: Override .detail-closed specificity at mobile
Root cause: The .app-layout.detail-closed class (2-class specificity)
was overriding .app-layout (1-class specificity) at mobile, creating
a 3-column grid "0 1fr 0" instead of single column "1fr".

The task-pane was placed in column 1 (0 width), making it invisible.

Fix: Explicitly override both .app-layout and .app-layout.detail-closed
with equal specificity in the 768px breakpoint.

Cache bust: v=6

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 21:33:11 -07:00
Keith SmithandClaude Sonnet 4.5 8b71447024 Fix task pane layout at mobile - add explicit grid positioning
The task-pane was not displaying at mobile because it lacked explicit
grid positioning and width constraints. Added:
- grid-row: 2 and grid-column: 1 for explicit placement
- width: 100%, min-width: 0, max-width: 100% to ensure full width
- Moved header grid positioning into mobile breakpoint for clarity

Also updated header to have explicit grid-row: 1 positioning.

Cache bust: v=5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 21:30:06 -07:00
Keith SmithandClaude Sonnet 4.5 f836769ad7 CRITICAL FIX: Move base CSS before media queries
The sidebar-toggle and mobile-overlay base definitions were placed
AFTER the media queries, causing them to override the responsive
styles. This prevented the hamburger menu from showing and broke
the sidebar drawer functionality.

Fixed by moving base definitions before the Mobile Responsive section.

CSS order is now correct:
1. Base styles (display: none for sidebar-toggle)
2. Media queries (display: flex at 768px)

This allows the media query to properly override the base style.

Updated cache version to v=4.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 21:18:14 -07:00
Keith SmithandClaude Sonnet 4.5 d83b1e3091 Fix mobile header layout - remove vertical stacking
The flex-direction: column on header-user was causing buttons to
overflow outside the header bar. Changed approach to keep buttons
horizontal but make them smaller on very small screens.

Changes:
- Removed flex-direction: column from 480px breakpoint
- Keep buttons horizontal with smaller font size
- Reduced button min-height to 36px on small screens
- Reduced touch targets slightly (40px) for very small screens
- Smaller brand font size (0.9rem)

Updated cache version to v=3 to force reload.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 21:14:30 -07:00
Keith Smith e038e47247 Add cache busting to CSS for mobile updates 2025-12-26 21:07:07 -07:00
Keith SmithandClaude Sonnet 4.5 52277d6687 Add favicon to web application
Added SVG favicon based on KeepItGoing app icon (white checkmark on
blue #3B82F6 background). Favicon displays in browser tabs and bookmarks.

Changes:
- Created static/favicons/favicon.svg with app icon design
- Updated templates/base.html with favicon link tags

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-26 20:09:41 -07:00
Keith SmithandClaude Sonnet 4.5 6fd86a3682 Make tag text bold for better readability
Add font-weight: 600 to tag labels to improve text readability
on solid colored backgrounds. The bold text provides better
contrast and matches the visual weight of the desktop app.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 22:06:57 -07:00
Keith SmithandClaude Sonnet 4.5 ccd1fe15c1 Update tag styling to match desktop app
Change tag display from transparent background with colored text
to solid colored background with white text to match the desktop app:
- Background: Solid tag color (was transparent with 20% opacity)
- Text: White (was same color as tag)
- Maintains existing rounded rectangle shape from CSS

Tags now appear as colored pills with white text, matching the
visual style of the desktop application.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 22:06:10 -07:00
Keith SmithandClaude Sonnet 4.5 1872442016 Fix dark/light mode support on change password page
Replace all hardcoded colors and CSS variable fallbacks with proper
theme CSS variables:
- Removed fallback values from all var() calls
- Replaced --color-* prefixed variables with actual theme variables:
  - --color-bg-secondary → --surface
  - --color-border → --border
  - --color-text → --text-primary
  - --color-text-secondary → --text-secondary
  - --color-primary → --accent (via .btn-primary class)
- Updated success alert to use .alert-success class
- Updated buttons to use .btn-primary and .btn-secondary classes
- Fixed input backgrounds and text colors to use theme variables
- Replaced hardcoded error color with --danger variable

The page now properly respects the dark/light mode toggle.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 22:03:22 -07:00
Keith SmithandClaude Sonnet 4.5 21d9d01885 Add email verification, admin approval, and user profile enhancements
Implement comprehensive email verification and admin approval system for user registration. Users must verify their email before logging in, and admins must approve new users before they can access the system.

Major features:
- Email verification with UUID tokens (24hr expiry, one-time use)
- Admin approval workflow via Django admin interface
- Custom authentication backend enforcing verification and approval
- Password change functionality for authenticated users
- Enhanced profile page with proper styling and theme support
- Collect first name, last name, and timezone during registration
- Profile link added to header navigation

Email notifications:
- Verification email sent after registration
- Admin notification when users need approval
- Approval notification sent to users

Security features:
- Cryptographically secure UUID tokens
- Token expiration and one-time use enforcement
- Email enumeration protection
- Custom JWT token validation for API access
- Existing users auto-approved via data migration

Templates added:
- Email templates (verification, approval, admin notification)
- Web templates (password change, verification pages)
- Enhanced profile page with dark/light mode support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 18:13:38 -07:00
Keith SmithandClaude Sonnet 4.5 6a0b35c39c Initial commit: KeepItGoing task management server
Features:
- Django-based REST API with web interface
- Task management with tags, priorities, and due dates
- Time tracking with start/stop timers
- Subtasks support
- Task filtering (all, today, upcoming, overdue, completed)
- Tag-based organization with color coding
- Sorting by due date and priority
- Auto-assign tags when filtering
- Responsive 3-pane layout (sidebar, task list, detail panel)
- Task sharing between users
- Mobile-responsive design with dark mode support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-18 17:41:29 -07:00