From 9008e9cd8e2a442613c9bc29efaeac8980545bc6 Mon Sep 17 00:00:00 2001 From: Chris Amow Date: Mon, 10 Aug 2026 16:18:56 -0500 Subject: [PATCH] Show the trendline Side control only when it can do anything MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Snapping now always lands an anchor on a bar extreme, and which extreme it is decides the side — a high is resistance, a low is support. That left the Side dropdown unable to affect the result: it was overridden on every drawn line. It now appears only when "Snap to highs/lows" is off, the one case where there is no extreme to infer from. With snapping on the row reads "Side auto" instead, so the behaviour is stated rather than implied by a control that does nothing. An "Auto" option in the dropdown would have been the same no-op wearing a label. Verified in a browser both ways, and that the inference itself holds with the dropdown left on its default: drawing above the candles yields resistance snapped to the bar high, drawing below yields support snapped to the bar low. Co-Authored-By: Claude Opus 5 --- docs/IMPLEMENTATION_PLAN.md | 10 ++++++++++ static/index.html | 5 ++++- static/style.css | 1 + 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/IMPLEMENTATION_PLAN.md b/docs/IMPLEMENTATION_PLAN.md index eedb9f1..0421fd6 100644 --- a/docs/IMPLEMENTATION_PLAN.md +++ b/docs/IMPLEMENTATION_PLAN.md @@ -1489,3 +1489,13 @@ resolving to the 08:30 bar on 15m and the 08:00 bar on 1h, never edge-parked, and returning to its original x on the way back. Edge-parking still works where it should — a comment scrolled 400 bars out parks right and comes back on return to live. + +**The trendline Side control became inert.** Once snapping always lands on a +bar extreme, the side is inferred from *which* extreme — a high is resistance, a +low is support — so the dropdown could no longer affect anything. It now appears +only when "Snap to highs/lows" is off, which is the one case where there is no +extreme to infer from; otherwise the row reads "Side auto". Verified both ways: +snap on shows the note and no dropdown, snap off shows the dropdown. + +`created_at` (epoch seconds) is already stored on every drawing and returned by +`GET /api/drawings`, so filtering by age needs UI only, not a migration. diff --git a/static/index.html b/static/index.html index 5e1d834..eda8d94 100644 --- a/static/index.html +++ b/static/index.html @@ -65,7 +65,10 @@
- + + + Side auto
diff --git a/static/style.css b/static/style.css index cf6676d..e25902e 100644 --- a/static/style.css +++ b/static/style.css @@ -76,3 +76,4 @@ aside { padding:16px; }h2 { margin:0 0 12px; color:var(--muted); font-size:11px; border-radius:4px; background:transparent; color:var(--muted); cursor:pointer; } .tool-body textarea { width:100%; min-width:0; font:inherit; font-size:11px; padding:4px 6px; resize:vertical; border:1px solid var(--line); border-radius:5px; background:transparent; color:var(--fg); } +.side-auto { align-self:end; padding-bottom:6px; font-size:10px; color:var(--muted); }.side-auto b { color:var(--fg); font-weight:600; }