Skip to content

fix(mobile): make app.config.ts resolve the languages import - #5473

Merged
iscekic merged 1 commit into
mainfrom
fix/mobile-expo-config-languages
Aug 25, 2026
Merged

fix(mobile): make app.config.ts resolve the languages import#5473
iscekic merged 1 commit into
mainfrom
fix/mobile-expo-config-languages

Conversation

@iscekic

@iscekic iscekic commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The mobile app config could not be read. Every local mobile prebuild failed, and the nightly release preflight failed with it.
  • The config now reads. A CI job checks it on every pull request, so the same break cannot reach main again.

Symptom

expo config failed on main:

Error: Error reading Expo config at apps/mobile/app.config.ts:
Cannot find module './src/i18n/languages'

That failure blocked two things:

  • Every local mobile prebuild, and with it the local E2E gate (see #5463 report).
  • The nightly kilo-app Release preflight, which fails at "Verify EAS production environment" because eas-cli spawns expo config --json (run 32816122305).

Cause

The Expo config loader transpiles app.config.ts and hands the result to Node. Node 24 resolves require('./x.ts') but not the extensionless require('./x'), and the transpiler keeps the specifier as written.

Every other app.config.ts import already points at a hand-written .js sibling — env-keys.js, sentry-dsn.js, url-contract.js, universal-link-paths.js. The languages import added by #5444 is the only one without one.

Fix

Import the module with its extension, and allow the extension in the app's tsconfig.

The alternative was a languages.js sibling holding the tag list. It widens SUPPORTED_LANGUAGES from a readonly tuple to string[], which erases the SupportedLanguage union that catalogs.ts, resolve-language.ts, language-rows.ts, rtl.ts, apply-language.ts, use-language-preference.ts, and two tests depend on.

Files
  • apps/mobile/app.config.ts — import ./src/i18n/languages.ts with its extension.
  • apps/mobile/tsconfig.jsonallowImportingTsExtensions, with the reason inline.

Guard

assert:config already evaluates the config, but it runs only in the nightly release workflow and needs the EAS production environment. No pull-request job read the config, so a broken import reached main twice (#5444, and the earlier break #5454 repaired). The typecheck job in kilo-app CI now reads the config. Missing environment variables only warn under GITHUB_ACTIONS, so the step needs no secret.

Files
  • .github/workflows/kilo-app-ci.yml — read the Expo config in the typecheck job.

Tests: none changed.
Generated: none.


Verification

Run from apps/mobile on this branch:

Check Result
npx expo config --type public exit 0
pnpm typecheck exit 0
pnpm test 568 files, 5894 tests passed
pnpm format:check exit 0

The guard was proven against the defect: with the two source changes stashed, pnpm --filter kilo-app exec expo config --type public exits 1; with them applied it exits 0.

Visual Changes

Visual Changes: N/A — build configuration only.

Human Steps

  • After merge, rerun kilo-app Release to confirm the preflight passes, or wait for the next scheduled run.

Reviewer Notes

  • The tsconfig relaxation is typecheck-only and scoped to apps/mobile. Metro never bundles app.config.ts, and no bundled source uses a .ts import specifier.

The Expo config loader transpiles app.config.ts and hands the result to
Node, which resolves require('./x.ts') but not the extensionless
require('./x'). Every other app.config.ts import points at a hand-written
.js sibling; the languages import added by #5444 has none, so
`expo config` failed with "Cannot find module './src/i18n/languages'".

That broke the nightly kilo-app release preflight (eas-cli spawns
`expo config --json`) and every local mobile prebuild. Import the module
with its .ts extension and allow the extension in the app's tsconfig.
Moving the list into a .js sibling was the alternative; it widens
SUPPORTED_LANGUAGES to string[] and breaks the SupportedLanguage union
that ten call sites depend on.

Read the config in kilo-app CI too. The release preflight was the only
job that evaluated app.config.ts, and it runs nightly, so a broken
import reached main twice.
@iscekic iscekic self-assigned this Aug 25, 2026
@kilo-code-bot

kilo-code-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Reviewed the Expo config languages import fix, mobile tsconfig change, and CI config-read guard with high confidence; no correctness or security issues.

Files Reviewed (3 files)
  • .github/workflows/kilo-app-ci.yml
  • apps/mobile/app.config.ts
  • apps/mobile/tsconfig.json

Reviewed by grok-4.6 · Input: 59.2K · Output: 8.6K · Cached: 366K

Review guidance: REVIEW.md from base branch main

@iscekic
iscekic enabled auto-merge (squash) August 25, 2026 09:33
@iscekic
iscekic merged commit a493dd4 into main Aug 25, 2026
19 checks passed
@iscekic
iscekic deleted the fix/mobile-expo-config-languages branch August 25, 2026 10:02
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.

2 participants