Skip to content

fix(mobile): label the expiring credit amount accurately on the profile card - #8036

Merged
iscekic merged 4 commits into
mainfrom
drain/profile-expiring-credit-copy
Oct 22, 2026
Merged

iscekic merged 4 commits into
mainfrom
drain/profile-expiring-credit-copy

Conversation

@iscekic

@iscekic iscekic commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Evidence

Evidence: partially demonstrated — the catalog parity checks and a throwaway vitest that drove the app's own i18n instance through all 87 languages show the new line resolving from each catalog with both placeholders bound; the earlier Android emulator run shows the English line rendered on the Profile card, and the translated values were not re-photographed on a device.

Change

The expiring line under the profile balance (profile.bonusCreditsExpiring) summed every credit block with a future expiry date but labelled the total as bonus credits. Paid credits expire too, so an account holding paid base credit plus a smaller bonus grant read the whole expiring total as bonus credit.

The line now says "{{amount}} in credits expiring {{date}}" in English, and all 86 translated catalogs carry the same change: the qualifier meaning "bonus" is gone and the grammar that depended on it was adjusted, with the rest of each sentence, its register and both placeholders untouched. The key name stays profile.bonusCreditsExpiring; renaming it would churn every catalog for no reader-visible gain, and the same line serves the organization context, which has the same credit-block shape.

The catalog-wide translation is the owner's explicit request on this pull request. The mobile translation section asks for English-only edits and normally leaves translation to a separate slice; this slice was authorized to fill every catalog so readers whose language is not English do not see a line naming bonus credit under a balance that is not bonus credit.

Verification

  • pnpm --filter kilo-app check:i18n — passed, "87 languages, every catalog matches en.json".
  • pnpm --filter kilo-app check:plurals — passed.
  • pnpm --filter kilo-app format:check — passed.
  • pnpm --filter kilo-app exec vitest run src/i18n — 17 files, 1697 tests passed, including a throwaway smoke (deleted before the commit) that called the app's i18n instance for all 87 languages with returnDetails: true: every language resolved its own catalog entry (exactUsedKey equals the key, so no English fallback), interpolated the amount and the date, left no {{…}} behind, and no catalog still held the old English string.
  • pnpm --filter kilo-app exec vitest run src/components/profile-credits-card.mounted.test.tsx — 24 tests passed. The mounted suite the latest main added pins the rendered line, so its expected text and its filter now match the copy the catalog holds; without that the merged tree would assert the old wording.
  • Mobile typecheck and lint were clean on the parent commit; these commits change catalog values and one test's expected strings.
  • Earlier in this pull request: Android emulator on the local dev stack with a fake account holding one paid and one smaller bonus expiring grant; the Profile card showed the combined balance with "$61.00 in credits expiring 10/27/2027". Screenshot in the comments. Fake-account test data only.

Proxy answers

The owner's proxy gave these answers in the owner's place.

  1. Question: Copy wording: The expiring line under the profile balance says "{{amount}} in bonus credits expiring {{date}}" but includes paid (base) credits, which now expire too. Which fix?
    Answer: 'credits expiring'
    Confidence: 0.80 · Precedent: Do the least work possible with no drop in quality (session 7f3470e0ba6f: "do the least amount of work possible, with no drop in quality"). The neutral wording is accurate, matches the brief's reword option, and keeps expiring paid credit visible.
  2. Question: Key name: Keep the i18n key name profile.bonusCreditsExpiring even though the copy no longer says bonus?
    Answer: Keep key name
    Confidence: 0.75 · Precedent: Never hand-edit generated files (session df491946927a: "generated files must always be regenerated on conflict"). A rename would force hand edits to every other catalog, which apps/mobile/AGENTS.md forbids.
  3. Question: Org card: The same line renders for organization context too (org credit blocks have the same shape). Accept that the reworded line covers both?
    Answer: Yes, same line
    Confidence: 0.85 · Precedent: Keep similar elements consistent across surfaces (session a247f3c19b1e: owner asked that the thought row match the tool call row). One accurate line covers both contexts, so no extra key is needed.

…le card

The expiring line under the profile balance summed every credit block
with a future expiry date, but called the total bonus credits. Paid
credits expire too (one year after purchase), so the expiring total
includes paid base credit and the label misreads a personal balance as
bonus credit. Reword the copy to 'credits expiring'; keep the key name
so the locale catalogs stay untouched.
@iscekic iscekic added drain Work item from the findings drain explorer:android Finding surfaced by the Android explorer labels Oct 19, 2026
@iscekic

iscekic commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Verified the profile credits card on the Android emulator against the local dev stack. The signed-in fake test account holds one paid expiring credit and one smaller free bonus expiring credit. The card shows the combined balance with "$61.00 in credits expiring 10/27/2027" underneath — the line now names the expiring credits total instead of calling the whole amount bonus credits. Fake-account test data only, non-production environment.

Profile credits card showing the expiring credits line

@kilo-code-bot

kilo-code-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental commit only updates the mounted credits-card test to assert the new English copy: both filters and both expectations now match profile.bonusCreditsExpiring ({{amount}} in credits expiring {{date}}) in en.json, no other test or source in the repo still expects "in bonus credits", and the previously reviewed 86 catalogs are unchanged since that review.

Assumptions: [INFERENCE] The mounted suite runs with the English locale through import '@/i18n'; the test was not executed in this read-only session, and the intervening origin/main merge was excluded from the review scope (only the PR's own commits were assessed).

Files Reviewed (2 files)
  • apps/mobile/src/components/profile-credits-card.mounted.test.tsx - 0 issues (incremental: 4 changed lines at 323-324, 358-359)
  • apps/mobile/src/i18n/locales/en.json - 0 issues (re-verified line 318 against the test expectations)
  • apps/mobile/src/i18n/locales/*.json (86 non-English catalogs) - carried forward, unchanged since the previous review; key parity and both placeholders intact
Previous Review Summaries (2 snapshots, latest commit 082fafe)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 082fafe)

Status: No Issues Found | Recommendation: Merge

Executive Summary

The incremental change rewords only the profile.bonusCreditsExpiring value in all 86 non-English catalogs; every value keeps both {{amount}} and {{date}}, JSON parses cleanly, key parity and the amount/date ordering contract at apps/mobile/src/components/profile-credits-card.tsx:278 are intact, and no catalog retains the removed "bonus" qualifier.

Assumptions: [INFERENCE] Translation wording was reviewed for meaning and placeholder integrity from the diff; native-speaker register was not verified, and check:i18n / check:plurals were not re-run in this read-only session.

Files Reviewed (86 files)
  • apps/mobile/src/i18n/locales/af.json … apps/mobile/src/i18n/locales/zu.json (all 86 non-English catalogs, one line each) - 0 issues

Previous review (commit 6a395ad)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Single-line English copy change; the placeholders ({{amount}}, {{date}}) and the key name are unchanged, so the component contract at apps/mobile/src/components/profile-credits-card.tsx:278 and the locale catalogs remain valid.

Files Reviewed (1 file)
  • apps/mobile/src/i18n/locales/en.json

Reviewed by deepseek-flash-latest · Input: 88.6K · Output: 5.1K · Cached: 806.9K

Review guidance: REVIEW.md from base branch main

@iscekic iscekic added the merge:human Substantive functional risk requires human review. label Oct 19, 2026
@iscekic iscekic added merge:blocked merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. merge:human Substantive functional risk requires human review. and removed merge:human Substantive functional risk requires human review. merge:bot Bot-owned review; merge when ready once readiness passes and a review approves. merge:blocked labels Oct 20, 2026
@iscekic
iscekic added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@iscekic
iscekic added this pull request to the merge queue Oct 21, 2026
@iscekic
iscekic removed this pull request from the merge queue due to a manual request Oct 21, 2026
@iscekic
iscekic added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
@iscekic

iscekic commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

Update the entire i18n catalog please

Paid credit expires too, so the line under the profile balance now names
the expiring credits instead of calling the whole amount bonus credit.
English moved in the previous commit; this one carries the same change
into the 86 translated catalogs: only the qualifier meaning "bonus" and
the grammar that depended on it change, and both placeholders stay as
they were.
@iscekic

iscekic commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator Author

bot: Done — all 86 translated catalogs now carry the change, not only English. Each value drops the qualifier that meant "bonus" and adjusts the grammar that depended on it; the key name, both placeholders, the register and the rest of each sentence stay as they were.

Verification on the head commit:

  • catalog parity check: 87 languages, every catalog matches English.
  • plural-category check and mobile format check: clean.
  • mobile i18n vitest: 17 files, 1697 tests passed.
  • a throwaway smoke (deleted before the commit) drove the app's own i18n instance through all 87 languages with returnDetails: true: every language answered from its own catalog, interpolated the amount and the date, left no placeholder behind, and no catalog still held the old English string.

Values, not keys: the English change and the key name are unchanged from the earlier commit.

@iscekic iscekic removed the merge:human Substantive functional risk requires human review. label Oct 22, 2026
The mounted credits-card suite now checks the line the card renders, so
its expected text and its filter follow the copy the catalog holds.
@iscekic iscekic added the merge:human Substantive functional risk requires human review. label Oct 22, 2026
@iscekic
iscekic added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit 622eeb1 Oct 22, 2026
80 checks passed
@iscekic
iscekic deleted the drain/profile-expiring-credit-copy branch October 22, 2026 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

drain Work item from the findings drain explorer:android Finding surfaced by the Android explorer merge:human Substantive functional risk requires human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants