From 5e2bdd3c2ae9ec4c9ec6a01b8d4a45582b4bf0c1 Mon Sep 17 00:00:00 2001 From: TommySquared Date: Mon, 21 Sep 2026 14:32:16 -0500 Subject: [PATCH] fix: seed drawn-feature fill alpha explicitly in the color (#7cc24280) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The EoGPT layer drawer's new alpha slider seeds from the fill color's alpha byte. Drawn features defaulted to a 6-digit #7cc242 — genuinely alpha FF, so the slider seeded at 100% while the polygon rendered translucent through the fill layer's baked-in 0.5 base fill-opacity. Agent-added polygons already carry 8-digit fills (e.g. #3388ff20), which is why they seeded correctly. Carry the drawn default's translucency in the color itself (0x80 = 50%), matching that convention. Note the effective rendered fill gets lighter (0.5 color alpha x 0.5 base = 0.25 vs 0.5 before); the baked 0.5 base is a separate discussion since changing it re-tints every geojson asset. Co-Authored-By: Claude Fable 5 --- server/mapcontrol_server/main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/server/mapcontrol_server/main.py b/server/mapcontrol_server/main.py index 5b279a2..330f00e 100644 --- a/server/mapcontrol_server/main.py +++ b/server/mapcontrol_server/main.py @@ -227,8 +227,16 @@ async def websocket_endpoint(websocket: WebSocket, map_id: str, user_session_id: # accent (--eo-accent #7cc242, darker #5fa830 stroke) so # user-drawn shapes read as part of the product, distinct # from agent-added analysis layers. + # + # The fill carries its translucency IN the color (8-digit + # hex, 0x80 = 50%) rather than relying on the fill layer's + # baked-in base fill-opacity: agent-added polygons already + # follow this convention (e.g. #3388ff20), and the EoGPT + # layer drawer's alpha slider seeds from the color's alpha + # byte — a 6-digit fill reads as 100% there while rendering + # translucent, which is exactly the mismatch this avoids. style = AssetStyle( - fill_color="#7cc242", + fill_color="#7cc24280", stroke_color="#5fa830", stroke_width=2.0, )