fix(flowpilot): widen message bar, add close/abandon session support
- Message bar now fixed-positioned above action bar with full-width
layout (respects both app sidebar and session sidebar)
- Added abandon_session endpoint (POST /ai-sessions/{id}/abandon)
- Added "Close" button to FlowPilot action bar with confirmation dialog
- Session can now be closed without resolving or escalating
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -793,6 +793,29 @@ async def resume_session(
|
||||
await db.flush()
|
||||
|
||||
|
||||
async def abandon_session(
|
||||
session_id: UUID,
|
||||
user_id: UUID,
|
||||
reason: Optional[str],
|
||||
db: AsyncSession,
|
||||
) -> None:
|
||||
"""Close a session without resolving or escalating.
|
||||
|
||||
Used when the engineer no longer needs help, figured it out on their own,
|
||||
or the session is no longer relevant.
|
||||
"""
|
||||
session = await _load_session(session_id, user_id, db)
|
||||
|
||||
if session.status not in ("active", "paused"):
|
||||
raise ValueError(f"Cannot close session in status: {session.status}")
|
||||
|
||||
session.status = "abandoned"
|
||||
session.resolved_at = datetime.now(timezone.utc)
|
||||
if reason:
|
||||
session.resolution_notes = reason
|
||||
await db.flush()
|
||||
|
||||
|
||||
async def rate_session(
|
||||
session_id: UUID,
|
||||
rating: int,
|
||||
|
||||
Reference in New Issue
Block a user