Skip to content

quick-review - Improve reliability#9846

Merged
fregante merged 11 commits into
mainfrom
svelte-status
Jul 17, 2026
Merged

quick-review - Improve reliability#9846
fregante merged 11 commits into
mainfrom
svelte-status

Conversation

@fregante

@fregante fregante commented Jul 17, 2026

Copy link
Copy Markdown
Member

I don't think this fixes this issue, but potentially we'll be able to just call "remount" and svelte will not trigger the internal logic code:

Test URLs

Screenshot

Screenshot Screenshot 1

@fregante fregante added the meta Related to Refined GitHub itself label Jul 17, 2026
@fregante fregante changed the title quick-review - Svelte component quick-review - Improve reliability Jul 17, 2026
Comment thread source/features/quick-review.tsx Outdated
Comment on lines +91 to +92
// "h3" required to exclude "x more reviewers without write access"
observe('[aria-label="Select reviewers"] h3.discussion-sidebar-heading', addSidebarReviewButtons, {signal});

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Bugfix. The feature was missing there

@fregante fregante added bug and removed meta Related to Refined GitHub itself labels Jul 17, 2026
@fregante
fregante marked this pull request as ready for review July 17, 2026 12:38
@fregante
fregante enabled auto-merge (squash) July 17, 2026 16:41
@fregante
fregante disabled auto-merge July 17, 2026 16:41
@fregante
fregante enabled auto-merge (squash) July 17, 2026 16:47
@fregante
fregante disabled auto-merge July 17, 2026 16:48

@fregante fregante left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Made a bunch of improvements to simplify names and usage. I'm so close to just deleting the code for the old version.

}

function initReviewRequestedButton(signal: AbortSignal): void {
delegate('section[aria-label="Review Request Banner"] a[type="button"]', 'click', onReviewRequestedButtonClick, {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I dropped this.

Our "Review now" button is specifically an action to quickly approve/reject a PR.

This banner is a formal invite to actually review the PR, we should not change the intent.

const prFilesChangedTabSelector = 'a#prs-files-anchor-tab';

const isNewFilesChangedExperienceEnabled = (): boolean => $(prFilesChangedTabSelector).href.endsWith('changes');
const isOldPrFiles = (): boolean => $(prFilesChangedTabSelector).href.endsWith('files');

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Now "new"

Comment on lines -62 to -65
function handleReviewClick(event: DelegateEvent<MouseEvent>): void {
if (isAlteredClick(event) || !isNewFilesChangedExperienceEnabled()) {
return;
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Conditions inlined.
Merged handleReviewClick into openReviewDialogWhenAvailable

// Trigger data preloading
// TODO [2027-01-01]: Change `$optional` to `$()` once legacy PR files view is removed
$optional(prFilesChangedTabSelector)?.dispatchEvent(new MouseEvent('mouseover', {bubbles: true}));
$(prFilesChangedTabSelector).dispatchEvent(new MouseEvent('mouseover', {bubbles: true}));

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

preloadPrFilesTab is no longer called when not necessary

@fregante
fregante merged commit fc3578e into main Jul 17, 2026
13 checks passed
@fregante
fregante deleted the svelte-status branch July 17, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant