Skip to content

Conversation

jluhrs
Copy link
Contributor

@jluhrs jluhrs commented Oct 13, 2025

No description provided.

def obsCountdown[F[_]: Temporal](total: TimeSpan, elapsed: TimeSpan): Stream[F, Progress] =
Stream.emit(ObsProgress(total, RemainingTime(total), ObserveStage.Preparing)) ++
(elapsed === TimeSpan.Zero).fold(
Stream.emit(ObsProgress(total, RemainingTime(total), ObserveStage.Preparing)),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an improvement for the simulated countdown: skip the "Preparing" notification if the observation was already started.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

.actionResume(seqId,
i,
c
.progress(ElapsedTime(c.expTime))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The solution was to start the progress notification at the same time the stopObserve command was emited. This will produce the notification for the "ReadingOut" stage.

Copy link
Contributor

@rpiaggio rpiaggio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@jluhrs jluhrs merged commit 91e52cd into gemini-hlsw:main Oct 13, 2025
17 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants