Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added public/images/home/why-fill-palm.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/home/why-fill-sand.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/home/why-fill-sun.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/home/why-fill-water.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 7 additions & 7 deletions src/blog/introducing-tanstack-oracles.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ The model keeps task records in a plain JavaScript `Map`. After applying each ba
```ts
function expectedTopTasks(tasks: Iterable<Task>) {
return [...tasks]
.filter(task => !task.completed)
.sort((a, b) =>
b.priority - a.priority ||
(a.id < b.id ? -1 : a.id > b.id ? 1 : 0)
.filter((task) => !task.completed)
.sort(
(a, b) =>
b.priority - a.priority || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0),
)
.slice(0, 10)
.map(task => task.id)
.map((task) => task.id)
}
```

Expand Down Expand Up @@ -138,7 +138,7 @@ Neither is automatically authoritative. The law records the behavior I've decide

When they disagree, that difference gives the agent a precise clue about what to investigate. It can replay the history, trace how each side arrived at its answer, and work out what needs to change to reconcile them with the law. If the law itself doesn't settle the question, the agent asks me to make the design decision.

In Oracles, a sequence of actions like this is called a *history*. A **driver** executes those actions against production and records what happens. A **check** compares the observations with the answers calculated by the model.
In Oracles, a sequence of actions like this is called a _history_. A **driver** executes those actions against production and records what happens. A **check** compares the observations with the answers calculated by the model.

The framework brings these pieces together through `oracleProperty`:

Expand Down Expand Up @@ -211,7 +211,7 @@ Constructed histories capture that judgment. I want Oracles to guide agents thro

For that I can add a **calibration**. Take an existing passing history where two equal-priority tasks both fit in the result, so the model expects `[A, B]`. I tell Oracles to feed the checker `[B, A]` instead.

That deliberately wrong observation is called a *corruption*. I'm not changing production code. I'm checking whether the oracle would recognize this particular mistake.
That deliberately wrong observation is called a _corruption_. I'm not changing production code. I'm checking whether the oracle would recognize this particular mistake.

Oracles handles the execution: it runs the original history, substitutes the wrong answer, and requires the ordering law to reject it. If the change doesn't take effect, the wrong law fires, or the test crashes for an unrelated reason, the calibration fails.

Expand Down
48 changes: 12 additions & 36 deletions src/components/ApplicationStarter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ function buildCursorStartUrl(prompt: string) {
return `cursor://anysphere.cursor-deeplink/prompt?text=${encodeURIComponent(prompt)}`
}

// The home prompt box: an outline with no fill. Hover firms the line, press
// sinks the fill, and focus holds a soft, warmer line with a faint fill.
const homePromptBoxClassName =
'corner-squircle relative overflow-visible rounded-2xl border border-border-default bg-transparent transition-[background-color,border-color,transform] duration-150 ease-out not-focus-within:hover:border-border-strong/35 hover:bg-background-surface/40 active:scale-[0.997] active:bg-background-surface/80 focus-within:border-border-strong/60 focus-within:bg-background-surface/40 motion-reduce:transition-none'

export function ApplicationStarter({
applicationStarterIntegration,
className,
Expand Down Expand Up @@ -967,45 +972,16 @@ export function ApplicationStarter({
</p>
) : null}
<div
className={twMerge(
'relative overflow-hidden rounded-[1rem] border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-950',
// Home: 36px full-squircle corners. `overflow-visible` lets the
// focus glow (an absolute child at -z-10) bleed out from behind
// the card; the inner wrapper below re-clips the card content.
isHomeStarter &&
'overflow-visible rounded-[36px] [corner-shape:squircle] transition-colors dark:border-transparent dark:bg-[#171717]',
// Light: a subtle recessed fill at rest that brightens to white
// on focus (no shadow). Dark keeps its #171717 fill.
isHomeStarter &&
(isPromptFocused ? 'bg-white' : 'bg-gray-50'),
)}
className={
isHomeStarter
? homePromptBoxClassName
: 'relative overflow-hidden rounded-[1rem] border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-950'
}
>
{/* Home: a warm terracotta glow that grows in from behind the card
while the prompt is focused, drifting in a slow wave. Sits at
-z-10 so the opaque card hides all but the bottom bleed. */}
{isHomeStarter ? (
<div
aria-hidden
className={twMerge(
'pointer-events-none absolute inset-x-24 -bottom-2 -z-10 h-20 origin-bottom transition-[opacity,transform] duration-700 ease-out',
isPromptFocused
? 'opacity-100 scale-100'
: 'opacity-0 scale-75',
reducedMotion && 'transition-none',
)}
>
<div
className={twMerge(
'h-full w-full rounded-[100%] bg-ds-terracotta-300/50 blur-2xl',
!reducedMotion && isPromptFocused && 'prompt-glow-flow',
)}
/>
</div>
) : null}
<div
className={
isHomeStarter
? 'overflow-hidden rounded-[36px] [corner-shape:squircle]'
? 'corner-squircle overflow-hidden rounded-2xl'
: undefined
}
>
Expand Down Expand Up @@ -1145,7 +1121,7 @@ export function ApplicationStarter({
onComplete={completeHomePayoff}
/>
) : !hasInput ? (
<span className="font-ds-display text-sm font-extralight text-gray-500 dark:text-[#8f8f98]">
<span className="hidden font-ds-display text-sm font-extralight text-gray-500 sm:inline dark:text-[#8f8f98]">
Press Shift + Enter
</span>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/MaintainerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function MaintainerSocialLinks({
onClick={(e) => e.stopPropagation()}
className={
variant === 'card'
? 'inline-flex size-4 items-center justify-center text-icon-muted transition-colors duration-200 hover:text-icon-default focus-visible:rounded-sm focus-visible:corner-squircle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus motion-reduce:transition-none [&_svg]:size-4'
? "relative inline-flex size-4 items-center justify-center text-icon-muted after:absolute after:-inset-x-2 after:-inset-y-3.5 after:content-[''] transition-colors duration-200 hover:text-icon-default focus-visible:rounded-sm focus-visible:corner-squircle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus motion-reduce:transition-none [&_svg]:size-4"
: 'p-2 -mb-2 -ml-2 transition-colors hover:scale-110 hover:text-gray-700 hover:grayscale-0 dark:hover:text-gray-200'
}
>
Expand Down
22 changes: 16 additions & 6 deletions src/components/NewsletterSignup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useToast } from '~/components/ToastProvider'
import { useLoginModal } from '~/contexts/LoginModalContext'
import { currentUserQueryOptions, useCurrentUser } from '~/hooks/useCurrentUser'
import { Button } from '~/ui'
import { Button as DsButton } from '~/components/ds/ui'
import { addUserSignupSource } from '~/utils/users.functions'

type NewsletterSignupProps = {
Expand All @@ -14,6 +15,11 @@ type NewsletterSignupProps = {
noteClassName?: string
successClassName?: string
showNote?: boolean
/** Overrides the button label in both the logged-in and logged-out states. */
label?: string
showIcon?: boolean
/** `ds` renders the design-system Button; `legacy` keeps the docs-era one. */
appearance?: 'legacy' | 'ds'
}

export function NewsletterSignup({
Expand All @@ -22,6 +28,9 @@ export function NewsletterSignup({
noteClassName,
successClassName,
showNote = true,
label,
showIcon = true,
appearance = 'legacy',
}: NewsletterSignupProps) {
const user = useCurrentUser()
const queryClient = useQueryClient()
Expand Down Expand Up @@ -86,25 +95,26 @@ export function NewsletterSignup({
)
}

const ButtonComponent = appearance === 'ds' ? DsButton : Button

return (
<div className={twMerge('grid gap-2', className)}>
<Button
<ButtonComponent
type="button"
onClick={handleSubscribe}
disabled={isPending}
className={twMerge('w-full', buttonClassName)}
>
{user ? (
{!showIcon ? null : user ? (
<EnvelopeIcon className="h-4 w-4" />
) : (
<SignInIcon className="h-4 w-4" />
)}
{isPending
? 'Subscribing...'
: user
? 'Subscribe with my login'
: 'Log in to subscribe'}
</Button>
: (label ??
(user ? 'Subscribe with my login' : 'Log in to subscribe'))}
</ButtonComponent>
{showNote ? (
<p
className={twMerge(
Expand Down
32 changes: 16 additions & 16 deletions src/components/PartnersGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export function TierBand({
}) {
return (
<div
className={`flex items-center justify-center px-4 py-3.5 ${colorClassName}`}
className={`flex items-center justify-center px-4 py-2.5 ${colorClassName}`}
>
<span className="font-ds-display text-xl font-bold uppercase tracking-wide text-ds-neutral-500 sm:text-2xl">
<span className="font-ds-display text-ds-heading-5 uppercase tracking-wide text-ds-neutral-500">
{label}
</span>
</div>
Expand All @@ -65,26 +65,26 @@ const tierLayout: Record<
}
> = {
gold: {
flexBasis: 'basis-full sm:basis-1/2',
minHeight: 'min-h-[240px]',
logoMaxWidth: 'max-w-[420px]',
logoMaxHeight: 'max-h-[130px]',
padding: 'p-12',
flexBasis: 'basis-1/2 lg:basis-1/3',
minHeight: 'min-h-[144px]',
logoMaxWidth: 'max-w-[240px]',
logoMaxHeight: 'max-h-[72px]',
padding: 'p-6 sm:p-8',
},
silver: {
flexBasis: 'basis-full sm:basis-1/2 lg:basis-1/3',
minHeight: 'min-h-[140px]',
logoMaxWidth: 'max-w-[200px]',
logoMaxHeight: 'max-h-[60px]',
padding: 'p-8',
},
bronze: {
flexBasis: 'basis-1/2 sm:basis-1/3 lg:basis-1/4',
minHeight: 'min-h-[120px]',
logoMaxWidth: 'max-w-[130px]',
minHeight: 'min-h-[104px]',
logoMaxWidth: 'max-w-[150px]',
logoMaxHeight: 'max-h-[44px]',
padding: 'p-6',
},
bronze: {
flexBasis: 'basis-1/3 sm:basis-1/4 lg:basis-1/5',
minHeight: 'min-h-[88px]',
logoMaxWidth: 'max-w-[110px]',
logoMaxHeight: 'max-h-[32px]',
padding: 'p-4',
},
}

function PartnerGridItem({
Expand Down
Loading
Loading