Skip to content

chore: remove the image-asset feature (Image widget + kip-plugin image service) - #112

Merged
mairas merged 4 commits into
mainfrom
chore/remove-image-assets
Jul 2, 2026
Merged

chore: remove the image-asset feature (Image widget + kip-plugin image service)#112
mairas merged 4 commits into
mainfrom
chore/remove-image-assets

Conversation

@mairas

@mairas mairas commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Implements the plan in #107. Removes the imported image-asset feature (upstream Kip #1080/#1081/#1082 → Skip #54/#50/#62) in full.

Why

Signal K has no reusable image/media API to lean on (the Resources API is JSON-only; charts and sk-video serve binary via their own plugin routes). The feature carries a heavy security surface (SVG-upload sanitization, multipart upload, worker pool), and the right long-term shape is a standalone sk-media plugin — mirroring how the Video widget already consumes the external sk-video plugin. So: remove now, recreate later via sk-media. This PR does not build that plugin.

What (4 atomic commits)

  1. Client (Closes Remove the Angular image feature (widget + service + Media config UI) #108) — delete the Image widget, ImageAssetService, image config UI, kip-plugin-url.util; un-wire the widget registry, the settings Media tab, the image? config field, the root-modal image tab, the help entry, and the imageWidget icon.
  2. Server (Closes Remove the kip-plugin image subsystem (/plugins/kip/images) #109) — delete kip-plugin/src/images/ + its tests; un-wire kip-plugin/src/index.ts (image store init, registerImageRoutes, image imports, orphaned nodePath).
  3. Deps (Closes Drop image-only deps (multer, sharp) + e2e image harness #110) — drop multer, sharp, and isomorphic-dompurify (the last was added by the image PR for SVG sanitization and is now orphaned — a refinement over the plan, which named only multer/sharp); delete the image e2e harness.
  4. Changelog (Closes Changelog: note image feature removal #111).

Kept (verified intact)

signalk-plugin-url.util.ts (used by sk-video + the kip history client), all Video/sk-video code, all history/series code.

No migration

A dashboard with an existing Image widget degrades to a graceful "failed to load" placeholder — WidgetService.getComponentType() returns undefined for an unknown selector and widget-host2 guards on it (sets loadFailed), so no crash and no config-upgrade step is needed. Documented in the changelog.

Verification

  • npm run lint clean; npm run build:dev clean (full type-check).
  • npm run build:plugin clean; npm run test:plugin 60/60 pass.
  • Grep confirms zero dangling image references and no remaining spec references the deleted code (webapp vitest runs in CI).

Closes #107. Follow-ups (separate): file sk-media tracking issue; reconcile #106; update #76.

🤖 Generated with Claude Code

https://claude.ai/code/session_018zURudCY3TTRcNd2acknJ9

mairas and others added 4 commits July 3, 2026 00:27
…settings UI

Also drops the now-stale image-asset-client reference from the kept
signalk-plugin-url util doc comment.

Part of #107. Closes #108.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zURudCY3TTRcNd2acknJ9
Part of #107. Closes #109.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zURudCY3TTRcNd2acknJ9
Removes multer, sharp, isomorphic-dompurify, and heic-convert — all added by
the image PR (upload / image processing / SVG sanitize / HEIC transcode) and
now orphaned after the widget + kip-plugin image code was deleted. Also
deletes the image screenshot e2e harness.

Part of #107. Closes #110.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zURudCY3TTRcNd2acknJ9
Part of #107. Closes #111.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zURudCY3TTRcNd2acknJ9
@mairas
mairas force-pushed the chore/remove-image-assets branch from 1ca3a63 to 4cc8e3a Compare July 2, 2026 21:27
@mairas

mairas commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

Review synthesis

Independent 3-lens review (completeness / keep-list regression / adversarial), each a fresh-context agent, with adversarial verification of blocking findings. 0 blocking, 0 high.

Findings (both fixed, folded into the atomic commits — see force-push below):

  • medium — orphaned heic-convert dep. An image-only dependency (HEIC→JPEG transcode, consumed only by the deleted image-processing.ts) that I missed alongside multer/sharp/isomorphic-dompurify. Now dropped in the deps commit; zero heic references remain and it's gone from the lockfile.
  • nit — stale doc comment. The kept signalk-plugin-url.util.ts header still named "the image-asset client" as a former consumer. Reworded to kip-series-api-client.service + the sk-video clients.

Keep-list verified intact by the review: signalk-plugin-url.util.ts + its real consumers (video widget, video-camera-setup) compile; the full Video/sk-video feature (incl. piexifjs snapshot path) is present; kip-plugin HistorySeriesService / sqlite storage / History-API provider registration / /series routes are intact (plugin build exit 0); and the widget-registry / options-tabs / root-modal splices are structurally clean (production AOT build succeeded). Adversarial lens constructed no runtime/CI failure — a saved image-widget instance degrades to loadFailed, not a crash.

Force-push note: the branch was rewritten (1ca3a6364cc8e3a6) to fold these two fixes into their proper units (deps / client-cleanup) rather than append a patch commit — keeping the 4-commit history free of a superseded intermediate state. Diff is otherwise unchanged.

Re-verified locally: lint clean, build:dev clean, build:plugin clean, test:plugin 60/60.

@mairas
mairas merged commit 11f3fbd into main Jul 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant