Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
863e1d3
Update pnpm-lock.yaml and enhance dashboard dev tools
mantrakp04 Mar 20, 2026
d4a17f4
Update pnpm-lock.yaml and enhance dev tool components
mantrakp04 Mar 27, 2026
01cbe39
Merge branch 'dev' into feat/dev-tool
mantrakp04 Mar 27, 2026
7bfde19
Refactor dashboard configuration and clean up template dependencies
mantrakp04 Mar 27, 2026
ce13ce2
Refactor dev tool components and enhance URL handling
mantrakp04 Mar 30, 2026
40c7d79
Merge branch 'dev' into feat/dev-tool
mantrakp04 Mar 30, 2026
e3feccc
Enhance feedback handling and introduce new internal API routes
mantrakp04 Mar 31, 2026
754f296
Refactor component version handling and improve feedback tests
mantrakp04 Mar 31, 2026
3c5b938
Merge branch 'dev' into feat/dev-tool
mantrakp04 Mar 31, 2026
fd4ade1
Refactor dev tool components and enhance functionality
mantrakp04 Mar 31, 2026
86f480c
Refactor feedback tests for improved clarity and consistency
mantrakp04 Apr 1, 2026
4a9272c
Remove deprecated dev tool components and consolidate functionality
mantrakp04 Apr 1, 2026
b2a73d2
Add request logging functionality to StackClientInterface
mantrakp04 Apr 1, 2026
38f6ddf
Merge branch 'dev' into feat/dev-tool
mantrakp04 Apr 4, 2026
aea74a3
Merge branch 'dev' into feat/dev-tool
mantrakp04 Apr 6, 2026
0c178c5
Refactor component version handling and add tests for API endpoint
mantrakp04 Apr 6, 2026
9f9000e
Updated component prompts
N2D4 Apr 9, 2026
4180be2
Merge branch 'dev' into feat/dev-tool
mantrakp04 Apr 9, 2026
5f8debe
Add "restricted users redirected to onboarding" logic to sign in and …
N2D4 Apr 9, 2026
37a37a6
Refactor dev environment scripts and add new demo pages for dev tools
mantrakp04 Apr 9, 2026
2607576
Merge branch 'dev' into feat/dev-tool
mantrakp04 Apr 9, 2026
633acc6
Implement trigger position snapping and management in dev tools
mantrakp04 Apr 11, 2026
a365ac4
Merge branch 'dev' into feat/dev-tool
N2D4 Apr 12, 2026
b1780b4
Update prompt
N2D4 Apr 12, 2026
8be613c
Merge branch 'dev' into feat/dev-tool
mantrakp04 Apr 13, 2026
3bbdfc9
Enhance AI Proxy Integration and Dev Tool UI
mantrakp04 Apr 13, 2026
e51d459
Refactor Dev Tool Core Functions and Enhance URL Target Tests
mantrakp04 Apr 13, 2026
01982ff
Refactor Dev Tool Tab Functions to Return Structured Results
mantrakp04 Apr 13, 2026
359e6d1
Refactor Panel Closing Logic in Dev Tool Core
mantrakp04 Apr 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated component prompts
  • Loading branch information
N2D4 committed Apr 9, 2026
commit 9f9000ee230c70ba7b0ccb724b7a91f76b2f4e9b
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createSmartRouteHandler } from "@/route-handlers/smart-route-handler";
import { yupNumber, yupObject, yupRecord, yupString } from "@stackframe/stack-shared/dist/schema-fields";
import { getLatestPageVersions } from "@stackframe/stack-shared/dist/interface/page-component-versions";
import { getLatestPageVersions } from "@stackframe/stack-shared/dist/interface/handler-urls";

export const GET = createSmartRouteHandler({
metadata: {
Expand Down
18 changes: 18 additions & 0 deletions claude/CLAUDE-KNOWLEDGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,21 @@ A: Use `signed_up_at` (OIDC-style naming) in access tokens and encode it as Unix

Q: Where should new globally searchable Cmd+K destinations be added in the dashboard?
A: Add project-level shortcuts to `PROJECT_SHORTCUTS` in `apps/dashboard/src/components/cmdk-commands.tsx` (optionally gated with `requiredApps`), and for app subpages rely on the flattened `appFrontend.navigationItems` command generation in the same file so pages are directly searchable without nested preview navigation.

Q: How should handler URL/shared interface renames be rolled out when template/backend import `@stackframe/stack-shared/dist/*`?
A: Add the new source entrypoint in `packages/stack-shared/src/interface` and update imports to the new `dist` path, but validate with package typechecks after the stack-shared dist artifacts are refreshed (for example via existing dev watchers), because consumers resolve through `dist/*` entrypoints rather than `src/*`.

Q: How are custom page prompts organized in `page-component-versions.ts` now?
A: `signIn` and `signUp` share a single `createAuthPagePrompt(type)` helper, and all remaining pages (`signOut`, `emailVerification`, `passwordReset`, `forgotPassword`, `oauthCallback`, `magicLinkCallback`, `accountSettings`, `teamInvitation`, `mfa`, `error`, `onboarding`) now use `createCustomPagePrompt(...)` with concise logical `structure` plus a React `reactExample`.

Q: What makes custom page prompt examples actionable for coding agents?
A: Avoid abstract placeholders for core flows (for example undefined section components or form primitives). In `page-component-versions.ts`, examples are most useful when they inline the section/form components and state transitions they rely on, while keeping `structure` focused on logical behavior rather than visual layout.

Q: How detailed should the Account Settings custom-page prompt be?
A: The `accountSettings` prompt should enumerate each top-level page and each subsection's exact responsibilities and API calls (emails, password, passkey, OTP, MFA, notifications, sessions, API keys, payments, settings, team pages, team creation). The example should inline section components and actions rather than referencing undefined placeholders.

Q: What should we do if dashboard typecheck fails with syntax errors in `apps/dashboard/.next/dev/types/routes.d.ts`?
A: Regenerate Next route types with `pnpm --filter @stackframe/dashboard exec next typegen` (and if needed, delete the corrupted `apps/dashboard/.next/dev/types/routes.d.ts` first). This fixes transient generated-file corruption without changing source code.

Q: What is the current `getCustomPagePrompts` API shape?
A: `getCustomPagePrompts` now takes no arguments and returns all prompts directly; call it as `getCustomPagePrompts()` instead of passing an SDK package name.
48 changes: 48 additions & 0 deletions packages/stack-shared/src/interface/handler-urls.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* @deprecated Plain string URLs are deprecated. Use `{ type: "custom", url: "...", version: 0 }` instead.
*/
type DeprecatedStringUrl = string;

export type HandlerPageUrls = Record<
| "handler"
| "signIn"
| "signUp"
| "signOut"
| "emailVerification"
| "passwordReset"
| "forgotPassword"
| "oauthCallback"
| "magicLinkCallback"
| "accountSettings"
| "teamInvitation"
| "mfa"
| "error"
| "onboarding",
DeprecatedStringUrl | { type: "custom", url: string, version: number } | { type: "hosted" | "handler-component" }
>;

export type HandlerRedirectUrls = Record<
| "afterSignIn"
| "afterSignUp"
| "afterSignOut"
| "home",
string
>;

export type HandlerUrls = HandlerPageUrls & HandlerRedirectUrls;
export type HandlerUrlTarget = HandlerUrls[keyof HandlerUrls];
export type DefaultHandlerUrlTarget = string | { type: "hosted" | "handler-component" };
export type HandlerUrlOptions = Partial<HandlerUrls> & { default?: DefaultHandlerUrlTarget };
export type ResolvedHandlerUrls = {
[K in keyof HandlerUrls]: string;
};

export {
getCustomPagePrompts,
getLatestPageVersions,
type CustomPagePrompt,
type PageComponentKey,
type PageVersionEntry,
type PageVersions
} from "./page-component-versions";

Loading