Skip to content

feat: improve follow checks, extension UX and improve README - #25

Open
cheemney wants to merge 1 commit into
alicangunduz:mainfrom
cheemney:feat/improve-extension
Open

feat: improve follow checks, extension UX and improve README#25
cheemney wants to merge 1 commit into
alicangunduz:mainfrom
cheemney:feat/improve-extension

Conversation

@cheemney

@cheemney cheemney commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What changed

This PR focuses on simplifying the extension's architecture, removing the unnecessary GitHub token requirement, fixing the existing tab/profile issues, and adding runtime language selection.

Follow-status checks

  • Removed the GitHub Personal Access Token requirement.
  • Switched follow checks to GitHub's public GET /users/{username}/following/{target_user} endpoint.
  • Removed the tabs and webNavigation permissions that were no longer necessary.
  • Simplified the communication between the content script and background service worker.
  • Added the required GitHub API version and Accept headers.
  • Added clearer handling for rate limits, network errors, API errors, and invalid profiles.
  • Added an explicit check for the user's own profile to avoid unnecessary API requests.
  • Made username comparisons case-insensitive.

Issues addressed

This PR addresses the following open issues:

#19 — Multiple tab bug

Closes #19

The previous implementation could sometimes show an incorrect follow status when multiple GitHub tabs were open or when navigating between profiles quickly.

The follow check is now tied to the profile currently displayed in each tab instead of relying on shared tab-dependent state. Stale API responses are also ignored when the user navigates to another profile before a previous request finishes.

#23 — Own profile badge

Closes #23

The extension now explicitly detects when the visited profile belongs to the configured GitHub username.

In that case, no follow-status API request is made and the follow badge is not displayed. This also prevents the extension from incorrectly treating the user's own profile as a profile that follows them.

#22 — Refactoring

Closes #22

The existing implementation had duplicated navigation handling and state shared across different tabs.

As part of this change, I simplified the background service worker, moved the follow check to a message-based flow, removed unnecessary browser permissions, separated API handling from UI rendering, and added clearer handling for different application states.

The goal was to make the code easier to follow and maintain without introducing a build step or additional dependencies.

Localization

The existing locales.json is now used as the extension's runtime localization source.

The extension currently supports:

  • English
  • Turkish
  • Spanish
  • French
  • Simplified Chinese
  • Japanese
  • Korean
  • Russian

The extension now:

  • Detects the browser language on first launch.
  • Falls back to English when the browser language is not supported.
  • Allows the language to be changed directly from the popup.
  • Stores the selected language locally.
  • Applies translations to the popup, follow-status badges, validation messages, and API errors.
  • Updates the displayed badge when the language is changed.

Popup and UX

  • Reworked the popup layout and form controls.
  • Added username validation.
  • Added localized feedback when saving settings.
  • Removed external font and icon dependencies.
  • Fixed the bug-report link and popup event handling.
  • Improved focus states and status announcements.

Privacy

The extension no longer requires or stores a GitHub access token.

The configured GitHub username and language preference are stored locally using chrome.storage.local.

There is no third-party backend. Follow-status requests are sent directly to GitHub's public REST API.

Documentation

  • Updated the README to reflect the new setup and authentication flow.
  • Added a Turkish version of the README.
  • Kept the existing project screenshot while restructuring the documentation.
  • Documented the supported languages and language selection behavior.
  • Documented the API behavior and privacy model.
  • Updated the changelog.

Testing

  • Validated manifest.json and locales.json.
  • Checked the JavaScript files for syntax errors.
  • Tested the extension as an unpacked Chrome extension.
  • Tested self-profile handling and profile navigation.
  • Tested multiple-tab behavior and stale API responses.
  • Tested language selection and browser-language fallback.
  • Tested API error and rate-limit states.

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.

Block from appearing on your own profile page Refactor needed Multiple tab bug

1 participant