Summary
After npm run rename (identity phase in setup:full, with --preserve-upstream), TypeScript fails in apps/mobile and apps/web billing screens because template code imports a product-prefixed meter constant from @adopter/config/billing that rename rewrites in adopter/ but not in apps/.
Steps to reproduce
-
Fork the template and run rename (preserve upstream is fine):
npm run rename -- --from "Beaker Stack" --to "NewApp" --preserve-upstream
-
Run type-check:
npm run type-check:mobile
# and/or npm run type-check:web
Actual behavior
adopter/config/billing.ts exports the renamed deprecated alias (e.g. NEWAPP_METER_AI_SUMMARIZE), but billing UI in apps/* still imports BEAKERSTACK_METER_AI_SUMMARIZE:
src/screens/billing/BillingOverviewScreen.tsx:16:3 - error TS2724:
'"@adopter/config/billing"' has no exported member named 'BEAKERSTACK_METER_AI_SUMMARIZE'.
Did you mean 'NEWAPP_METER_AI_SUMMARIZE'?
Affected files (template):
apps/mobile/src/screens/billing/BillingOverviewScreen.tsx
apps/mobile/src/screens/billing/BillingUsageScreen.tsx
apps/web/src/pages/billing/BillingOverviewPage.tsx
apps/web/src/pages/billing/BillingPlansPage.tsx
apps/web/src/pages/billing/BillingUsagePage.tsx
apps/web/src/billing/__tests__/beakerstackBillingConfig.test.ts
Pre-commit husky hook fails on type-check:mobile.
Expected behavior
Rename + preserve-upstream should not leave apps/* importing symbols that only exist under the old product prefix in adopter/config/billing.ts.
adopter/config/billing.ts already documents the stable export:
export const METER_AI_SUMMARIZE = 'ai_summarize' as const;
/** @deprecated Use METER_AI_SUMMARIZE */
export const beakerstackMeterAiSummarize = ... // renamed on rebrand
Template billing UI in apps/* should import METER_AI_SUMMARIZE (brand-agnostic), matching adopter dashboard code that already uses it (e.g. adopter/mobile/screens/DashboardScreen.tsx).
Root cause
Same class of issue as #379: npm run rename only walks adopter/, while apps/mobile and apps/web retain hardcoded BEAKERSTACK_* imports from @adopter/config/billing.
Suggested fix
- Template: Change all
apps/* billing imports from BEAKERSTACK_METER_AI_SUMMARIZE → METER_AI_SUMMARIZE.
- Rename (optional hardening): Either extend rename to patch known
apps/* import sites, or stop exporting product-prefixed meter aliases from adopter/config/billing.ts (keep only METER_AI_SUMMARIZE + deprecated beakerstackBillingConfig in preserve mode).
- Docs: Note in
docs/renaming.md that adopter renames change deprecated prefixed exports and apps/* must use stable names.
Workaround (adopters)
Replace imports in the six files above:
import { billingConfig, METER_AI_SUMMARIZE } from '@adopter/config/billing';
Summary
After
npm run rename(identity phase insetup:full, with--preserve-upstream), TypeScript fails inapps/mobileandapps/webbilling screens because template code imports a product-prefixed meter constant from@adopter/config/billingthat rename rewrites inadopter/but not inapps/.Steps to reproduce
Fork the template and run rename (preserve upstream is fine):
Run type-check:
npm run type-check:mobile # and/or npm run type-check:webActual behavior
adopter/config/billing.tsexports the renamed deprecated alias (e.g.NEWAPP_METER_AI_SUMMARIZE), but billing UI inapps/*still importsBEAKERSTACK_METER_AI_SUMMARIZE:Affected files (template):
apps/mobile/src/screens/billing/BillingOverviewScreen.tsxapps/mobile/src/screens/billing/BillingUsageScreen.tsxapps/web/src/pages/billing/BillingOverviewPage.tsxapps/web/src/pages/billing/BillingPlansPage.tsxapps/web/src/pages/billing/BillingUsagePage.tsxapps/web/src/billing/__tests__/beakerstackBillingConfig.test.tsPre-commit husky hook fails on
type-check:mobile.Expected behavior
Rename + preserve-upstream should not leave
apps/*importing symbols that only exist under the old product prefix inadopter/config/billing.ts.adopter/config/billing.tsalready documents the stable export:Template billing UI in
apps/*should importMETER_AI_SUMMARIZE(brand-agnostic), matching adopter dashboard code that already uses it (e.g.adopter/mobile/screens/DashboardScreen.tsx).Root cause
Same class of issue as #379:
npm run renameonly walksadopter/, whileapps/mobileandapps/webretain hardcodedBEAKERSTACK_*imports from@adopter/config/billing.Suggested fix
apps/*billing imports fromBEAKERSTACK_METER_AI_SUMMARIZE→METER_AI_SUMMARIZE.apps/*import sites, or stop exporting product-prefixed meter aliases fromadopter/config/billing.ts(keep onlyMETER_AI_SUMMARIZE+ deprecatedbeakerstackBillingConfigin preserve mode).docs/renaming.mdthat adopter renames change deprecated prefixed exports andapps/*must use stable names.Workaround (adopters)
Replace imports in the six files above: