app: use session_working helper to simplify loading states (#27212)

This commit is contained in:
Brendan Allan 2026-05-13 10:27:05 +08:00 committed by GitHub
commit 2f4dce789f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 10 additions and 26 deletions

View file

@ -208,6 +208,9 @@ export function createChildStoreManager(input: {
session: [],
sessionTotal: 0,
session_status: {},
session_working(id: string) {
return this.session_status[id].type !== "idle"
},
session_diff: {},
todo: {},
permission: {},

View file

@ -46,6 +46,7 @@ export type State = {
session_status: {
[sessionID: string]: SessionStatus
}
session_working(id: string): boolean
session_diff: {
[sessionID: string]: SnapshotFileDiff[]
}