Open
Conversation
hogejiro
commented
Mar 26, 2026
| } | ||
| } | ||
|
|
||
| const BADGE_POSITIONS = ['bottom-right', 'top-left']; |
Author
There was a problem hiding this comment.
Sorted by notification count descending. Only 2 slots —
bottom-right uses native setBadgeText for best readability,
top-left uses Canvas. 3rd+ are visible in popup/tooltip only.
hogejiro
commented
Mar 26, 2026
| export async function getInstances() { | ||
| const {[STORAGE_KEY]: instances = []} = await browser.storage.local.get(STORAGE_KEY); | ||
|
|
||
| // Backfill colorIndex for instances created before this field existed |
Author
There was a problem hiding this comment.
Instances created before colorIndex was added get a stable index assigned on first read, so colors don't shift on delete.
hogejiro
commented
Mar 26, 2026
|
|
||
| // Assign a stable color index if not provided | ||
| if (data.colorIndex === undefined) { | ||
| const usedIndices = new Set(instances.map(i => i.colorIndex).filter(i => i !== undefined)); |
Author
There was a problem hiding this comment.
Finds the lowest unused index rather than using array length,
so deleted instance colors can be reused without collisions.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Addresses #290 and #260.
Adds support for multiple GitHub instances (e.g., github.com + GitHub Enterprise) with per-instance notification tracking.
Options page adapts: single instance shows original-style UI, 2+ shows list with inline editor
Auto-migration from single-instance settings
GHE host permissions requested at runtime via
optional_host_permissionsNew
*-multifiles sit alongside originals — no existing files are deleted.Test plan
Supported by Claude Code