Files
com_r35157_nenjim-hubd-impl…/openspec/changes/hide-empty-perps-venues/design.md
T

1.3 KiB

Design

Context

See proposal.md. Venue snapshots include successful-empty, not-yet-read and failed scopes. Cross accounts hold capital independently of positions, so position count alone cannot determine visibility.

Goals / Non-Goals

Goals: Remove childless headings while preserving capital totals and failure visibility.

Non-Goals: Changing integration reads, snapshot data, wallet visibility or refresh scheduling.

Decisions

  • Skip a venue during tree reconciliation only when both its positions and Cross-account lists are empty. Filtering the service snapshot instead would lose unknown scopes and could produce misleading totals.
  • Include childless venues' read status in wallet tooltip notes so hiding their headings does not hide the reason for unavailable totals. Keep the existing venue tooltips when rows exist.
  • Reconcile surviving items with the existing IDs; a venue returning after removal is a new expanded group. Its wallet and other venue rows remain retained.

Risks / Trade-offs

  • Hidden failed/initial reads can resemble a successfully empty portfolio → preserve unavailable totals and expose the exact status on the wallet row.
  • A Phoenix account may have capital without positions → treat the Cross account itself as a child.