dgtlmoon / changedetection.io

The best and simplest free open source web page change detection, website watcher, restock monitor and notification service. Restock Monitor, change detection. Designed for simplicity - Simply monitor which websites had a text change for free. Free Open source web page change detection, Website defacement monitoring, Price change notification
https://changedetection.io
Apache License 2.0
16.85k stars 941 forks source link

[feature] Use same diff format in notification and in diff page. #2554

Open petersg83 opened 1 month ago

petersg83 commented 1 month ago

Describe the bug Often I see that the diff in the notification is different than on the diff page. Sometimes there is a tiny change (like one red line and one green line) on the diff page but the notification diff is enormous (tens of lines of changed, into, added, removed).

Version Exact version in the top right area: 0.46.02

Expected behavior I expect the diff to be the same

Screenshots Here is a small example where the lines "removed" are not the same in notification and in diff page

notification Capture d’écran 2024-08-08 à 00 03 48

diff page

Capture d’écran 2024-08-08 à 00 03 54
petersg83 commented 1 month ago

Another example:

Capture d’écran 2024-08-12 à 00 56 01 Capture d’écran 2024-08-12 à 00 56 18
dgtlmoon commented 3 weeks ago

Hmm it's not a bug, more a "feature", because they use different ways to present the data

the coloured version is actually rendered by JavaScript which CANNOT be used in emails, discord, slack etc

petersg83 commented 3 weeks ago

Yes I understand, so maybe the issue I have is more the "diff notification is complex whereas it seems it could be not"? Here is an example of this morning.

Diff in notification:

(changed)       * Project Controls, Planner
(into)       * Project Manager
(changed)       * Project Manager
(into)     Operations - Plant Engineering
(into)
(into)       * Senior Mechanical Engineer
(changed)     Operations - Plant Engineering
(changed)
(changed)       * Senior Mechanical Engineer
(into)       * Lead Electrical Engineer
(changed)       * Lead Electrical Engineer
(into)     Operations - Plant Operations
(into)
(into)       * Maintenance Engineer - Electrical
(into)
(into)           Reykjavik, Iceland
(into)
(into)       * Senior Process Engineer
(into)
(into)           Reykjavik, Iceland
(into)
(into)       * Maintenance Manager
(into)
(into)           Reykjavik, Iceland
(into)
(into)     Operations - Purchasing & Logistics
(into)
(into)       * Senior Manager Supply Chain
(changed)     Operations - Plant Operations
(changed)
(changed)       * Maintenance Engineer - Electrical
(changed)
(changed)           Reykjavik, Iceland
(changed)
(changed)       * Senior Process Engineer
(changed)
(changed)           Reykjavik, Iceland
(changed)
(changed)       * Maintenance Manager
(changed)
(changed)           Reykjavik, Iceland
(changed)
(changed)     Operations - Purchasing & Logistics
(changed)
(changed)       * Senior Manager Supply Chain
(into)       * Senior Manager Supply Chain (80-100%)
(into)
(into)           Zurich, Switzerland
(into)
(into)     Product
(into)
(into)       * Senior Design Engineer (80-100%)
(into)
(into)           Zurich, Switzerland
(into)
(into)       * Calculation Engineer (80-100%)
(into)
(into)           Zurich, Switzerland
(into)
(into)     Project Development
(into)
(into)       * Lead CCS Specialist
(changed)       * Senior Manager Supply Chain (80-100%)
(into)       * Lead CCS Specialist (80 - 100%)
(into)
(into)           Cologne, Germany
(into)
(into)       * Lead CCS Specialist (80 - 100%)
(changed)     Product
(changed)
(changed)       * Senior Design Engineer (80-100%)
(into)     Technology
(into)
(into)       * Senior Development Specialist in Adsorption (80-100%)
(changed)       * Calculation Engineer (80-100%)
(into)       * Performance Engineer Lead (80-100%)
(changed)     Project Development
(changed)
(changed)       * Lead CCS Specialist
(changed)
(changed)           Austin, United States
(changed)
(changed)       * Lead CCS Specialist (80 - 100%)
(changed)
(changed)           Cologne, Germany
(changed)
(changed)       * Lead CCS Specialist (80 - 100%)
(into)       * Senior Manager Sorbent Structures Industrialization (80-100%)
(changed)     Technology
(changed)
(changed)       * Senior Development Specialist in Adsorption (80-100%)
(into)       * Senior Research Engineer - Energy (80-100%)
(changed)       * Performance Engineer Lead (80-100%)
(into)       * Senior Process Engineer - Energy (80-100%)
(changed)       * Senior Manager Sorbent Structures Industrialization (80-100%)
(into)       * Lead Development Specialist in Adsorption (80-100%)
(changed)       * Senior Research Engineer - Energy (80-100%)
(into)     Testing
(into)
(into)       * Stellvertretung Werkstättenleiter/in Prototypenbau (100%)
(into)
(into)           Zurich (Seebach), Switzerland
(into)
(into)       * Senior Test Engineer (80-100%)
(into)
(into)           Basel, Switzerland
(into)
(into)       * Director of Testing Operations (100%)
(changed)       * Senior Process Engineer - Energy (80-100%)
(changed)
(changed)           Zurich, Switzerland
(changed)
(changed)       * Lead Development Specialist in Adsorption (80-100%)
(changed)
(changed)           Zurich, Switzerland
(changed)
(changed)     Testing
(changed)
(changed)       * Stellvertretung Werkstättenleiter/in Prototypenbau (100%)
(into)       * Anlagen- und Apparatebauer/in (80-100%)
(removed)
(removed)       * Intern in Testing (100%)
(removed)
(removed)           Zurich, Switzerland
(removed)
(removed)       * Senior Test Engineer (80-100%)
(removed)
(removed)           Basel, Switzerland
(removed)
(removed)       * Director of Testing Operations (100%)
(removed)
(removed)           Zurich, Switzerland
(removed)
(removed)       * Anlagen- und Apparatebauer/in (80-100%)
(removed)
(removed)           Zurich (Seebach), Switzerland

Diff in changedetection.io:

Capture d’écran 2024-08-20 à 10 21 07 Capture d’écran 2024-08-20 à 10 21 18

As you can see, there are just some lines removed but the diff algorithm thought it was way more than that :P What do you think?