Skip to content

Commit df501ca

Browse files
ci: apply automated fixes
1 parent 8de4313 commit df501ca

6 files changed

Lines changed: 48 additions & 31 deletions

File tree

‎packages/react-start/skills/_artifacts/domain_map.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ skills:
467467
- Query-owned RSC caching
468468
- Refresh ownership (router.invalidate, invalidateQueries, refetchQueries)
469469
- "Selective SSR modes (ssr: 'data-only', ssr: false)"
470-
- "structuralSharing: false for Query-cached RSC values"
470+
- 'structuralSharing: false for Query-cached RSC values'
471471
tasks:
472472
- 'Implement route-owned React Server Components'
473473
- 'Choose between renderServerComponent and createCompositeComponent'

‎packages/react-start/skills/_artifacts/skill_spec.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ TanStack Start is a full-stack React framework built on TanStack Router and Vite
44

55
## Domains
66

7-
| Domain | Description | Skills |
8-
| ------------------------ | ------------------------------------------------------------- | ---------------- |
9-
| Project Setup | Scaffolding, Vite plugin, router factory, root route, entries | start-setup |
10-
| Server Functions | Type-safe RPCs with createServerFn, validation, streaming | server-functions |
11-
| Middleware and Context | Request/function middleware, context, global middleware | middleware |
12-
| Execution Model | Isomorphic defaults, environment boundaries, env vars | execution-model |
13-
| Server Routes | API endpoints, HTTP handlers, handler middleware | server-routes |
7+
| Domain | Description | Skills |
8+
| ------------------------ | ------------------------------------------------------------- | ----------------------------- |
9+
| Project Setup | Scaffolding, Vite plugin, router factory, root route, entries | start-setup |
10+
| Server Functions | Type-safe RPCs with createServerFn, validation, streaming | server-functions |
11+
| Middleware and Context | Request/function middleware, context, global middleware | middleware |
12+
| Execution Model | Isomorphic defaults, environment boundaries, env vars | execution-model |
13+
| Server Routes | API endpoints, HTTP handlers, handler middleware | server-routes |
1414
| Deployment and Rendering | Hosting, selective SSR, prerendering, SEO | deployment, server-components |
1515

1616
## Skill Inventory
@@ -80,11 +80,11 @@ TanStack Start is a full-stack React framework built on TanStack Router and Vite
8080

8181
### server-components (3 failure modes)
8282

83-
| # | Mistake | Priority | Source |
84-
| --- | -------------------------------------------------------------- | -------- | --------------------------- |
85-
| 1 | Using renderServerComponent when the UI needs slots | HIGH | docs/guide/server-components |
83+
| # | Mistake | Priority | Source |
84+
| --- | ------------------------------------------------------------- | -------- | ---------------------------- |
85+
| 1 | Using renderServerComponent when the UI needs slots | HIGH | docs/guide/server-components |
8686
| 2 | Omitting structuralSharing: false for Query-cached RSC values | HIGH | docs/guide/server-components |
87-
| 3 | Copying stale renderRsc or .validator examples | MEDIUM | docs/guide/server-functions |
87+
| 3 | Copying stale renderRsc or .validator examples | MEDIUM | docs/guide/server-functions |
8888

8989
## Tensions
9090

‎packages/react-start/skills/react-start/server-components/docs/architecture.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Use these boundaries instead:
2121
- `createServerOnlyFn`: utility that must never run on the client
2222
- route `loader`: orchestration layer that runs on the server for the initial SSR request and in the browser on client navigation unless the route is `ssr: false`
2323

24-
Practical rule: loaders decide *when* to fetch. Server functions decide *what* must stay on the server.
24+
Practical rule: loaders decide _when_ to fetch. Server functions decide _what_ must stay on the server.
2525

2626
## What still works inside RSCs
2727

‎packages/react-start/skills/react-start/server-components/examples/02-composite-slots.tsx‎

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,18 @@ const getPostCard = createServerFn({ method: 'GET' })
3838

3939
const src = await createCompositeComponent<{
4040
children?: ReactNode
41-
renderActions?: (args: {
42-
postId: string
43-
authorId: string
44-
}) => ReactNode
41+
renderActions?: (args: { postId: string; authorId: string }) => ReactNode
4542
}>((props) => (
4643
<article className="card">
4744
<h1>{post.title}</h1>
4845
<p>{post.body}</p>
4946

50-
<footer>{props.renderActions?.({
51-
postId: post.id,
52-
authorId: post.authorId,
53-
})}</footer>
47+
<footer>
48+
{props.renderActions?.({
49+
postId: post.id,
50+
authorId: post.authorId,
51+
})}
52+
</footer>
5453

5554
<section>{props.children}</section>
5655
</article>
@@ -60,7 +59,8 @@ const getPostCard = createServerFn({ method: 'GET' })
6059
})
6160

6261
export const Route = createFileRoute('/posts/$postId')({
63-
loader: async ({ params }) => getPostCard({ data: { postId: params.postId } }),
62+
loader: async ({ params }) =>
63+
getPostCard({ data: { postId: params.postId } }),
6464
component: PostPage,
6565
})
6666

@@ -84,7 +84,11 @@ function Comments() {
8484
}
8585

8686
function PostActions(props: { postId: string; authorId: string }) {
87-
return <button type="button">Moderate {props.postId} / {props.authorId}</button>
87+
return (
88+
<button type="button">
89+
Moderate {props.postId} / {props.authorId}
90+
</button>
91+
)
8892
}
8993

9094
// Component-prop slot variant
@@ -108,7 +112,11 @@ const getProductCard = createServerFn({ method: 'GET' })
108112
})
109113

110114
function AddToCartButton(props: { productId: string; price: number }) {
111-
return <button type="button">Add {props.productId} at {props.price}</button>
115+
return (
116+
<button type="button">
117+
Add {props.productId} at {props.price}
118+
</button>
119+
)
112120
}
113121

114122
// Example usage somewhere else:

‎packages/react-start/skills/react-start/server-components/examples/03-query-owned-rsc.tsx‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ declare const db: {
1919
title: string
2020
body: string
2121
}>
22-
update(postId: string, patch: { title?: string; body?: string }): Promise<void>
22+
update(
23+
postId: string,
24+
patch: { title?: string; body?: string },
25+
): Promise<void>
2326
}
2427
}
2528

@@ -42,11 +45,13 @@ const getPostRsc = createServerFn({ method: 'GET' })
4245
})
4346

4447
const updatePost = createServerFn({ method: 'POST' })
45-
.inputValidator(z.object({
46-
postId: z.string(),
47-
title: z.string().optional(),
48-
body: z.string().optional(),
49-
}))
48+
.inputValidator(
49+
z.object({
50+
postId: z.string(),
51+
title: z.string().optional(),
52+
body: z.string().optional(),
53+
}),
54+
)
5055
.handler(async ({ data }) => {
5156
await db.posts.update(data.postId, {
5257
title: data.title,

‎packages/react-start/skills/react-start/server-components/examples/04-selective-ssr-data-only.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,9 @@ function ResponsiveChart(props: {
6464
data: Array<{ x: number; y: number }>
6565
width: number
6666
}) {
67-
return <pre>{JSON.stringify({ width: props.width, points: props.data.length })}</pre>
67+
return (
68+
<pre>
69+
{JSON.stringify({ width: props.width, points: props.data.length })}
70+
</pre>
71+
)
6872
}

0 commit comments

Comments
 (0)