feat(maestro): stamp last-focused time on the session (#145)
Add Session::last_focused_at, shipped on the wire like every other field. Both POST /api/sessions/:id/focus (focused: true) and opening /api/attach/:id stamp it and emit SessionUpdated, so a client that only attaches sorts the same as one that reports focus explicitly. Losing focus does not clear it, and a never-focused session has None, which is what lets the command bar's empty-query ordering (docs/COMMAND-BAR.md) sort it after every session that has focused.
This commit is contained in:
@@ -46,6 +46,7 @@ pub fn session(id: Uuid, cwd: &str, command: &str) -> Session {
|
||||
activity_since: chrono::Utc::now(),
|
||||
current_cwd: None,
|
||||
blocked_work: None,
|
||||
last_focused_at: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user