diff --git a/apps/studio/compat/sentry-nextjs.ts b/apps/studio/compat/sentry-nextjs.ts index 0e2362f0bce..8666c90b2ac 100644 --- a/apps/studio/compat/sentry-nextjs.ts +++ b/apps/studio/compat/sentry-nextjs.ts @@ -6,8 +6,8 @@ * at module scope. Optional chaining does NOT guard an undeclared `process` * identifier in the browser, so any built chunk containing it throws * `ReferenceError: process is not defined` at load time (observed on the - * table editor route). The Vite dev server shims `process`, which is why - * this only surfaced in the production/test build. + * table editor route). The Vite dev server shims `process`, so the crash + * only surfaces in the production/test build. * * vite.config.ts aliases `@sentry/nextjs` to this module for the TanStack * build only — app source keeps importing `@sentry/nextjs`, and the Next diff --git a/apps/studio/lib/nuqs-tanstack-adapter.tsx b/apps/studio/lib/nuqs-tanstack-adapter.tsx index c2935765970..983047a9ca1 100644 --- a/apps/studio/lib/nuqs-tanstack-adapter.tsx +++ b/apps/studio/lib/nuqs-tanstack-adapter.tsx @@ -10,12 +10,12 @@ import { searchParamsToRecord, type SearchRecord } from './router-search-params' // `navigate({ to: renderQueryString(search) || '.', from })`. That shape is // doubly broken for us: // - TanStack resolves a `?`-only relative `to` by *appending* it to the -// current path, injecting a trailing slash — every nuqs write turned +// current path, injecting a trailing slash — every nuqs write turns // `/auth/providers?provider=x` into `/auth/providers/?provider=x`. // - Embedding the query string in `to` at all sends it through TanStack's // path interpolation, which percent-decodes and then strips control // characters — `%0A` newlines in values (e.g. Logs Explorer SQL in `s`) -// were silently deleted. +// are silently deleted. // So we navigate with `to` = the current pathname and the query as a // TanStack `search` *object*, which the router serialises through the app's // Next-style codec (lib/router-search-params) without touching the path diff --git a/apps/studio/styles/fonts.css b/apps/studio/styles/fonts.css index cf9d4eeed74..8d849661b2f 100644 --- a/apps/studio/styles/fonts.css +++ b/apps/studio/styles/fonts.css @@ -7,10 +7,9 @@ * --font-sans -> body (Inter) [theme.css: --font-sans] * --font-heading -> headings (Manrope) [globals.css @theme inline] * --font-source-code-pro -> mono (Source Code Pro) - * #47306 renamed the sans var from --font-custom to --font-sans and added - * --font-heading (Manrope); this file wasn't updated, so on TanStack the body - * fell through to the theme fallback chain (Circular/system) and headings had - * no Manrope. + * If a var is renamed on the Next side (fonts/index.ts / theme.css), rename it + * here too — otherwise the TanStack build silently falls through to the theme + * fallback chain. * * All three families are vendored below (matching next/font, which self-hosts * them on the Next build) so nothing depends on the Google Fonts CDN at runtime diff --git a/apps/studio/vite.config.ts b/apps/studio/vite.config.ts index 7cdf8515a72..b973fd0d13f 100644 --- a/apps/studio/vite.config.ts +++ b/apps/studio/vite.config.ts @@ -418,8 +418,7 @@ export default defineConfig(({ command, mode }) => { // transform above — a blanket `'define.amd': 'false'` define would also // rewrite the *read* in vendored bundles that install their own local // `define` shim (monaco-editor's `esm/vs/base/common/marked/marked.js`) - // and break them the same way an unguarded transform did — see the - // plugin's comment. + // and break them — see the plugin's comment for the failure mode. const sharedDefines = { global: 'globalThis', } @@ -444,7 +443,7 @@ export default defineConfig(({ command, mode }) => { // (`next/dist/shared/lib/constants`), whose module scope evaluates // `process?.features?.typescript` — optional chaining doesn't guard // an undeclared `process` in the browser, so every built chunk - // containing it (e.g. table-editor) crashed at load with + // containing it (e.g. table-editor) crashes at load with // "ReferenceError: process is not defined". Dev is unaffected // because the dev pipeline shims `process`. Point the bare import // at a shim that re-exports `@sentry/react` (same 10.x version — @@ -557,10 +556,9 @@ export default defineConfig(({ command, mode }) => { // entire exports object `{ default: fn }`, and call sites like // `AwesomeDebouncePromise(fn, 500)` crash with "is not a function" at // SSR module evaluation. Surfaces on routes that load the table grid. - // `@sentry/nextjs` itself needed CJS workarounds here (noExternal + - // ssr.optimizeDeps.include) — both dropped now that the resolve.alias + // `@sentry/nextjs` deliberately has no entry here: the resolve.alias // above rewrites it to the `@sentry/react`-backed shim before SSR - // resolution ever sees the id. `@sentry/react` ships real ESM + // resolution ever sees the id, and `@sentry/react` ships real ESM // ("import" condition → build/esm), so plain externalization works. noExternal: ['lodash', /^next(\/|$)/, 'tslib', 'react-use', 'awesome-debounce-promise'], },