fix(tui): preserve family session recency
This commit is contained in:
parent
dbd934689f
commit
729531550c
7 changed files with 165 additions and 56 deletions
|
|
@ -659,6 +659,7 @@ describe("SessionProjector", () => {
|
|||
directory: "/project",
|
||||
title: "test",
|
||||
version: "test",
|
||||
time_updated: -1,
|
||||
})
|
||||
.run()
|
||||
.pipe(Effect.orDie)
|
||||
|
|
@ -670,9 +671,17 @@ describe("SessionProjector", () => {
|
|||
.where(eq(SessionTable.id, sessionID))
|
||||
.get()
|
||||
.pipe(Effect.orDie)
|
||||
const updated = () =>
|
||||
db
|
||||
.select({ value: SessionTable.time_updated })
|
||||
.from(SessionTable)
|
||||
.where(eq(SessionTable.id, sessionID))
|
||||
.get()
|
||||
.pipe(Effect.orDie)
|
||||
|
||||
yield* bus.publish(SessionEvent.Execution.Interrupted, { sessionID, reason: "shutdown" })
|
||||
expect((yield* suspended())?.timeSuspended).toBeNull()
|
||||
expect((yield* updated())?.value ?? -1).toBeGreaterThan(-1)
|
||||
|
||||
yield* bus.publish(SessionEvent.Execution.Started, { sessionID })
|
||||
expect((yield* suspended())?.timeSuspended).toBeNull()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue