Merged
Conversation
Owner
knightedcodemonkey
commented
Mar 31, 2026
- address PR creation part of Feature: Add an AI Agent Side Panel using GitHub Models for @knighted/develop #18
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the PR/BYOT (Bring Your Own Token) GitHub controls available by default (no AI feature flag required) while keeping AI chat functionality opt-in behind ?feature-ai=true, aligning with the “release PR creation” portion of Issue #18.
Changes:
- Removed
featureEnabledgating/early-return stubs from the PR drawer and BYOT controls modules so PR/BYOT can run by default. - Updated app UI sync so the PR toggle can appear when a token is present even if AI chat is feature-flagged off.
- Updated docs and Playwright coverage to reflect “PR/BYOT always available, chat behind feature flag”.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/modules/github-pr-drawer.js | Removes feature-flag short-circuit so PR drawer controller always initializes. |
| src/modules/github-byot-controls.js | Removes feature-flag short-circuit so BYOT controls logic always initializes. |
| src/app.js | Updates visibility logic to keep chat behind the flag but allow PR/BYOT by default. |
| README.md | Documents that AI chat remains behind ?feature-ai=true. |
| docs/byot.md | Reframes BYOT as default behavior; AI chat becomes the feature-flagged portion. |
| docs/next-steps.md | Updates roadmap language to reflect PR/BYOT default + AI chat behind flag. |
| playwright/github-byot-ai.spec.ts | Updates tests for new visibility expectations when the feature flag is off. |
Comments suppressed due to low confidence (1)
src/app.js:231
#github-ai-controlsstarts with thehiddenattribute inindex.html, butsetCompactAiControlsOpen()only callsgithubAiControls.removeAttribute('hidden')in the non-compact viewport branch. If the app loads in a compact viewport (<=900px), toggling the GitHub controls setsdata-compact-openbut the element remainshidden, so the PR/BYOT controls can never be opened. Consider removing thehiddenattribute unconditionally before the viewport split (and let CSS handle compactdisplay:none), or explicitly remove it in the compact branch when opening.
aiControlsToggle.removeAttribute('hidden')
if (!isCompactViewport()) {
compactAiControlsOpen = false
setGitHubTokenInfoOpen(false)
💡 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.