feat(market): square grid cells (2x1 min), preserve grid on edit, sparkline interval

- Grid cells are now square (cellH = cellW); column count is responsive with a
  2-column minimum, and a group's minimum size is 2x1 cells. New groups default
  to 2x1; drag/resize/auto-place all enforce the 2-wide minimum.
- Fix: editing a group no longer resets its grid placement/size. The editor's
  Save now starts from the existing entry and only overwrites the form fields,
  so grid_col/row/w/h (and anything else off-form) are preserved.
- Add a per-group sparkline interval (Minute/Hour/Day/Week/Month) next to the
  Sparkline toggle. The price history (~1 sample/min) is resampled by averaging
  each interval's worth of minute-samples into one point.

PortfolioEntry gains sparklineInterval and defaults gridW=2. Persisted in
settings.json. Full-node + Lite build clean; ctest 1/1; hygiene clean.

Note: the app only accumulates in-session minute samples, so Hour/Day/Month
show points only once enough data has been collected; true long-range history
(instant day/month charts) would need a CoinGecko market_chart fetch, which can
be added separately.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-03 04:15:38 -05:00
parent 77219c5ce7
commit 76ed09fad0
4 changed files with 66 additions and 25 deletions

View File

@@ -1135,6 +1135,11 @@ void I18n::loadBuiltinEnglish()
strings_["portfolio_show_value"] = "Value";
strings_["portfolio_show_24h"] = "24h";
strings_["portfolio_show_sparkline"] = "Sparkline";
strings_["portfolio_spark_min"] = "Minute";
strings_["portfolio_spark_hour"] = "Hour";
strings_["portfolio_spark_day"] = "Day";
strings_["portfolio_spark_week"] = "Week";
strings_["portfolio_spark_month"] = "Month";
strings_["portfolio_appearance"] = "APPEARANCE";
strings_["portfolio_addresses_hdr"] = "ADDRESSES";
strings_["portfolio_search"] = "Search addresses\xE2\x80\xA6";