mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-22 19:23:31 +00:00
fix: resolve webhook notification timestamp error and improve scroll timing
- Fix RangeError in AlertManager by using correct timestamp fields (triggeredAt/lastUpdate) instead of non-existent alert.timestamp - Replace Promise.resolve() with requestAnimationFrame() for better scroll position restoration timing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1234,7 +1234,7 @@ This alert was generated by Pulse monitoring system.
|
||||
};
|
||||
|
||||
const payload = {
|
||||
timestamp: new Date(alert.timestamp).toISOString(),
|
||||
timestamp: new Date(alert.triggeredAt || alert.lastUpdate || Date.now()).toISOString(),
|
||||
alert: {
|
||||
id: alert.id,
|
||||
rule: {
|
||||
|
||||
@@ -299,8 +299,8 @@ PulseApp.utils = (() => {
|
||||
// Execute the update function
|
||||
updateFn();
|
||||
|
||||
// Restore scroll positions after a microtask to ensure DOM is updated
|
||||
Promise.resolve().then(() => {
|
||||
// Restore scroll positions after DOM updates are complete
|
||||
requestAnimationFrame(() => {
|
||||
element.scrollLeft = scrollLeft;
|
||||
element.scrollTop = scrollTop;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user