Skip to content

DTE/Term column-label split across position tables #45

@heyitsStylez

Description

@heyitsStylez

What to build

The label "DTE" is currently used on three tables but means two different things:

  • Expiring This Week shows a live countdown (days remaining until expiry).
  • Open Positions shows the original DTE stored on the trade at open — a frozen number.
  • Position History also shows the original DTE — meaningful for settled trades.

Resolve the discrepancy by splitting the concepts into two distinct labels and aligning the live tables:

  • DTE = live countdown. Used on Expiring This Week (already correct) and Open Positions (currently shows frozen original — change to countdown).
  • Term = original DTE at open, frozen on the Trade. Used on Position History (rename header from "DTE" to "Term"; value unchanged).

The Open Positions sort key for the column should change from the stored dte field to expiry, since live-countdown order is equivalent to expiry order and the stored field is no longer what's displayed.

Glossary entry already added in CONTEXT.md ("DTE vs Term") to lock in the convention.

Acceptance criteria

  • Open Positions DTE column shows live days-remaining (computed from expiry − today), matching Expiring This Week
  • Open Positions DTE column sorts by expiry (ascending = soonest first)
  • Position History column header reads "Term"; value remains the stored original t.dte
  • Expiring This Week is unchanged
  • Mobile cards on Expiring This Week unchanged (already use the countdown label)
  • python3 build.py --check passes
  • npm test passes

Blocked by

None - can start immediately

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions