lluistfc avatar

k-ui-refresh

UI refresh pipeline and ViewModel state management. Covers shared UI state (ViewModel), safe refresh

提供方 lluistfc|开源

UI Refresh Flow & State Management

Knowledge for BookArchivist's UI refresh pipeline and shared state (ViewModel).

Quick Reference

ComponentPurpose
ViewModelShared UI state (selection, mode, filters)
RefreshUI()Safe refresh pipeline (guarded execution)
Lazy InitDefer frame creation until needed

Critical: RefreshUI uses guards to prevent infinite loops (common during multi-page capture).

Full Documentation

See: ../../.github/copilot-skills/6-ui-refresh-flow.md

Contains:

  • ViewModel structure (selection, mode, filters, pagination)
  • RefreshUI pipeline (guard → list refresh → reader refresh)
  • Lazy initialization pattern (SafeCreateFrame)
  • Reader/List coordination (selection sync)
  • Refresh guards (preventing cascading calls)
  • Capture refresh behavior (once per session, not per page)
  • Common pitfalls (infinite loops, race conditions)