Skip to content

build_latency_sparkline: NA bar heights produce invalid CSS #280

@seanthimons

Description

@seanthimons

Source: PR #278 review (round 1)
Severity: MEDIUM
File: R/mod_cost_tracker.R:319

When max_ms guard passes but individual rows have avg_latency_ms = NA, bar_heights[i] is NA. max(as.integer(NA), 2) returns NA without na.rm, and sprintf("height: %dpx", NA) renders "NApx" — invalid CSS that silently breaks bar rendering.

Suggested fix: Add bar_heights[is.na(bar_heights)] <- 0 after computing bar_heights.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions