Skip to content

Fix/66 dashboard schedule and electron vite#73

Merged
altaskur merged 6 commits intodevelopfrom
fix/66-dashboard-schedule-and-electron-vite
Feb 17, 2026
Merged

Fix/66 dashboard schedule and electron vite#73
altaskur merged 6 commits intodevelopfrom
fix/66-dashboard-schedule-and-electron-vite

Conversation

@altaskur
Copy link
Copy Markdown
Owner

Description

Goal

Fix the dashboard not reflecting the daily schedule configured in the Calendar, migrate the build system to electron-vite for better DX and cross-platform support, and improve home page card layout consistency.

Key Changes

  • Fix getDayTarget to use daySchedule per-day minutes instead of dividing weeklyMinutes evenly (fixes [Bug]: Dashboard does not reflect updated daily schedule from Calendar configuration #66)
  • Fix workDays parsing from JSON.parse() to .split(',') matching the stored format
  • Migrate build system from Angular CLI + manual Electron to electron-vite
  • Add cross-platform asset serving Vite plugin (dev middleware + build copy)
  • Constrain card dimensions (134px height, 356px max-width) with text overflow ellipsis
  • Add AI guidelines for project contributors (.agent/rules/ia-rules.md)

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update
  • 🎨 Style/UI changes
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvement
  • ✅ Test updates
  • 🔧 Build/configuration changes

Impact Assessment

Database Impact

  • No database changes
  • New migration(s) included
  • Existing data migration required

Backup Impact

  • No impact on backups
  • Backup format changed
  • Restore compatibility maintained

Testing

How Has This Been Tested?

  • Unit tests
  • Integration tests
  • Manual testing
  • Tested with SonarQube analysis

Test Steps

  1. Open the Calendar and set a day (e.g., Monday) to 8h 30m in Work Schedule Configuration
  2. Navigate to Home (Dashboard)
  3. Verify the "Today" card shows 0m / 8h 30m — Remaining: 8h 30m instead of the old 0m / 8h
  4. Toggle theme to light mode, close and reopen the app — verify theme persists
  5. Check all cards have consistent height and long text truncates with ellipsis

Test Configuration

  • Node version: 22.x
  • npm version: 10.x
  • Platform tested: Windows

UI Changes

Before

  • Dashboard showed 0m / 8h even when a day was configured to 8h 30m
  • Cards had inconsistent heights and long text overflowed

After

  • Dashboard correctly reflects per-day schedule from Calendar configuration
  • Cards have uniform 134px height with text-overflow ellipsis on long names

Checklist

  • My code follows the project's coding standards
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have run npm run lint and fixed any issues
  • I have run npm test and all tests pass
  • I have run npm run test:electron and all tests pass
  • I have run npm run sonar:check and the analysis passes
  • Any dependent changes have been merged and published

Breaking Changes

  • This PR contains breaking changes

Related Issues

Closes #66
Related to #28

Additional Context

The electron-vite migration replaces the previous Angular CLI + manual Electron build setup with a unified electron-vite configuration. This simplifies the build pipeline and provides HMR for the renderer process in development. The index.html was moved to the project root following Vite conventions, and a custom Vite plugin handles cross-platform asset serving (translations, icons) both in dev and production builds.

Reviewer Notes

…on-vite

- Replace Angular CLI build with electron-vite unified build system
- Add @analogjs/vite-plugin-angular for Angular compilation in Vite
- Move index.html to project root (Vite convention)
- Update paths.ts for electron-vite dev server and production paths
- Update window.ts to load from Vite dev server in development
- Remove old electron/build/ tsconfig files (replaced by electron.vite.config.ts)
- Add cross-platform asset serving plugin (dev middleware + build copy)
- Update package.json scripts for electron-vite commands
- Add Zone.js import in src/main.ts for Vite compatibility
- Update electron/tsconfig.spec.json for standalone Vitest usage
- Fix workDays parsing: use split(',') instead of JSON.parse()
  to match the comma-separated format stored in the database
- Use daySchedule per-day minutes instead of dividing weeklyMinutes
  evenly, matching the calendar component's behavior
- Handle dayTypeId in overrides (holidays/special days return 0)
- Fix Sunday dayOfWeek conversion (0 -> 7) to match ISO format

Closes #66
- Set card height to 134px for all variants
- Set max-width to 356px for all cards
- Add text-overflow: ellipsis on card names and task titles
- Change grid to auto-fill with minmax(200px, 356px)
- Add overflow: hidden to p-card for clean truncation
- Reduce card body padding for compact layout
- Add ia-rules.md with coding standards, architecture context,
  and essential commands for AI agents working on the project
@altaskur altaskur merged commit 76f26da into develop Feb 17, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenTimeTracker Feb 17, 2026
@altaskur altaskur deleted the fix/66-dashboard-schedule-and-electron-vite branch February 17, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant