Skip to content

fix(quota): preserve delimiters in card selections - #60

Merged
Nanako0129 merged 1 commit into
mainfrom
fix/quota-selection-delimiters
Jul 17, 2026
Merged

fix(quota): preserve delimiters in card selections#60
Nanako0129 merged 1 commit into
mainfrom
fix/quota-selection-delimiters

Conversation

@Nanako0129

Copy link
Copy Markdown
Owner

Summary

  • Split persisted quota selections at the first | only.
  • Preserve the complete provider-owned card ID remainder, including delimiter characters.
  • Update self-tests for exact, unmatched, nil-payload, and structurally malformed selections.

Context

Follow-up to PR #58 and review discussion. Antigravity card IDs embed exact provider model IDs, so treating every | as a structural delimiter could canonicalize a valid explicit selection to Auto.

Verification

  • swift run TokenBar --selftest
  • git diff --cached --check

Parse persisted quota selections at the first `|` delimiter only. Client IDs
remain the prefix while the full remainder is retained as the card ID, so
provider-owned identities such as Antigravity model IDs can contain delimiter
characters without canonicalizing to Auto or resolving a different tray
source.

Update selection self-tests to cover an exact card ID containing `|`, an
unmatched explicit selection whose card identity contains delimiters, nil
payload preservation, and truly malformed values with a missing delimiter or
empty side.

Verification:
- swift run TokenBar --selftest
- git diff --cached --check
@Nanako0129
Nanako0129 merged commit 1e00e7b into main Jul 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant