Skip to content

chore(mobile): remove dead Kilo Pass tier-description helper - #6454

Open
iscekic wants to merge 1 commit into
mainfrom
kwf/janitor-2026-09-21-maintainability-5096
Open

iscekic wants to merge 1 commit into
mainfrom
kwf/janitor-2026-09-21-maintainability-5096

Conversation

@iscekic

@iscekic iscekic commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Changelog for users

  • No user-visible change: Kilo Pass tier cards still show " paid credits added monthly for Kilo App usage." in the active language.

Changelog for maintainers

  • Delete the unused formatKiloPassTierDescription helper, a superseded copy of the tier-card formatting.
  • Delete subscription-page-copy.test.ts, which exercised only the deleted helper.
  • Remove the inert vi.mock('@/lib/kilo-pass/subscription-page-copy') block from the subscription-screen test.
  • The subscription screen keeps its inline formatUsd(..., i18n.language, { minimumFractionDigits: 0, maximumFractionDigits: 2 }) call, so the kiloPass.tierDescription key stays in use.
  • Review first: confirm no remaining references with rg "subscription-page-copy|formatKiloPassTierDescription" apps/mobile (no matches).
  • iOS tier-card verification is skipped and pending owner verification; the harness host had no iOS simulator.

E2E proof

[e1] Kilo Pass subscription screen renders every tier-description in the active language (android) — Android (emulator-5554): the digest carries 'SCENE e1 OK' with all three cards — '$199 paid credits added monthly for Kilo App usage.', '$49 paid credits added monthly for Kilo App usage.', '$19 paid credits added monthly for Kilo App usage.' — and screenshot e1.png; e1-nextjs.log shows 'POST /api/trpc/kiloPass.getMobileStoreProducts?batch=1 200'. Tier cards required a temporary, reverted store-products fixture (emulator has no Play Store service); the plan's dev:capture log cannot name this client-rendered string — plan defect, no logging added.

[e1] Kilo Pass subscription screen renders every tier-description in the active language (android) — e2e-mobile-app/e1.png

[e3] Tier-description re-renders in the newly active language (android) — Android (emulator-5554): after switching the app language to Deutsch, e3-scene.log carries 'SCENE e3 OK' and 'Du erhältst monatlich 19 $ als bezahltes Guthaben für die Nutzung der Kilo App.' (plus the 199 $ and 49 $ cards) with locale-formatted prices, proving the screen still reads useTranslation/formatUsd; screenshot e3.png. Same temporary store-products fixture as e1, reverted before finishing.

[e3] Tier-description re-renders in the newly active language (android) — e2e-mobile-app/e3.png

[e2] On an iOS simulator, repeat the same tier-card check; if no iOS device is available in the harness, record iOS as skipped and pending owner verification rather than passed. — Proven on android emulator-5604 (only platform on this host): the Kilo Pass subscription screen renders '$199 paid credits added monthly for Kilo App usage.', '$49 paid credits added monthly for Kilo App usage.' and '$19 paid credits added monthly for Kilo App usage.' in the SCENE e2 digest (e2-tier-card.log lines 11,15,19) with a tier-card capture at e2-tiers-android.png and e2.png; the deleted helper is absent from the packed tree (e2-deletion.log empty, rg exit 1). iOS was unavailable (IOS BOOTED none), so its repeat is skipped and pending owner verification. UX audit of Home, Profile and…

[e2] On an iOS simulator, repeat the same tier-card check; if no iOS device is available in the harness, record iOS as skipped and pending owner verification rather than passed. — e2e-mobile-app/e2-tiers-android.png

[e2] On an iOS simulator, repeat the same tier-card check; if no iOS device is available in the harness, record iOS as skipped and pending owner verification rather than passed.

[e2] On an iOS simulator, repeat the same tier-card check; if no iOS device is available in the harness, record iOS as skipped and pending owner verification rather than passed. — e2e-mobile-app/e2.png

E2E proof — log excerpts

[e1] Kilo Pass subscription screen renders every tier-description in the active  -> pass :: Android (emulator-5554): the digest carries 'SCENE e1 OK' with all three cards — '$199 paid credits added monthly for Kilo App usage.', '$49 paid credits added monthly for Kilo App usage.', '$19 paid credits added monthly for Kilo App usage.' — and screenshot e1.png; e1-nextjs.log shows 'POST /api/trpc/kiloPass.getMobileStoreProducts?batch=1 200'. Tier cards required a temporary, reverted store-products fixture (emulator has no Play Store service); the plan's dev:capture log cannot name this client-rendered string — plan defect, no logging added.
[e3] Tier-description re-renders in the newly active language (android) -> pass :: Android (emulator-5554): after switching the app language to Deutsch, e3-scene.log carries 'SCENE e3 OK' and 'Du erhältst monatlich 19 $ als bezahltes Guthaben für die Nutzung der Kilo App.' (plus the 199 $ and 49 $ cards) with locale-formatted prices, proving the screen still reads useTranslation/formatUsd; screenshot e3.png. Same temporary store-products fixture as e1, reverted before finishing.
[e2] On an iOS simulator, repeat the same tier-card check; if no iOS device is a -> pass :: Proven on android emulator-5604 (only platform on this host): the Kilo Pass subscription screen renders '$199 paid credits added monthly for Kilo App usage.', '$49 paid credits added monthly for Kilo App usage.' and '$19 paid credits added monthly for Kilo App usage.' in the SCENE e2 digest (e2-tier-card.log lines 11,15,19) with a tier-card capture at e2-tiers-android.png and e2.png; the deleted helper is absent from the packed tree (e2-deletion.log empty, rg exit 1). iOS was unavailable (IOS BOOTED none), so its repeat is skipped and pending owner verification. UX audit of Home, Profile and Kilo Pass: no layout shift, no duplicate loading indicator, retryable error carries a 'Try again' act
/home/igor_kilocode_ai/.local/share/kwf/sections/janitor-2026-09-21-maintainability-5096/e2e-mobile-app/e1-scene.log
android.widget.TextView Could not connect to Google Play. Check your connection and try again. tappable [46,323][1036,415]
android.widget.Button Retry loading Kilo Pass tappable [46,443][263,558]
android.widget.TextView Try again tappable [85,477][223,523]
android.widget.Button $199 in credits, $19.00/mo [46,586][1034,790]
android.widget.TextView $199 in credits tappable [95,635][766,691]
android.widget.TextView $19.00/mo tappable [802,635][986,691]
android.widget.TextView $199 paid credits added monthly for Kilo App usage. tappable [95,704][766,741]
android.widget.Button $49 in credits, $19.00/mo [46,818][1034,1022]
android.widget.TextView $49 in credits tappable [95,867][766,923]
android.widget.TextView $19.00/mo tappable [802,867][986,923]
android.widget.TextView $49 paid credits added monthly for Kilo App usage. tappable [95,936][766,973]
android.widget.Button $19 in credits, $19.00/mo [46,1049][1034,1253]
android.widget.TextView $19 in credits tappable [95,1098][766,1154]
android.widget.TextView $19.00/mo tappable [802,1098][986,1154]
android.widget.TextView $19 paid credits added monthly for Kilo App usage. tappable [95,1167][766,1204]
android.widget.Button Restore Purchases tappable [373,1281][707,1397]
android.widget.TextView Restore Purchases tappable [400,1315][679,1361]
android.widget.TextView Kilo Pass is an auto-renewable monthly subscription. Payment is charged to your Google Play account at confirmation of purchase. Subscriptions renew automatically each month at
android.widget.Button Terms of Use (EULA) tappable [840,1580][1018,1617]
android.widget.Button Privacy Policy tappable [422,1617][588,1654]
android.view.ViewGroup !, [Expo-IAP] Error fetching available purchases: Error: Play Store service is not connected tappable [26,2146][1054,2271]
/home/igor_kilocode_ai/.local/share/kwf/sections/janitor-2026-09-21-maintainability-5096/e2e-mobile-app/e1-nextjs.log
 POST /api/trpc/activeSessions.list?batch=1 200 in 145ms (next.js: 53ms, proxy.ts: 10ms, application-code: 81ms)
 POST /api/trpc/kiloPass.getMobileStoreProducts,user.getMe,kiloPass.getPurchasePresentation?batch=1 200 in 44ms (next.js: 14ms, proxy.ts: 10ms, application-code: 19ms)
 POST /api/trpc/kiloPass.getMobileStoreProducts?batch=1 200 in 29ms (next.js: 11ms, proxy.ts: 8ms, application-code: 11ms)
 POST /api/trpc/kiloPass.getMobileStoreProducts?batch=1 200 in 79ms (next.js: 51ms, proxy.ts: 9ms, application-code: 19ms)
 POST /api/trpc/kiloPass.getMobileStoreProducts?batch=1 200 in 112ms (next.js: 47ms, proxy.ts: 13ms, application-code: 52ms)
 GET /api/app/min-version 200 in 23ms (next.js: 3ms, proxy.ts: 4ms, application-code: 15ms)
 POST /api/trpc/activeSessions.list?batch=1 200 in 87ms (next.js: 28ms, proxy.ts: 6ms, application-code: 52ms)
 POST /api/trpc/activeSessions.list?batch=1 200 in 130ms (next.js: 45ms, proxy.ts: 13ms, application-code: 73ms)
/home/igor_kilocode_ai/.local/share/kwf/sections/janitor-2026-09-21-maintainability-5096/e2e-mobile-app/e3-scene.log
android.widget.Button 199 $ Guthaben, $19.00/Monat [46,586][1034,827]
android.widget.TextView 199 $ Guthaben tappable [95,635][713,691]
android.widget.TextView $19.00/Monat tappable [749,635][986,691]
android.widget.TextView Du erhältst monatlich 199 $ als bezahltes Guthaben für die Nutzung der Kilo App. tappable [95,704][713,778]
android.widget.Button 49 $ Guthaben, $19.00/Monat [46,855][1034,1096]
android.widget.TextView 49 $ Guthaben tappable [95,904][713,960]
android.widget.TextView $19.00/Monat tappable [749,904][986,960]
android.widget.TextView Du erhältst monatlich 49 $ als bezahltes Guthaben für die Nutzung der Kilo App. tappable [95,973][713,1047]
android.widget.Button 19 $ Guthaben, $19.00/Monat [46,1123][1034,1364]
android.widget.TextView 19 $ Guthaben tappable [95,1172][713,1228]
android.widget.TextView $19.00/Monat tappable [749,1172][986,1228]
android.widget.TextView Du erhältst monatlich 19 $ als bezahltes Guthaben für die Nutzung der Kilo App. tappable [95,1241][713,1315]
android.widget.Button Käufe wiederherstellen tappable [342,1392][738,1508]
android.widget.TextView Käufe wiederherstellen tappable [369,1426][710,1472]
android.widget.TextView Kilo Pass ist ein automatisch verlängerbares Monatsabonnement. Die Zahlung wird bei Kaufbestätigung deinem Google-Play-Konto belastet. Abonnements verlängern sich automatisch j
android.widget.Button Nutzungsbedingungen (EULA) tappable [518,1765][886,1802]
android.widget.Button Datenschutzerklärung tappable [482,1802][748,1839]
android.view.ViewGroup !, [Expo-IAP] Error fetching available purchases: Error: Play Store service is not connected tappable [26,2146][1054,2271]
android.widget.TextView ! tappable [73,2185][100,2233]
/home/igor_kilocode_ai/.local/share/kwf/sections/janitor-2026-09-21-maintainability-5096/e2e-mobile-app/e2-tier-card.log
android.view.ViewGroup kilo-pass-native-iap tappable [0,0][1080,2400]
android.widget.Button Go back tappable [37,84][138,185]
android.view.View Kilo Pass tappable [138,102][944,167]
android.widget.TextView A monthly subscription that adds credits to your Kilo balance for running AI coding sessions in Kilo App. tappable [46,213][1036,296]
android.widget.Button $199 in credits, $19.00/mo [46,324][1034,528]
android.widget.TextView $199 in credits tappable [95,373][766,429]
android.widget.TextView $19.00/mo tappable [802,373][986,429]
android.widget.TextView $199 paid credits added monthly for Kilo App usage. tappable [95,442][766,479]
android.widget.Button $49 in credits, $19.00/mo [46,555][1034,759]
android.widget.TextView $49 in credits tappable [95,604][766,660]
android.widget.TextView $19.00/mo tappable [802,604][986,660]
android.widget.TextView $49 paid credits added monthly for Kilo App usage. tappable [95,673][766,710]
android.widget.Button $19 in credits, $19.00/mo [46,787][1034,991]
android.widget.TextView $19 in credits tappable [95,836][766,892]
android.widget.TextView $19.00/mo tappable [802,836][986,892]
android.widget.TextView $19 paid credits added monthly for Kilo App usage. tappable [95,905][766,942]
android.widget.Button Restore Purchases tappable [373,1018][707,1133]
android.widget.TextView Restore Purchases tappable [400,1052][679,1098]
android.widget.TextView Kilo Pass is an auto-renewable monthly subscription. Payment is charged to your Google Play account at confirmation of purchase. Subscriptions renew automatically each month at
android.widget.Button Terms of Use (EULA) tappable [840,1318][1018,1355]
android.widget.Button Privacy Policy tappable [422,1355][588,1392]
Owner request

Surface: the mobile app (apps/mobile).

Delete the dead Kilo Pass copy helper and stop mocking a module that no screen imports.

Problem
apps/mobile/src/lib/kilo-pass/subscription-page-copy.ts exports a single function, formatKiloPassTierDescription (line 4). No production module imports it: a repo-wide search for subscription-page-copy and formatKiloPassTierDescription matches only its own test and an inert Vitest mock. The Kilo Pass subscription screen inlines the same formatting instead (apps/mobile/src/components/kilo-pass/kilo-pass-subscription-screen.tsx:439-444 builds kiloPass.tierDescription with the same formatUsd(..., i18n.language, { minimumFractionDigits: 0, maximumFractionDigits: 2 })), so the helper is a superseded second copy of the logic.

Evidence

  • apps/mobile/src/lib/kilo-pass/subscription-page-copy.ts:4 — the only export.
  • apps/mobile/src/lib/kilo-pass/subscription-page-copy.test.ts:3,7 — the only importer; the test exercises the dead function only.
  • apps/mobile/src/components/kilo-pass/kilo-pass-subscription-screen.test.ts:130-132 — vi.mock('@/lib/kilo-pass/subscription-page-copy', () => ({ formatKiloPassTierDescription: () => 'description' })); the screen imports no such module (its imports are at screen.tsx:1-31), so the mock is inert today and would fail to resolve if the file were deleted without also removing the mock.
  • apps/mobile/src/components/kilo-pass/kilo-pass-subscription-screen.tsx:439-444 — the live inline copy that supersedes the helper.
  • kiloPass.tierDescription stays in use (en.json:2837 via the inline call), so the i18n key is not orphaned.

Requested behavior

  1. Delete apps/mobile/src/lib/kilo-pass/subscription-page-copy.ts.
  2. Delete apps/mobile/src/lib/kilo-pass/subscription-page-copy.test.ts (it tests the deleted dead function).
  3. Remove the now-inert vi.mock('@/lib/kilo-pass/subscription-page-copy', ...) block from apps/mobile/src/components/kilo-pass/kilo-pass-subscription-screen.test.ts (lines 130-132).

This is a no-behavior-change deletion: the screen keeps its inline tier-description formatting and every other copy path is untouched.

Exclusions

  • Do not touch Kilo Claw or Kilo Chat.
  • No backend, shared-package, schema, dependency, or i18n-catalog changes.
  • Do not re-wire the screen to the helper; the goal is to delete the dead second copy, not to change language reactivity from useTranslation() to module-level i18n.t.
  • Do not remove the kiloPass.tierDescription key.

Acceptance checks (run from apps/mobile)

  • rg -n "subscription-page-copy|formatKiloPassTierDescription" apps/mobile returns no matches.
  • pnpm format:check && pnpm typecheck && pnpm lint && pnpm check:unused all pass, and check:unused reports no unused file or module for the deleted path.
  • pnpm test passes, including src/components/kilo-pass/kilo-pass-subscription-screen.test.ts with the removed mock.
  • git diff --check is clean.

E2E proof (normal workflow; start the backend and Metro yourself)

  • Mount the app on an Android emulator and open the Kilo Pass subscription screen; confirm each tier card still renders " paid credits added monthly for Kilo App usage." for the active language. Capture a decisive sanitized log excerpt naming the rendered tier-description string, plus a screenshot of the tier card.
  • Repeat on an iOS simulator where the harness supports it. The change is platform-agnostic JS, so if iOS is unavailable, state that in the PR and keep both platforms in scope.
  • Flag any check you cannot run as skipped and pending owner verification; do not report it as passed.

Prerequisites

  • Install dependencies and run the mobile checks from apps/mobile per apps/mobile/AGENTS.md; the repository dev runner owns Metro and pnpm start must not be run.

Follow-ups (not changed here)

  • not proved live: On an Android emulator, open the Kilo Pass subscription screen and confirm every tier card renders ' paid credits added monthly for Kilo App usage.' for the active language; capture a sanitized log excerpt naming the rendered tier-description string and a screenshot of a tier card. (no capture cited it)
  • not proved live: On either device, change the active language and confirm the tier-description still re-renders in the newly active language (proves the screen still reads useTranslation/formatUsd and was not re-wired to the deleted module-level helper). (no capture cited it)
  • not proved live: iOS: not run — the diff forks on no platform, so Android proves both

Surface: the mobile app (apps/mobile).

Delete the dead Kilo Pass copy helper and stop mocking a module that no screen imports.

Problem
`apps/mobile/src/lib/kilo-pass/subscription-page-copy.ts` exports a single function, `formatKiloPassTierDescription` (line 4). No production module imports it: a repo-wide search for `subscription-page-copy` and `formatKiloPassTierDescription` matches only its own test and an inert Vitest mock. The Kilo Pass subscription screen inlines the same formatting instead (`apps/mobile/src/components/kilo-pass/kilo-pass-subscription-screen.tsx:439-444` builds `kiloPass.tierDescription` with the same `formatUsd(..., i18n.language, { minimumFractionDigits: 0, maximumFractionDigits: 2 })`), so the helper is a superseded second copy of the logic.

Evidence
- apps/mobile/src/lib/kilo-pass/subscription-page-copy.ts:4 — the only export.
- apps/mobile/src/lib/kilo-pass/subscription-page-copy.test.ts:3,7 — the only importer; the test exercises the dead function only.
- apps/mobile/src/components/kilo-pass/kilo-pass-subscription-screen.test.ts:130-132 — `vi.mock('@/lib/kilo-pass/subscription-page-copy', () => ({ formatKiloPassTierDescription: () => 'description' }))`; the screen imports no such module (its imports are at screen.tsx:1-31), so the mock is inert today and would fail to resolve if the file were deleted without also removing the mock.
- apps/mobile/src/components/kilo-pass/kilo-pass-subscription-screen.tsx:439-444 — the live inline copy that supers
@iscekic iscekic added the kwf-janitor Nightly mobile janitor request label Sep 21, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Verified the dead-helper removal is self-consistent: no remaining references to subscription-page-copy or formatKiloPassTierDescription exist anywhere in the repo, the deleted test was the only importer, and the removed vi.mock block was inert because the screen test imports no such module. The live inline t('kiloPass.tierDescription', { price: formatUsd(...) }) path in kilo-pass-subscription-screen.tsx:439 keeps the i18n key in use.

Files Reviewed (3 files)
  • apps/mobile/src/components/kilo-pass/kilo-pass-subscription-screen.test.ts
  • apps/mobile/src/lib/kilo-pass/subscription-page-copy.test.ts (deleted)
  • apps/mobile/src/lib/kilo-pass/subscription-page-copy.ts (deleted)

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@iscekic

iscekic commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator Author

This description names a scenario the proof did not capture:

  • not proved live: On an Android emulator, open the Kilo Pass subscription screen and confirm every tier card renders ' paid credits added monthly for Kilo App usage.' for the active language; capture a sanitized log excerpt naming the rendered tier-description string and a screenshot of a tier card. (no capture cited it)

A repeated proof run rebuilds the same evidence, so no proof run is dispatched for a named gap. Merging with this gap open is your decision.

@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 21, 2026
@iscekic iscekic self-assigned this Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review. kwf-janitor Nightly mobile janitor request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant