Mobile SDK extraction, MobileRouter, CI gates, mounted test harness, and font bundle trim#4695
Mobile SDK extraction, MobileRouter, CI gates, mounted test harness, and font bundle trim#4695iscekic wants to merge 11 commits into
Conversation
…re-export from web
…he divergent resolvers
…Material-Symbols font chain
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThis is a mechanical SDK/package extraction and CI-tooling PR (import-path rewrites, new workspace packages, font-bundle trim, CI gating) with no behavior-changing logic in the reviewed diff; no security, correctness, or memory-leak issues were found in changed lines. Files Reviewed (226 files)
Special attention was given to the Metro Reviewed by claude-sonnet-5 · Input: 32 · Output: 17.3K · Cached: 863.8K Review guidance: REVIEW.md from base branch |
Mobile-audit package W1-C — "SDK and CI foundation." Packaging, CI, test-infrastructure, and bundle-size work. No user-facing feature, trigger, message, or CTA changes; runtime behavior and rendered UI are unchanged (only import paths, type surfaces, CI selection, test tooling, and shipped font bytes change).
Slices
packages/cloud-agent-sdk): moved the SDK source out ofapps/webinto a workspace package that ships TypeScript source via itsexportsmap (no rolled dist). Rewrote intra-package@/specifiers, gaveSendMessagePayloada single client-safe home in the package, and migrated all 28 web import sites. No dual source.@kilocode/cloud-agent-sdk; removed the three divergent resolvers (thetsconfig/metro/vitestcloud-agent-sdk+ web-pointing aliases) while preserving the app-wide@/*→./src/*alias. One source, one resolution path.MobileRouter(packages/trpc): newsrc/mobile.ts→dist/mobile.d.ts+ a./mobileexport subpath; the 9 mobileRootRouterconsumers now import@kilocode/trpc/mobile. Web (RootRouter/dist/index.d.ts) is unchanged.dist/mobile.d.tsis 48.75% smaller thandist/index.d.ts(582,744 vs 1,137,085 bytes).kilo-app-ci.ymlnow runspnpm --filter kilo-app testand exposesworkflow_call;kilo-app-release.ymlgatesbuild-and-submiton validation viauses:(intra-workflowneeds:).kilo-app-ci.yml/kilo-app-release.ymlpath filters to the real mobile-input packages, and madescripts/changed-workspaces.shwalk theworkspace:*dependency graph (pnpm --filter "...^<name>"dependents + the changed package), instead of the blanket all-workspaces flag. Force-all is kept only for lockfile/workspace-yaml/loosepackages/*changes.changed-workspaces.shnow reads the pushbeforeSHA from$GITHUB_EVENT_PATH(all-zeros/invalid →HEAD~1), so a push tomainno longer produces an empty validation matrix;pull_requestand local runs keep merge-base behavior.react-test-renderer, node env, no jsdom).renderWithProvidersprovidesQueryClientProvider+ a fresh test client, plus one representative mounted test asserting a TanStack Query pending→success transition.resolveRequestshim resolves the unused Material Symbols chain to an empty module (the app renders lucide icons and never mountsNativeTabs/SymbolView).Measured bundle impact (
expo export, before → after)Material
.ttfcount is 0 on both platforms after the change; JetBrains drops from 16 weights to 2. Both platform exports succeed with the shim in place (Metro resolves the full<Tabs>graph).Validation
typecheck,lint,check:unused,format, andtest(206 files / 1641 tests) green.typecheck+lintgreen (28 migrated import sites). cloud-agent-sdk:typecheck+ tests (27 suites / 1045 tests) green.@kilocode/trpcbuilds.packages/app-shared,packages/cloud-agent-sdk,apps/mobile, a non-mobile web change) and simulatedpush/pull_request/all-zeros base SHAs.No device E2E: every acceptance criterion is targeted / CI / artifact / bundle. The
expo exportmeasurements and CI simulations are the evidence.Notes / follow-ups (non-blocking)
SymbolView; if a future change adds native Android tab icons viaexpo-symbols, the shim (which resolves those modules to empty) must be revisited. This invariant is documented inline inmetro.config.js.changed-workspaces.sh's event/dependent logic is verified by inspection and simulation; a scripted unit test for thepush/all-zeros path is a reasonable future addition.