Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds the first slice of the BYOT (Bring Your Own Token) groundwork for the planned AI side panel feature (#18): a feature-flagged UI for entering a GitHub PAT, persisting it locally, and using it to list writable repositories via the GitHub API.
Changes:
- Adds a feature flag (
?feature-ai=true/ localStorage) to show/hide BYOT controls. - Implements PAT storage/masking + GitHub API repo discovery and selection persistence.
- Adds Playwright coverage and a BYOT setup guide in docs.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles/ai-controls.css | Adds styling for the BYOT controls (token input/buttons + repo select). |
| src/styles.css | Imports the new AI/BYOT controls stylesheet. |
| src/modules/github-token-store.js | localStorage-backed token load/save/clear + masking helper. |
| src/modules/github-byot-controls.js | BYOT UI controller: token validation via repo listing, repo selection persistence. |
| src/modules/github-api.js | GitHub API client to list writable repositories (pagination + normalization). |
| src/modules/feature-flags.js | Feature flag for enabling the AI/BYOT UI via query param/localStorage. |
| src/index.html | Adds the BYOT controls markup (token input, add/delete, repo selector). |
| src/app.js | Wires feature flag + creates BYOT controls in the main app. |
| playwright/app.spec.ts | Adds tests for feature-flag visibility and persistence across reload. |
| docs/media/byot-model-perms.png | Adds screenshot asset for PAT model permissions. |
| docs/byot.md | Adds BYOT setup guide (fine-grained PAT permissions + enablement). |
| README.md | Links to the BYOT guide. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
First step at #18