-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: handle no active tab scenarios #164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to 43f8617 in 30 seconds
More details
- Looked at
40
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
7
drafted comments based on config settings.
1. src/background/helpers.ts:9
- Draft comment:
Good use of async/await for handling asynchronous tab queries. The fallback logic is clear. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
2. src/background/helpers.ts:19
- Draft comment:
Consider if debug logging here is sufficient or if users should be notified. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
3. src/background/helpers.ts:21
- Draft comment:
Fallback query to search for active tabs in any window works well to address the issue. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
4. src/background/helpers.ts:29
- Draft comment:
Final debug log and returning undefined if no active tab exists: behavior meets the requirement. - Reason this comment was not posted:
Confidence changes required:0%
<= threshold50%
None
5. src/background/helpers.ts:9
- Draft comment:
Ensure downstream code handles undefined return value, as getActiveWindowTab now returns undefined instead of throwing. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
6. src/background/helpers.ts:9
- Draft comment:
Consider adding an explicit return type annotation (e.g. Promise<browser.tabs.Tab | undefined>) for clarity. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
7. src/background/helpers.ts:21
- Draft comment:
Double-check that falling back to any active tab across windows is the desired behavior; it might result in selecting a non-current window's tab. - Reason this comment was not posted:
Confidence changes required:33%
<= threshold50%
None
Workflow ID: wflow_Yd8wPikvM0Qg5wKm
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good to me, merging for now.
Let me know if you're feeling confident and I'll make a new release :)
@ErikBjare I'm pretty sure this will fix the issue, so I agree with creating a new release :) |
Important
getActiveWindowTab
inhelpers.ts
now checks all windows for active tabs and logs when none are found.getActiveWindowTab
inhelpers.ts
now handles scenarios with no active tab in the current window by checking all windows.undefined
if no active tab is found in any window.This description was created by
for 43f8617. It will automatically update as commits are pushed.