Main -> Development#2358
Conversation
Bun's default isolated linker doesn't hoist transitive deps to locations Metro and native build scripts can resolve. Switching to hoisted mode creates a flat node_modules layout compatible with React Native tooling. Also adds react-native-css-interop as an explicit dep (previously only in the bun content-addressed store with no symlink).
@aws-sdk/xml-builder v3.894.0 switched S3 XML parsing to window.DOMParser in its browser bundle. Wrangler uses the browser esbuild condition, but Cloudflare Workers has no DOMParser or DOM Node constants. Polyfilling via @xmldom/xmldom causes TypeScript dom-lib type conflicts throughout the worker. Pinning below the breakpoint is the clean fix until AWS adds a workerd export condition. Refs: aws/aws-sdk-js-v3#7375 cloudflare/workers-sdk#10755
Template catalog items send notes: null but both CreatePackItemRequestSchema and UpdatePackItemRequestSchema only accepted string | undefined via .optional(). Changed both to .nullish() to accept null as well.
Plain View root caused LargeTitleHeader button/content to render behind the header on iOS. Matches the SafeAreaView pattern used by other screens such as gear-inventory.tsx.
Catalog items carry full https:// image URLs. Concatenating cacheDirectory with a URL produced an invalid local path that FileSystem.uploadAsync then tried to open, crashing with ERR_FILE_NOT_EXISTS. Guard both createPackItem and updatePackItem to only upload when the image is a local filename.
…View LargeTitleHeader.ios.tsx renders only Stack.Screen options (nothing in the RN tree); the native large title is transparent and overlays content. SafeAreaView only covers the device safe area, not the nav bar height. Fragment wrapper + contentInsetAdjustmentBehavior="automatic" lets iOS calculate the correct scroll inset, matching weather-alert-preferences.tsx.
…leHeader screens All 19 screens using LargeTitleHeader were missing this prop on their main scroll component, causing content to render behind the transparent native header on iOS. Fixes the overlap bug found on SeasonSuggestions.
- Remove .optional() from tags in generateObject schema; OpenAI structured output requires all properties in the required array - Fix Icon usage: pass namingScheme="sfSymbol" + name= so iconNames.sfSymbol is truthy on iOS, preventing fallthrough to MaterialCommunityIcons with MaterialIcons-only names (auto-awesome, eco, location-on)
Catalog template items store a full https:// URL in image. CachedImage uses the image field as a local filename (cacheDirectory + fileName), producing an invalid path like /Documents/images/https://... that downloadAsync then fails to create. Guard: if image is a remote URL, render <Image> directly — same check applied to uploadImage in packItems.ts.
…tem FK race - Add isRemoteUrl() to packages/guards/src/narrow.ts and remove the two inline copies in packItems.ts and PackItemImage.tsx - Delay item store writes by 1500ms in useCreatePackWithItems so the pack API call has time to commit before items are synced. Without this, Legend State's parallel sync triggers FK violations (23503) on pack_items. UI is unaffected — items appear immediately via optimistic store update.
parseISO('') crashes internally when date-fns tries to split an empty
string on 'T' and accesses the undefined second part. Accept
string | null | undefined, bail out early on falsy input, and skip
NaN dates. The pack/item timestamps can be absent before server sync.
…viver Legend State's `safeParse` silently converts ISO8601 strings to `Date` objects when loading from SQLite, causing `parseISO(Date)` to throw `dateString.split is not a function`. - Rewrote `getRelativeTime` to accept `Date | string | null | undefined` via a `toDate()` helper; `parseISO` removed in favour of `new Date()` - Added optional `t: TFunction` param so relative times are translated - Added `common.timeAgo.*` i18n keys (justNow + pluralised units) to en.json - Hardened `PackItem`, `Pack`, `PackWeightHistoryEntry` timestamp fields to `Date | string` to reflect runtime reality - Updated call sites in recent-packs and current-pack to pass `t`
Development -> main
- Remove the ENVIRONMENT=production 503 guard on /token — Basic-only remains valid when CF vars are absent (no CF account or misconfigured) - Add scoped CORS on adminRoutes (origin: admin.packratai.com, credentials: true) so the browser can send the CF Access session cookie cross-origin; CF edge then injects Cf-Access-Jwt-Assertion - Add credentials: 'include' to adminFetch and the login page fetch so the CF Access session cookie travels with every API request - Update /token CF check comment to reflect the browser flow - Update tests: replace 503 assertion with Basic-only-in-prod test
fix(admin): wire CF Access two-factor auth for browser SPA login
…ameterization fix(admin/analytics): use sql.raw for date_trunc period to avoid parameter mismatch
…teUrl guard + return types)
…tInsetAdjustmentBehavior
- PackItemDetailScreen: edges={['bottom']} — regular stack header already offsets content
- current-pack, weight-analysis, trail-conditions: strip manual paddingTop/insets since
contentInsetAdjustmentBehavior=automatic handles nav bar offset
…h contentInsetAdjustmentBehavior" This reverts commit 715a013.
…LargeTitleHeader screens" This reverts commit 4cc20ce.
…k-schema fix: iOS runtime crashes, date hardening, and icon fixes
chore: regenerate bun.lock after merge (fix frozen-lockfile CI)
…leHeader screens All 19 screens using LargeTitleHeader were missing this prop on their main scroll component, causing content to render behind the transparent native header on iOS. Fixes the overlap bug found on SeasonSuggestions.
…tInsetAdjustmentBehavior
- PackItemDetailScreen: edges={['bottom']} — regular stack header already offsets content
- current-pack, weight-analysis, trail-conditions: strip manual paddingTop/insets since
contentInsetAdjustmentBehavior=automatic handles nav bar offset
… / overlapping header in multiple screens
fix: iOS contentInsetAdjustmentBehavior for all LargeTitleHeader screens
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning
|
Coverage Report for Expo Unit Tests Coverage (./apps/expo)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Coverage Report for API Unit Tests Coverage (./packages/api)
File CoverageNo changed files found. |
No description provided.