Skip to content

feat: Snapshots & viewer#22

Merged
keyldev merged 8 commits into
mainfrom
feat/phase-14-snapshots-viewer
Jun 19, 2026
Merged

feat: Snapshots & viewer#22
keyldev merged 8 commits into
mainfrom
feat/phase-14-snapshots-viewer

Conversation

@keyldev

@keyldev keyldev commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Turns ad-hoc snapshots into a managed feature: always-HD capture, a SQLite index, a browser, an in-app viewer with basic editing, and share. All five heads build (Win/Lin/Mac/Android/iOS), 0 warnings.

  • 14.1 HD-always captureSnapshotService (Core) picks the HD source by
    priority: running mainstream → Majestic HTTP /image.jpg → briefly open the
    mainstream → SD fallback. Never persists an SD frame when an HD source exists.
    Snapshot button added to grid tiles; single-camera page reuses the service.
  • 14.2 PersistenceSnapshots table (migration 009) + SnapshotRepository,
    entity / strongly-typed id / source & kind enums in Core.
  • 14.3 Snapshot browser — a segmented Snapshots tab inside the Recordings
    page (keeps the mobile bottom nav at 5/5). Camera + date-preset filters, sort,
    per-day timeline, multi-select with batch delete.
  • 14.4 In-app viewer — window on desktop / full-screen overlay on mobile;
    zoom / pan / rotate / flip / fit / 1:1 / slideshow, prev-next over the current
    filter, wheel + drag + pinch + arrow-key navigation.
  • 14.5 Basic editor — crop + arrow/box/text with colour & thickness, undo.
    Composited by SkiaImageEditor from normalized coordinates; saved always as
    a copy
    (*_edited.jpg), original untouched.
  • 14.6 ShareIShareService in Core; desktop reveals in the file manager,
    Android ACTION_SEND via FileProvider, iOS UIActivityViewController.
  • 14.7 Tests — source-priority selection, repository filters, Skia
    thumbnail/editor compose.

Related

Type

  • Bug fix
  • Feature
  • Refactor / cleanup
  • Docs / CI
  • Other:

Checklist

  • Builds with 0 warnings (TreatWarningsAsErrors=true).
  • Tests pass (dotnet test); new Core logic has unit tests.
  • No layering violation — App references Core only (Infrastructure / Video / Devices wired via DI in a head).
  • Scope stays within one phase (didn't pull work from a later phase's "Не входит").
  • README / docs updated if public commands, options, or setup changed.

Platforms tested

  • Windows
  • Linux
  • macOS
  • Android
  • iOS
  • CI build only

Screenshots / notes

keyldev added 8 commits June 19, 2026 19:35
- Snapshot entity + SnapshotId/Source/Kind in Core
- ISnapshotRepository + SqliteSnapshotRepository (Dapper, UTC ISO-8601)
- migration 009_snapshots with (CameraId, TakenAt) index
- DI registration in SharedComposition
- SnapshotService in Core picks the HD source by priority: live
  mainstream -> Majestic HTTP -> brief mainstream open -> SD fallback
- thumbnails via SkiaThumbnailGenerator (Video); indexes each capture
- ICameraCredentialsProvider seam keeps the service unit-testable
- snapshot button on grid tiles + reuse in single-camera page
- IconCamera/IconImage lucide glyphs
- Recordings page gains a segmented Recordings/Snapshots switch
- SnapshotBrowserPageViewModel: camera + date-preset filters, sort,
  per-day timeline, multi-select with batch delete
- gallery via WrapPanel; thumbnails decode capped at 320px
- en/ru strings
- ImageViewerViewModel: prev/next over the filtered set, zoom/pan,
  rotate, flip, fit, 1:1, slideshow, copy, delete, properties
- window on desktop (modal) / full-screen overlay on mobile
- wheel + drag + pinch + arrow-key navigation
- browser opens snapshots in-app; reloads on viewer deletes
- en/ru strings
- SnapshotEdit/IImageEditor in Core; SkiaImageEditor composites
  arrows, boxes, text and crop, normalized coords
- editor mode in the viewer: tool/color/thickness, undo, save copy
- saves always as *_edited.jpg via SnapshotService.SaveEditAsync;
  original untouched; new DB row (Source=Edited)
- en/ru strings
- IShareService in Core; desktop reveals in file manager
- Android ACTION_SEND via FileProvider (manifest provider + file_paths)
- iOS UIActivityViewController
- share button in viewer + browser selection toolbar
- en/ru strings; all five heads build
- SnapshotServiceTests: HD source-priority (live main > majestic >
  brief open > SD fallback), never SD when HD available
- SqliteSnapshotRepositoryTests: CRUD + camera/date filters
- SkiaImagingTests: thumbnail downscale, editor crop + annotation
- ROADMAP: phase 14 done; snapshot share sheet ticked
- Video.Tests needs the Skia native; the SkiaSharp package bundles
  win/osx natives but Linux needs SkiaSharp.NativeAssets.Linux
- the app loads Avalonia.Skia's native at runtime, so this is test-only
- fixes 3 SkiaImagingTests failing on Linux CI (cannot open libSkiaSharp)
@keyldev keyldev merged commit 9106d4d into main Jun 19, 2026
6 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

Development

Successfully merging this pull request may close these issues.

1 participant