Skip to content

[CRITICAL] drawFullSkeleton is an empty stub — full skeleton overlay never renders, worst visual quality at best performance #1041

Description

@namann5

Description

In src/services/cameraService.ts (lines 231-234), the drawFullSkeleton function is an empty stub whose body was never implemented — it consists of only a placeholder comment and does absolutely nothing.

Location

src/services/cameraService.ts:231-234

function drawFullSkeleton(_ctx: CanvasRenderingContext2D, _landmarks: any[]) {
  // Your existing full drawing logic (connections + labels + shadows)
  // ...
}

The Inverted Behavior

The skeleton selection logic at lines 287-293 chooses which drawing function to call based on currentThrottleLevel:

if (currentThrottleLevel === 0) {
  drawFullSkeleton(ctx, landmarks);       // Level 0 = best performance -> draws NOTHING
} else if (currentThrottleLevel === 1) {
  drawReducedSkeleton(ctx, landmarks);    // Level 1 = throttled -> draws major joints (works)
} else {
  drawBoundingBox(ctx, landmarks);        // Level 2+ = heavy throttle -> draws bounding box (works)
}
  • Throttle level 0 (best performance, full detail expected): No skeleton is drawn at all
  • Throttle level 1 (reduced performance): Partial skeleton with major joints appears
  • Throttle level 2+ (worst performance): Bounding box appears

The visual quality is inverted — users get the worst visualization exactly when the system is performing best.

Impact

  • Users get no skeleton overlay during normal operating conditions
  • The skeleton only partially appears when performance degrades, which is the opposite of expected behavior
  • The comment says "Replace your existing draw call with this" but the replacement was never completed
  • Makes the entire throttling/adaptation system counterproductive from a UX perspective

Severity

Critical — The primary visual feedback mechanism of the app (the pose skeleton overlay) is completely missing under the most common operating condition (throttle level 0). This affects all users on capable hardware.

Steps to Reproduce

  1. Start a workout (the camera feed activates at throttle level 0 by default)
  2. Observe that no skeleton overlay is drawn on the canvas
  3. Check the console — no errors because the function silently does nothing
  4. (Optionally) Artificially increase CPU load to trigger throttling to level 1 or 2
  5. Observe that a partial skeleton or bounding box does appear when performance degrades

Expected Behavior

At throttle level 0, a full detailed skeleton (connections + labels + shadows) should be drawn, as implied by the function name and documented in the placeholder comment.

Suggested Fix

Implement drawFullSkeleton with the full landmark rendering logic (connections between all 33 MediaPipe landmarks, joint labels, shadow effects). The existing drawReducedSkeleton function at lines 236-256 provides a working reference for the drawing pattern.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions