Skip to content

Comments

feat(background): add GET_ACTIVE_TAB_INFO/GET_ACTIVE_TAB_URL to return active tab url and tabId#34

Merged
cto-new[bot] merged 1 commit intotestfrom
feat-background-get-active-tab-info-tabid
Nov 26, 2025
Merged

feat(background): add GET_ACTIVE_TAB_INFO/GET_ACTIVE_TAB_URL to return active tab url and tabId#34
cto-new[bot] merged 1 commit intotestfrom
feat-background-get-active-tab-info-tabid

Conversation

@cto-new
Copy link

@cto-new cto-new bot commented Nov 26, 2025

Summary

Add a new tab-aware background API that provides the active tab's URL and tabId. It supports both GET_ACTIVE_TAB_INFO and GET_ACTIVE_TAB_URL and returns a single payload with { url, tabId }.

Details

  • Implement GET_ACTIVE_TAB_INFO and GET_ACTIVE_TAB_URL handlers in background/index.ts to return { url, tabId, timestamp } with defaults when access is denied
  • Add ActiveTabInfo TypeScript interface with url, tabId, timestamp, and optional error; include JSDoc
  • Add defensive logging for missing tabs, IDs, or errors; include timestamp
  • Ensure backward compatibility by supporting both message names; side panel can request a single payload with { url, tabId }
  • No breaking changes; existing consumers remain compatible while gaining richer data

…n active tab url and tabId

This introduces a new tab-aware API in the background to fetch the active tab's URL and tabId, with robust fallbacks when access is denied. It also adds a TypeScript ActiveTabInfo type, defensive logging, and supports both message names for backward compatibility.
@cto-new cto-new bot merged commit ffce83a into test Nov 26, 2025
4 of 27 checks passed
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.

0 participants