Skip to content

chore(capture): keep charts and the feed still in scene pictures - #1268

Merged
guyverino merged 1 commit into
mainfrom
chore/capture-steady-market
Nov 6, 2026
Merged

guyverino merged 1 commit into
mainfrom
chore/capture-steady-market

Conversation

@guyverino

Copy link
Copy Markdown
Collaborator

What & why

A scene run photographs every screen for the site. Each picture's file name carries a hash of its bytes, and every clip made from a picture is rendered again when that name changes. Anything on screen that moves by itself therefore costs clips with no change to the interface.

Two whole runs differed on 95 of 221 screens. The main causes:

  • charts were placed by a running clock, so candles shifted between runs
  • the synthetic book drew new random quantities twenty times a second
  • news kept arriving during a run
  • the status row prints the version, which changes with every release and sits in the main window picture every clip starts from

This PR removes those causes for a scene run only. Ordinary builds and the capture build started with no flags behave as before.

  • chartdx::now_unix_ms is the one clock a chart places itself by. In a scene run it reads one held moment. Code measuring elapsed time (double click, recheck periods, the application-wide return to Live) reads moon_chart::paint::now_unix_ms as before.
  • The synthetic feed gets a still mode, MOON_SYNTH_STILL_AT_MS: no ticks, one book sent repeatedly, only the first news, all stamped with that moment.
  • A news card's printed age and the trade window's time origin follow the same clock.
  • The status row's version is held during a scene run through a cfg(uidoc) hook.
  • The Core Status rows now follow a language change at once. Before, they stayed in the old language until the next sample. This one also reaches ordinary users.

The private overlay's half (the held values, and waiting until two pictures in a row match) is already in place. Without this PR it has no callers.

Notable decisions

  • The application clock is not stopped globally, although that would be simpler. pin_clock documents why, and reading the code confirmed it: double-click detection and panel refresh gates depend on time passing.
  • A still market repeats its book rather than sending it once. MarketStore::apply_book drops a book for a market no chart has opened, so a single send left charts with no book.
  • A still market has no ticks. A single tick would reach a chart or not depending on when the chart opened, and a repeated one would add up.
  • A chart's own idle return to Live and a pane's TTL stay on the held clock, so they do not fire in a scene run. That is what a picture needs: firing would make it depend on time.

Known limitations

  • Three narrow runs of 196 pictures, measured before the rebase onto fix(render): restore chart layers and event delivery; add background saves and Obsidian #1267: the same list repeated gave 195 identical, the same list minutes later 188. What remains is 1 to 7 pixels. Where the values were read, the difference was one brightness level on a glyph edge. Its cause is not fixed, and such a picture still gets a new name.
  • Two whole runs have not been compared yet. They follow this merge and are the only check of all 230 screens.
  • This change has not been run through a scene run since the rebase onto fix(render): restore chart layers and event delivery; add background saves and Obsidian #1267. The two whole runs after the merge cover that.
  • The first reshoot renames about 90 main window pictures once, because they were taken before the readings were held.
  • A scene run takes about 1.7 times longer, from the overlay's wait for two matching pictures.
  • FireTest was not run; the developer has asked not to run it. Non-capture chart behaviour is unchanged by construction outside cfg(uidoc), apart from the Core Status bypass.

Issues

None of the 64 open issues is touched by this change.

How to verify

cargo build -p moon-ui-gpui --bin moonterminal --target x86_64-pc-windows-msvc --all-targets
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings
cargo test --workspace --target x86_64-pc-windows-msvc

fmt clean, clippy exit 0, 9138 tests green, on this tree rebased onto #1267, with MoonUI refreshed to master as CI does. The lock is not part of this PR.

A picture's name carries a hash of its bytes and every clip made from it is
rendered again when the name changes, so anything on screen that moves by
itself costs clips. Charts were drawn relative to a running clock, the
synthetic book drew new random quantities twenty times a second, news kept
arriving, and the version in the status row changes with every release.

In a scene run charts now read one held moment through chartdx::now_unix_ms,
while code measuring elapsed time keeps the plain clock. The synthetic feed
gets a still mode, MOON_SYNTH_STILL_AT_MS: no ticks, one book repeated, only
the first news.

The Core Status rows also follow a language change at once instead of up to
a second later.
@guyverino
guyverino merged commit a7a9222 into main Nov 6, 2026
10 checks passed
@guyverino
guyverino deleted the chore/capture-steady-market branch November 6, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant