Skip to content

v1.3.1#67

Merged
hoangsvit merged 72 commits into
mainfrom
dev
Jul 20, 2026
Merged

v1.3.1#67
hoangsvit merged 72 commits into
mainfrom
dev

Conversation

@hoangsvit

@hoangsvit hoangsvit commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

Type of Change

  • Bug fix
  • New feature
  • UI / UX update
  • Translation / i18n update
  • Refactor
  • Tests
  • Build / CI / release
  • Documentation

Areas Touched

  • Popup alias generator
  • Settings
  • Account management
  • Alias history / favorites / statistics
  • Gmail tricks
  • Context menu / background logic
  • Browser extension manifest / permissions
  • Other:

Testing

  • yarn compile
  • yarn test
  • yarn build
  • Loaded the extension locally and tested the changed flow
  • Tested light and dark mode, if UI changed
  • Checked translations, if user-facing text changed

Screenshots or Recording

Notes for Reviewers

Summary by CodeRabbit

  • New Features
    • Added a “Main Account” section to the inline suggestions popup with preview-on-hover and click-to-select.
    • Improved website suggestions with per-page caching and updated suggestion titles.
  • Bug Fixes
    • Reduced console noise by quietly failing on website/alias, badge, and history loading issues while preserving user-visible behavior (including retry where applicable).
    • Refined “disable site” UX with temporary disablement and clearer failure feedback.
    • Hardened alias saving, icon injection, and email input detection for safer, quieter operation.
  • Style / UI
    • Added an error-themed visual state for invalid alias inputs.
  • Release / Maintenance
    • Bumped version to 1.3.1 and updated dev/prod site permissions.

hoangsvit and others added 3 commits July 20, 2026 09:55
…ndling

fix: optimize DOM observation with debounce for email input detection
chore: update version to 1.3.1 and use constant for toast duration
Performance:
- Remove polling loop; MutationObserver handles detection
- Fix ResizeObserver memory leak on SPA nav
- Extract getActiveEmail() helper; remove 4x duplication
- Add suggestion caching (invalidate on URL change)
- Debounce MutationObserver (100ms) to reduce CPU thrashing

Fixes:
- Version 1.1.0 → 1.3.0 (match changelog)
- Toast duration configurable via TOAST_DURATION
- Context menu shows full email (user@domain.com)
- Remove all 16 console statements

Feature:
- Add main account email to inline popup
- Blue highlighted button at popup top
- Hover preview + one-click select
- Consistent with prev alias/suggestions UI

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@eplus-bot

Copy link
Copy Markdown
Contributor

Thank you for creating this pull request and helping make the project better.

We will review / merge it when we are online.

@eplus-bot eplus-bot added needs-review Pull request is ready for maintainer review app Application or extension source code ui User interface or visual changes labels Jul 20, 2026
@eplus-bot
eplus-bot self-requested a review July 20, 2026 03:22
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Active-email resolution is centralized across background flows, website suggestions are cached by page URL and email, and inline Gmail alias selection gains a main-account control. Failure paths are quieter, input detection uses debounced DOM observation, environment-specific access is configured, and settings/package versions are updated.

Changes

Runtime and inline alias flow

Layer / File(s) Summary
Background alias and suggestion handling
entrypoints/background.ts
Active-email selection is centralized; website suggestions are cached by page URL and email, rendered with derived titles, and selected failures no longer log errors.
Inline alias selection and failure handling
entrypoints/content/index.ts, entrypoints/content/email-helper.css
The inline UI adds main-account selection, handles suggestion and history failures with user-facing states, and shows input error styling when alias persistence fails.
Icon injection and input detection
entrypoints/content/index.ts
Icon cleanup is hardened, visible and wide inputs are filtered, DOM detection is debounced, and periodic scanning is removed.
Environment-specific content access
entrypoints/content/index.ts, wxt.config.ts
Production uses broad content-script matching and host permissions, while non-production uses an explicit development site allowlist.

Settings and release version

Layer / File(s) Summary
Settings version and toast behavior
entrypoints/popup/components/Settings.tsx
Toast timing uses a named constant, the initial displayed version is 1.3.0, and manifest lookup failures retain the current version.
Package release version
package.json
The package version is updated to 1.3.1.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ContextMenu
  participant Background
  participant SessionStorage
  ContextMenu->>Background: refresh suggestions for pageUrl
  Background->>SessionStorage: read contextMenuWebsiteCache
  SessionStorage-->>Background: cached suggestions or cache miss
  Background->>SessionStorage: store suggestions for pageUrl and activeEmail
  Background-->>ContextMenu: create titled suggestion menu items
Loading

Suggested reviewers: eplus-bot

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is just a version number and does not describe the actual changes in this pull request. Use a concise, descriptive title that summarizes the main change, such as the user-facing feature or bug fix.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Comment @coderabbitai help to get the list of available commands.

@deepsource-io

deepsource-io Bot commented Jul 20, 2026

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in 9ec1055...ea11faf on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
JavaScript Jul 20, 2026 2:43p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@entrypoints/content/index.ts`:
- Around line 713-715: Update the history-loading catch block around historyList
so storage failures render a distinct error/retry state instead of the
noResultsFound empty state. Keep noResultsFound exclusively for successful loads
with no history, and provide the user with a retry action or equivalent recovery
path.
- Around line 371-373: Update the disableInlineForCurrentSite error handling so
a rejected persistence operation is surfaced to the user through the existing
retryable UI error or toast mechanism instead of being silently ignored.
Preserve the current disable flow and connect the catch path to the appropriate
visible error feedback.
- Around line 1283-1285: Update the catch block in the icon initialization flow
to remove the partially initialized icon container and reset the input marker
state before swallowing the error. Use the existing container and marker symbols
assigned immediately before the catch, ensuring failed initialization cannot
remain detectable or trigger duplicate injection.
- Around line 133-135: The account lookup catch in the surrounding content
initialization flow must not continue with the default email after storage
failure. Update the catch to return an unavailable/error state or preserve only
a verified last-known account, ensuring the placeholder "your.email@gmail.com"
cannot reach alias persistence and avoiding silent continuation that masks the
failure.
- Around line 1235-1237: Preserve alias-save failures across both layers: in
entrypoints/content/index.ts lines 1235-1237, update the alias-save catch path
to propagate a stable failure result and display a retryable UI error; in
entrypoints/background.ts lines 358-359, return or report the persistence
failure instead of swallowing it as success. Use the existing alias-save
contract symbols and keep successful saves unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c554e2ec-678d-4dbe-95b8-a10379d80dfa

📥 Commits

Reviewing files that changed from the base of the PR and between 9ec1055 and ad536f4.

📒 Files selected for processing (3)
  • entrypoints/background.ts
  • entrypoints/content/index.ts
  • entrypoints/popup/components/Settings.tsx

Comment thread entrypoints/content/index.ts Outdated
Comment thread entrypoints/content/index.ts Outdated
Comment thread entrypoints/content/index.ts
Comment thread entrypoints/content/index.ts
Comment thread entrypoints/content/index.ts
DeepSource JS-0356: 'error' defined but never used in catch handler.
Remove parameter name since error is silently ignored.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@eplus-bot eplus-bot added the build-ci Build, CI, release, or project configuration label Jul 20, 2026
This commit fixes the style issues introduced in 56cbed5 according to the output
from Prettier.

Details: #67

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@entrypoints/background.ts`:
- Around line 34-50: The getActiveEmail helper in entrypoints/background.ts
diverges from the shared account contract by ignoring the first email_accounts
entry and not normalizing the selected address. Reuse the resolver and
normalizer used by the shared account flow in entrypoints/content/index.ts,
preserving the configured account fallback and avoiding duplicated selection
logic.
- Around line 565-585: Update the contextMenuWebsiteCache shape and logic around
generateSuggestionsForWebsite to store activeEmail alongside url and
suggestions, and reuse cached suggestions only when both cached.activeEmail
matches activeEmail and cached.url matches info.pageUrl. Include activeEmail in
the storage.session.set cache entry.

In `@entrypoints/popup/components/Settings.tsx`:
- Line 673: Update the initial fallback value in the version state used by
Settings to match the current release version 1.3.1, including the corresponding
fallback at the additional referenced location, or reuse the shared
release-version source so manifest-access failures display the correct version.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 23141ecf-df07-4827-a562-de0beed0f6a6

📥 Commits

Reviewing files that changed from the base of the PR and between ad536f4 and 74bde55.

📒 Files selected for processing (4)
  • entrypoints/background.ts
  • entrypoints/content/index.ts
  • entrypoints/popup/components/Settings.tsx
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • entrypoints/content/index.ts

Comment thread entrypoints/background.ts
Comment thread entrypoints/background.ts Outdated
Comment thread entrypoints/popup/components/Settings.tsx
eplus-bot
eplus-bot previously approved these changes Jul 20, 2026

@eplus-bot eplus-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved by @eplus-bot after all pull request checks passed.

CI run: https://github.com/ePlus-DEV/gmail-alias-toolkit/actions/runs/29715020518

@eplus-bot

eplus-bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

CI passed

Approved by @eplus-bot after all pull request checks passed.

Approval refresh: #9
CI updated: 2026-07-20T14:42:38Z
CI attempt: #1
Approval workflow: #261.1

CI run: https://github.com/ePlus-DEV/gmail-alias-toolkit/actions/runs/29751786752

hoangsvit and others added 4 commits July 20, 2026 10:45
If account storage is inaccessible, return null from fetchSuggestions
instead of silently continuing with placeholder 'your.email@gmail.com'.
This prevents:
- Aliases being saved under wrong account
- Silent masking of storage failures
- Suggestions generated with unverified email

Impact: Better error isolation; popup won't show if account can't be verified.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
When disabling inline helper for current site fails, provide visual
feedback instead of silently ignoring:
- Disable button during operation
- On success: close popup (current behavior)
- On failure: show error state with:
  * Button remains enabled for retry
  * Reduced opacity indicates error
  * Tooltip updated with error message

Impact: User aware of disable failures; can retry action.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
When saving alias to history/website map fails, provide visual feedback:
- Check message response from background.ts for errors
- Track save success/failure across all tasks
- On failure: highlight input with error styling for 3 seconds
- Add tooltip explaining that alias was filled but save failed
- Add gmail-alias-input-error CSS class with red background/border

Impact: User aware of persistence failures; can investigate storage issues.
Background.ts already returns error responses on failure (no changes needed).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
If icon injection fails after DOM append, remove partially initialized
state to prevent duplicate injection attempts and orphaned elements:
- Remove iconContainer from DOM
- Reset input marker state (__gmailAliasIcon, __gmailAliasPosition, __gmailAliasCleanup)
- Disconnect ResizeObserver if created
- Remove event listeners added to window

Impact: Failed injections no longer leave orphaned DOM or marker state.
Prevents duplicate injection on retry.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit fixes the style issues introduced in 94dcefa according to the output
from Prettier.

Details: #67

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@entrypoints/content/index.ts`:
- Around line 1354-1362: Move nullable cleanup references for iconContainer and
state outside the try block, then assign them during initialization. In the
catch block, guard iconContainer before removing it and state before
disconnecting the observer or removing listeners, while preserving the existing
input property cleanup.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6037911c-4ace-4992-a1db-fd668abf92a0

📥 Commits

Reviewing files that changed from the base of the PR and between 74bde55 and c91fb33.

📒 Files selected for processing (2)
  • entrypoints/content/email-helper.css
  • entrypoints/content/index.ts

Comment thread entrypoints/content/index.ts Outdated
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 1 file(s) based on 1 unresolved review comment.

A stacked PR containing fixes has been created.

  • Stacked PR: #68
  • Files modified:
  • entrypoints/content/index.ts

Time taken: 4m 2s

Fixed 1 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@hoangsvit hoangsvit closed this Jul 20, 2026
@hoangsvit hoangsvit reopened this Jul 20, 2026
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

eplus-bot
eplus-bot previously approved these changes Jul 20, 2026

@eplus-bot eplus-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved by @eplus-bot after all pull request checks passed.

CI run: https://github.com/ePlus-DEV/gmail-alias-toolkit/actions/runs/29747890736

eplus-bot
eplus-bot previously approved these changes Jul 20, 2026

@eplus-bot eplus-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved by @eplus-bot after all pull request checks passed.

CI run: https://github.com/ePlus-DEV/gmail-alias-toolkit/actions/runs/29748718448

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Preview removed

The temporary website preview for this pull request has been removed.

@eplus-bot eplus-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved by @eplus-bot after all pull request checks passed.

CI run: https://github.com/ePlus-DEV/gmail-alias-toolkit/actions/runs/29751786752

@hoangsvit
hoangsvit merged commit 4e619bd into main Jul 20, 2026
11 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for helping make Gmail Alias Toolkit better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Application or extension source code build-ci Build, CI, release, or project configuration documentation Improvements or additions to documentation i18n Translation or localization changes needs-review Pull request is ready for maintainer review ui User interface or visual changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants