# Phase F4 — Long-history chart + drawing tools

**Status:** Complete (v0.8.0)  
**Rollback:** v0.7.0 @ 989b5b8

## Objective

Bounded historical chart windows (warehouse-first) and time/price-anchored drawing tools on lightweight-charts.

## Delivered

- Warehouse **latest-window** default (800 bars) + **beforeMs** older chunks (500 bars)
- In-memory candle buffer with trim (`CHART_MAX_IN_MEMORY_BARS`)
- Pan-left triggers older warehouse loads (no external provider per pan)
- Drawing model (`lib/chart/drawings/*`) — horizontal, vertical, trend, ray, rectangle, fib, text, measure
- Canvas overlay (`ChartDrawingLayer`) + modular `DrawingToolbar`
- LocalStorage persistence scoped by symbol + timeframe
- Pre-F4 fix: Strict Mode duplicate chart init

## Not in scope

Alerts, backtest, replay, auth, PWA, MT5, new Pine ports, NAS100 fabrication

## Manual verification

Warehouse M15: EUR_USD, BTCUSDT, ETHUSDT, XAU_USD; NAS100 shows 404 when no warehouse rows.
