Skip to content

Commit 830418a

Browse files
Upgrade Remix to 3.0.0 beta 4 (#74)
* Upgrade Remix to beta 4 Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com> * Adapt Remix beta 4 API changes Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com> * Format Remix beta API updates Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 977e397 commit 830418a

20 files changed

Lines changed: 87 additions & 303 deletions

bun.lock

Lines changed: 44 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/editable-text.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const inheritTextStyles = {
1717
lineHeight: 'inherit',
1818
color: 'inherit',
1919
} as const
20-
export function EditableText(handle: Handle) {
20+
export function EditableText(handle: Handle<EditableTextProps>) {
2121
let isEditing = false
2222
let draftValue = ''
2323
let isSaving = false
@@ -36,7 +36,8 @@ export function EditableText(handle: Handle) {
3636
button.focus()
3737
})
3838
}
39-
return (props: EditableTextProps) => {
39+
return () => {
40+
const props = handle.props
4041
const buttonId = `${props.id}-button`
4142
function startEditing() {
4243
if (isSaving) return

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"@modelcontextprotocol/sdk": "1.26.0",
7070
"agents": "^0.7.6",
7171
"get-port": "^7.1.0",
72-
"remix": "3.0.0-beta.0",
72+
"remix": "3.0.0-beta.4",
7373
"workers-ai-provider": "^3.1.2",
7474
"zod": "^4.3.6"
7575
}

server/handlers/account.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type BuildAction } from 'remix/fetch-router'
1+
import { type Action } from 'remix/router'
22
import { readAuthSessionResult } from '#server/auth-session.ts'
33
import { redirectToLogin } from '#server/auth-redirect.ts'
44
import { Layout } from '#server/layout.ts'
@@ -25,7 +25,4 @@ export const account = {
2525

2626
return response
2727
},
28-
} satisfies BuildAction<
29-
typeof routes.account.method,
30-
typeof routes.account.pattern
31-
>
28+
} satisfies Action<typeof routes.account>

server/handlers/auth-handler.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="bun" />
22
import { beforeAll, expect, test } from 'vitest'
3-
import { RequestContext } from 'remix/fetch-router'
3+
import { RequestContext } from 'remix/router'
44
import { setAuthSessionSecret } from '#server/auth-session.ts'
55
import { createPasswordHash } from '#server/password-hash.ts'
66
import { createAuthHandler } from './auth.ts'

server/handlers/auth.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type BuildAction } from 'remix/fetch-router'
1+
import { type Action } from 'remix/router'
22
import { enum_, object, parseSafe, string } from 'remix/data-schema'
33
import { createAuthCookie, isSecureRequest } from '#server/auth-session.ts'
44
import { getRequestIp, logAuditEvent } from '#server/audit-log.ts'
@@ -235,5 +235,5 @@ export function createAuthHandler(appEnv: AppEnv) {
235235
},
236236
)
237237
},
238-
} satisfies BuildAction<typeof routes.auth.method, typeof routes.auth.pattern>
238+
} satisfies Action<typeof routes.auth>
239239
}

server/handlers/chat-threads.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type BuildAction } from 'remix/fetch-router'
1+
import { type Action } from 'remix/router'
22
import { readAuthenticatedAppUser } from '#server/authenticated-user.ts'
33
import { type routes } from '#server/routes.ts'
44
import { createChatThreadsStore } from '#server/chat-threads.ts'
@@ -58,10 +58,7 @@ export function createChatThreadsHandler(appEnv: AppEnv) {
5858
const thread = await store.createForUser(user.userId)
5959
return jsonResponse({ ok: true, thread }, { status: 201 })
6060
},
61-
} satisfies BuildAction<
62-
typeof routes.chatThreadsCreate.method | typeof routes.chatThreads.method,
63-
typeof routes.chatThreads.pattern
64-
>
61+
} satisfies Action<typeof routes.chatThreads>
6562
}
6663

6764
export function createDeleteChatThreadHandler(appEnv: AppEnv) {
@@ -111,10 +108,7 @@ export function createDeleteChatThreadHandler(appEnv: AppEnv) {
111108

112109
return jsonResponse({ ok: true })
113110
},
114-
} satisfies BuildAction<
115-
typeof routes.chatThreadsDelete.method,
116-
typeof routes.chatThreadsDelete.pattern
117-
>
111+
} satisfies Action<typeof routes.chatThreadsDelete>
118112
}
119113

120114
export function createUpdateChatThreadHandler(appEnv: AppEnv) {
@@ -176,8 +170,5 @@ export function createUpdateChatThreadHandler(appEnv: AppEnv) {
176170

177171
return jsonResponse({ ok: true, thread })
178172
},
179-
} satisfies BuildAction<
180-
typeof routes.chatThreadsUpdate.method,
181-
typeof routes.chatThreadsUpdate.pattern
182-
>
173+
} satisfies Action<typeof routes.chatThreadsUpdate>
183174
}

server/handlers/chat.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type BuildAction } from 'remix/fetch-router'
1+
import { type Action } from 'remix/router'
22
import { readAuthSessionResult } from '#server/auth-session.ts'
33
import { redirectToLogin } from '#server/auth-redirect.ts'
44
import { Layout } from '#server/layout.ts'
@@ -21,4 +21,4 @@ export const chat = {
2121

2222
return response
2323
},
24-
} satisfies BuildAction<typeof routes.chat.method, typeof routes.chat.pattern>
24+
} satisfies Action<typeof routes.chat>

server/handlers/health-handler.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="bun" />
22
import { expect, test } from 'vitest'
3-
import { RequestContext } from 'remix/fetch-router'
3+
import { RequestContext } from 'remix/router'
44
import { createHealthHandler } from './health.ts'
55

66
function createHealthRequestContext() {

server/handlers/health.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type BuildAction } from 'remix/fetch-router'
1+
import { type Action } from 'remix/router'
22
import { type routes } from '#server/routes.ts'
33
import { type AppEnv } from '#types/env-schema.ts'
44

@@ -21,8 +21,5 @@ export function createHealthHandler(appEnv: HealthEnv) {
2121
},
2222
)
2323
},
24-
} satisfies BuildAction<
25-
typeof routes.health.method,
26-
typeof routes.health.pattern
27-
>
24+
} satisfies Action<typeof routes.health>
2825
}

0 commit comments

Comments
 (0)