Skip to content

Bug: Budget source name missing from Budget Overview printout #1390

@steilerDev

Description

@steilerDev

[product-owner]

Summary

When a user prints the Budget Overview page, each budget line shows only its confidence/quoted/invoiced badge. The budget-source identification (the colored badge that names the source like "Personal Savings" or "Bank Loan") is invisible in print.

Reproduction

  1. Open /budget/overview with sample data containing budget lines from at least two sources.
  2. Trigger the browser print preview (Cmd/Ctrl-P) or call window.print().
  3. Observe that budget-line rows show only the own_estimate/quoted/invoiced badge — no source name appears next to it.

Root Cause (notes for the dev-team-lead spec)

In client/src/components/CostBreakdownTable/CostBreakdownTable.tsx BudgetLineRow (lines 199-284), each line renders both <span className={styles.sourceBadgeDot}> and <span className={styles.sourceBadgeLabel}>…<Badge … /></span>.

In CostBreakdownTable.module.css (lines 787-805):

  • .sourceBadgeDot is display: none outside the mobile breakpoint
  • .sourceBadgeLabel is hidden via @media (max-width: 767px)

Browsers render print pages at ~600-720 CSS pixels, which usually triggers the mobile media query — so the label is hidden, leaving only the dot, whose colored background is dropped by default in print.

Expected Behavior

When the user prints the Budget Overview page, every budget line shows the source name (the labeled badge) next to its confidence/quoted/invoiced badge — same way it appears on desktop screens. Confidence levels and the source badge are both visible.

Acceptance Criteria

  • Given a budget overview with multiple budget sources, When I open print preview, Then every budget-line row shows the named source badge (label visible, with sufficient contrast).
  • Given the same print preview, Then the confidence/quoted/invoiced badge is still visible on each line.
  • Given the existing screen layouts (desktop ≥768px shows label only; mobile <768px shows dot only), Then on-screen behavior is unchanged.
  • Given the source badge background colors don't print reliably, Then the printed source badge stays legible (e.g., via print-color-adjust: exact for source badges, or via a print-mode style that uses borders/text without relying on background-color, whichever the implementer prefers).

Notes

  • Priority: Should Have
  • Parent Epic: None (EPIC-05 Budget Management is closed/Done; no active Budget epic). Standalone bug.
  • Type: Print-mode CSS bug fix.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions