tracks/internal/handlers
Claude d2a9c79633
Add inline context creation when creating todos
Users can now create a new context directly from the todo creation modal
without having to navigate away to the contexts page.

Changes:
- Added "Create new context..." option to context dropdown in todo modal
- Added inline form that appears when user selects "Create new context"
- Added JavaScript to show/hide the new context input field dynamically
- Added form validation to ensure either an existing context is selected
  or a new context name is provided
- Updated HandleCreateTodo to detect when user wants to create a new context
  (context_id == "__new__") and create it before creating the todo
- New contexts are created with proper position ordering

UX Flow:
1. User clicks "New Todo"
2. User selects "Create new context..." from dropdown
3. Input field appears below for entering context name
4. User enters context name (e.g., "@home", "@work")
5. When form is submitted, context is created first, then todo is created
   with the new context automatically assigned
6. User is redirected back to todos page with both new context and todo visible

This streamlines the workflow and eliminates context switching when users
need to quickly add a todo with a new context.
2025-11-05 13:21:04 +00:00
..
auth_handler.go Add default admin user and admin-only user creation 2025-11-05 11:35:36 +00:00
context_handler.go Rewrite Tracks application in Golang 2025-11-05 10:46:59 +00:00
project_handler.go Rewrite Tracks application in Golang 2025-11-05 10:46:59 +00:00
todo_handler.go Rewrite Tracks application in Golang 2025-11-05 10:46:59 +00:00
web_handler.go Add inline context creation when creating todos 2025-11-05 13:21:04 +00:00