Add context filter to Tasks TUI and fix calendar UI bugs

Tasks TUI:
- Add context support to TaskBackend interface (get_context, set_context,
  get_contexts methods)
- Implement context methods in DstaskClient
- Add Context section to FilterSidebar (above projects/tags)
- Context changes persist via backend CLI

Calendar TUI:
- Remove duplicate header from InvitesPanel (use border_title instead)
- Fix border_title color to use $primary
- Fix WeekGrid to always scroll to work day start (7am) on mount
This commit is contained in:
Bendt
2025-12-19 11:51:53 -05:00
parent be2f67bb7b
commit 3629757e70
6 changed files with 205 additions and 34 deletions

View File

@@ -648,13 +648,10 @@ class WeekGrid(Vertical):
current_row = (now.hour * rows_per_hour) + (now.minute // minutes_per_row)
self.cursor_row = current_row
# Scroll to show work day start initially
# Always scroll to work day start initially (e.g., 7am)
if self._body:
work_start_row = config.work_day_start_hour() * rows_per_hour
# If current time is before work day start, scroll to work day start
# Otherwise scroll to show current time
scroll_target = min(work_start_row, current_row)
self._body.scroll_to(y=scroll_target, animate=False)
self._body.scroll_to(y=work_start_row, animate=False)
def watch_week_start(self, old: date, new: date) -> None:
"""Handle week_start changes."""