Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-15943] - fix extension flicker when filling in a password #13143

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

jaasen-livefront
Copy link
Collaborator

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-15943

📔 Objective

This PR fixes an issue where, upon autofilling, the extension UI would quickly reload before closing. The cause was the call to await this.cipherService.updateLastUsedDate(options.cipher.id); which was causing the service to re-emit values and the consuming components to re-render. Doing the update in the background avoids the UI flicker but still ensures the last used password is still top of the autofill suggestion list.

📸 Screenshots

Screen.Recording.2025-01-29.at.1.11.56.PM.mov

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@jaasen-livefront jaasen-livefront requested a review from a team as a code owner January 29, 2025 21:12
Copy link
Contributor

github-actions bot commented Jan 29, 2025

Logo
Checkmarx One – Scan Summary & Detailsefaa391c-2dd3-4b8a-b070-c727d23d5861

Great job, no security vulnerabilities found in this Pull Request

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 35.38%. Comparing base (aef8121) to head (09b0940).
Report is 50 commits behind head on main.

Files with missing lines Patch % Lines
apps/browser/src/background/runtime.background.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13143      +/-   ##
==========================================
+ Coverage   35.37%   35.38%   +0.01%     
==========================================
  Files        3010     3010              
  Lines       91176    91150      -26     
  Branches    16996    16982      -14     
==========================================
  Hits        32251    32251              
+ Misses      56419    56397      -22     
+ Partials     2506     2502       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

if (!options.skipLastUsed) {
await this.cipherService.updateLastUsedDate(options.cipher.id);
// In order to prevent a UI update send message to background script to update last used date
Copy link
Contributor

Choose a reason for hiding this comment

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

I appreciate this note!

Copy link
Contributor

@jprusik jprusik left a comment

Choose a reason for hiding this comment

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

LGTM - thanks 👍

@jaasen-livefront jaasen-livefront merged commit 1b3bc71 into main Feb 4, 2025
35 checks passed
@jaasen-livefront jaasen-livefront deleted the PM-15943-2 branch February 4, 2025 20:38
jprusik added a commit that referenced this pull request Feb 10, 2025
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