Repository navigation
fix(sdk): bump submodule for CORS User-Agent fix - #342
Merged
Merged
Conversation
Picks up Scaffald/sdk#7. The previous SDK release (#6) unblocked the apikey-header check at Kong, but exposed a second CORS-preflight failure: the SDK was sending `User-Agent: scaffald-sdk-js/0.1.0`, which is a forbidden request header in browsers and isn't in Kong's `Access-Control-Allow-Headers` list. Browsers (esp. Safari) rejected the preflight with: Request header field User-Agent is not allowed by Access-Control-Allow-Headers The SDK now sends `X-Client-Info` instead, which Kong allows by default. Also bumps scaffald-app patch version to 1.10.1. Co-Authored-By: Claude Opus 4.7 <[email protected]>
thinkclay
added a commit
that referenced
this pull request
Sep 15, 2026
…rew, and iPads got two layouts at once (#769) Closes #373 — the iPad audit that was filed as low priority and turned out to hold a P0. The native map has never rendered. mapboxStyleConfig.ts set the light style to mapbox://styles/mapbox/standard in fe152b1 (2026-03-13) and the dark style to a Scaffald style that imports it. Both need Mapbox Maps SDK v11; the app bundles MapboxMaps 10.19.5 (@rnmapbox/maps 10.1.45). On v10 the style request answers 200 — the token is fine, which is why #686/#694 could not have caught this — and the SDK paints nothing: a black map with markers floating on it. git tag --contains fe152b1 is every tag from app-v1.0.1 through app-v1.17.1, the build on TestFlight now. Proven by swapping in streets-v12 alone and watching the same screen render. Native now reads NATIVE_MAP_STYLE_CONFIG (streets-v12 / dark-v11); web keeps Standard, which mapbox-gl JS v3 draws. The SDK v11 move that lets native have Standard too is #765. Every Office table threw "Text strings must be rendered within a <Text> component" on native. columnsFromTanStack() hands flexRender()'s result to @scaffald/ui's Table, which drops render() output straight into a <View>; flexRender returns the raw value for any column without a custom cell. Web tolerates a bare string there, native does not. Primitives now get a <Text>. A 1032pt iPad Pro rendered the drawer's sidebar layout (width < 1024) and the map screen's phone layout (isSmallScreen = width <= 800 || isNativeMobile) at the same time, so the floating Map/List bar sat clipped over a desktop-width map. Phones are under 800 on every platform, so the native override only ever changed the answer for tablets, and changed it the wrong way. Width alone now. ui-sweep.mjs takes AUDIT_DEVICE (iphone | ipad-portrait | ipad-landscape | android) so #373's viewports and #372's web half are one command each; its login no longer clicks a terms checkbox the form has not had since #342; and it dismisses the dev error overlay the #681 hydration mismatch paints over every protected route at these widths. Three sweeps ran clean on --no-dev: 121 captures, 0 errors, no tablet-only layout break on web (768 gets the phone layout, 1024 gets the sidebar). Verified on the iPad Pro 13" simulator with an SDK 56 dev client built from this tree: map renders, Office loads without the error, sidebar + desktop map layout. Findings that need a decision rather than a fix are filed: #764 (native shows the web cookie banner), #765 (SDK v11). Two gotchas hit on the way and worth knowing: Metro OOMs when a native lazy route bundles during a web SSR sweep (#680) — keep the simulator idle while sweeping — and the preview launcher reads the main checkout's .claude/launch.json, not the worktree's. scf-core:typecheck clean; biome reports only pre-existing hits on untouched lines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Picks up Scaffald/sdk#7 — the SDK now sends
X-Client-Infoinstead ofUser-Agent.Live
app.scaffald.commagic-link was still broken after #341 merged because the SDK was settingUser-Agent: scaffald-sdk-js/0.1.0, which:Request header field User-Agent is not allowed by Access-Control-Allow-HeadersKong's
Access-Control-Allow-Headersisauthorization, x-client-info, apikey, content-type, x-trpc-source.X-Client-Infois the Supabase convention and is allowed by default.Changes
e99ecee(Scaffald/sdk PR Bump brace-expansion from 1.1.11 to 1.1.12 #7 merge SHA)apps/scaffaldpatch version bump → 1.10.1Test plan
app.scaffald.com/auth/login— confirm POST toauth.scaffald.com/functions/v1/api/v1/auth/magic-linksucceeds, magic-link email arrives🤖 Generated with Claude Code