feat: improve session naming, project display, rename support, tab titles
Backend:
- sessions.py: include workspace_name in session response
- instance_service.py: auto-generate display names as
'Project / Workspace / Tool #N' instead of 'Workspace / Tool #N'
- instance_service.py: add rename_tool_instance() service function
- tool_instances.py: add PATCH /instances/{id} endpoint for renaming
display_name
Frontend:
- api/sessions.ts: add workspace_name to Session type, add renameInstance()
- use-instance-actions.ts: add handleRename, set document.title when opening
- session-card.tsx: click-to-edit display_name inline; always show project
context line (Project / Workspace or Repo / Tool)
- session-list.tsx: pass through onRename prop
- SessionsPage.tsx: wire handleRename to SessionCard and SessionList
- app-shell.tsx: sidebar tooltip includes workspace or repo name
- use-terminal-page.ts: set document.title based on active terminal session
Quality gates: py_compile all backend files pass, tsc --noEmit pass,
npm run build pass, 82/82 tests pass
This commit is contained in:
@@ -26,6 +26,7 @@ export interface Session {
|
||||
repository_id: string;
|
||||
project_name: string;
|
||||
project_id: string;
|
||||
workspace_name?: string | null;
|
||||
status: string;
|
||||
url: string | null;
|
||||
container_status?: string;
|
||||
@@ -188,6 +189,19 @@ export async function checkInstanceHealth(
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function renameInstance(
|
||||
projectId: string,
|
||||
repoId: string,
|
||||
instanceId: string,
|
||||
displayName: string,
|
||||
): Promise<{ id: string; name: string; display_name: string }> {
|
||||
const response = await apiClient.patch(
|
||||
`/projects/${projectId}/repositories/${repoId}/instances/${instanceId}`,
|
||||
{ display_name: displayName },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
export async function recreateInstanceTunnel(
|
||||
projectId: string,
|
||||
repoId: string,
|
||||
|
||||
Reference in New Issue
Block a user