fix(sessions): keep created-session scope through navigation and send (#10)
createSession now stamps the scope directory onto the returned session, and the create-session navigation passes that directory to the detail screen. Previously a freshly created home-scoped session was opened/addressed with the default (CWD) client because the route carried no directory param — the same scope mismatch class as #10, on the open/send path instead of the list path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -188,7 +188,10 @@ export default function SessionsScreen() {
|
||||
const onCreateSession = async () => {
|
||||
const session = await createSession()
|
||||
if (session) {
|
||||
router.push(`/session/${session.id}`)
|
||||
router.push({
|
||||
pathname: `/session/[id]`,
|
||||
params: { id: session.id, ...(session.directory ? { directory: session.directory } : {}) },
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +230,10 @@ export default function SessionsScreen() {
|
||||
setShowNewSession(false)
|
||||
setCustomDir("")
|
||||
if (session) {
|
||||
router.push(`/session/${session.id}`)
|
||||
router.push({
|
||||
pathname: `/session/[id]`,
|
||||
params: { id: session.id, ...(session.directory ? { directory: session.directory } : {}) },
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user