{% extends "base.html" %} {% set active_page = 'positions' %} {% block title %}Positions · net-alpha{% endblock %} {% block topbar_right %}{% endblock %} {% block content %}

Positions

{% if selected_account %}{{ selected_account }}{% else %}All accounts{% endif %} · {{ selected_period|default('YTD')|upper }}
{% if imports and selected_view in ('all', 'stocks') %}{% include "_portfolio_toolbar.html" %}{% endif %}
{# Emit column markers so tests / density.js can read extra_columns regardless of whether imports exist (empty-state path never reaches _portfolio_table). #} {% if extra_columns %} {% endif %} {# Symbol search — client-side filter applied to all rows with `data-symbol` (set by tab fragments). Partial match by underlying; for options that means typing the ticker shows every contract on it. #}
{% include "_positions_tabs.html" %} {% if selected_view == 'all' %} {% include "_positions_view_all.html" %} {% elif selected_view == 'stocks' %} {% include "_positions_view_stocks.html" %} {% elif selected_view == 'options' %} {% include "_positions_view_options.html" %} {% elif selected_view == 'at-loss' %} {% include "_positions_view_at_loss.html" %} {% elif selected_view == 'closed' %} {% include "_positions_view_closed.html" %} {% elif selected_view == 'plan' %} {% include "_positions_view_plan.html" %} {% endif %} {# Side pane (§3.5). Non-modal — table stays interactive while pane is open. Alpine state tracks the currently-open row. HTMX fetches the pane body from /positions/pane?sym=…&account_id=…. Closing zeros the state; clicking another row swaps content via @click on each . #} {% endblock %}