Complete Phase 1: parallel sync, IPC, theme colors, lazy CLI loading

- Sync: Parallelize message downloads with asyncio.gather (batch size 5)
- Sync: Increase HTTP semaphore from 2 to 5 concurrent requests
- Sync: Add IPC notifications to sync daemon after sync completes
- Mail: Replace all hardcoded RGB colors with theme variables
- Mail: Remove envelope icon/checkbox gap (padding cleanup)
- Mail: Add IPC listener for refresh notifications from sync
- Calendar: Style current time line with error color and solid line
- Tasks: Fix table not displaying (CSS grid to horizontal layout)
- CLI: Implement lazy command loading for faster startup (~12s to ~0.3s)
- Add PROJECT_PLAN.md with full improvement roadmap
- Add src/utils/ipc.py for Unix socket cross-app communication
This commit is contained in:
Bendt
2025-12-19 10:29:53 -05:00
parent a41d59e529
commit d4226caf0a
11 changed files with 1096 additions and 103 deletions

View File

@@ -373,8 +373,8 @@ class WeekGridBody(ScrollView):
# Style time label - highlight current time, dim outside work hours
if is_current_time_row:
secondary_color = self._get_theme_color("secondary")
time_style = Style(color=secondary_color, bold=True)
error_color = self._get_theme_color("error")
time_style = Style(color=error_color, bold=True)
elif (
row_index < self._work_day_start * rows_per_hour
or row_index >= self._work_day_end * rows_per_hour
@@ -388,13 +388,19 @@ class WeekGridBody(ScrollView):
# Event cells for each day
for col_idx, day_col in enumerate(self._days):
cell_text, cell_style = self._render_event_cell(day_col, row_index, col_idx)
cell_text, cell_style = self._render_event_cell(
day_col, row_index, col_idx, is_current_time_row
)
segments.append(Segment(cell_text, cell_style))
return Strip(segments)
def _render_event_cell(
self, day_col: DayColumn, row_index: int, col_idx: int
self,
day_col: DayColumn,
row_index: int,
col_idx: int,
is_current_time_row: bool = False,
) -> Tuple[str, Style]:
"""Render a single cell for a day/time slot."""
events_at_row = day_col.grid[row_index] if row_index < len(day_col.grid) else []
@@ -404,10 +410,16 @@ class WeekGridBody(ScrollView):
is_cursor = col_idx == self.cursor_col and row_index == self.cursor_row
# Get colors for current time line
error_color = self._get_theme_color("error") if is_current_time_row else None
if not events_at_row:
# Empty cell
if is_cursor:
return ">" + " " * (day_col_width - 1), Style(reverse=True)
elif is_current_time_row:
# Current time indicator line
return "" * day_col_width, Style(color=error_color, bold=True)
else:
# Grid line style
if row_index % rows_per_hour == 0: