Skip to content

TUI doesn't update description and meta data #1282

@SorraTheOrc

Description

@SorraTheOrc

When a work item is updated via external commands (e.g., 'wl update', 'wl comment add') or by other processes, the TUI detail pane and metadata pane should refresh to display the updated content. Previously, the detailCache was populated but never invalidated, causing stale content to persist after database changes. The database watcher triggered refreshes but reused cached detail content.

Fix

  • Added invalidateDetailCache(itemId) to clear specific cache entries
  • Called invalidateDetailCache() after all TUI update handlers (submitUpdateDialog, delete, close, move, tags, etc.)
  • Added detailCache.clear() to refreshListWithOptions() to handle external updates from database watcher
  • Cache is invalidated per-item for TUI updates and cleared globally for database watcher refreshes

Testing

All 35 TUI test files (229 tests) pass. The fix ensures immediate visual feedback when items are modified.

Commits

  • 3c698f3: Implement cache invalidation for TUI updates
  • bdf0fcb: Clear cache on refresh to handle external updates

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions