Repository navigation
feat(heartbeats): edit an existing heartbeat from the dashboard - #158
Merged
Merged
Conversation
Add an Edit button to the heartbeat detail, backed by a HeartbeatForm
component now shared with creation. Saving keeps the id, the ping token
and the history.
PUT /api/v1/heartbeats/{id} now shifts next_deadline_at by the change of
interval plus grace for up and started heartbeats, in the same UPDATE so
a concurrent ping is never overwritten. It refuses an interval lowered
under the current grace period, and emits heartbeat.updated, which the
heartbeat list applies live.
The detail shows next_deadline_at as the next expected time.
btouchard
force-pushed
the
048-heartbeat-edit
branch
from
October 24, 2026 14:59
86dbfd4 to
213f89a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Heartbeats could only be changed through the API, and changing the interval or grace left the deadline computed from the old values.
What changes
HeartbeatFormcomponent), prefilled; an interval set through the API outside the presets is kept as a selectable option.PUT /api/v1/heartbeats/{id}recomputesnext_deadline_atforupandstartedheartbeats from the same starting point (last ping, start of the run, or resume). It is done in theUPDATEitself, so a ping arriving meanwhile is not overwritten.new,pausedanddownkeep their deadline; a recomputed deadline already past is caught by the next check as a regulardeadline_missed.heartbeat.updatedkeeps the heartbeat lists of other open dashboards up to date.next_deadline_atas the next expected time (grace included).Behaviour change
PUTwith onlyinterval_secondslower than the current grace period now answers400 INVALID_INPUTinstead of storing a grace larger than the interval.Docs: new "Edit a Heartbeat" section in
docs/features/heartbeats.md,PUTand SSE entries indocs/api/reference.md.