Ready for first real test

This commit is contained in:
Aryan Singh committed 2026-07-02 00:46:34 -05:00
1 parent acddf9135f
commit b91c81ebdf
46 files changed
+34903 -26

No files matched your search

+28 -2
View File
@@ -71,8 +71,8 @@ if not latest.empty:
else:
c1.info("No account snapshot yet — run execution once Alpaca keys are set.")
tab_port, tab_theses, tab_orders, tab_logs = st.tabs(
["📊 Portfolio", "🧠 Tonight's Theses", "🧾 Orders", "📜 Logs"]
tab_port, tab_theses, tab_reports, tab_orders, tab_logs = st.tabs(
["📊 Portfolio", "🧠 Tonight's Theses", "📝 Reports", "🧾 Orders", "📜 Logs"]
)
# ---------------- portfolio ----------------
@@ -132,6 +132,32 @@ with tab_theses:
if out.errors:
st.warning("errors: " + "; ".join(out.errors))
# ---------------- reports ----------------
with tab_reports:
rdir = S.reports_dir
rdates = (
sorted((p.name for p in rdir.iterdir() if p.is_dir()), reverse=True)
if rdir.exists() else []
)
if not rdates:
st.info("No reports yet — generated during the nightly run (state/reports/).")
else:
rdate = st.selectbox("Report date", rdates, key="rdate")
ddir = rdir / rdate
# daily.md first, then each agent
mds = sorted(ddir.glob("*.md"), key=lambda p: (p.name != "daily.md", p.name))
for md in mds:
st.markdown(md.read_text())
pdf = md.with_suffix(".pdf")
if pdf.exists():
st.download_button(
f"⬇ Download {pdf.name}", pdf.read_bytes(), file_name=pdf.name,
mime="application/pdf", key=f"dl_{md.stem}",
)
for png in sorted(ddir.glob(f"{md.stem}_*.png")):
st.image(str(png))
st.divider()
# ---------------- orders ----------------
with tab_orders:
orders = _query_df(