Skip to content

Commit c159e41

Browse files
authored
Merge branch 'dev' into add-fix-command
2 parents c3afc02 + 647883c commit c159e41

43 files changed

Lines changed: 1976 additions & 384 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/CLAUDE-KNOWLEDGE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,3 +400,9 @@ A: Root `dev` starts the OpenAPI docs watcher at the same time as package `dev`
400400

401401
## Q: How do SDK source tests replace the compile-time client version sentinel?
402402
A: `packages/template/vitest.config.ts` installs a Vite transform plugin for Vitest that replaces `STACK_COMPILE_TIME_CLIENT_PACKAGE_VERSION_SENTINEL` with `js <package-name>@<version>` from the local package.json. Keep the plugin in `packages/template` so `pnpm pre`/`scripts/generate-sdks.ts` propagates it to `packages/js`, `packages/react`, and `packages/stack`; otherwise tests importing `common.ts` throw `Client version was not replaced` before test collection.
403+
404+
## Q: How does the Mintlify apps sidebar filter stay in sync with theme changes?
405+
A: `docs-mintlify/apps-sidebar-filter.js` injects the Apps filter with inline styles, so the MutationObserver must reapply `applySidebarAppsFilterTheme` when an existing input is found. Theme detection should handle both `html.dark` and `data-theme="dark"` signals.
406+
407+
## Q: How should `StackAssertionError` preserve an underlying thrown error?
408+
A: Pass the underlying error as the `cause` property in the second argument. The `StackAssertionError` constructor only forwards `cause` into `ErrorOptions`, so storing a caught error under an `error` property captures it as ordinary metadata instead of preserving the error cause chain.

.github/workflows/db-migration-backwards-compatibility.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ jobs:
169169
wait-for: 30s
170170
log-output-if: true
171171

172+
- name: Start stack-mcp in background
173+
uses: JarvusInnovations/background-action@v1.0.7
174+
with:
175+
run: pnpm run start:mcp --log-order=stream &
176+
wait-on: |
177+
http://localhost:8144/health
178+
tail: true
179+
wait-for: 30s
180+
log-output-if: true
181+
172182
- name: Start stack-dashboard in background
173183
uses: JarvusInnovations/background-action@v1.0.7
174184
with:
@@ -366,6 +376,16 @@ jobs:
366376
wait-for: 30s
367377
log-output-if: true
368378

379+
- name: Start stack-mcp in background
380+
uses: JarvusInnovations/background-action@v1.0.7
381+
with:
382+
run: pnpm run start:mcp --log-order=stream &
383+
wait-on: |
384+
http://localhost:8144/health
385+
tail: true
386+
wait-for: 30s
387+
log-output-if: true
388+
369389
- name: Start stack-dashboard in background
370390
uses: JarvusInnovations/background-action@v1.0.7
371391
with:

.github/workflows/e2e-api-tests-local-emulator.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ jobs:
119119
tail: true
120120
wait-for: 30s
121121
log-output-if: true
122+
- name: Start stack-mcp in background
123+
uses: JarvusInnovations/background-action@v1.0.7
124+
with:
125+
run: pnpm run start:mcp --log-order=stream &
126+
wait-on: |
127+
http://localhost:8144/health
128+
tail: true
129+
wait-for: 30s
130+
log-output-if: true
122131

123132
- name: Start stack-dashboard in background
124133
uses: JarvusInnovations/background-action@v1.0.7

.github/workflows/e2e-api-tests.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@ jobs:
125125
tail: true
126126
wait-for: 30s
127127
log-output-if: true
128+
- name: Start stack-mcp in background
129+
uses: JarvusInnovations/background-action@v1.0.7
130+
with:
131+
run: pnpm run start:mcp --log-order=stream &
132+
wait-on: |
133+
http://localhost:8144/health
134+
tail: true
135+
wait-for: 30s
136+
log-output-if: true
128137
- name: Start stack-dashboard in background
129138
uses: JarvusInnovations/background-action@v1.0.7
130139
with:

.github/workflows/e2e-custom-base-port-api-tests.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,15 @@ jobs:
118118
tail: true
119119
wait-for: 30s
120120
log-output-if: true
121+
- name: Start stack-mcp in background
122+
uses: JarvusInnovations/background-action@v1.0.7
123+
with:
124+
run: pnpm run start:mcp --log-order=stream &
125+
wait-on: |
126+
http://localhost:6744/health
127+
tail: true
128+
wait-for: 30s
129+
log-output-if: true
121130
- name: Start stack-dashboard in background
122131
uses: JarvusInnovations/background-action@v1.0.7
123132
with:

apps/backend/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
"@stackframe/stack-shared": "workspace:*",
8888
"@upstash/qstash": "^2.8.2",
8989
"@vercel/functions": "^2.0.0",
90-
"@vercel/mcp-adapter": "^1.0.0",
9190
"@vercel/otel": "^1.10.4",
9291
"@vercel/sandbox": "^1.2.0",
9392
"ai": "^6.0.0",

apps/backend/src/app/api/internal/[transport]/route.ts

Lines changed: 0 additions & 105 deletions
This file was deleted.

apps/backend/src/app/api/latest/connected-accounts/access-token-helpers.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ function captureOAuthAccessTokenRefreshIssue(options: {
2626
attempts: options.refreshError.attempts,
2727
retryCount: options.refreshError.retryCount,
2828
sawAmbiguousRefreshAttempt: options.refreshError.sawAmbiguousRefreshAttempt,
29-
error: options.refreshError.cause,
3029
causes: options.refreshError.causes,
3130
},
3231
));
@@ -197,7 +196,7 @@ export async function retrieveOrRefreshAccessToken(options: {
197196
refreshError: tokenSetResult.error,
198197
});
199198
const assertionError = new StackAssertionError('Unexpected error refreshing access token — this may indicate a bug or misconfiguration', {
200-
error: tokenSetResult.error.cause,
199+
cause: tokenSetResult.error.cause,
201200
providerClass: providerInstance.constructor.name,
202201
refreshErrorType: tokenSetResult.error.type,
203202
attempts: tokenSetResult.error.attempts,
@@ -210,7 +209,7 @@ export async function retrieveOrRefreshAccessToken(options: {
210209
}
211210
default: {
212211
const _: never = tokenSetResult.error;
213-
throw new StackAssertionError("Unhandled OAuth access token refresh error", { error: _ });
212+
throw new StackAssertionError("Unhandled OAuth access token refresh error", { cause: _ });
214213
}
215214
}
216215
}

apps/backend/src/app/api/latest/users/crud.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ export const usersCrudHandlers = createLazyProxy(() => createCrudHandlers(usersC
882882
}
883883
});
884884
throw new StackAssertionError("Failed to update team member", {
885-
error: e,
885+
cause: e,
886886
tenancy_id: auth.tenancy.id,
887887
user_id: params.user_id,
888888
team_id: data.selected_team_id,

apps/backend/src/lib/email-rendering.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export async function renderEmailWithTemplate(
154154
// This can happen with complex or invalid JSX
155155
captureError("email-transpilation-template-error", new StackAssertionError(
156156
"Failed to transpile template for editable markers",
157-
{ error: e instanceof Error ? e.message : String(e) }
157+
{ cause: e }
158158
));
159159
}
160160
}
@@ -169,7 +169,7 @@ export async function renderEmailWithTemplate(
169169
// If transpilation fails, fall back to original source
170170
captureError("email-transpilation-theme-error", new StackAssertionError(
171171
"Failed to transpile theme for editable markers",
172-
{ error: e instanceof Error ? e.message : String(e) }
172+
{ cause: e }
173173
));
174174
}
175175
}

0 commit comments

Comments
 (0)