add brainmax canvas extension#2360
Closed
juliamuiruri4 wants to merge 1 commit into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the BrainMax Canvas extension for interactive, codebase-grounded competency quizzes.
Changes:
- Implements quiz state, Canvas actions, and an HTTP/SSE bridge.
- Adds the responsive browser UI and theme support.
- Adds extension metadata, documentation, and marketplace registration.
Show a summary per file
| File | Description |
|---|---|
.github/plugin/marketplace.json |
Registers BrainMax Canvas. |
extensions/brainmax-canvas/.github/plugin/plugin.json |
Defines extension metadata. |
extensions/brainmax-canvas/README.md |
Documents installation and usage. |
extensions/brainmax-canvas/assets/preview.png |
Provides the marketplace preview. |
extensions/brainmax-canvas/extension.mjs |
Implements Canvas actions and lifecycle. |
extensions/brainmax-canvas/lib/http-server.mjs |
Serves the UI and event endpoints. |
extensions/brainmax-canvas/lib/state.mjs |
Manages quiz state and score tiers. |
extensions/brainmax-canvas/package.json |
Defines the Node package and scripts. |
extensions/brainmax-canvas/public/app.js |
Implements frontend behavior. |
extensions/brainmax-canvas/public/index.html |
Defines the accessible UI structure. |
extensions/brainmax-canvas/public/styles.css |
Provides responsive themes and styling. |
Review details
Comments suppressed due to low confidence (1)
extensions/brainmax-canvas/extension.mjs:379
- This action contract also assumes every quiz has five questions, although
start_quizpermits totals from 1–20. Referring to the final question keeps the action usable for every accepted total.
name: "complete_domain",
description: "MANDATORY after Question 5: show the domain summary with non-empty strongestArea and gap analysis before presenting the summary in chat.",
- Files reviewed: 10/11 changed files
- Comments generated: 7
- Review effort level: Medium
Comment on lines
+8
to
+11
| "scripts": { | ||
| "check": "node --check extension.mjs && node --check lib/http-server.mjs && node --check lib/state.mjs && node --check public/app.js", | ||
| "test": "node --test" | ||
| }, |
| @@ -0,0 +1,38 @@ | |||
| # BrainMax Canvas | |||
|
|
|||
| BrainMax Canvas is the interactive dashboard for codebase-grounded concept-mastery quizes. It presents detected knowledge domains, accepts freeform answers, shows rubric scores, and compiles completed domains into a competency report. | |||
Comment on lines
+81
to
+89
| let body = ""; | ||
| for await (const chunk of req) { | ||
| body += chunk; | ||
| if (Buffer.byteLength(body, "utf8") > MAX_EVENT_BODY_BYTES) { | ||
| writeHeaders(res, 413, MIME[".json"]); | ||
| res.end(JSON.stringify({ ok: false, error: "event payload is too large" })); | ||
| return; | ||
| } | ||
| } |
Comment on lines
+342
to
+344
| name: "record_score", | ||
| description: | ||
| "Reveal the score for the question just answered (0-3 rubric) with a one-sentence explanation. For questions 1-4, immediately follow this successful action with set_question for the next question before responding in chat. For question 5, follow with complete_domain.", |
Comment on lines
+157
to
+159
| :root { | ||
| color-scheme: dark; | ||
| } |
Comment on lines
+10
to
+11
| // See README.md in this directory for the full action contract with | ||
| // example payloads. |
|
|
||
| ## Install | ||
|
|
||
| Install the Brainmax Canvas extension through GitHub Copilot or place this directory at `.github/extensions/brainmax-canvas/` in a project. |
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
Added Brainmax canvas extension
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.