Add Brainmax Canvas Extension#2361
Open
juliamuiruri4 wants to merge 11 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds BrainMax Canvas, an interactive quiz and competency-report extension for the GitHub Copilot marketplace.
Changes:
- Adds the Canvas server, state machine, and SDK actions.
- Adds an accessible, responsive browser interface.
- Registers the extension in the marketplace.
Show a summary per file
| File | Description |
|---|---|
extensions/brainmax-canvas/README.md |
Documents installation and usage. |
extensions/brainmax-canvas/public/styles.css |
Defines themes and responsive styling. |
extensions/brainmax-canvas/public/index.html |
Provides the Canvas UI structure. |
extensions/brainmax-canvas/public/app.js |
Renders state and handles interactions. |
extensions/brainmax-canvas/package.json |
Defines package metadata and scripts. |
extensions/brainmax-canvas/lib/state.mjs |
Manages quiz instance state. |
extensions/brainmax-canvas/lib/http-server.test.mjs |
Tests request-body handling. |
extensions/brainmax-canvas/lib/http-server.mjs |
Serves UI, SSE, and event endpoints. |
extensions/brainmax-canvas/extension.mjs |
Implements Canvas actions and lifecycle. |
extensions/brainmax-canvas/.github/plugin/plugin.json |
Defines extension marketplace metadata. |
.github/plugin/marketplace.json |
Registers BrainMax Canvas. |
Review details
- Files reviewed: 11/12 changed files
- Comments generated: 4
- Review effort level: Medium
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4b95f746-9a23-4513-80eb-9d641986aab2
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4b95f746-9a23-4513-80eb-9d641986aab2
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4b95f746-9a23-4513-80eb-9d641986aab2
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 22323915-a9c0-42b7-bf74-36ce4069a32e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 22323915-a9c0-42b7-bf74-36ce4069a32e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 22323915-a9c0-42b7-bf74-36ce4069a32e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 22323915-a9c0-42b7-bf74-36ce4069a32e
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 22323915-a9c0-42b7-bf74-36ce4069a32e
Contributor
There was a problem hiding this comment.
Review details
Comments suppressed due to low confidence (3)
extensions/brainmax-canvas/extension.mjs:112
- A successful
session.senddoes not guarantee that the agent will invokerecord_score. If that follow-up action is omitted,answerStatusnever leavessubmitting, so the textarea remains disabled and the answer cannot be retried. Detect completion/timeout of the agent turn and restore an actionable error state when no score arrives.
state.answerStatus = "submitting";
extensions/brainmax-canvas/extension.mjs:160
- This request has the same permanent-pending path: if the agent responds without
show_report, the button remains disabled forever because onlyshow_reportor a rejectedsession.sendresets the status. Add a session-idle/timeout check that setsreportRequestStatustoerrorwhen no report action arrives.
state.reportRequestStatus = "submitting";
extensions/brainmax-canvas/public/app.js:456
- Web storage access can throw a
SecurityErrorwhen storage is disabled or restricted. Because this read runs before theEventSourceis created, that exception prevents the entire Canvas from connecting; guard both the read and write so theme persistence remains optional.
const storedTheme = localStorage.getItem(THEME_STORAGE_KEY);
- Files reviewed: 11/12 changed files
- Comments generated: 2
- Review effort level: Medium
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 22323915-a9c0-42b7-bf74-36ce4069a32e
| handler: async (ctx) => { | ||
| const state = getState(ctx.instanceId); | ||
| const { index, score, feedback } = ctx.input || {}; | ||
| if (!state.quiz || !state.question || index !== state.question.index || state.answerStatus === "scored") { |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 22323915-a9c0-42b7-bf74-36ce4069a32e
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.
Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
BrainMax Canvas is the interactive dashboard for codebase-grounded concept-mastery quizzes. It presents detected knowledge domains, accepts freeform answers, shows rubric scores, and compiles completed domains into a competency report.
The Canvas is an optional visual layer. Question generation and scoring stay with the BrainMaxxing Agent Skills, and the skills continue to work in clients without Canvas support.
Type of Contribution
Additional Notes
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.