Commit cd5e629
committed
fix(webapp): anchor schedules-list lastRun on updatedAt, not createdAt
ScheduleListPresenter was guarding the cron-derived lastRun against
schedule.createdAt, which only proves the row exists. If a schedule
was edited (cron changed, timezone changed) or deactivated and then
reactivated, the cron's previous slot might predate the most recent
config change but still pass the createdAt guard — surfacing a
"Last run" the schedule never actually fired at under the current
configuration.
Switch the guard to schedule.updatedAt. Prisma's @updatedat bumps on
every row update (cron change, timezone change, activate toggle, etc.),
so the cron-derived slot is only shown once it's strictly after the
most recent config change — meaning the current config has been in
effect long enough to have actually fired at that slot.
Per CodeRabbit review on PR #3476.1 parent db83e67 commit cd5e629
1 file changed
Lines changed: 9 additions & 6 deletions
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| |||
249 | 250 | | |
250 | 251 | | |
251 | 252 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
257 | 260 | | |
258 | 261 | | |
259 | 262 | | |
260 | 263 | | |
261 | 264 | | |
262 | 265 | | |
263 | 266 | | |
264 | | - | |
| 267 | + | |
265 | 268 | | |
266 | 269 | | |
267 | 270 | | |
| |||
0 commit comments