Show Markdown images as links on the dashboard, never loaded #195

Merged
aluminum-ice merged 1 commit from md-images-as-links into main 2026-11-14 16:32:21 +00:00
Owner

What this PR does

The dashboard's small Markdown renderer (_render_markdown, used for the operator guide and the What's new release notes) didn't know images, so ![alt](url) showed as a stray "!" followed by a link. 1.0.14-beta.5's notes carry two pictures, so a device viewing them saw exactly that.

Now an image becomes a link labelled "Picture: alt" (or "Picture: untitled") that opens the picture. The page still never loads anything from off the device: there is no <img>. As for links, only http://, https:// and / URLs become links; a javascript: or data: image keeps its label as plain text.

Checklist

  • Lint passes — the real-data check is clean locally; the Lint workflow runs the rest.
  • Tests pass — two new tests in test_web.py cover the renderer and the notes page. In the full suite, 1,741 pass; the 5 test_web.py potfile-import tests fail locally exactly as on main (local werkzeug), so CI is the check for those.
  • Nothing real: no secrets, no personal information, no real data.
  • Consent gates intact.
  • Docs updated in the same PR — docs/developer/updates-setup.md says how images in the notes show.
  • Commit messages are short and imperative.

Release impact

  • App-layer-safe — the kestrel_pi package only.
  • Reflash-class

Notes for review

Devices pick this up with the next release; until then, beta.5's notes on the dashboard keep the "!" in front of the two picture links.

🤖 Generated with Claude Code

## What this PR does The dashboard's small Markdown renderer (`_render_markdown`, used for the operator guide and the *What's new* release notes) didn't know images, so `![alt](url)` showed as a stray "!" followed by a link. 1.0.14-beta.5's notes carry two pictures, so a device viewing them saw exactly that. Now an image becomes a link labelled **"Picture: alt"** (or "Picture: untitled") that opens the picture. The page still never loads anything from off the device: there is no `<img>`. As for links, only `http://`, `https://` and `/` URLs become links; a `javascript:` or `data:` image keeps its label as plain text. ## Checklist - [x] **Lint passes** — the real-data check is clean locally; the **Lint** workflow runs the rest. - [x] **Tests pass** — two new tests in `test_web.py` cover the renderer and the notes page. In the full suite, 1,741 pass; the 5 `test_web.py` potfile-import tests fail locally exactly as on `main` (local werkzeug), so CI is the check for those. - [x] **Nothing real: no secrets, no personal information, no real data.** - [x] **Consent gates intact.** - [x] **Docs updated in the same PR** — `docs/developer/updates-setup.md` says how images in the notes show. - [x] Commit messages are short and imperative. ## Release impact - [x] **App-layer-safe** — the `kestrel_pi` package only. - [ ] **Reflash-class** ## Notes for review Devices pick this up with the next release; until then, beta.5's notes on the dashboard keep the "!" in front of the two picture links. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Show Markdown images as links on the dashboard, never loaded
All checks were successful
Lint / lint (pull_request) Successful in 30s
Test / test (pull_request) Successful in 56s
Lint / lint (push) Successful in 29s
Test / test (push) Successful in 52s
4c47bea48b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
aluminum-ice deleted branch md-images-as-links 2026-11-14 16:32:21 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aluminum-ice/kestrel!195
No description provided.