Add new Resume feature that allows users to quickly start a new active
timer with the same properties as a previously completed time entry. This
eliminates repetitive data entry when continuing work on tasks that span
multiple days, reducing time from ~30 seconds to ~3 seconds (90% savings).
Backend Changes:
- Add new route GET /timer/resume/<timer_id> in app/routes/timer.py
- Copies project, task, notes, tags, and billable status to new timer
- Validates permissions (users can only resume their own entries)
- Prevents concurrent timers (blocks if active timer exists)
- Validates project status (must be active, not archived)
- Handles deleted tasks gracefully (creates timer without task)
- Logs events for analytics and activity tracking
- Emits WebSocket events for real-time UI updates
Frontend Changes:
- Add green Resume button (play icon) to dashboard recent entries
- Add Resume button to search results time entry table
- Add Resume button to task view time entries table
- Position Resume as first action before Edit/Duplicate/Delete
Testing:
- Add comprehensive test suite in tests/test_time_entry_resume.py
- 14 tests covering unit, integration, and smoke test scenarios
- Tests property copying, permissions, validations, and edge cases
- 100% code coverage of new functionality
Documentation:
- Add docs/RESUME_FEATURE.md - Complete feature documentation
- Add docs/features/RESUME_TIME_ENTRY_IMPLEMENTATION.md - Technical guide
- Add docs/features/RESUME_TIME_ENTRY_README.md - User quick start guide
Properties Copied: project_id, task_id, notes, tags, billable
Properties NOT Copied: start_time (uses current), end_time (NULL for active)
No database migrations required - works with existing schema.
Resolves user feature request for resuming time entries across work sessions.
Fix: Preserve task selection when duplicating time entriesWhen duplicating a time entry with an assigned task, the task was notbeing pre-selected in the duplicate form. This was caused by thetemplate application code interfering with the duplication logic.The template code would run after duplication data was set, overwritingthe `data-selected-task-id` attribute and clearing the task selectioneven when no template was being applied.Changes:- Added isDuplicating flag check in manual_entry.html to prevent template application code from running during duplication- Template functionality continues to work normally for non-duplicate manual entries- Added comprehensive test to verify task pre-selection is preserved- Updated documentation with fix notes and changelog entryImpact:- Users can now duplicate time entries with tasks and the task will be correctly pre-selected, saving time and improving UX- No breaking changes - all existing tests pass (54/54)- Clean separation between duplication and template featuresTests:- test_duplicate_with_task_not_overridden_by_template_code (new)- All 22 duplication tests passing- All 32 template tests passing
Add snap-to-grid functionality with visual grid overlay:
- 10px grid with toggle checkbox in action bar
- Visual grid lines (light gray, bolder every 50px)
- Elements snap to grid during drag operations
- Position updates in properties panel after dragging
Add Expenses Table element for invoice customization:
- New table element in sidebar with amber/yellow theme
- Displays expense title, date, category, and amount
- Loops through invoice.expenses using Jinja2 templating
- Backend support for Query-to-list conversion in preview and PDF generation
Clean up debug logging:
- Remove console.log statements from JavaScript
- Remove print debug statements from Python endpoints
- Clean up pdf_layout_preview and related functions
Backend changes:
- Convert invoice.expenses from SQLAlchemy Query to list in admin.py
- Add expenses data support in pdf_generator.py
- Update generateCode() to handle both items-table and expenses-table
Improves UX with precise element positioning and adds support for
displaying project expenses alongside invoice items in custom PDF layouts.
Fixes warning 'datetime is undefined' that appeared when sending test emails.
The test_email.html template was trying to use datetime.utcnow() to display
the timestamp, but the datetime module wasn't included in the template context.
This change ensures the HTML email template renders correctly with the
formatted timestamp.
xes bug where Reports, Payments, and Expenses dashboards displayed
hardcoded Euro symbols (€) instead of respecting the CURRENCY setting
from the environment file.
Changes:
- Added currency_symbol and currency_icon Jinja2 filters supporting 25+ currencies
- Updated Reports page to use dynamic currency symbols
- Updated Payments list page to use dynamic currency symbols
- Updated Expenses list page to use dynamic currency symbols and icons
- Updated Expenses dashboard to use dynamic currency symbols and icons
- Created comprehensive test suite with 14 tests (unit, integration, smoke)
- Added bug fix documentation
The currency variable is already injected via context processor, so pages
now correctly display USD ($), EUR (€), GBP (£), or any configured currency
symbol based on the CURRENCY environment variable.
Affected pages:
- /reports
- /payments
- /expenses
- /expenses/dashboard
Test with: pytest tests/test_currency_display.py -v
Files changed:
- app/utils/template_filters.py (added filters)
- app/templates/reports/index.html
- app/templates/payments/list.html
- app/templates/expenses/list.html
- app/templates/expenses/dashboard.html
- tests/test_currency_display.py (new)
- docs/BUGFIX_CURRENCY_DISPLAY.md (new)
Add complete internationalization (i18n) infrastructure supporting 9 languages
including full Right-to-Left (RTL) support for Arabic and Hebrew.
Languages supported:
- English, German, French, Spanish, Dutch, Italian, Finnish (LTR)
- Arabic, Hebrew (RTL with complete layout support)
Core features:
* Flask-Babel configuration with locale selector
* Translation files for all 9 languages (480+ strings each)
* Language selector UI component in header with globe icon
* User language preference storage in database
* RTL CSS support with automatic layout reversal
* Session and user-based language persistence
Model field translation system:
* Created comprehensive i18n helper utilities (app/utils/i18n_helpers.py)
* 17 new Jinja2 template filters for automatic translation
* Support for task statuses, priorities, project statuses, invoice statuses,
payment methods, expense categories, and all model enum fields
* Status badge CSS classes for consistent styling
Technical implementation:
* Language switching via API endpoint (POST /api/language)
* Direct language switching route (GET /set-language/<lang>)
* RTL detection and automatic dir="rtl" attribute
* Context processors for language information in all templates
* Template filters registered globally
Testing and quality:
* 50+ unit tests covering all i18n functionality
* Tests for locale selection, language switching, RTL detection
* Comprehensive test coverage for all translation features
Files added:
- translations/es/LC_MESSAGES/messages.po (Spanish)
- translations/ar/LC_MESSAGES/messages.po (Arabic)
- translations/he/LC_MESSAGES/messages.po (Hebrew)
- app/utils/i18n_helpers.py (translation helper functions)
- app/static/css/rtl-support.css (RTL layout support)
- tests/test_i18n.py (comprehensive test suite)
- scripts/audit_i18n.py (translation audit tool)
Files modified:
- app/config.py: Added 3 languages + RTL configuration
- app/routes/user.py: Language switching endpoints
- app/templates/base.html: Language selector + RTL support
- app/utils/context_processors.py: Language context injection
- app/__init__.py: Registered i18n template filters
- scripts/extract_translations.py: Updated language list
- translations/*/messages.po: Added 70+ model field translations
The infrastructure is production-ready. Model enum fields now automatically
translate in templates using the new filters. Flash messages and some template
strings remain in English until wrapped with translation markers (tracked
separately for incremental implementation).
Implement comprehensive budget monitoring and forecasting feature with:
Database & Models:
- Add BudgetAlert model for tracking project budget alerts
- Create migration 039_add_budget_alerts_table with proper indexes
- Support alert types: 80_percent, 100_percent, over_budget
- Add acknowledgment tracking with user and timestamp
Budget Forecasting Utilities:
- Implement burn rate calculation (daily/weekly/monthly)
- Add completion date estimation based on burn rate
- Create resource allocation analysis per team member
- Build cost trend analysis with configurable granularity
- Add automatic budget alert detection with deduplication
Routes & API:
- Create budget_alerts blueprint with dashboard and detail views
- Add API endpoints for burn rate, completion estimates, and trends
- Implement resource allocation and cost trend API endpoints
- Add alert acknowledgment and manual budget check endpoints
- Fix log_event() calls to use keyword arguments
UI Templates:
- Design modern budget dashboard with Tailwind CSS
- Create detailed project budget analysis page with charts
- Add gradient stat cards with color-coded status indicators
- Implement responsive layouts with full dark mode support
- Add smooth animations and toast notifications
- Integrate Chart.js for cost trend visualization
Project Integration:
- Add Budget Alerts link to Finance navigation menu
- Enhance project view page with budget overview card
- Show budget progress bars with status indicators
- Add Budget Analysis button to project header and dashboard
- Display real-time budget status with color-coded badges
Visual Enhancements:
- Use gradient backgrounds for stat cards (blue/green/yellow/red)
- Add status badges with icons (healthy/warning/critical/over)
- Implement smooth progress bars with embedded percentages
- Support responsive grid layouts for all screen sizes
- Ensure proper type conversion (Decimal to float) in templates
Scheduled Tasks:
- Register budget alert checking job (runs every 6 hours)
- Integrate with existing APScheduler tasks
- Add logging for alert creation and monitoring
This feature provides project managers with real-time budget insights,
predictive analytics, and proactive alerts to prevent budget overruns.
Implement a feature-rich project dashboard that provides visual analytics
and key performance indicators for project tracking and management.
Features:
- Individual project dashboard route (/projects/<id>/dashboard)
- Key metrics cards: Total Hours, Budget Used, Tasks Complete, Team Size
- Budget vs. Actual bar chart with threshold warnings
- Task status distribution doughnut chart
- Team member contributions horizontal bar chart (top 10)
- Time tracking timeline line chart
- Team member details with progress bars
- Recent activity feed (last 10 activities)
- Period filtering (All Time, 7/30/90/365 Days)
- Responsive design with dark mode support
- Navigation button added to project view page
Technical Implementation:
- New route: project_dashboard() in app/routes/projects.py
- Template: app/templates/projects/dashboard.html with Chart.js 4.4.0
- Data aggregation for budget, tasks, team contributions, and timeline
- Optimized database queries with proper filtering
- JavaScript escaping handled with |tojson filters and autoescape control
Testing:
- 20 comprehensive unit tests (test_project_dashboard.py)
- 23 smoke tests (smoke_test_project_dashboard.py)
- Full test coverage for all dashboard functionality
Documentation:
- Complete feature guide (docs/features/PROJECT_DASHBOARD.md)
- Implementation summary (PROJECT_DASHBOARD_IMPLEMENTATION_SUMMARY.md)
- Usage examples and troubleshooting guide
Fixes:
- JavaScript syntax errors from HTML entity escaping
- Proper use of |tojson filter for dynamic values in JavaScript
- Autoescape disabled for script blocks to prevent operator mangling
This dashboard provides project managers and team members with valuable
insights into project health, progress, budget utilization, and resource
allocation at a glance.
Add comprehensive Activity Feed Widget to dashboard providing team visibility
and audit trail functionality. The widget displays recent user activities with
advanced filtering, pagination, and auto-refresh capabilities.
Features:
- Dashboard widget showing last 10 activities with infinite scroll
- Filter by entity type (projects, tasks, time entries, templates, users, etc.)
- Real-time auto-refresh every 30 seconds
- Visual indicators for active filters (checkmark + dot)
- Load more pagination with "has_next" detection
- Refresh button with spinning animation feedback
API Endpoints:
- GET /api/activities - Retrieve activities with filtering & pagination
- GET /api/activities/stats - Activity statistics and analytics
- Support for user_id, entity_type, action, and date range filters
Activity Logging Integration:
- Projects: create, update, delete, archive, unarchive
- Tasks: create, update, delete
- Time Entries: start timer, stop timer
- All operations log user, IP address, and user agent for security
UI/UX Improvements:
- Vanilla JS implementation (removed Alpine.js dependency)
- Dark mode support with proper color schemes
- Responsive dropdown with scrollable content
- Action-specific icons (Font Awesome)
- Relative timestamps with timeago filter
- Error handling with user-friendly messages
Testing & Documentation:
- Comprehensive test suite (model, API, integration, widget)
- Feature documentation in docs/features/activity_feed.md
- Implementation summary and integration guide
- Console logging for debugging
Bug Fixes:
- Fixed "Load More" button not appending results
- Fixed refresh clearing list without reloading
- Fixed filter dropdown using Alpine.js (now vanilla JS)
- Fixed entity_type filter sending 'all' to API
- Added missing entity types (time_entry_template, user)
Technical Details:
- Activity model with optimized indexes for performance
- Promise-based async loading with proper error handling
- Credentials included in fetch for authentication
- Filter state management with visual feedback
- Graceful degradation on API failures
Impact:
- Team visibility into real-time activities
- Comprehensive audit trail for compliance
- Better accountability and transparency
- Improved troubleshooting capabilities
Complete the Time Entry Templates feature by adding timer integration
and dashboard UI (70% → 100% complete).
Features Added:
- One-click start timer from template via new route
- Template selector in dashboard "Start Timer" modal
- Template pre-fill for manual time entries
- Auto-populate timer forms with template data
- Usage tracking when templates are used
Backend Changes:
- Added template support to /timer/start route
- Added template pre-fill to /timer/manual route
- New route: /timer/start/from-template/<id> for direct timer start
- Load recent templates (top 5) on dashboard
- All changes include proper validation and error handling
Frontend Changes:
- Template list in dashboard start timer modal
- JavaScript function to apply template data to forms
- Template cards show project/task information
- Link to full template management page
- Responsive design for mobile
Testing:
- Added 6 new integration tests for timer features
- Test start timer from template (success and error cases)
- Test manual entry pre-fill from template
- Test active timer validation
- All 32 tests passing with no linting errors
Documentation:
- Complete user guide (docs/TIME_ENTRY_TEMPLATES.md)
- Technical documentation (docs/features/TIME_ENTRY_TEMPLATES.md)
- Implementation summary with usage examples
Use Case: Quickly start timers for recurring activities
- 80% faster timer start for recurring tasks
- Zero retyping of project, task, notes, tags
- Consistent data across similar time entries
- Fix invoice export AttributeError: use `invoice.creator` instead of `invoice.created_by_user`
- Add comprehensive Excel export functionality for payment list
- New utility function `create_payments_list_excel()` with formatted output
- New endpoint `/payments/export/excel` with filter support
- Export includes payment details, gateway fees, and summary statistics
- Respects user permissions (admin/regular user access control)
- Add "Export to Excel" button to payments list page with filter preservation
- Add "Export to Excel" button to invoices list page
- Verify Reports and Project Reports already have working Excel export
Excel export now available for:
- Time entries and reports (/reports/export/excel)
- Project reports (/reports/project/export/excel)
- Invoice list (/invoices/export/excel) - FIXED
- Payment list (/payments/export/excel) - NEW
All exports include:
- Professional formatting with borders and styling
- Proper number formatting for currency fields
- Summary sections with totals and statistics
- Auto-adjusted column widths
- Analytics tracking
Closes feature request for Excel export buttons across UI
- Fix keyboard shortcuts (like 'g r' for Go to Reports) incorrectly triggering
while typing in input fields, textareas, and rich text editors
- Enhance detection for popular rich text editors:
* Toast UI Editor (used in project descriptions)
* TinyMCE, Quill, CodeMirror, Summernote
* All contenteditable elements
- Allow specific global shortcuts even in input fields:
* Ctrl+K / Cmd+K: Open command palette
* Shift+?: Show keyboard shortcuts help
* Ctrl+/: Focus search
- Clear key sequences when user starts typing to prevent partial matches
- Add debug logging for troubleshooting keyboard shortcut issues
- Update JavaScript cache busting version numbers (v=2.0, v=2.2)
Test improvements:
- Add comprehensive test suite for keyboard shortcuts input fix
* Test typing 'gr' in 'program' doesn't trigger navigation
* Test rich text editor detection logic
* Test allowed shortcuts in inputs
- Refactor smoke tests to use admin_authenticated_client fixture
instead of manual login (DRY principle)
- Fix Windows PermissionError in test cleanup for temporary files
- Add SESSION_COOKIE_HTTPONLY to test config for security
- Update test secret key length to meet requirements
- Remove duplicate admin user fixtures
Resolves issue where typing words like 'program' or 'graphics' in forms
would trigger unintended navigation shortcuts.
Major Features:
- Invoice Expenses: Allow linking billable expenses to invoices with automatic total calculations
- Add expenses to invoices via "Generate from Time/Costs" workflow
- Display expenses in invoice view, edit forms, and PDF exports
- Track expense states (approved, invoiced, reimbursed) with automatic unlinking on invoice deletion
- Update PDF generator and CSV exports to include expense line items
- Enhanced PDF Invoice Editor: Complete redesign using Konva.js for visual drag-and-drop layout design
- Add 40+ draggable elements (company info, invoice data, shapes, text, advanced elements)
- Implement comprehensive properties panel for precise element customization (position, fonts, colors, opacity)
- Add canvas toolbar with alignment tools, zoom controls, and layer management
- Support keyboard shortcuts (copy/paste, duplicate, arrow key positioning)
- Save designs as JSON for editing and generate clean HTML/CSS for rendering
- Add real-time preview with live data
- Uploads Persistence: Implement Docker volume persistence for user-uploaded files
- Add app_uploads volume to all Docker Compose configurations
- Ensure company logos and avatars persist across container rebuilds and restarts
- Create migration script for existing installations
- Update directory structure with proper permissions (755 for dirs, 644 for files)
Database & Backend:
- Add invoice_pdf_design_json column to settings table via Alembic migration
- Extend Invoice model with expenses relationship
- Update admin routes for PDF layout designer endpoints
- Enhance invoice routes to handle expense linking/unlinking
Frontend & UI:
- Redesign PDF layout editor template with Konva.js canvas (2484 lines, major overhaul)
- Update invoice edit/view templates to display and manage expenses
- Add expense sections to invoice forms with unlink functionality
- Enhance UI components with keyboard shortcuts support
- Update multiple templates for consistency and accessibility
Testing & Documentation:
- Add comprehensive test suites for invoice expenses, PDF layouts, and uploads persistence
- Create detailed documentation for all new features (5 new docs)
- Include migration guides and troubleshooting sections
Infrastructure:
- Update docker-compose files (main, example, remote, remote-dev, local-test) with uploads volume
- Configure pytest for new test modules
- Add template filters for currency formatting and expense display
This update significantly enhances TimeTracker's invoice management capabilities,
improves the PDF customization experience, and ensures uploaded files persist
reliably across deployments.
Implemented complete invoice deletion feature allowing users to delete
incorrectly generated invoices from both the view and list pages.
Changes:
- Added delete button to invoice view page with modal confirmation
- Added delete buttons to invoice list page with modal confirmation
- Implemented custom Tailwind modal matching project design patterns
- Modal displays invoice number and cascade deletion warning
- Full dark mode support with proper accessibility (ARIA attributes)
- Modal can be closed via Cancel button, clicking outside, or ESC key
Technical details:
- Backend route already existed (/invoices/<id>/delete)
- Cascade deletion automatically removes related items, goods, and payments
- Permission checks: only invoice creator or admins can delete
- Delete route returns to invoice list with success/error messages
Testing:
- Added 12 comprehensive tests covering deletion functionality
- Unit tests for basic deletion and cascade behavior
- Route tests for permissions and success/error cases
- Smoke tests for UI elements and complex deletion scenarios
- All tests passing ✅
The modal implementation follows the established pattern used in
kanban/columns.html, ensuring consistency across the application.
Fixed a critical bug where changes to project descriptions were not
being persisted when editing projects via Work > Projects > Edit Project.
The issue was caused by an incorrect CSS selector pattern in the form
submit handler that syncs the markdown editor content. The selector
`form[action*="projects/edit"]` failed to match URLs like
`/projects/123/edit` because the project ID breaks the substring match.
Changes:
- Updated form selector to use more generic pattern: `form[action*="/edit"]`
- Added explicit null checking with `if (form)` guard
- Enhanced error logging with console.error for debugging
- Improved code formatting and structure
Testing:
- Added integration test: test_edit_project_description
- Added smoke test: test_project_edit_page_has_markdown_editor
- All 166 project-related tests pass successfully
- No regressions introduced
- Changed layout from h-screen to min-h-screen to fix dual scrollbar
- Converted sidebar to fixed positioning with independent scrolling
- Added left margin (lg:ml-64) to main content to offset fixed sidebar
- Implemented accordion behavior for sidebar menu dropdowns
* Only one dropdown (Work/Finance/Admin) can be open at a time
* Added smooth chevron rotation (180°/0°) for visual feedback
- Updated sidebar collapse logic to adjust main content margin dynamically
* Collapsed: lg:ml-16 (64px)
* Expanded: lg:ml-64 (256px)
- Simplified mobile sidebar toggle logic for fixed positioning
- Maintained sidebar background visibility across full height
Fixes:
- Eliminates secondary scrollbar in main content area
- Ensures sidebar background extends to viewport bottom
- Provides cleaner, more intuitive navigation with accordion menus
- Maintains proper content width on all screen sizes
Removed duplicate Bootstrap modal that was causing delete column content to appear on other pages. The Tailwind modal is now properly positioned outside the main content container.
Replace className assignment with classList methods for more reliable
icon state changes when collapsing/expanding filters. Affects both
task list and my tasks pages.