diff --git a/AGENTS.md b/AGENTS.md index 608a0158d8..54be6f1d55 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -73,9 +73,9 @@ To see all development ports, refer to the index.html of `apps/dev-launchpad/pub - Environment variables are pre-configured in `.env.development` files - Always run typecheck, lint, and test to make sure your changes are working as expected. You can save time by only linting and testing the files you've changed (and/or related E2E tests). - The project uses a custom route handler system in the backend for consistent API responses -- Sometimes, the typecheck will give errors along the line of "Cannot assign Buffer to Uint8Array" or similar, on changes that are completely unrelated to your own changes. If that happens, tell the user to run `pnpm clean && pnpm i && pnpm run codegen && pnpm build:packages`, and restart the dev server (you cannot run this yourself). After that's done, the typecheck should pass. - When writing tests, prefer .toMatchInlineSnapshot over other selectors, if possible. You can check (and modify) the snapshot-serializer.ts file to see how the snapshots are formatted and how non-deterministic values are handled. - Whenever you learn something new, or at the latest right before you call the `Stop` tool, write whatever you learned into the ./claude/CLAUDE-KNOWLEDGE.md file, in the Q&A format in there. You will later be able to look up knowledge from there (based on the question you asked). +- Animations: Keep hover/click transitions snappy and fast. Don't delay the action with a pre-transition (e.g. no fade-in when hovering a button) — it makes the UI feel sluggish. Instead, apply transitions after the action, like a smooth fade-out when the hover ends. ### Code-related - Use ES6 maps instead of records wherever you can. diff --git a/apps/backend/src/app/api/latest/internal/payments/stripe/account-info/route.ts b/apps/backend/src/app/api/latest/internal/payments/stripe/account-info/route.ts index 959627ce1b..cf240d88aa 100644 --- a/apps/backend/src/app/api/latest/internal/payments/stripe/account-info/route.ts +++ b/apps/backend/src/app/api/latest/internal/payments/stripe/account-info/route.ts @@ -1,8 +1,8 @@ import { getStackStripe } from "@/lib/stripe"; import { globalPrismaClient } from "@/prisma-client"; import { createSmartRouteHandler } from "@/route-handlers/smart-route-handler"; +import { KnownErrors } from "@stackframe/stack-shared"; import { adaptSchema, adminAuthTypeSchema, yupBoolean, yupNumber, yupObject, yupString } from "@stackframe/stack-shared/dist/schema-fields"; -import { StatusError } from "@stackframe/stack-shared/dist/utils/errors"; export const GET = createSmartRouteHandler({ metadata: { @@ -32,11 +32,7 @@ export const GET = createSmartRouteHandler({ }); if (!project?.stripeAccountId) { - return { - statusCode: 200, - bodyType: "json", - body: null, - }; + throw new KnownErrors.StripeAccountInfoNotFound(); } const stripe = getStackStripe(); diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/(overview)/globe.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/(overview)/globe.tsx index f47123c4b6..1b97c982f8 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/(overview)/globe.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/(overview)/globe.tsx @@ -182,8 +182,9 @@ export function GlobeSection({ countryData, totalUsers, children }: {countryData } const controls = current.controls(); controls.maxDistance = 1000; - controls.minDistance = 400; + controls.minDistance = 200; controls.dampingFactor = 0.2; + current.camera().position.z = 500; // even though rendering is resumed by default, we want to pause it after 200ms, so call resumeRender() resumeRender(); }} diff --git a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/page-layout.tsx b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/page-layout.tsx index 9210610413..0746d839bd 100644 --- a/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/page-layout.tsx +++ b/apps/dashboard/src/app/(main)/(protected)/projects/[projectId]/page-layout.tsx @@ -12,9 +12,9 @@ export function PageLayout(props: { width?: number, })) { return ( -
- The default offer that is included in the group. -