Skip to content

Migrate standalone apps to oakapp-base 1.3.0 - #856

Draft
michalvankodev wants to merge 3 commits into
mainfrom
misc/update-base-image
Draft

Migrate standalone apps to oakapp-base 1.3.0#856
michalvankodev wants to merge 3 commits into
mainfrom
misc/update-base-image

Conversation

@michalvankodev

@michalvankodev michalvankodev commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Migrate the standalone examples in this change set to the luxonis/oakapp-base 1.3.0 image family.
  • Update all standalone custom frontends to Visualizer package release 3.8.3.
  • Make the custom standalone frontends reproducible in clean, constrained OAK build containers.
  • Correct DINO Tracking's FastSAM parser wiring and P2P Measurement's current React ref typing.

Base-image migration

Updates the affected Python examples to luxonis/oakapp-base:1.3.0, the C++ example to 1.3.0-cpp, and the Python 3.11 frontend examples to 1.3.0-py311. Associated frontend lockfiles are regenerated for the updated package graph.

Visualizer frontend packages

Update the direct @luxonis/depthai-viewer-common and @luxonis/depthai-pipeline-lib dependencies from 3.7.6 to 3.8.3 for every standalone custom frontend:

  • Data Collection
  • DINO Tracking
  • Focused Vision
  • Object Volume Measurement 3D
  • P2P Measurement
  • People Demographics and Sentiment Analysis
  • QR Tiling
  • Open-Vocabulary Object Detection
  • Raw Stream
  • Roboflow Workflow

Frontend build reliability

For Data Collection, DINO Tracking, Focused Vision, Object Volume Measurement 3D, P2P Measurement, People Demographics and Sentiment Analysis, and QR Tiling:

  • add direct @floating-ui/dom@1.8.0, @sentry/browser@8.55.2, and date-fns@2.30.0 dependencies required by transitive Luxonis frontend packages;
  • use npm overrides to keep react and react-dom aligned to the direct React 19 versions, preventing a nested ReactDOM 18/React 19 mismatch;
  • set Rollup maxParallelFileOps: 8 to avoid EMFILE: too many open files in the OAK build container.

P2P Measurement additionally accepts a nullable RefObject in ClickCatcher, fixing its TypeScript build error.

DINO Tracking correction

FastSAM parser output now feeds the mask-selection and outline paths. Its pipeline type is dai.Buffer, while the runtime message remains dai.SegmentationMask; the host node handles that contract explicitly.

Validation

  • Ran npm install && npm run build sequentially for all ten updated frontends with the 3.8.3 package pair; all builds pass.
  • Removed node_modules, dist, and generated styled-system directories after every frontend build; no generated frontend artifacts remain.
  • Deployed current source with oakctl app run . --detach --invalidate to an OAK4-S R1 (RVC4, serial 221646362).
  • Confirmed custom frontend behavior for Data Collection, DINO Tracking, Focused Vision, People Demographics and Sentiment Analysis, QR Tiling, and Open-Vocabulary Object Detection.
  • Confirmed P2P Measurement and Object Volume Measurement 3D build successfully; their runtime paths correctly reject this RGB-only device because CAM_B/CAM_C are absent. A stereo-capable device is required for functional verification.

dev-app-test.md is intentionally excluded from this PR.

Data Collection snap crash fix

Data Collection's snapping host node used the obsolete SnapData(file_name=..., frame=..., detections=...) constructor. With depthai-nodes==0.5.0, triggering a snap raised TypeError: SnapData.__init__() got an unexpected keyword argument 'file_name' inside a DepthAI host-node callback, which aborted the backend and dropped the stream.

The producer now creates a dai.FileGroup, adds the image/detections pair with addImageDetectionsPair(...), and passes it as SnapData(file_group=...). The changed Python module passes python3 -m py_compile.

@michalvankodev
michalvankodev force-pushed the misc/update-base-image branch 2 times, most recently from 596eec4 to 1efe66b Compare August 12, 2026 17:45
@michalvankodev
michalvankodev force-pushed the misc/update-base-image branch from 1efe66b to c9b655f Compare August 12, 2026 17:46
@michalvankodev michalvankodev changed the title Fix standalone custom frontend builds Migrate standalone apps to oakapp-base 1.3.0 Aug 12, 2026
@michalvankodev michalvankodev self-assigned this Aug 12, 2026
@michalvankodev
michalvankodev marked this pull request as ready for review August 12, 2026 17:52
@klemen1999
klemen1999 requested a review from PetrNovota August 13, 2026 07:37
Comment on lines +19 to +23
[env]
WEBRTC__DC_MESSAGE__ORDERED = "false"
WEBRTC__DC_MESSAGE__MAX_RETRANSMITS = "0"
WEBRTC__DC_MESSAGE__QUEUE_POLICY = "lossy_drop_new"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is now always required for every example using oakapp-base 1.3 image? Should we maybe have default values that are already set to this in that case so one doesn't have to always set it in the oakapp tomls manually?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about this as well. I will recommend these settings as "default" but for the period of time to consider the new protocol "stable" we've decided to make lossy type "opt in" and preserve the previous non-lossy as one that is established.

@michalvankodev
michalvankodev marked this pull request as draft August 14, 2026 09:24
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.

2 participants