* 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:
@@ -43,8 +43,9 @@ interface ConnectionsState {
|
||||
) => Promise<{ ok: boolean; error?: string }>
|
||||
updateConnection: (id: string, updates: Partial<ServerConnection>) => Promise<void>
|
||||
refreshProject: () => Promise<void>
|
||||
// Create a one-off client pointing at a specific directory (for cross-project operations)
|
||||
clientForDirectory: (directory: string) => Client | null
|
||||
// Create a one-off client pointing at a specific directory (for cross-project operations).
|
||||
// Pass undefined to get a directory-less client that queries the server without project scope.
|
||||
clientForDirectory: (directory?: string) => Client | null
|
||||
// Switch the active connection's directory and reload
|
||||
switchDirectory: (directory?: string) => Promise<void>
|
||||
// Record a directory as recently used
|
||||
|
||||
Reference in New Issue
Block a user