* fix(sessions): load all sessions across projects, not just active directory Closes #48 Root cause: loadSessions() used connState.client which carries the active connection's directory as x-opencode-directory header. The server filters sessions by that directory, so only the current project's sessions were visible. Fix: call clientForDirectory(undefined) to get a no-header client. The server then returns sessions from all projects. The session row UI already showed a directory badge (shortDir from session.directory), so no UI change is needed — each session already displays its project folder name. * fix(sessions): preserve directory when opening rows Carry each listed session directory into the route so selection, messages, and follow-up operations use the matching project client. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -49,7 +49,10 @@ function SessionItem({
|
||||
onDelete: () => void
|
||||
}) {
|
||||
const onPress = () => {
|
||||
router.push(`/session/${session.id}`)
|
||||
router.push({
|
||||
pathname: `/session/[id]`,
|
||||
params: { id: session.id, ...(session.directory ? { directory: session.directory } : {}) },
|
||||
})
|
||||
}
|
||||
|
||||
const onLongPress = () => {
|
||||
|
||||
Reference in New Issue
Block a user