You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The sidepanelPort is stored as a global variable and used to send updates on tab changes, but there's no cleanup when the port disconnects. This could lead to errors when trying to send messages to a closed port.
// @ts-expect-error - TS7034 - Variable 'sidepanelPort' implicitly has type 'any' in some locations where its type cannot be determined.letsidepanelPort=null;
The onMessage listener now returns true to indicate it will respond asynchronously, but the implementation doesn't actually use sendResponse. This could lead to unexpected behavior.
The favIconUrl property is added but not initialized in the constructor, which could lead to undefined behavior when the status card is first rendered.
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: The error comment about err variable is misplaced. It should be on the line where err is declared, not on the if (sidepanelPort) check. [general, importance: 7]
Suggested change
leterr=null;
// @ts-expect-error - TS7034 - Variable 'err' implicitly has type 'any' in some locations where its type cannot be determined.
if(sidepanelPort){
sidepanelPort.postMessage({type: "update"});
}
const{ waitForTabUpdate }=opts;
// @ts-expect-error - TS7034 - Variable 'err' implicitly has type 'any' in some locations where its type cannot be determined.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
Enhancement
Description
Status card shows current page info
Updates status on tab change
Improved UI layout and styling
Fixed port handling for sidepanel
Changes walkthrough 📝
argo-archive-list.ts
CSS style reorganizationsrc/argo-archive-list.ts
.card-containerCSS rule to improve style organizationbg.ts
Background script updates for sidepanel communicationsrc/ext/bg.ts
sidepanelPortvariable to maintain connectionpopupHandlerfunctionchanges
recorder.ts
Enhanced status object with page metadatasrc/recorder.ts
favIconUrl,pageTitle, andtabIdto status objectsidepanel.ts
Status card implementation and UI enhancementssrc/sidepanel.ts
utils.ts
Utility functions for UI displaysrc/utils.ts
mapIntegerToRangefunction to convert integers to progressvalues
truncateStringfunction to limit string length for displaysidepanel.html
Simplified HTML structure with component-based approachstatic/sidepanel.html