Skip to content

Meta: fix waitForElement and once parameter of observe - #9258

Merged
SunsetTechuila merged 4 commits into
mainfrom
observe-once
Apr 24, 2026
Merged

SunsetTechuila merged 4 commits into
mainfrom
observe-once

Conversation

@SunsetTechuila

Copy link
Copy Markdown
Contributor

Fixes #9257

Test URLs

Screenshot

@github-actions github-actions Bot added bug meta Related to Refined GitHub itself labels Apr 24, 2026
Comment thread source/helpers/selector-observer.tsx Resolved
Comment thread source/helpers/selector-observer.tsx Resolved
Comment thread source/helpers/selector-observer.tsx Resolved
signal,
stopOnDomReady,
once: true,
ancestor: 4,

@SunsetTechuila SunsetTechuila Apr 24, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Image Image

getCallerId adds 1 to ancestor. Default is 1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I can't guarantee it just by looking at it. Try calling waitForElement twice in sequence and see what the ID is. If it's the same, then it's wrong. Two calls should have two different IDs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tweaked the value first and only then asked Copilot to explain it. So yes, it's tested

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

image

@SunsetTechuila SunsetTechuila changed the title Meta: fix once parameter of observe helper Meta: fix waitForElement and once parameter of observe Apr 24, 2026
@SunsetTechuila
SunsetTechuila merged commit 299d624 into main Apr 24, 2026
13 checks passed
@SunsetTechuila
SunsetTechuila deleted the observe-once branch April 24, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

The once parameter of the observe helper is useless

2 participants