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:
@@ -269,3 +269,36 @@ class TaskBackend(ABC):
|
||||
True if successful
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_context(self) -> Optional[str]:
|
||||
"""Get the current context filter.
|
||||
|
||||
Returns:
|
||||
Current context string, or None if no context is set
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def set_context(self, context: Optional[str]) -> bool:
|
||||
"""Set the context filter.
|
||||
|
||||
Args:
|
||||
context: Context string (e.g., "+work", "project:foo") or None to clear
|
||||
|
||||
Returns:
|
||||
True if successful
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def get_contexts(self) -> list[str]:
|
||||
"""Get available predefined contexts.
|
||||
|
||||
For taskwarrior, returns named contexts from config.
|
||||
For dstask, may return common tag-based contexts.
|
||||
|
||||
Returns:
|
||||
List of context names/filters
|
||||
"""
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user