Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Conversation

@eseliger
Copy link
Member

@eseliger eseliger commented Aug 25, 2022

After switching back to wildcard tabs, it was forgotten that before those components would not render at the same time.
https://github.com/sourcegraph/sourcegraph/pull/40110 migrated to using the wildcard components directly, but forgot to port over the lazy parameter: https://github.com/sourcegraph/sourcegraph/pull/40110/files#diff-733709eadc832fc5f74d1eb476d37c6ae449569239cc0b8653f550cac409d1d1L127

I think this doesn't affect the other stuff that you wanted to address in that PR, correct @courier-new? At least I don't see why we couldn't use lazy with that new tabbing approach.

This missing parameter causes two issues:

  • Going to the bulp operations tab doesn't reload so it's unclear where the bulk operation went (noticed that while debugging)
  • The Bulk operations, Executions and Changesets tabs will all three race for the visible (and other, likely) URL query param and keep updating it, leading to an infinite loop of updates, freezing up the page.

Closes https://github.com/sourcegraph/customer/issues/1262

Test plan

Verified that the scenario described in https://github.com/sourcegraph/customer/issues/1262 doesn't happen anymore with this change.

App preview:

Check out the client app preview documentation to learn more.

After switching back to wildcard tabs, it was forgotten that before those components would not render at the same time. This causes two issues:
- Going to the bulp operations tab doesn't reload so it's unclear where the bulk operation went (noticed that while debugging)
- The Bulk operations, Executions and Changesets tabs will all three race for the `visible` (and other, likely) URL query param and keep updating it, leading to an infinite loop of updates until Chrome prevents the loop.
@eseliger eseliger requested review from a team and courier-new August 25, 2022 17:39
@cla-bot cla-bot bot added the cla-signed label Aug 25, 2022
@sourcegraph-bot
Copy link
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 02fb2e8...316ecbe.

Notify File(s)
@courier-new client/web/src/enterprise/batches/BatchChangeTabs.tsx

Copy link
Contributor

@Piszmog Piszmog left a comment

Choose a reason for hiding this comment

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

Just curious, would an e2e test or something should have caught this - if possible?

Copy link
Contributor

@LawnGnome LawnGnome left a comment

Choose a reason for hiding this comment

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

Had to dig into the Wildcard implementation a bit to verify that this actually does what we want, but seems good to me.

@eseliger
Copy link
Member Author

We have some tests that cover these pages, technically, but I think they currently don't have data in all the tabs.. Maybe it would have! I can try that later.

Copy link
Contributor

@courier-new courier-new left a comment

Choose a reason for hiding this comment

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

Thanks so much, Erik! This is exactly why I asked for another set of eyes on that previous refactor... 🙈 Guess I should have asked more aggressively, heh. This shouldn't affect that bug, no! 🙌

@courier-new
Copy link
Contributor

Re:tests, do our e2e tests click the "show more" button/can we mock that somehow? That'd be cool if so! I haven't been able to get the e2e tests to work since I upgraded to the M2 MacBook though so good luck. 😅

@eseliger
Copy link
Member Author

Nice, that sounds like fun! 😢

@eseliger eseliger merged commit f21dd61 into main Aug 25, 2022
@eseliger eseliger deleted the es/no-race-batches-tabs branch August 25, 2022 18:15
unknwon pushed a commit that referenced this pull request Aug 29, 2022
After switching back to wildcard tabs, it was forgotten that before those components would not render at the same time. This causes two issues:
- Going to the bulp operations tab doesn't reload so it's unclear where the bulk operation went (noticed that while debugging)
- The Bulk operations, Executions and Changesets tabs will all three race for the `visible` (and other, likely) URL query param and keep updating it, leading to an infinite loop of updates until Chrome prevents the loop.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants