Skip to content

Unchecked checkbox primary field displays as "Untitled" instead of a distinguishable value #106

Description

@brylie

Problem

primaryFieldDisplayValue (src/lib/data/views.ts) renders a checkbox value as "Checked" when true, or an empty string when false. Board/Calendar's title functions treat an empty display string as "no value," falling back to "Untitled". So a record whose primary field is an unchecked checkbox shows as "Untitled" — indistinguishable from a record with no value set at all — rather than something informative like "Unchecked".

This is a real but low-severity edge case: choosing checkbox as a Collection's primary field is an unusual choice (resolvePrimaryField's automatic fallback only ever picks text fields; a user has to explicitly pick checkbox via FieldMenu's "Set as primary field" for this to occur at all), but nothing currently prevents it, and the resulting display is misleading when it happens.

Scope

  • Change primaryFieldDisplayValue's checkbox case to return a non-empty string for the false case too (e.g. "Unchecked"), so a deliberately-unchecked primary field is distinguishable from a genuinely unset one.
  • Add/update a views.test.ts case covering primaryFieldDisplayValue for { type: 'checkbox', value: false }.
  • Spot-check Board's card-title PropertyValueCell rendering for a checkbox primary field still looks sane (it renders the checkbox input itself, not primaryFieldDisplayValue's string — this issue is specifically about the aria-label/static-text call sites: Board's "Move to column" label and Calendar's entry title).

Non-goals

  • Not discouraging or restricting checkbox (or any other eligible type) as a primary field choice — the fix is purely about the display-value fallback, not the eligibility rule.

Done when

An unchecked checkbox primary field renders as something other than "Untitled" everywhere primaryFieldDisplayValue is used, verified by a test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions