Merged
Conversation
Owner
knightedcodemonkey
commented
Mar 22, 2026
- Step 3 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
Adds a GitHub “Open PR” workflow to the @knighted/develop AI/BYOT surface, enabling users to create a branch, commit current editor JSX/CSS into repo files, and open a pull request directly from the app.
Changes:
- Introduces an “Open PR” drawer UI (toggle + form) and a toast notification for success feedback.
- Extends GitHub BYOT state handling to expose writable repositories and support programmatic repository selection.
- Adds GitHub REST helpers to create refs, upsert files via Contents API, and open pull requests; updates Playwright coverage for the new flow.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/styles/dialogs-overlays.css | Adds toast styling and extends confirm-dialog copy styling to handle lists. |
| src/styles/ai-controls.css | Styles the new GitHub PR toggle button and PR drawer layout (responsive included). |
| src/modules/github-pr-drawer.js | New controller for PR drawer state, validation, persistence, and submit flow. |
| src/modules/github-byot-controls.js | Emits writable repo list changes; adds getters/setters for selected repo and repos list. |
| src/modules/github-api.js | Adds REST helpers for git refs, contents upsert, and PR creation; composes into createEditorContentPullRequest. |
| src/index.html | Adds PR toggle + PR drawer markup; adds toast node; updates confirm dialog copy container to <ul>. |
| src/app.js | Wires PR drawer into app lifecycle; adds toast helper; updates BYOT integration for writable repos. |
| playwright/app.spec.ts | Adds tests for PR drawer flow + validation; adjusts BYOT/repo selection tests for new UI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 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.