Files

2.3 KiB

Spec Delta

MODIFIED Requirements

Requirement: Prototype is clearly labeled and entirely local

The Perps view SHALL explicitly label its data as sample data and explain that Phoenix rows are illustrative without an existing integration. It SHALL obtain positions only from the Perps service's current in-memory snapshot, with no external network calls, Refresh button, or simulated position changes. EMC SHALL own all UI components, row colors and formatting.

Scenario: Inspect the prototype boundary

  • WHEN the Perps tab is displayed
  • THEN sample-data and illustrative-Phoenix labels are visible
  • AND there is no Refresh button or simulated update of sample positions
  • AND displaying and interacting with the prototype uses only the service's local sample snapshot

ADDED Requirements

Requirement: Asynchronous polling follows window visibility

EMC SHALL request the current Perps snapshot immediately on opening and every three seconds while visible, without blocking the UI thread. UI updates SHALL occur only on the JavaFX thread. Hiding the window SHALL stop polling; reopening SHALL create only one active polling loop and ignore results belonging to an earlier window session. Poll failures SHALL preserve the current view and allow subsequent attempts.

Scenario: Read takes time or fails

  • WHEN a snapshot read is delayed or fails
  • THEN the UI remains responsive and the existing view is retained
  • AND later polling remains possible without overlapping scheduled reads

Scenario: Hide and reopen

  • WHEN the owner hides and reopens EMC repeatedly
  • THEN each visible session has only one polling loop and obsolete results cannot update its views

Requirement: Polling preserves Perps view state

The Perps table SHALL retain matching wallet, venue and position identities across snapshots. Repeated unchanged snapshots SHALL leave existing rows, expansion, selection and formatting untouched without flicker. New groups SHALL be expanded by default, and future added or removed positions SHALL be reconciled by identity without resetting retained groups.

Scenario: Poll unchanged positions

  • WHEN a user collapses a group or selects a position and repeated snapshots are unchanged
  • THEN the same rows remain, with the same expansion and selection and no rebuild or refresh