跳转到内容

页面刷新

Parent aspect: Portal data plane.

Outpost/Portal UI keeps data fresh with two distinct verbs. Do not conflate them with PWA / installer “reload”, which updates shell assets only.

VerbWhenWhat happens
syncHabitat reconnect, tab visible again, Offline sync toast retryFlush outbox; modules that flushed call refreshAll (see offline platform)
refreshHeader Refresh button or touch pull-to-refreshRe-run the page’s reload* / list fetch (online withOfflineCache already network-fetches). Same handler for button and pull
  • Limited auto: keep sync + existing live channels (chat stream.*, conversation.updated, pomodoro.active.changed, notification.created). No global list polling for attention or lists. No unconditional refreshAll of every module on visibility when the outbox is empty. Attention routing → Notification and reminder.
  • Manual refresh required on product list surfaces so multi-device / agent edits can be pulled on demand.
  • Interaction dimension (see UI dimensions, agent API in ui-dimensions): pointer uses a header button; touch also gets pull-to-refresh on the primary list. Shell kind does not lock the affordance. Pattern note → UI patterns (PullToRefresh candidate / DataListRow sibling surfaces).
  • Out of scope: Habitat fan-out for every CRUD entity; adopting the React Query library (self-owned hooks on the Portal data plane are fine); turning the offline-sync toast into a page refresh control.
ClassPagesAutoManual
A StreamChatSAP stream + recovery pollHeader refresh (existing)
B CRUD outboxTask, Project, DiaryMount / selection cache-first; local write reload; sync → refreshAllHeader + pull-to-refresh
C Hybrid outboxPomodoropomodoro.active.changedOffline refreshAll for config/stats
D snapshotEmail, Notification, Dream, VaultMount / dependency loadHeader refresh (pull on list where bound)
E HabitatOps listsLoad on enterExplicit refresh (existing)
F SettingsShell settingsLoad on openRe-read after save
G Shell updatePWA / installerUpdate checkReload / install ≠ business refresh
  • Shared pull gesture: @freeanima/ui-kit/composite PullToRefresh (touch-only; ignore starts near the left edge to avoid drawer swipe conflicts). Visual/hit-target norms → UI foundations.
  • Copy: m.habitat_common_refresh / m.habitat_common_refreshing.
  • Follow-up (not required here): soft refresh of the focused module only on visibility with an empty outbox.