add zeit todo

This commit is contained in:
Emil Lerch 2026-06-19 15:50:42 -07:00
parent bd6ba89ea7
commit ed2c0b8c5d
Signed by: lobo
GPG key ID: A7B62D657EF764F8

34
TODO.md
View file

@ -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 <clock time>" 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