fix: resolve four frontend/backend issues
- Fix ProjectsPage tests by wrapping renders in MemoryRouter (9 passing) - Improve session auto-naming to 'project / repo / tool' format - Add missing /users/me/sessions endpoint for sidebar session loading - Handle git history 500s: catch RuntimeError in endpoints, graceful empty repo handling - Add git status badge and discard-changes button to FileEditor toolbar Quality gates: tsc pass, build pass, Python syntax pass
This commit is contained in:
@@ -15,3 +15,27 @@ class CreateInstanceRequest(BaseModel):
|
||||
config_profile_id: str | None = Field(
|
||||
default=None, description="Optional config profile ID to apply to the instance"
|
||||
)
|
||||
|
||||
|
||||
class SessionItemResponse(BaseModel):
|
||||
"""Lightweight session summary for sidebar and dashboard."""
|
||||
|
||||
model_config = {"extra": "ignore"}
|
||||
|
||||
id: str = Field(description="Session (tool instance) ID")
|
||||
display_name: str = Field(description="Display name of the session")
|
||||
tool_type_name: str = Field(description="Name of the tool type")
|
||||
tool_icon: str | None = Field(default=None, description="Icon URL for the tool type")
|
||||
tool_type_interfaces: list[str] = Field(default_factory=list, description="Supported interfaces")
|
||||
repository_name: str = Field(description="Name of the repository")
|
||||
repository_id: str = Field(description="Repository ID")
|
||||
project_name: str = Field(description="Name of the project")
|
||||
project_id: str = Field(description="Project ID")
|
||||
status: str = Field(description="Current status")
|
||||
url: str | None = Field(default=None, description="Access URL")
|
||||
|
||||
|
||||
class SessionListResponse(BaseModel):
|
||||
"""Response wrapping a list of session summaries."""
|
||||
|
||||
sessions: list[SessionItemResponse]
|
||||
|
||||
Reference in New Issue
Block a user