Skip to content

Commit 2fa6216

Browse files
authored
Merge branch 'dev' into docs/apps_updates
2 parents f46b268 + f7e3898 commit 2fa6216

405 files changed

Lines changed: 5046 additions & 2334 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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
This file contains knowledge learned while working on the codebase in Q&A format.
44

5+
## Q: Which Hexclave rename compatibility layers should be avoided in PR #1475 follow-ups?
6+
A: Do not keep backwards compatibility for the MCP tool name, cross-domain auth query parameter names, `NEXT_PUBLIC_STACK_PORT_PREFIX`, or a parallel `hexclaveAppInternalsSymbol`. For refresh/access cookies, read both legacy Stack and new Hexclave cookie names, but only write the canonical Hexclave cookies.
7+
58
## Q: How should GitHub Contents API request-body assertions be written in Stack Auth tests?
69
A: Prefer inline snapshots over individual field selectors. For request bodies that contain base64 file content, parse the JSON body, assert it is an object, decode the `content` field back to UTF-8, and snapshot the normalized call object so the test verifies the path, method, headers, branch, message, sha, and rendered file content together.
710

@@ -535,3 +538,18 @@ A: The workflow needs a full checkout using the fine-grained `NPM_PUBLISH_VERSIO
535538

536539
## Q: How should the Mintlify docs homepage reuse the generated setup prompt?
537540
A: Import `generatedSetupPromptText` from `docs-mintlify/snippets/home-prompt-island.jsx` in `docs-mintlify/index.mdx`, render it directly in a `<pre><code>{generatedSetupPromptText}</code></pre>` block, and keep the home copy button wired to that imported value. Clipboard failures can happen when the browser document is not focused, so the button should surface the actual error text instead of only saying "Copy failed".
541+
542+
## Q: Where should Mintlify docs for restricted users live?
543+
A: Put restricted-user docs at `docs-mintlify/guides/apps/authentication/restricted-users.mdx` and register the page in the Authentication group in `docs-mintlify/docs.json`. The page should cover `includeRestricted: true`, `user.isRestricted`, `user.restrictedReason`, anonymous users being restricted by definition, and JWKS `include_restricted=true` for services that intentionally accept restricted-user tokens.
544+
545+
## Q: How should e2e tests switch to a newly created project?
546+
A: `Project.createAndSwitch` should leave `backendContext.projectKeys` set to real project API keys, not only `{ projectId, adminAccessToken }`. Internal admin access tokens are regular short-lived access tokens; keeping one in the default project context makes later server/admin requests fail with `ADMIN_ACCESS_TOKEN_EXPIRED` or validate the token against the wrong project.
547+
548+
## Q: How should backend SMTP SSRF checks be rolled out?
549+
A: Keep the real outbound SMTP policy in `apps/backend/src/private/implementation/smtp-egress-policy.ts`, export it through `apps/backend/src/private/index.ts`, and provide a simple `implementation-fallback` function for self-hosters. It should allow only SMTP ports 25, 465, 587, 2465, 2587, and 2525, reject internal IP literals or DNS resolutions, and initially run report-only from `emails-low-level.tsx` via `captureError("smtp-egress-policy-report-only", ...)` before enforcing hard failures.
550+
551+
## Q: What project-level `sourceOfTruth` config is supported?
552+
A: Project config overrides only support the hosted `sourceOfTruth` shape. Legacy external source-of-truth overrides such as Postgres or Neon are removed by `migrateConfigOverride("project", ...)`, while raw schema validation should reject them.
553+
554+
## Q: How should managed email onboarding e2e tests wait for mock verification?
555+
A: Do not rely on a fixed `wait(1500)` after setup. The mock onboarding path flips the domain to `verified` asynchronously through `runAsynchronously`, so tests should poll the managed-onboarding check endpoint until the expected status appears.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
NODE_ENV: test
1919
STACK_ENABLE_HARDCODED_PASSKEY_CHALLENGE_FOR_TESTING: yes
2020
STACK_DATABASE_CONNECTION_STRING: "postgres://postgres:PASSWORD-PLACEHOLDER--uqfEC1hmmv@localhost:6728/stackframe"
21-
NEXT_PUBLIC_STACK_PORT_PREFIX: "67"
21+
NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX: "67"
2222
STACK_EXTERNAL_DB_SYNC_MAX_DURATION_MS: "20000"
2323
STACK_EXTERNAL_DB_SYNC_DIRECT: "false"
2424

.github/workflows/qemu-emulator-build.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,12 @@ jobs:
148148
- name: Build stack-cli (for emulator CLI)
149149
if: matrix.arch == 'amd64'
150150
run: |
151-
pnpm install --frozen-lockfile --filter '@stackframe/stack-cli...'
152-
# Turbo's trailing `...` filter builds stack-cli AND its workspace
153-
# deps (@stackframe/js, @stackframe/stack-shared, etc.) — stack-cli
154-
# imports them at runtime from their dist/ outputs.
151+
# Turbo's task graph for stack-cli#build includes
152+
# @stackframe/dashboard#build:rde-standalone, which transitively
153+
# depends on @stackframe/stack#build (via dashboard → stack).
154+
# The pnpm filter must cover the dashboard dep tree too so that
155+
# devDependencies like tailwindcss are installed for the build.
156+
pnpm install --frozen-lockfile --filter '@stackframe/stack-cli...' --filter '@stackframe/dashboard...'
155157
pnpm exec turbo run build --filter='@stackframe/stack-cli...'
156158
157159
- name: Start emulator and verify
@@ -267,10 +269,8 @@ jobs:
267269

268270
- name: Install stack-cli deps + build
269271
run: |
270-
pnpm install --frozen-lockfile --filter '@stackframe/stack-cli...'
271-
# Turbo's trailing `...` filter builds stack-cli AND its workspace
272-
# deps (@stackframe/js, @stackframe/stack-shared, etc.) — stack-cli
273-
# imports them at runtime from their dist/ outputs.
272+
# See "Build stack-cli" step comment for why dashboard filter is needed
273+
pnpm install --frozen-lockfile --filter '@stackframe/stack-cli...' --filter '@stackframe/dashboard...'
274274
pnpm exec turbo run build --filter='@stackframe/stack-cli...'
275275
276276
- name: Download built image

.github/workflows/setup-tests-with-custom-base-port.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ jobs:
1919
if: ${{ (github.head_ref || github.ref_name) == 'dev' }}
2020
runs-on: ubicloud-standard-16
2121
env:
22-
NEXT_PUBLIC_STACK_PORT_PREFIX: "69"
22+
NEXT_PUBLIC_HEXCLAVE_PORT_PREFIX: "69"
2323
STACK_EXTERNAL_DB_SYNC_MAX_DURATION_MS: "20000"
2424
STACK_EXTERNAL_DB_SYNC_DIRECT: "false"
2525

2626
steps:
2727
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2828

29-
- name: Setup Node.js v20
29+
- name: Setup Node.js v22
3030
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
3131
with:
32-
node-version: 20
32+
node-version: 22
3333

3434
- name: Setup pnpm
3535
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4

.github/workflows/setup-tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2626

27-
- name: Setup Node.js v20
27+
- name: Setup Node.js v22
2828
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2929
with:
30-
node-version: 20
30+
node-version: 22
3131

3232
- name: Setup pnpm
3333
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4

.vscode/settings.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@
121121
"xact",
122122
"zustand"
123123
],
124-
"editor.codeActionsOnSave": {
125-
"source.fixAll.eslint": "explicit",
126-
"source.organizeImports": "explicit"
124+
"[typescript]": {
125+
"editor.codeActionsOnSave": {
126+
"source.fixAll.eslint": "explicit",
127+
"source.organizeImports": "explicit"
128+
},
127129
},
128130
"terminal.integrated.wordSeparators": " (){}',\"`─‘’“”|",
129131
"editor.formatOnSave": false,

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ To see all development ports, refer to the index.html of `apps/dev-launchpad/pub
116116
- NEVER INSTALL A NEW PACKAGE (or anything else) WITHOUT EXPLICIT APPROVAL FROM THE USER.
117117
- A "development environment" is either an RDE (remote development environment; = local dashboard + prod backend) or a local emulator (local dashboard + local backend). When communicating to the user, we always say "development environment" instead of RDE or local emulator (the distinction to the user is minor, even though the implementation is quite different).
118118
- NEVER EVER return a server error with an internal server error that may contain information that the user shouldn't see. For example, never return the error message on a public API from an upstream provider without properly filtering it first. Most of the time, for internal server errors, you should just use StackAssertionError (which won't pass the message to the user), not StatusError (you almost never want to instantiate a StatusError with status 5xx).
119+
- When adding code to the `private` part of the backend, put the actual implementation into `implementation` (if the submodule is checked out), and implement a simple fallback in `implementation-fallback` for self-hosters. `implementation.generated.ts` will automatically be generated, which you can then import from `index.ts`. (See the existing code as an example.) If the submodule isn't checked out, but you need to add code to the `private` part of the backend, let the user know.
120+
- Security-sensitive code on the backend that shouldn't be public should be in the `private` part of the backend.
119121

120122
### Code-related
121123
- Use ES6 maps instead of records wherever you can.

CHANGELOG.md

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,52 @@
22

33
---
44

5-
## 1/23/26
5+
## 5/22/26
66

7-
### Payments
8-
Introduced a redesigned payments onboarding flow
9-
![Payments Onboarding](https://raw.githubusercontent.com/stack-auth/stack-auth/dev/apps/dashboard/public/changelog/payments-onboarding.png)
7+
- Faster ClickHouse analytics for project metrics and previews.
8+
- Smoother cross-domain auth handoffs and hosted-domain trust.
9+
- Sharper Auth Methods and Users dashboard tables.
10+
![Auth method and user table polish](https://raw.githubusercontent.com/hexclave/stack-auth/dev/apps/dashboard/public/assets/changelog-auth-methods.png)
1011

11-
## 1/21/26
12+
## 5/15/26
1213

13-
### Payments
14-
- Payments page updated with new UI changes
15-
![Create Product](https://raw.githubusercontent.com/stack-auth/stack-auth/refs/heads/dev/apps/dashboard/public/changelog/payments-create-product.png)
16-
- Added a new Payments Settings page with an option to temporarily disable all payments
17-
![Payments Setting](https://raw.githubusercontent.com/stack-auth/stack-auth/refs/heads/dev/apps/dashboard/public/changelog/payments-settings-1.png)
18-
- Subscription renewal emails are now sent automatically to users
19-
- Past payment invoices are now visible on the Account Settings page
20-
![Past Payments Invoices](https://raw.githubusercontent.com/stack-auth/stack-auth/refs/heads/dev/apps/dashboard/public/changelog/account-settings-invoices.png)
14+
- Redesigned Team Management tables with cleaner action states.
15+
- New project transfer, session replay, and team payments screens.
16+
- Unified AI chat experience on assistant-ui threads.
17+
![Team management table](https://raw.githubusercontent.com/hexclave/stack-auth/dev/apps/dashboard/public/assets/changelog-teams.png)
2118

22-
### Documentation
23-
- Updated JWT documentation to include `isRestricted` and `restrictedReason`
19+
## 5/8/26
2420

25-
## 1/19/26
26-
- Updated package dependencies to their newest versions.
21+
- New TanStack Start SDK integration with refreshed OpenAPI schemas.
22+
- Weekly active users now appear on Project Overview.
23+
- Cleaner Project Permissions with upgraded data grids.
24+
![Project permissions dashboard](https://raw.githubusercontent.com/hexclave/stack-auth/dev/apps/dashboard/public/assets/changelog-rbac.png)
2725

28-
## 12/19/25
29-
- Introduces new changelog and deprecates all older changelogs.
30-
- Date versioning for public view.
26+
## 5/1/26
27+
28+
- Shareable Session Replay IDs across dashboard, backend, and SDKs.
29+
- Sleeker Data Vault and overview data-grid layouts.
30+
- Emulator updates can now auto-install dependencies.
31+
![Data Vault dashboard](https://raw.githubusercontent.com/hexclave/stack-auth/dev/apps/dashboard/public/assets/changelog-data-vault.png)
32+
33+
## 4/24/26
34+
35+
- Redesigned Email Server settings and managed-domain setup.
36+
- Faster local emulator startup with RAM snapshots.
37+
- Live secret rotation plus a simpler sign-up rules tester.
38+
![Email server settings and logs](https://raw.githubusercontent.com/hexclave/stack-auth/dev/apps/dashboard/public/assets/changelog-email-server.png)
39+
40+
## 4/17/26
41+
42+
- Redesigned Overview and onboarding experience.
43+
- Crisper dashboard sidebar styling and category navigation.
44+
- New Payments product setup flow.
45+
![Payments product setup](https://raw.githubusercontent.com/hexclave/stack-auth/dev/apps/dashboard/public/assets/changelog-payments-products.png)
3146

3247
---
3348

34-
> **Note:** All older changelogs are deprecated and have been removed. The source of true is this single changelog file.
35-
>
49+
> **Note:** All older changelogs are deprecated and have been removed. The source of truth is this single changelog file.
50+
>
3651
> Going forward, all changes should be documented in this file only.
3752
3853
---

0 commit comments

Comments
 (0)