From ed2c0b8c5db13fbe798efa8cdbf892b80c17f397 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Fri, 19 Jun 2026 15:50:42 -0700 Subject: [PATCH] add zeit todo --- TODO.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/TODO.md b/TODO.md index a8b5679..b608d6a 100644 --- a/TODO.md +++ b/TODO.md @@ -522,8 +522,38 @@ Implementation notes: (`RateLimiter.perHour`, wired into the provider). A batched quote call is 1 request, but heavy `r` use plus candle refreshes draw from the same hourly budget, so watch for contention. -- Tiingo websocket streaming would be the natural follow-on for true - push-based real-time, replacing poll-on-`r` entirely. + - Tiingo websocket streaming would be the natural follow-on for true + push-based real-time, replacing poll-on-`r` entirely. + +## Precise "as of " via a datetime/timezone lib (zeit) - priority LOW + +The portfolio tab's live-price footer is deliberately vague static +text: "(as of intraday quote today)" after a live refresh, falling +back to "(as of close on YYYY-MM-DD)" otherwise. We can't do better +today because the codebase has no wall-clock-to-local-time machinery - +`Date` is days-only, and every time display is either a date or a +relative "X ago" (`fmt.fmtTimeAgo`). There's no way to render an +absolute local clock time like "2:34 PM ET". + +Pulling in a datetime/timezone library (e.g. [zeit](https://github.com/rockorager/zeit), +already by the libvaxis author) would let us: + +- Show a precise, honest stamp: "(as of 2:34 PM ET)" / "refreshed + 2:34 PM" instead of "today" / "Xs ago". +- Fix the current label's weekend/after-hours imprecision. Right now a + refresh when the market is closed flips the footer to "intraday quote + today" even though Yahoo returned the last close (which on a Saturday + is Friday's). With real clock + market-calendar awareness, the label + could say "as of Fri close" or "(market closed, last quote Fri 4:00 + PM ET)" instead of implying live intraday data. +- Replace `last_refresh_s` "refreshed Xs ago" in the TUI status bar + (and the quote/earnings/options "data Xs ago" readouts) with absolute + times where that reads better. + +Scope is a judgment call: a new dependency for what's currently a +cosmetic label. Worth it once we want trustworthy timestamps (e.g. for +screenshots, or to stop conflating "live" with "last close"); not +before. ## Audit: em-dash sentinel usage across all tables — priority LOW