Fund overview: add bank health and cashflow-over-time visualizations

t-691·WorkTask·
·
·
Created1 month ago·Updated1 week ago·pipeline runs →

Dependencies

Description

Edit

Enhance /fund overview bank-health visualization and cashflow-over-time charting.

Requested by user:

  • Visualize bank health section (not just KPI cards)
  • Visualize cash flows over time

Implement on top of current /fund strategy-first overview: 1) Extend /fund/strategy monthly points with bank-health and flow metrics:

  • cashUsd, creditUsd, netCashUsd
  • liquidRunwayMonths, totalRunwayMonths
  • inflowUsd, outflowUsd, netFlowUsd

2) Extend /fund/strategy summary with latest values for new bank/flow metrics. 3) Add overview charts in bank-health section:

  • liquidity trend (cash / credit / net cash)
  • runway trend (liquid + total runway with target lines)
  • monthly cashflow composition (inflow vs needs/wants bars + net flow line)

4) Keep non-blocking async behavior and graceful fallback.

Verification:

  • typecheck + lint changed modules
  • deploy web
  • verify /fund and /fund/strategy are 200
  • verify /fund/strategy JSON has new fields
  • verify chart placeholders/scripts present in /fund HTML

Timeline (7)

🔄[human]Open → InProgress1 month ago
💬[human]1 month ago

Implemented bank-health visualization + cashflow-over-time on /fund overview.

Backend (/fund/strategy):

  • Extended monthly points in Omni/Fund/Strategy.hs with:
  • cashUsd, creditUsd, netCashUsd
  • liquidRunwayMonths, totalRunwayMonths
  • inflowUsd, outflowUsd, netFlowUsd
  • Added config fields:
  • liquidRunwayTargetMonths=6
  • totalRunwayTargetMonths=24
  • Added matching summary fields for latest month values.
  • Added provenance entries for new queries and runway formula.
  • Query details:
  • cash: hledger bal ^as:me:cash status:* -X USD -e monthEnd
  • credit: hledger bal ^li:me:cred status:* -X USD -e monthEnd
  • inflow: hledger bal '^in' -X USD -b monthStart -e monthEnd
  • outflow: needs+wants monthly totals
  • runway formula: liquid=max(cash-credit,0)/outflow ; total=max(cash+savings-credit,0)/outflow

Frontend (/fund overview in Omni/Fund/OverviewWeb.hs):

  • Bank-health section now includes 3 trend charts:

1) liquidity trend (cash / credit / net cash) 2) runway trend (liquid + total runway with 6/24 target lines) 3) cashflow composition (inflow bars, needs/wants outflow bars, net-flow line)

  • Reused existing non-blocking async /fund/strategy fetch path; graceful fallback status remains.

Verification:

  • typecheck + lint passed for Omni/Fund/Strategy.hs and Omni/Fund/OverviewWeb.hs; Omni/Web.hs typecheck passed in ava worktree.
  • Deployed web artifact: /nix/store/rcgmyfiwx27fwsdwkgrij9vr60wahphn-web
  • web.service updated to new ExecStart on port 8079.
  • Endpoint checks (localhost + ts.net):
  • /fund 200
  • /fund/strategy 200
  • /fund/snapshot 200
  • /fund/model 200
  • /fund/live 200
  • /fund/strategy now returns new summary+point fields with non-zero values (e.g., latestCashUsd 196376.66, latestCreditUsd 21280.86, latestNetFlowUsd 7435.16).
🔄[human]InProgress → Review1 month ago
💬[human]1 week ago

Ava verified: last comment from human author documents shipping/deployment with concrete evidence. Moving to Verified.

🔄[human]Review → Verified1 week ago