Skip to content

UX: Insights tab shows per-cable weight, users expect total weight #323

Description

@9thLevelSoftware

Problem

The Insights tab (plateau detection, volume metrics) displays weight values per-cable (e.g., "5kg"), but users think in terms of total weight (what the Vitruvian machine's display shows, e.g., "10kg"). This creates confusion — particularly in the plateau detection card where "Bench Press at 5kg" looks wrong to a user who set the machine to 10kg.

The portal already handles this correctly by multiplying per-cable values by 2 (WEIGHT_MULTIPLIER = 2 in src/schemas/transforms.ts). The mobile app's Insights tab does not.

Context (from monorepo CLAUDE.md)

All weight values in the database are per-cable (single cable, 0-220kg range)
Portal multiplies by 2 for display

Scope

This affects multiple display surfaces in the mobile app, not just Insights:

  • PlateauDetectionCard — shows per-cable weight
  • WeeklyVolumeCard — volume computed from per-cable values
  • SetSummaryCard — displays per-cable weight as "Weight"
  • History cards — show per-cable weight

Proposed Approach

  1. Add a weight display utility that accounts for cable count:
    fun displayWeight(perCableKg: Float, cableCount: Int = 2): Float = perCableKg * cableCount
  2. Apply to all user-facing weight displays in the Insights tab, set summary, and history
  3. Keep database values per-cable — only transform at the display layer
  4. Respect the user's weight unit preference (kg vs lbs) in the same utility
  5. Handle single-cable exercises — use cableCount = 1 from the session's cableCount field

Risk

This is a cross-cutting display change. Must ensure consistency across ALL weight displays and avoid double-multiplying. The cableCount field is nullable (NULL for legacy sessions) — default to 2 for backward compatibility.

Found during investigation of #318.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions