Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
81e9a51
fix: change overflow property to 'visible' for better layout in Setti…
hoangsvit Jul 8, 2026
62a86ac
fix: update version to 1.2.1 in package.json and adjust overflow prop…
hoangsvit Jul 8, 2026
c5dc658
fix: import createPortal from react-dom for proper rendering in Selec…
hoangsvit Jul 8, 2026
4f29972
fix: update hover styles for tab buttons and adjust button border rad…
hoangsvit Jul 8, 2026
6e5b73f
feat: enhance statistics component with new metrics and localization …
hoangsvit Jul 8, 2026
55921cf
Add Russian and Turkish localization files for Gmail Alias Toolkit
hoangsvit Jul 8, 2026
3af6702
fix(i18n): update Chinese translations for clarity and consistency
hoangsvit Jul 8, 2026
d2952b4
style: format code with Prettier
deepsource-autofix[bot] Jul 8, 2026
777a7cf
refactor: simplify imports and improve key usage in charts
hoangsvit Jul 8, 2026
5781903
style: format code with Prettier
deepsource-autofix[bot] Jul 8, 2026
9763300
docs: add JSDoc comments to Statistics component functions
hoangsvit Jul 8, 2026
6fd628d
docs: add development guide with code standards and JSDoc requirements
hoangsvit Jul 8, 2026
5b42e02
style: format code with Prettier
deepsource-autofix[bot] Jul 8, 2026
3f3e55d
fix: hide Tags tab when fewer than 2 tags to prevent poor pie chart r…
hoangsvit Jul 8, 2026
875e1db
Merge branch 'dev' of https://github.com/ePlus-DEV/gmail-alias-toolki…
hoangsvit Jul 8, 2026
29a1609
feat: implement Phase 1 - auto-detect website, normalize hostname, ge…
hoangsvit Jul 8, 2026
be21a42
refactor: enhance context menu with dynamic website-specific suggestions
hoangsvit Jul 8, 2026
c1392cb
docs: add Phase 1 implementation details to CLAUDE.md
hoangsvit Jul 8, 2026
2c5f829
feat(Phase 2): add email input icons with suggestion popups
hoangsvit Jul 8, 2026
53e4d7f
docs: add Phase 2 email input helper documentation
hoangsvit Jul 8, 2026
ab1c792
fix: resolve duplicate content script entrypoint - consolidate into s…
hoangsvit Jul 8, 2026
66e97f8
fix: correct import path in websiteAliasService.ts
hoangsvit Jul 8, 2026
fdb1677
style: format code with Prettier
deepsource-autofix[bot] Jul 8, 2026
53d5a1c
style: use extension icon with prominent badge styling (Roboform-like)
hoangsvit Jul 8, 2026
3f3c847
style: add hover highlight effect on input field when icon is hovered
hoangsvit Jul 8, 2026
ae17424
refactor: reorganize content script files into proper folder structure
hoangsvit Jul 8, 2026
67f33bb
refactor: move email helper CSS to src/styles folder
hoangsvit Jul 8, 2026
f4c1068
refactor: colocate email helper CSS with content script (WXT best pra…
hoangsvit Jul 8, 2026
8e593b3
feat: open popup on hover icon (not click)
hoangsvit Jul 8, 2026
b50a859
feat: add info panel in popup with supported rules and privacy notice
hoangsvit Jul 8, 2026
74b7b0e
fix: keep popup open when hovering over it with delay-based close
hoangsvit Jul 8, 2026
4bb190a
debug: add console logging to email input detection and icon injection
hoangsvit Jul 8, 2026
fffcfbe
ux: add explicit 'Use' buttons to suggestions - require confirmation …
hoangsvit Jul 8, 2026
a723917
ux: adjust popup positioning - overlap with input to prevent mouselea…
hoangsvit Jul 8, 2026
40f5bf6
feat: add live preview on suggestion hover - shows alias in input bef…
hoangsvit Jul 8, 2026
fc0f1b2
style: format code with Prettier
deepsource-autofix[bot] Jul 8, 2026
863eb34
style: add visual indicator for preview mode - blue tint on input
hoangsvit Jul 8, 2026
ec08f68
Merge branch 'dev' of https://github.com/ePlus-DEV/gmail-alias-toolki…
hoangsvit Jul 8, 2026
5059ab4
feat: enhance alias selection and popup positioning - add previous al…
hoangsvit Jul 9, 2026
0a37ec7
feat: enhance popup functionality - add tab navigation and history se…
hoangsvit Jul 9, 2026
c5be959
style: improve popup design - enhance styling and layout for better u…
hoangsvit Jul 9, 2026
a5c18af
style: format code with Prettier
deepsource-autofix[bot] Jul 9, 2026
86cd9b3
style: adjust input styling - set flex and min-width for better layout
hoangsvit Jul 9, 2026
858d191
Merge branch 'dev' of https://github.com/ePlus-DEV/gmail-alias-toolki…
hoangsvit Jul 9, 2026
f5b26c3
fix: preserve email input layout width when injecting icon
hoangsvit Jul 13, 2026
f84c1ad
fix: add flex properties to wrapper to properly fill parent container
hoangsvit Jul 13, 2026
0cc51da
fix: capture and preserve original input layout properties
hoangsvit Jul 13, 2026
06d64ac
refactor: position icon absolutely without wrapping input
hoangsvit Jul 13, 2026
10afb3f
feat: show all aliases in history tab without website filter
hoangsvit Jul 13, 2026
92a8e66
style: add border and background to icon container for visual consist…
hoangsvit Jul 13, 2026
4af1091
fix: resolve DeepSource code quality issues
hoangsvit Jul 13, 2026
f02f125
Potential fix for pull request finding 'CodeQL / Client-side cross-si…
hoangsvit Jul 13, 2026
6e130f0
style: format code with Prettier
deepsource-autofix[bot] Jul 13, 2026
bd0f14d
fix: add missing JSDoc comment for escapeHtml function
hoangsvit Jul 13, 2026
c3c790c
refactor: reduce cyclomatic complexity of context menu handler
hoangsvit Jul 13, 2026
9f332c2
style: format code with Prettier
deepsource-autofix[bot] Jul 13, 2026
d043e44
fix: use account-based history storage in popup History tab
hoangsvit Jul 13, 2026
2772949
fix: remove unnecessary async from generateEmail function
hoangsvit Jul 13, 2026
35f8967
fix: revert version number to 1.2.0 in package.json
hoangsvit Jul 13, 2026
7b852b8
fix: update version number to 1.3.0 in package.json
hoangsvit Jul 13, 2026
b9a4e4b
chore: update CHANGELOG for version 1.3.0 with added, changed, and fi…
hoangsvit Jul 13, 2026
0de5e10
feat: enhance email history management with account-specific storage …
hoangsvit Jul 14, 2026
1658a8c
feat: implement batch alias saving and enhance history management wit…
hoangsvit Jul 14, 2026
3f038f3
feat: add internationalization support for menu items and loading mes…
hoangsvit Jul 14, 2026
a2db799
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
4146242
feat: enhance email input icon positioning and styling, add support f…
hoangsvit Jul 14, 2026
9ab73c3
feat: integrate tldts for enhanced hostname normalization and update …
hoangsvit Jul 14, 2026
36e825e
feat: enhance icon positioning and popup behavior for email input, im…
hoangsvit Jul 14, 2026
93f6e9a
feat: enhance icon positioning logic and add preferred side calculati…
hoangsvit Jul 14, 2026
cd95911
feat: implement inline helper disable functionality with site managem…
hoangsvit Jul 14, 2026
9224bc1
feat: enhance icon positioning logic by introducing placement directi…
hoangsvit Jul 14, 2026
0ebd077
feat: enhance popup disable button with tooltip and improved styling …
hoangsvit Jul 14, 2026
370d04b
feat: enhance popup layout and add footer with review links for impro…
hoangsvit Jul 14, 2026
b5e268e
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
9305385
feat: add index.html for production build and enhance metadata
hoangsvit Jul 14, 2026
5a92866
Merge branch 'dev' of https://github.com/ePlus-DEV/gmail-alias-toolki…
hoangsvit Jul 14, 2026
4662189
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
b42c3b0
feat: add inline popup feature with detailed user guidance and enhanc…
hoangsvit Jul 14, 2026
3b40de2
Merge branch 'dev' of https://github.com/ePlus-DEV/gmail-alias-toolki…
hoangsvit Jul 14, 2026
e044c80
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
73235e4
feat: implement dark mode toggle and enhance UI components in extensi…
hoangsvit Jul 14, 2026
e5d822f
feat: upgrade React and TypeScript types, add ThemeToggle component, …
hoangsvit Jul 14, 2026
36f6f95
Merge branch 'dev' of https://github.com/ePlus-DEV/gmail-alias-toolki…
hoangsvit Jul 14, 2026
5d8d87f
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
991ee5d
feat: add Firefox installation link and translations for Firefox support
hoangsvit Jul 14, 2026
dbe3f1b
Merge branch 'dev' of https://github.com/ePlus-DEV/gmail-alias-toolki…
hoangsvit Jul 14, 2026
c67e865
feat: enhance inline popup functionality and improve UI components
hoangsvit Jul 14, 2026
78a3c7c
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
5f704b9
docs: update changelog and readme with code quality improvements
hoangsvit Jul 14, 2026
7dbe28f
test: add comprehensive unit tests for services and content script he…
hoangsvit Jul 14, 2026
8f1c9d5
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
c134e06
docs: add publishing procedures and pre-submission checklist to contr…
hoangsvit Jul 14, 2026
0a7b99b
docs: add submission workflow for Chrome & Firefox stores with .env.s…
hoangsvit Jul 14, 2026
cba0b59
refactor: remove submission test script and update contributing guide…
hoangsvit Jul 14, 2026
2cb247b
refactor: update release workflow for improved clarity and efficiency
hoangsvit Jul 14, 2026
ab808c5
fix: resolve DeepSource code quality issues
hoangsvit Jul 14, 2026
2b541e7
refactor: enhance hostname normalization to preserve subdomains and i…
hoangsvit Jul 14, 2026
52e16a8
fix: resolve all remaining DeepSource code quality issues
hoangsvit Jul 14, 2026
1bee720
fix: remove duplicate state prefix in object literal
hoangsvit Jul 14, 2026
559c52c
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
63c3c11
fix: restore hover logic in inline demo popup
hoangsvit Jul 14, 2026
147c116
Merge branch 'dev' of https://github.com/ePlus-DEV/gmail-alias-toolki…
hoangsvit Jul 14, 2026
e9347dd
fix: resolve final 3 DeepSource issues
hoangsvit Jul 14, 2026
1464c07
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
62caeee
chore: apply selectedAlias cleanup
hoangsvit Jul 14, 2026
358981e
fix(web): remove unused selectedAlias prop
github-actions[bot] Jul 14, 2026
d21d2f2
chore: apply PR review fixes
hoangsvit Jul 14, 2026
910b88d
docs: sync README version with package
hoangsvit Jul 14, 2026
f2eb332
chore: remove temporary review workflow
hoangsvit Jul 14, 2026
f4041c1
perf: optimize alias filtering
hoangsvit Jul 14, 2026
afd53fd
test: cover PR review regressions
hoangsvit Jul 14, 2026
f876aff
chore: ignore TypeScript build info
hoangsvit Jul 14, 2026
88010bb
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
55893e2
chore: remove generated TypeScript build info
hoangsvit Jul 14, 2026
f99a439
docs: record review fixes
hoangsvit Jul 14, 2026
24e8e89
ci: run compile and tests before build
hoangsvit Jul 14, 2026
c4daa5d
ci: preserve TypeScript diagnostics
hoangsvit Jul 14, 2026
47226cb
fix(types): stop shadowing lucide-react exports
hoangsvit Jul 14, 2026
a01d2f9
chore: apply TypeScript fixes
hoangsvit Jul 14, 2026
e6e8e97
ci: apply remaining review fixes
hoangsvit Jul 14, 2026
34834f5
ci: make review fix patch robust
hoangsvit Jul 14, 2026
8cc8771
fix: resolve TypeScript compile errors
github-actions[bot] Jul 14, 2026
b3312f8
style: format code with Prettier
deepsource-autofix[bot] Jul 14, 2026
097bb5e
ci: finalize compile test build checks
hoangsvit Jul 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:

jobs:
ci:
name: Build
name: Compile, Test, Build
runs-on: ubuntu-latest

steps:
Expand All @@ -37,5 +37,28 @@ jobs:
- name: Prepare WXT types
run: yarn exec wxt prepare

- name: Compile TypeScript
id: compile
continue-on-error: true
shell: bash
run: |
set -o pipefail
yarn compile --pretty false 2>&1 | tee compile.log

- name: Upload TypeScript diagnostics
if: steps.compile.outcome == 'failure'
uses: actions/upload-artifact@v5
with:
name: typescript-diagnostics
path: compile.log
if-no-files-found: error

- name: Fail on TypeScript errors
if: steps.compile.outcome == 'failure'
run: exit 1

- name: Run tests
run: yarn test

- name: Build extension
run: yarn build
43 changes: 17 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Submit to Web Store"
name: Submit to Web Store
permissions:
contents: write

Expand All @@ -7,10 +7,6 @@ on:
tags:
- "[0-9]+.[0-9]+.[0-9]+"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-release:
name: Build and Release
Expand All @@ -27,32 +23,30 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Enable Corepack
run: corepack enable
uses: actions/checkout@v4

- name: Setup Node.js with Yarn cache
uses: actions/setup-node@v6
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: "yarn"
cache: yarn

- name: Install dependencies
run: yarn install --immutable --mode=skip-build
run: yarn install --frozen-lockfile

- name: Prepare WXT types
run: yarn exec wxt prepare
run: yarn wxt prepare

- name: Run tests
run: yarn test

- name: Build the extension
- name: Build extension
run: |
yarn zip
yarn zip:firefox --mv3
yarn zip -b edge
yarn zip -b opera
yarn zip:firefox

- name: Verify build outputs
run: ls -l .output/*.zip
run: ls -lh .output/*.zip

- name: Update CHANGELOG
id: changelog
Expand All @@ -69,19 +63,16 @@ jobs:
file_pattern: CHANGELOG.md

- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v3
uses: softprops/action-gh-release@v2
with:
name: "v.${{ github.ref_name }}"
draft: true
name: "v${{ github.ref_name }}"
draft: false
generate_release_notes: true
body_path: INSTALL.md
files: .output/*.zip

- name: Submit to stores
if: startsWith(github.ref, 'refs/tags/')
run: |
yarn exec wxt submit \
yarn wxt submit \
--chrome-zip .output/*-chrome.zip \
--firefox-zip .output/*-firefox.zip \
--firefox-sources-zip .output/*-sources.zip
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ lerna-debug.log*

node_modules
.output
web/dist/
*.tsbuildinfo
stats.html
stats-*.json
.wxt
Expand Down
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,44 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Added comprehensive JSDoc comments to all functions and components to meet documentation standards
- Fixed async/await anti-patterns by replacing `void` statements with proper `.catch()` error handlers
- Improved variable declarations to use `const` where appropriate
- Optimized JSX component nesting by extracting inline form input into a separate component
- Resolved all DeepSource code quality warnings (24 issues)
- Optimized alias filtering by normalizing search input once and using a set for favorites
- Added regression coverage for plus-addressed Gmail validation and trimmed searches
- Removed generated TypeScript build-info files from version control

## [1.3.0] - 2026-07-13

### Added

- Added website-aware alias suggestions based on the current hostname
- Added an email input helper with inline icons, suggestion popups, live previews, and explicit Use actions
- Added previous-alias navigation and an information panel explaining supported rules and local-only storage
- Added expanded statistics metrics and Russian and Turkish translations
- Added a product landing page with automated GitHub Pages deployment

### Changed

- Enhanced the context menu with dynamic, website-specific alias suggestions
- Updated the History tab to show aliases across websites and store history per email account
- Improved popup navigation, layout, styling, and alias selection behavior
- Reorganized the content script and colocated its email helper styles

### Fixed

- Preserved email input width and flex layout when injecting the helper icon
- Improved helper popup positioning and hover behavior to prevent accidental closing
- Hid the Tags statistics tab when there is not enough data for a useful chart
- Hardened content rendering against client-side cross-site scripting
- Resolved code quality, localization, and build workflow issues

## [1.2.0] - 2026-07-03

### Added
Expand Down
200 changes: 200 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
# Gmail Alias Toolkit Development Guide

## Code Standards

### JSDoc Comments (Required)

All functions, arrow functions, and exported components must have a JSDoc comment. This prevents DeepSource (`JS-D1001`) documentation warnings.

**Rule:** Every function declaration, arrow function, and exported component needs at minimum a one-line JSDoc comment describing its purpose.

**Format:**

```typescript
/** Brief description of what this function does. */
function myFunction() {
// ...
}
```

**Examples:**

- `/** Renders a bar chart comparing alias creation counts for today, week, and month. */`
- `/** Loads active email account and fetches associated statistics from storage. */`
- `/** Handles storage changes and reloads stats if relevant keys change. */`

**Why:** DeepSource flags missing documentation as `JS-D1001` errors. Adding JSDoc prevents build/review failures and maintains code clarity.

---

## Project Structure

- `entrypoints/` - Browser extension entry points
- `src/` - Shared components and utilities
- `lib/` - Core libraries (i18n, etc.)

---

## Phase 1: Website Detection & Auto-suggestions

**Implemented:**

- Auto-detect active tab website (hostname normalization)
- Generate 5 alias suggestions per site
- Save website → alias mapping (local storage)
- Show "Previously used" alias in Statistics tab
- Display suggestions in Statistics tab with one-click copy
- Integrated into right-click context menu (3 suggestions)
- Auto-save mapping when suggestion is used

**Key Files:**

- `src/utils/hostnameNormalizer.ts` — URL → clean keyword (shopee, github, etc.)
- `src/services/websiteAliasService.ts` — Storage, retrieval, suggestion generation
- `entrypoints/background.ts` — Messaging + dynamic context menu population
- `entrypoints/popup/components/Statistics.tsx` — Website detection UI

**Privacy Note:**

Local-first: All mappings stored in browser.storage.local. No server or analytics.

---

## Phase 2: Email Input Helper UI

**Implemented:**

- Detect email inputs on any webpage
- Inject blue icon next to each input (like Roboform)
- Popup on icon click showing:
- Previous alias for current website (highlighted in yellow)
- 5 suggestion buttons
- One-click fill + auto-save mapping
- Supports controlled inputs (React, Vue, Angular)
- Watch for dynamically added inputs (SPA support)
- Dark mode styling

**Key Files:**

- `entrypoints/content/index.ts` — Content script entry point
- `entrypoints/content/email-input-helper.ts` — Icon injection + popup logic
- `entrypoints/content/email-input-helper.css` — UI styling

**Detection Logic:**

- Looks for: `input[type="email"]`, `input[name*="email"]`, `input[placeholder*="email"]`
- Uses MutationObserver to catch dynamically added inputs
- Skips hidden inputs (offsetParent === null)

---

## Testing & CI

### Automated Code Quality Checks

Code is checked by DeepSource for:

- Documentation completeness (JS-D1001) — All functions and components require JSDoc
- Unused imports/variables (JS-0356)
- Array index keys (JS-0437)
- Anti-patterns: void statements, improper variable declarations
- Other code quality issues

All issues must be resolved before merging to `main`.

### Unit Testing with Vitest

The project uses **Vitest** for unit testing. Tests are located in the `tests/` directory mirroring the source structure.

**Test File Locations:**

- `tests/services/` — Tests for service layer (websiteAliasService, etc.)
- `tests/utils/` — Tests for utility functions (hostnameNormalizer, inlineSiteSettings, etc.)
- `tests/popup/` — Tests for popup components and utilities
- `tests/content/` — Tests for content script helper functions

**Running Tests:**

```bash
npm test # Run all tests
npm test -- [file] # Run specific test file
npm test -- --ui # Run with UI dashboard
npm test -- --coverage # Generate coverage report
```

**Test Standards:**

1. **Coverage Requirements:**
- Utility functions: 100% line coverage
- Service layer: 90%+ line coverage
- Components: 80%+ line coverage

2. **Test Organization:**
- One test file per module
- Use `describe()` blocks to group related tests
- Test both success and error paths
- Mock external dependencies (browser APIs, storage)

3. **Best Practices:**
- Use descriptive test names that explain what is being tested
- Test edge cases and boundary conditions
- Mock browser storage and extension APIs
- Arrange → Act → Assert pattern for test structure
- Use `beforeEach()` to reset state between tests

**Example Test Structure:**

```typescript
import { describe, expect, it, beforeEach, vi } from "vitest";

describe("functionName", () => {
beforeEach(() => {
// Reset state before each test
vi.clearAllMocks();
});

it("should do something specific", () => {
// Arrange: Set up test data
const input = "test";

// Act: Call the function
const result = functionName(input);

// Assert: Verify the result
expect(result).toBe("expected");
});
});
```

### Test Coverage

**Current Coverage Areas:**

- ✅ Hostname normalization and URL parsing
- ✅ Website alias storage and retrieval
- ✅ Alias suggestion generation
- ✅ Email address normalization
- ✅ HTML escaping (XSS prevention)
- ✅ Inline site settings management
- ✅ Gmail tricks generation (dot tricks, plus tags, etc.)
- ✅ Custom alias creation
- ✅ Popup components (Button, Input, Toggle, etc.)

**Add Tests For:**

- New utility functions (100% line coverage)
- Service layer changes (test both happy path and error cases)
- Complex component logic (interaction testing)
- Browser API integrations (with proper mocking)

### Continuous Integration

Pull requests to `main` require:

1. ✅ All tests passing
2. ✅ Code coverage maintained
3. ✅ DeepSource checks passing (zero issues)
4. ✅ TypeScript type checking strict mode
5. ✅ Prettier formatting compliance

See [CONTRIBUTING.md](CONTRIBUTING.md#publishing-to-extension-stores) for publishing and store submission procedures.
Loading