feat(update): show release notes + version-card layout in update notice

The update notice dialog now mirrors what GitHub publishes: side-by-side
Installed → Latest version cards (the new one accent-tinted to draw the
eye) and a scrollable release-notes panel under them. Light markdown
rendering covers `##` headings, bullet lists, and inline bold/code
markers — enough for the GitHub release body format we ship.

- update_check::check_for_update() returns UpdateInfo { version, body };
  body is parsed from the releases API JSON with a tiny custom
  string-field extractor (\n / \" / \u handling) so we keep the
  serde_json-free dependency footprint.
- Window grows from 480x240 to 560x460 and becomes resizable to make
  room for the notes scroller.
- Layout tightens: header bottom padding drops 14 → 6, notes heading
  10, and the notes block is wrapped in a Fill-height container so it
  claims every leftover pixel — no more dead space between heading and
  footer.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Hakan 2026-05-22 12:55:37 +03:00
commit 2357b39a1d
5 changed files with 255 additions and 53 deletions

View file

@ -104,6 +104,10 @@ pub(super) struct H7CAD {
/// Tag of the latest available release (without the leading "v"),
/// e.g. `"0.3.0"`. `None` when up-to-date or check hasn't returned.
update_notice_version: Option<String>,
/// Release-notes body for the version above (GitHub release "body"
/// markdown, as returned by the API). May be empty when the release
/// shipped without notes.
update_notice_body: Option<String>,
/// In-memory clipboard: cloned entities waiting to be pasted.
clipboard: Vec<acadrust::EntityType>,
/// Centroid of the clipboard entities (XZ plane, Y-up).
@ -542,7 +546,7 @@ pub enum Message {
Noop,
/// GitHub releases API returned a result. `Some(version)` means a
/// newer release exists; we open the update-notice window.
UpdateCheckResult(Option<String>),
UpdateCheckResult(Option<crate::update_check::UpdateInfo>),
/// User dismissed the update-notice window.
UpdateNoticeClose,
/// User clicked the "Open release page" button — opens the GitHub
@ -739,6 +743,7 @@ impl H7CAD {
about_window: None,
update_notice_window: None,
update_notice_version: None,
update_notice_body: None,
clipboard: Vec::new(),
clipboard_centroid: glam::Vec3::ZERO,
layout_context_menu: None,