Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Configures GitHub Copilot workspace instructions to provide project-specific context for better code suggestions.

Changes

  • Added .github/copilot-instructions.md with:
    • Tech stack and architecture overview (TypeScript, React 18.3+, Vite, Two.js)
    • Component patterns and ref forwarding conventions
    • Canvas boundary rules (react-two.js components only, no DOM elements)
    • Context system documentation (useTwo, useFrame hooks)
    • Performance patterns for animations (prefer refs over state)
    • TypeScript standards and interface conventions

Key Patterns Documented

Component Structure:

export const Shape = forwardRef<RefShape, ShapeProps>((props, ref) => {
  // Use forwardRef for all shape components
});

Canvas Boundaries:

// ✅ Correct - only react-two.js components
<Canvas>
  <Circle radius={50} />
</Canvas>

// ❌ Triggers warning - no DOM elements inside Canvas
<Canvas>
  <div>Invalid</div>
</Canvas>

Animation Pattern:

// Prefer useFrame with refs over state updates
useFrame((elapsed: number) => {
  if (ref.current) {
    ref.current.rotation = elapsed * 0.5;
  }
});

Based on existing CLAUDE.md documentation, formatted for GitHub Copilot's workspace instruction format.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • gh.io
    • Triggering command: /usr/bin/curl curl -sL REDACTED (dns block)
    • Triggering command: /usr/bin/wget wget -qO- REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.

Refer to ./CLAUDE.md for onboarding</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 5, 2025 08:30
Co-authored-by: jonobr1 <220033+jonobr1@users.noreply.github.com>
Co-authored-by: jonobr1 <220033+jonobr1@users.noreply.github.com>
Co-authored-by: jonobr1 <220033+jonobr1@users.noreply.github.com>
Copilot AI changed the title [WIP] Configure Copilot instructions for repository Add GitHub Copilot instructions for repository context Dec 5, 2025
Copilot AI requested a review from jonobr1 December 5, 2025 08:37
@jonobr1 jonobr1 marked this pull request as ready for review December 5, 2025 08:42
Copilot AI review requested due to automatic review settings December 5, 2025 08:42
@jonobr1 jonobr1 merged commit 2f24b00 into main Dec 5, 2025
2 checks passed
@jonobr1 jonobr1 deleted the copilot/set-up-copilot-instructions branch December 5, 2025 08:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds GitHub Copilot workspace instructions to provide AI-assisted development with project-specific context about react-two.js architecture, coding standards, and best practices.

  • Creates .github/copilot-instructions.md with comprehensive project documentation
  • Documents TypeScript standards, React patterns, and Two.js integration requirements
  • Establishes canvas boundary rules and animation performance guidelines


### Peer Dependencies
- Ensure React 18.3+ is installed
- Two.js must be from @jonobr1/two.js#dev branch
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The instruction to use the 'dev' branch may become outdated. Consider adding context about when/why the dev branch is required, or if this is a temporary requirement until features are merged to main.

Suggested change
- Two.js must be from @jonobr1/two.js#dev branch
- Two.js must be installed from @jonobr1/two.js#dev branch (required for features/fixes not yet available in main, such as [list key features or fixes if known]). This is a temporary requirement until these changes are merged into main—check the Two.js repository for updates and switch to main when possible.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ Set up Copilot instructions

2 participants