`rgh-improve-new-issue-form` - Restore version auto-input by SunsetTechuila · Pull Request #9293 · refined-github/refined-github · GitHub
Skip to content

rgh-improve-new-issue-form - Restore version auto-input#9293

Merged
fregante merged 4 commits into
mainfrom
rgh-issue-form
Apr 30, 2026
Merged

rgh-improve-new-issue-form - Restore version auto-input#9293
fregante merged 4 commits into
mainfrom
rgh-issue-form

Conversation

@SunsetTechuila

Copy link
Copy Markdown
Contributor

@SunsetTechuila SunsetTechuila added bug meta Related to Refined GitHub itself labels Apr 28, 2026
Comment on lines +81 to +82

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 don't think there is a better solution

@SunsetTechuila SunsetTechuila Apr 28, 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.

Session storage key for auto-restore: refined-github-refined-github.1_bug_report.yml-Extension version-client:MDEwOlJlcG9zaXRvcnk1MTc2OTY4OQ==:issueForm(filename:"1_bug_report.yml"):elements:3

The client value can be taken from the command palette DOM (unreliable) or from the React payload (slow and unreliable). Additionally, we can't be sure if we set the value fast enough for GitHub to pick it up

Comment on lines +81 to +82
// Wait for GitHub listener to be registered
await delay(2000);

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.

Minimum value for me is 1000

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.

It's also inconsistent. I definitely ran into the issue during multiple tests with a 500ms delay, but I can't reproduce it now. Let's settle on 1000ms

Comment on lines +81 to +82
// Wait for GitHub listener to be registered
await delay(2000);

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.

Bug demo:

Image

);

// Wait for GitHub's listener to be attached #9293
await delay(2000);

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.

Two seconds is a long time, won't it affect any other fields if the user is already typing? If not, we're good to go.

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.

won't it affect any other fields if the user is already typing

It doesn't

fixes occasional element not found errors
@fregante fregante merged commit b2b7a6d into main Apr 30, 2026
10 checks passed
@fregante fregante deleted the rgh-issue-form branch April 30, 2026 09:06
@fregante

fregante commented Apr 30, 2026

Copy link
Copy Markdown
Member

Copilot AI pushed a commit that referenced this pull request Apr 30, 2026
Co-authored-by: fregante <1402241+fregante@users.noreply.github.com>
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.

2 participants