Skip to content

parity: fix(clients): attachment sizes just under 1 MB no longer read "1024 KB" (pingdotgg/t3code#29165) #146

Closed

Description

@rynfar

Upstream pingdotgg/t3code#29165 (ab06e2a265) changed code the native client depends on.

Watched files:

  • packages/client-runtime/src/state/attachments.test.ts
  • packages/client-runtime/src/state/attachments.ts

Activity

  1. added
    parity
    parity:regression-risk
    on Nov 3, 2026
  2. added this to the M2 Parity core milestone on Nov 3, 2026
  3. rynfar commented on Nov 3, 2026

    @rynfar
    OwnerAuthor

    Triaged in intake #134: native format_size (crates/core/src/composer/attachments.rs:235) has the same bug: pick the unit after rounding so 1023.5 KB reads '1.0 MB'.

  4. added
    status:in-progress
    on Nov 3, 2026
  5. rynfar commented on Nov 3, 2026

    @rynfar
    OwnerAuthor

    Implemented size formatting in #174: all four upstream unit boundaries and both exact MB decimal midpoints with adjacent bytes are covered in the existing core test, with failures recorded before the fixes. MB formatting reuses the existing JS-compatible to_fixed helper without changing it or Usage callers. No remaining size-formatter gaps for #146.

    CO-ATTACH stays partial and now points to #175 for the remaining gaps: size labels on staged image tiles, sent image/file chips, and transcript file rows; question-response attachments; and retry-on-send for failed uploads. No missing size surface is implemented in this PR. Web specialised preview headers also use formatAttachmentSize; the separate native plain-preview truncation notice uses grouped raw bytes.

    Strict native Clippy, workspace tests (1,213 passing), native build, theme, parity-sync, conformance, and targeted ledger formatting checks passed. Review evidence is local at /private/tmp/native-factory-2f5f764a/146/review-1/. No optional offscreen capture or live upload verification was performed.

  6. added
    status:review
    and removed
    status:in-progress
    status:review
    on Nov 3, 2026
  7. rynfar commented on Nov 3, 2026

    @rynfar
    OwnerAuthor

    Fixed in #174 (squash 64f645b701): attachment sizes choose their unit after rounding, and MB decimals round ties like toFixed. CO-ATTACH stays partial; its remaining gaps (size labels on staged images, sent chips and transcript file rows, question-response attachments, retry-on-send) are tracked in #175.

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

    parityparity:regression-risk

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions