Skip to content

Conversation

@nkomonen-amazon
Copy link
Contributor

Problem:

We have an explicit force refresh of the auth webview when it is shown/hidden. There is not an obvious reason why we do this.

This causes problems since we expect that show/hiding of the webview does not trigger any functional changes since we have configured the webview to continue running even while hidden. This means that our handlers for auth changes are still running even when auth is hidden.

For my specific issue, by force reloading the webview on every show/hide it triggered the webview loading code each time, causing webview telemetry events to be triggered more than expected.

Solution:

Remove the force reload line. With this change we can move the edge case handling code which throttled the telemetry emitted when it was triggered on every hide/show.

I've done manual testing and have not noted any obvious regressions to the expected user flow.


  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

Problem:

We have an explicit force refresh of the auth webview when it is shown/hidden.
There is not an obvious reason why we do this.

This causes problems since we expect that show/hiding of the webview does not trigger
any functional changes since we have configured the webview to continue running even
while hidden. This means that our handlers for auth changes are still running even
when auth is hidden.

For my specific issue, by force reloading the webview on every show/hide it triggered
the webview loading code each time, causing webview telemetry events to be triggered
more than expected.

Solution:

Remove the force reload line. With this change we can move the edge case handling code which
throttled the telemetry emitted when it was triggered on every hide/show.

I've done manual testing and have not noted any obvious regressions to the expected user flow.

Signed-off-by: nkomonen-amazon <[email protected]>
@nkomonen-amazon nkomonen-amazon requested a review from a team as a code owner March 24, 2025 15:28
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.

@nkomonen-amazon
Copy link
Contributor Author

nkomonen-amazon commented Mar 24, 2025

/runIntegrationTests

Copy link
Contributor

@jpinkney-aws jpinkney-aws left a comment

Choose a reason for hiding this comment

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

I wonder if we originally had this because our super old auth flow needed a way to be reset if the webview was closed/opened? For some reason I vaguely remember something about that. Regardless its probably not relevant now

@nkomonen-amazon
Copy link
Contributor Author

@jpinkney-aws that sounds accurate. Right now we have some event listeners that will force the UI to refresh on change of the auth connection, and separately if the user happens to log in/out we will change from the auth to chat view regardless of the explicit webview refresh. So as you said it doesn't seem relevant anymore!

@nkomonen-amazon nkomonen-amazon merged commit c238710 into aws:master Mar 25, 2025
29 of 32 checks passed
Hweinstock pushed a commit to Hweinstock/aws-toolkit-vscode that referenced this pull request Mar 26, 2025
## Problem:

We have an explicit force refresh of the auth webview when it is
shown/hidden. There is not an obvious reason why we do this.

This causes problems since we expect that show/hiding of the webview
does not trigger any functional changes since we have configured the
webview to continue running even while hidden. This means that our
handlers for auth changes are still running even when auth is hidden.

For my specific issue, by force reloading the webview on every show/hide
it triggered the webview loading code each time, causing webview
telemetry events to be triggered more than expected.

## Solution:

Remove the force reload line. With this change we can move the edge case
handling code which throttled the telemetry emitted when it was
triggered on every hide/show.

I've done manual testing and have not noted any obvious regressions to
the expected user flow.

---

- Treat all work as PUBLIC. Private `feature/x` branches will not be
squash-merged at release time.
- Your code changes must meet the guidelines in
[CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines).
- License: I confirm that my contribution is made under the terms of the
Apache 2.0 license.

Signed-off-by: nkomonen-amazon <[email protected]>
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