Skip to content

behavior logging: remove last line dupe check for behavior logs #874

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 30, 2025

Conversation

ikreymer
Copy link
Member

@ikreymer ikreymer commented Jul 30, 2025

Shouldn't skip multiple log messages, as this is unexpected behavior for user-defined behaviors.

@ikreymer ikreymer changed the title behavior logging: last line dupe check should use actual last line, n… behavior logging: last line dupe check should use actual last line Jul 30, 2025
@ikreymer ikreymer requested a review from tw4l July 30, 2025 02:36
Copy link
Member

@tw4l tw4l left a comment

Choose a reason for hiding this comment

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

I think this is getting closer but still not quite where we want it.

By only looking at the message, Lib.getState() calls that use the same message but increment counters now don't appear in the behavior logs after the first iteration.

e.g. https://github.com/webrecorder/custom-behaviors/blob/main/behaviors/timeline.js#L54

Do we actually need to be checking for dupes at all? Almost seems like we're creating an undocumented barrier in the way of developing custom behaviors.

@ikreymer
Copy link
Member Author

I think this is getting closer but still not quite where we want it.

By only looking at the message, Lib.getState() calls that use the same message but increment counters now don't appear in the behavior logs after the first iteration.

e.g. https://github.com/webrecorder/custom-behaviors/blob/main/behaviors/timeline.js#L54

Do we actually need to be checking for dupes at all? Almost seems like we're creating an undocumented barrier in the way of developing custom behaviors.

Yeah, you're right, maybe we should just remove this. I think was mostly used for autoscroll to reduce logging, but that should just be handled in Autoscroll..

@ikreymer ikreymer changed the title behavior logging: last line dupe check should use actual last line behavior logging: remove last line dupe check for behavior logs Jul 30, 2025
@ikreymer ikreymer requested a review from tw4l July 30, 2025 17:33
@ikreymer
Copy link
Member Author

Updated to 0.9.2 for behavior webrecorder/browsertrix-behaviors#104 fix

@ikreymer ikreymer merged commit 18fe5a9 into main Jul 30, 2025
4 checks passed
@ikreymer ikreymer deleted the fix-behavior-log-dupe-check branch July 30, 2025 23:20
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