Changelog

All notable changes to the Demetra Trading Journal project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).


[1.0.79] - 2026-07-31

Fixed — MT5 auto-sync (investor password)

Fixed — accounts

[1.0.73] - 2026-07-11

Fixed — offline resilience for cloud mode + clearer mode switching

[1.0.72] - 2026-07-11

Added — Private Desktop early-access launch

[1.0.71] - 2026-06-30

Changed — Private entitlement plumbing + dashboard polish

[1.0.70] - 2026-06-07

Added — drag-to-update price + OCR chroma filter + tighter psychology insights

Manual chart annotation (`backtest_detail.html`)

OCR pipeline (`screenshot_ocr_routes.py`)

Psychology block (`analytics.html`)

Backend-only release. APP_VERSION marker bumped to 1.0.70.

No installer rebuild, no manifest bump.


[1.0.69] - 2026-06-07

Added — editable per-slot screenshot label (timeframe tagging)

Backtest screenshot slots can now be tagged with a free-form

label (typically a timeframe like H1 / M15 / M3 / M1), so a

five-slot top-down analysis reads as the actual TF stack

instead of "Slot 1 … Slot 5".

Backend-only release. No desktop or installer changes, no

manifest bump.


[1.0.68] - 2026-06-07

Fixed — emergency rollback of v1.0.67 PyInstaller version resource

The 1.0.67 release added `version=*_version_info.txt` to both

`demetra.spec` and `bridge.spec` to embed a Windows VS_VERSIONINFO

resource for SmartScreen reputation. That broke `Demetra.exe` at

runtime: the bootloader spawned, Python initialized to ~34 MB, but

the process hung silently before reaching `_setup_logging()`. No

log writes, no UI, no Application Error event, no crash dump.

Reproducible against the freshly-built `dist/Demetra/Demetra.exe`

before Inno Setup ran, so the regression was in the PyInstaller

output itself — not the installer.

No backend, EA, or behavioural changes from 1.0.67 → 1.0.68. This

is a pure rebuild to ship a launchable desktop binary.


[1.0.67] - 2026-05-23

Fixed — backend + EA + ops cleanup pass

Backend

MT5 EAs

Infra / ops

Build / installer


[1.0.66] - 2026-05-23

Fixed — second-wave medium-priority cleanup

Backtest correctness

Updater

MT5 EAs

Dashboard UX

Schema hardening (migration 0025)

Normalizer dedup

Caddy

Changed


[1.0.65] - 2026-05-23

Fixed — second-wave review (5 parallel agents)

Punch list from the wider code review that covered Desktop, DB,

Backtest/replay, Frontend templates, and Build/deploy — areas the

first 3-agent pass didn't touch.

**XSS holes (ship-blocking, 3 sites)**

**Desktop security**

**Frontend regressions / footguns**

**Backtest / broker-bars feature (1.0.63 follow-up)**

**DB**

**Build / dev**

Known follow-ups (not in this release)

Changed


[1.0.64] - 2026-05-21

Fixed — auto-update "doesn't do anything" bug (root cause)

Users on 1.0.61–1.0.63 reported that clicking "Update" appeared to

do nothing: UAC prompt accepted, no progress visible, app closes,

but on relaunch the version stayed the same OR the app simply

never re-opened.

Root cause: the updater launched the installer with `/VERYSILENT`,

which is incompatible with Inno Setup's `[Run]` step combination

of `postinstall` + `runasoriginaluser` we use to drop privileges

back to the logged-in user after the elevated install. In

`/VERYSILENT` mode Inno can't switch contexts, so the post-install

auto-launch was silently skipped — the user got no window after

the install and assumed it had failed.

Files DID get replaced. The user could see the new version if they

manually re-opened Demetra from Start menu or the desktop icon.

But that's a confusing UX, especially since the user reasonably

expects "click update → app comes back with new features".

Fix:

Important — one-time manual install required

Because the broken `/VERYSILENT` line lives inside the *existing*

desktop app's bundled updater.py, this fix only takes effect once

the user has installed 1.0.64. Users currently on 1.0.61–1.0.63

need to download the installer manually from

https://demetra-journal.com/downloads/DemetraSetup-1.0.64.exe and

run it once. After that, all subsequent auto-updates work as

expected.

Changed


[1.0.63] - 2026-05-21

Added — broker bars for backtest replay (on-demand fetch via MT5)

Lets users replace Yahoo Finance's spot fid (the default replay data

source) with bars pulled directly from their MT5 broker. Eliminates

the 2-10 pip drift between Yahoo and the broker chart they actually

took the trade on.

Flow:

1. User opens a backtest's chart-replay block (already in 1.0.61).

2. Below the chart, clicks the new "📡 Запросить из MT5" button.

3. Backend creates a `chart_bar_requests` row (status=pending) for

the user's MT5 account.

4. EA polls `bridge/bar-requests` every 60s (proxied to backend via

HMAC-signed request). Sees the pending row, runs `CopyRates()`

for the (symbol, M1, from, to) window, ships the bars as a

`CHART_BARS_BATCH` event (already-existing path → `rls.chart_bars`).

5. EA POSTs to `bridge/bar-requests/{id}/complete` to mark the

request done.

6. Frontend polls `/broker-bars-status` every 10s; once `done` it

reloads the page and the replay chart now renders broker bars.

Components:

Caveats

Changed


[1.0.62] - 2026-05-21

Fixed — full-chain hardening (3-agent code review punch list)

Closes the remaining critical + medium-priority findings from the

end-to-end EA → Bridge → Backend review.

**Backend**

**Bridge**

**MT5 EA**

Changed


[1.0.61] - 2026-05-20

Added — Lightweight-Charts trade replay (Wave 2 of 2)

The visible half of the trade-replay feature. Where 1.0.60 wired up

the data path, 1.0.61 ships the actual TV-style chart viewer on both

the live-trade and backtest detail pages.

**Backtest replay (new):**

**Live trade replay (new):**

**Frontend (new):**

**Dependencies:**

Caveats

Changed

Pre-release review hardening (4-agent code review)

Pulled in fixes after a parallel backend / security / frontend / MT5

review pass. None of these are user-visible behaviour changes; they

close concrete attack-surface and reliability gaps before this

release reaches production.

**Backend**

**MT5 EA**

**Frontend**

Known follow-ups (deferred to v1.0.62)


[1.0.60] - 2026-05-20

Added — trade-replay foundation (Wave 1 of 2)

Wire-level groundwork for the upcoming Lightweight-Charts trade-replay

viewer. This release only ships the **data path** — the actual replay UI

lands in 1.0.61. After installing this build the EA starts emitting bars

for every newly-closed trade; the new backfill EA covers history.

Changed

Notes


[1.0.59] - 2026-05-20

Added (F5 from the 5-feature roadmap — bulk CSV import)

Tolerant of common synonyms — `symbol`/`pair` accepted for `asset`,

`side`/`buy_sell` for `direction`, `result`/`win_loss` for `outcome`,

`session` for `killzone`, `r`/`risk_reward` for `rr`. Direction values

accept `LONG`/`SHORT`/`BUY`/`SELL`/`L`/`S`/`B`; outcome accepts

`TP`/`SL`/`WIN`/`LOSS`/`TARGET`/`STOPLOSS`. Date column tries 7

common formats (ISO, dd.mm.yyyy, mm/dd/yyyy etc.) plus ISO-with-

offset.

When `entry_price` / `stop_loss` / `take_profit` are all present in

a row, RR is auto-derived from the geometry (overriding any explicit

`rr` column). Geometry-mismatched rows fail with a friendly message.

Encoding: tries UTF-8-BOM first, falls back to CP1251 (Excel

Russian default). Delimiter is auto-sniffed (comma, semicolon, tab,

pipe) — works with both Excel and Google Sheets exports.

Bad rows are skipped and reported individually

(`{row, error}` list in the response) so a typo in row 12 doesn't

abort the other 49 trades. Successful rows commit together; if

zero succeed, transaction rolls back.

F1–F5 roadmap complete

v1.0.55 (TV link auto-attach) → v1.0.56 (retro-annotate live trades)

→ v1.0.57 (OCR confidence + multi-PSM) → v1.0.58 (canvas manual

fallback) → v1.0.59 (bulk CSV) closes the 5-feature roadmap from

the post-v1.0.54 planning session.

[1.0.58] - 2026-05-20

Added (F2 from the 5-feature roadmap — canvas manual fallback for OCR)

Memory hygiene: the pasted image is held as a single

`URL.createObjectURL(blob)` reference for the modal session and

revoked on close so re-opening doesn't leak.

Notes for F2

[1.0.57] - 2026-05-20

Changed (F4 from the 5-feature roadmap — OCR robustness)

[1.0.56] - 2026-05-19

Added (F3 from the 5-feature roadmap)

The image-paste handler is gated on the retro-zone being rendered,

so on EA-completed trades a stray Ctrl+V can't accidentally try

to OCR something — it falls through to the existing 1.0.55

TV-link text-paste path.

Five new i18n keys (`trade_detail.retro_*`) in en + ru.

[1.0.55] - 2026-05-19

Added (F1 from the 5-feature roadmap)

Backend resolves the share page's `og:image` meta tag (more stable

than the snapshot URL pattern), downloads the PNG via httpx with a

10 s timeout and 5 MB cap, magic-byte verifies it, and saves to the

standard upload dir. Two thin endpoints:

Both reuse `_validate_image_signature`, `_secure_path_join`,

`UPLOAD_DIR`, `MAX_UPLOAD_SIZE`, `BACKTEST_SCREENSHOT_SLOTS` so the

download path has identical hardening to the existing UploadFile

routes. Defense-in-depth on the resolved snapshot URL — we only

accept `https://s3.tradingview.com/snapshots/...` even though the

share page is trusted, so an attacker who somehow inserted a

different og:image can't steer us to download arbitrary files.

Direct snapshot URLs (`s3.tradingview.com/snapshots/<l>/<id>.png`)

are accepted too — saves the extra HTTP roundtrip for users who

already have the direct URL.

On the backtest page, the existing 1.0.54 paste-zone now does

double duty: image paste → OCR (extract Entry / SL / TP);

text paste matching the TV regex → download + attach. The

i18n hint copy was updated to reflect both modes.

Changed

[1.0.54] - 2026-05-19

Added

Implemented as:

Backend image deps: `Pillow`, `pytesseract` in pyproject + lock;

`tesseract-ocr` apt package in the backend Dockerfile (+ ~40 MB

image size, no language data packs needed — digit-only OCR).

Changed

[1.0.53] - 2026-05-18

Security

Fix: route saves through the existing `_save_connectors()` re-

encryption pipeline; both `_load_connectors` and `_save_connectors`

now SKIP the `web_session_id_envelope` key entirely so the envelope's

already-encrypted token is carried opaquely (never decrypted to

memory, never re-encrypted on save).

**Action required:** delete `%LOCALAPPDATA%\Demetra\connectors.json`

and re-enroll connectors, OR rotate every connector token via the

Connectors page in the UI. Existing tokens on disk are compromised.

Fixed

Changed

[1.0.52] - 2026-05-18

Added

Closes the "Failed to download. Check your connection" pop-up that

Russian → Frankfurt users were hitting when a single chunk fell off

mid-transfer on flaky home internet.

Changed

Both `en.json` and `ru.json` extended (+41 lines each, parse-validated).

Dropzone toasts at trade_detail.html:1366-1371 reuse the existing

`I18N.screenshot_uploaded` / `I18N.upload_failed` keys — no

duplicates introduced.

Docs

[1.0.50] - 2026-05-13

Fixed

Fix: set `WEBVIEW2_USER_DATA_FOLDER` env var BEFORE calling

`webview.start()`. That env var is Microsoft's canonical mechanism

and is honored by every WebView2 build regardless of which pywebview

knob it was attached to. Belt-and-suspenders with the existing

`storage_path` kwarg so cookies persist whichever path pywebview

actually uses.

The folder is `%LOCALAPPDATA%\Demetra\webview` (same as before).

To reset your session deliberately, delete that folder.

Server-side hotfix included from 1.0.49

[1.0.49] - 2026-05-13

Fixed

Fix: `InitializeSetup` now runs `taskkill /F /T /IM Demetra.exe`

and `taskkill /F /T /IM DemetraBridge.exe` BEFORE any file

operation, then sleeps 1.5 s to let Windows flush the file

mappings. `/T` kills the whole process tree, so any pywebview

helper or child process also dies.

No code change in the desktop or backend — this is purely an

installer-side fix. After installing 1.0.49 once, all future

in-app auto-updates (1.0.49 → 1.0.50 and beyond) will perform

the taskkill cleanly without prompting the user.

[1.0.48] - 2026-05-13

Fixed

Internal

[1.0.47] - 2026-05-13

Fixed

Security

[1.0.46] - 2026-05-13

Fixed

[1.0.45] - 2026-05-12

Added

Fixed

Pure UI change — no backend or auth-flow modifications.

[1.0.44] - 2026-05-12

Added

[1.0.43] - 2026-05-11

Changed

Added

[1.0.42] - 2026-05-11

Added

[1.0.41] - 2026-05-11

Added

[1.0.40] - 2026-05-11

Added

[1.0.39] - 2026-05-11

Added

[1.0.38] - 2026-05-11

Added

[1.0.37] - 2026-05-11

Added

[1.0.36] - 2026-05-10

Added

[1.0.35] - 2026-05-09

Added

[1.0.34] - 2026-05-09

Added

[1.0.33] - 2026-05-09

Added

Changed

[1.0.32] - 2026-05-08

Added

Removed

[1.0.31] - 2026-05-08

Added

Removed

[1.0.30] - 2026-05-08

Added — Foundation & A11y

Added — Trader dashboard (the killer change)

Added — Trade table & journal

Changed

[1.0.29] - 2026-05-07

Fixed

[1.0.28] - 2026-04-30

Added

[1.0.26-1.0.27] - 2026-04-15

Fixed

[1.0.18] - 2026-03-20

Fixed

[1.0.7] - 2026-02-12

Fixed

#### Auto-Setup Token Rotation Storm (Critical)

#### Legacy Token Verification Fallback

#### Updater Uses ShellExecute for UAC Elevation

Changed


[1.0.6] - 2026-02-08

Fixed

#### EA Code Review Fixes

#### Bridge pydantic Import Crash

#### EA Startup Blocking


[1.0.5] - 2026-02-01

Added - Invisible Flow (99% Automatic Setup)

#### Auto-Account Creation

#### Getting Started Page

#### Smart Redirect Logic

#### Desktop App First-Trade Notification

Changed


[Previous Releases]

Security & Robustness Updates

Core Features


Migration Guide

Upgrading to 1.0.7

If you're experiencing trades not appearing after updating:

1. Close the desktop app

2. Delete `%APPDATA%\Demetra\connectors.json` and `%APPDATA%\Demetra\bridge.yaml`

3. Reopen the app and re-login

4. Auto-setup will provision a fresh connector token

No database migrations required.

For New Users

1. Install desktop app

2. Register

3. Drag EA to MT5 chart

4. Start trading

5. Everything else is automatic!


Known Issues

1. **NotFoundError returns 404 instead of 401** — Failed token verification raises `NotFoundError` which the global error handler maps to HTTP 404. Bridge handles this correctly.

2. **Rate limit shared IP in production** — All connectors behind Caddy reverse proxy share a single Docker internal IP for rate limiting purposes.

3. **AppData persists across updates/uninstalls** — `%APPDATA%\Demetra\` is not cleaned by the installer or uninstaller. Stale tokens can cause issues after server-side changes.

4. **Multiple accounts with same MT5 login** — Using the same MT5 login across multiple Demetra accounts can cause ambiguous auto-detection.