Skip to content

Add 2048 canvas extension - #6369

Open
geniodelmale wants to merge 2 commits into
github:mainfrom
geniodelmale:geniodelmale-2048-canvas-contribution
Open

geniodelmale wants to merge 2 commits into
github:mainfrom
geniodelmale:geniodelmale-2048-canvas-contribution

Conversation

@geniodelmale

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description

Adds the keyboard-2048 canvas as a standalone plugin, preserving the current source implementation and attributing it to its canonical repository. The plugin includes its preview image, runtime modules, and focused game/server tests. The gist-only preview save and legacy extension metadata are excluded.


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify):

Additional Notes

Validation passed: npm run plugin:validate, npm start, npm run website:data, and node --test extensions/keyboard-2048/game.test.mjs extensions/keyboard-2048/server.test.mjs (22/22 tests). In-app testing with GitHub Copilot was not available. The source project has no standalone license file; this contribution is licensed under MIT per the repository's submission terms.


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@geniodelmale
geniodelmale requested review from a team as code owners November 11, 2026 20:08
Copilot AI auto review requested due to automatic review settings November 11, 2026 20:08
@github-actions github-actions Bot added canvas-extension PR touches canvas extensions new-submission PR adds at least one new contribution plugin PR touches plugins awaiting-automation merge-risk:high labels Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: ⏳ Awaiting automation

Risk tier: merge-risk:high — Privileged execution, automation, or review-policy change
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access, including a maintainer with admin or maintain permission.

Why this tier
  • Spawns processes or evaluates code in extensions/keyboard-2048/game.mjs

Automated checks

Check Status Details
Line endings ⏳ Pending Queued · logs
Spelling ⏳ Pending Queued · logs
Generated README consistency ⏳ Pending Queued · logs
Plugin and extension validation ⏳ Pending Queued · logs
Canvas extension validation ⏳ Pending Queued · logs
Plugin structure ⏳ Pending Queued · logs
Risk scan ⏳ Pending Queued · logs
Contributor reputation ⏳ Pending Running · logs
Duplicate resource scan ⏳ Pending (advisory, non-blocking) Queued · logs
PR quality signal ⏳ Pending (advisory, non-blocking) Queued · logs
Canvas/plugin smoke test ⏳ Pending Waiting for the check to start

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s); an approval from a maintainer with admin or maintain permission
  • The core-maintainers pool is not staffed yet; an approver with admin or maintain permission is required instead.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for 91cbbbc · gate run · This comment is maintained automatically — see submission gate docs.

@github-actions

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 11 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

Skipped non-text or missing files
  • extensions/keyboard-2048/assets/preview.png

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions

Copy link
Copy Markdown
Contributor

🧩 Canvas smoke test

✅ Passed · 0 error(s), 2 warning(s)

Check Result
Syntax, imports, file safety ✅
Preview image (≥ 400×160 PNG) ✅
Plugin manifests ✅
Materialize ✅
Install (Copilot CLI) ✅

Plugin keyboard-2048 v1.0.0

Field Value
Description Play 2048 in a Copilot canvas with keyboard and touch controls, undo, and session saves.
Author geniodelmale — https://github.com/geniodelmale
License MIT
Keywords 2048, copilot-canvas, game, keyboard, puzzle, undo
Extensions keyboard-2048
Materialize ✅
Install ✅
Changed plugin files
  • plugins/keyboard-2048/README.md
  • plugins/keyboard-2048/plugin.json

Extension keyboard-2048

keyboard-2048 preview

Field Value
Registered by keyboard-2048
Package —
Preview 1546×1496, 160.2 KB
Modules 6 (3 reachable from extension.mjs)
Files 9

Permissions and capabilities (static analysis of modules reachable from extension.mjs)

  • File system access (node:fs)
  • Network sockets / local server (node:http, node:net, ...)

Warnings

  • game.test.mjs: import "node:test" is not a Node.js builtin, host-provided package, or declared dependency (module is not reachable from extension.mjs)
  • server.test.mjs: import "node:test" is not a Node.js builtin, host-provided package, or declared dependency (module is not reachable from extension.mjs)
Changed extension files
  • extensions/keyboard-2048/app.mjs
  • extensions/keyboard-2048/assets/preview.png
  • extensions/keyboard-2048/extension.mjs
  • extensions/keyboard-2048/game.mjs
  • extensions/keyboard-2048/game.test.mjs
  • extensions/keyboard-2048/index.html
  • extensions/keyboard-2048/server.mjs
  • extensions/keyboard-2048/server.test.mjs
  • extensions/keyboard-2048/style.css

Static checks compile modules without executing them. Minimum preview size is configurable with CANVAS_PREVIEW_MIN_WIDTH/CANVAS_PREVIEW_MIN_HEIGHT. Workflow run

@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Nov 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Uncaught URL-parsing errors can terminate the extension before authentication, while inaccessible tile labels and insufficient dark-mode text contrast also remain unresolved.

3 open issues
What changed in this PR

Adds Keyboard 2048 as a standalone Copilot canvas plugin, with source attribution and registration in the repository’s plugin catalog.

Changes:

  • Implements the game, keyboard and touch controls, animations, undo, and session saves.
  • Adds canvas actions, an authenticated local server, and focused game/server tests.
  • Provides plugin metadata, installation instructions, and catalog entries.
File Description
plugins/​keyboard-2048/​README.md Documents installation, source attribution, and license.
plugins/​keyboard-2048/​plugin.json Defines plugin metadata and extension composition.
extensions/​keyboard-2048/​style.css Styles the board, themes, controls, and animations.
extensions/​keyboard-2048/​server.test.mjs Tests persistence, command ordering, and HTTP behavior.
extensions/​keyboard-2048/​server.mjs Provides saved state, authenticated endpoints, and live updates.
extensions/​keyboard-2048/​index.html Defines the game interface and restart dialog.
extensions/​keyboard-2048/​game.test.mjs Tests movement, merging, undo, spawning, and save validation.
extensions/​keyboard-2048/​game.mjs Implements game rules and state validation.
extensions/​keyboard-2048/​extension.mjs Registers canvas actions and manages panel lifecycles.
extensions/​keyboard-2048/​app.mjs Handles rendering, animation, input, and server communication.
docs/​README.plugins.md Adds the plugin to the documentation catalog.
.github/​plugin/​marketplace.json Registers the plugin for marketplace discovery.

Review effort: Balanced (auto)

Comment thread extensions/keyboard-2048/server.mjs Resolved
motionLayer.setAttribute("aria-hidden", "true");
board.parentElement.append(motionLayer);
const cells = Array.from({ length: 16 }, () => {
const cell = document.createElement("div");
--cp-border: #474747;
--cp-border-strong: #5f5f5f;
--cp-text: #dedede;
--cp-text-muted: #919191;
Add error handling for invalid request URLs.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI auto review requested due to automatic review settings November 11, 2026 20:47
@github-actions github-actions Bot added awaiting-automation and removed ready-for-review Submission passed intake validation and is ready for maintainer review labels Nov 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Note

This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-automation canvas-extension PR touches canvas extensions merge-risk:high new-submission PR adds at least one new contribution plugin PR touches plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants