Commit graph

82 commits

Author SHA1 Message Date
becbc0e0b4 Sample trendlines on their own timeframe and hit-test the painted line.
1m was putting a point on every bar for 30m/1d lines, which kinked at
tape holes and made hover/select miss. Clicks that were eaten by the
vertical pan gesture now select on pointer-up.
2026-08-26 01:55:47 -05:00
c2ad2e8d7d Stop rebuilding chart overlays on every live tick.
Ticks were force-redrawing trendline overlays and, in diagnostic mode,
sampling canvas pixels. That maxed CPU. Also document production log
and capture access for agents.
2026-08-26 01:36:17 -05:00
5468bbec60 fix future drawing interactions 2026-08-25 05:41:55 -05:00
90fc77df92 fix canonical future geometry 2026-08-25 05:03:42 -05:00
cb81672a37 trendline fix and just 2026-08-25 04:00:52 -05:00
01acdce045 slope calc fix 2026-08-24 01:02:51 -05:00
eaf118ef8b drawings from higher timeframes to lower fixes 2026-08-23 21:37:19 -05:00
913eec34ea lower time frame trendlines blocked from dma chart 2026-08-23 21:10:09 -05:00
7c5f0a7627 large timeframes dashed 2026-08-23 18:27:08 -05:00
dae60fdf67 undo 2026-08-21 03:10:31 +00:00
6e69b7337a current bar fix and ma features 2026-08-20 23:15:34 +00:00
fbb469de57 fib fixes 2026-08-19 09:51:21 +00:00
b932fa2d75 fib label 2026-08-19 09:43:08 +00:00
ac2943f248 fib look and feel tweaks 2026-08-19 09:33:18 +00:00
1c3a852a03 better fib left start 2026-08-19 09:29:48 +00:00
5f39144dc8 fib width fix 2026-08-19 09:17:23 +00:00
58a64c1eeb fib levels 2026-08-19 09:09:47 +00:00
08cff3ce53 enable symbols and comments in the future whitespace 2026-08-19 08:36:31 +00:00
44cec38750 slope in tooltip 2026-08-19 05:30:16 +00:00
1ee2a96fc0 more performance 2026-08-17 01:03:28 -05:00
90f8a1b567 performance fixes 2026-08-17 00:50:20 -05:00
fc09da7053 final pan fix 2026-08-16 23:25:36 -05:00
2589a1db13 vertical drag fix 2026-08-16 21:56:42 -05:00
171521cf75 jitter fix 2026-08-16 21:44:35 -05:00
baf2048867 ohlc and scroll 2026-08-16 21:33:09 -05:00
ae596ebf8e weekday tooltip 2026-08-16 21:15:01 -05:00
11508e5325 tweaks 2026-08-15 04:48:49 -05:00
0c7e81d222 2nd fix 2026-08-15 03:50:38 -05:00
73570d2904 line fix 2026-08-15 03:40:34 -05:00
e1d2c60af7 diagnose line problem 2026-08-15 02:54:19 -05:00
796e6cdeb8 superior extended trendlines 2026-08-15 00:58:19 -05:00
edcfd3977e trendline wrinkle 2026-08-14 23:28:44 -05:00
333ca4c111 trendline extension slope fix 2026-08-14 23:15:00 -05:00
aae47b6681 autoscroll optional 2026-08-14 13:58:44 -05:00
a921db4610 horizontal line to start of trendline problem 2026-08-14 06:06:16 -05:00
8ab054cf67 timeframe trendline interactions 2026-08-14 04:58:08 -05:00
952a3bb7f3 animated current price 2026-08-14 03:53:04 -05:00
a09e4f1208 better select and visibility 2026-08-14 03:33:53 -05:00
087d9d9d2a changed ntfy string 2026-08-14 02:44:10 -05:00
f9e02fc3e4 fixed del key bug 2026-08-14 01:12:20 -05:00
54f4871757 key nudge for all drawing types 2026-08-13 19:02:49 -05:00
05e8aef40b better colors 2026-08-13 06:46:38 -05:00
0a56d56261 reposition price level lines 2026-08-13 06:44:01 -05:00
22a638cf73 Label the axis past the last bar, and fix the Yahoo bars that exposed
Trendlines project into the whitespace beyond the newest candle, but the time
axis stopped there, so a converging pair could be seen without knowing when it
converges. Lightweight Charts only labels times present on its scale, so the
chart now carries whitespace points past the last bar: no value, nothing drawn,
but the axis has something to label and timeToCoordinate answers out there.

Future times repeat the most recent bar interval, which is what timeAtIndex
already does for the projections themselves. That drifts across the daily halt
and the weekend; agreeing with the projected line matters more than abstract
accuracy, and session-accurate projection needs server-side session rules the
client does not have.

Two bugs surfaced while measuring it. Padding meant to be five bars measured as
sixty-seven, because the interval came from the gap between the final two bars;
barInterval now takes a median over recent bars and ignores a ragged tail.

And that gap was two seconds on a one-minute chart because Yahoo stamps its
in-progress candle with the time of the request, while the poller emitted
anything newer than the last thing it sent. Every poll therefore appended a new
"1m" bar seconds after the previous one, interleaved with the real ones — live
in production, which is still on Yahoo. Timestamps are bucketed on parse, and
the final candle is emitted unclosed so it revises the current minute rather
than entering the aggregator and adding its volume to every higher timeframe
again on each poll. Verified live: eight consecutive bars, all aligned, all
sixty seconds apart.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-11 23:55:27 -05:00
e957991242 symbol improvements 2026-08-11 19:51:39 -05:00
81045e2128 trendlines should only show numbers until selected or hover 2026-08-11 18:59:12 -05:00
c653e65d5b diagnostic capture feature 2026-08-11 16:08:32 -05:00
a395818581 Post cross-thread events through the loop, and measure how late it runs
P0 from docs/async_refactor.md. The mutating routes are sync `def`, so FastAPI
runs them in a threadpool, and they reach Runtime.broadcast through
rebuild_levels — writing asyncio.Queue directly from there. That queue is not
thread-safe: it wakes a consumer by resolving a Future, which only the loop
thread may do. A dropped wakeup means a drawing made in one browser does not
reach another until the next market tick.

broadcast now posts through call_soon_threadsafe when it is off the loop, and
publishes directly when it is on it, so the stream's own path pays nothing.

Worth being straight about the tests: the race is timing-dependent and did not
reproduce in twenty attempts — a foreign-thread put_nowait usually lands in the
ready queue before the loop sleeps, and a tick every second covers the rest.
Even asyncio's debug thread-affinity check stays quiet unless a consumer is
parked on the Future at that instant. So the tests assert the contract rather
than provoke the failure: a broadcast from a worker thread must go through
call_soon_threadsafe, one from the loop must deliver synchronously, and both
must arrive.

Also adds the loop-lag probe, which reports scheduling drift as loop_lag_ms on
/api/status. It found P1 on its first run: 19,441ms worst against 1.5ms in
steady state, which is seeding blocking the loop. "The chart feels laggy" is now
a number.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-11 15:30:45 -05:00
e02f919b27 better default names 2026-08-11 14:36:58 -05:00
3b3c06a1f3 - Drag a selected trendline body to reposition the entire line.
- Duplicate and delete from the line context menu.
     - Copies shift ten bars right.
     - Default names are up and down; copies become up 2, down 2, etc.
     - Exact local data receipt time including seconds.
     - Deployment timestamp removed.
     - Test cleanup no longer deletes drawings created from your browser.
     - JWT password session flow.
2026-08-11 05:46:09 -05:00