Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 11, 2025

This PR adds comprehensive GitHub Copilot instructions to help developers work effectively with this Chinese GitHub client web application, with a pure JavaScript-first approach.

What's Added

Created .github/copilot-instructions.md with detailed guidance covering:

  • JavaScript-Only Development: Uses Node.js HTTP server (npx http-server -p 8080) exclusively, reflecting the JavaScript full-stack nature of this project
  • Architecture Documentation: Complete overview of the SPA structure using jQuery, Bootstrap v3, EasyWebApp framework, and AMD modules (with planned ECMAScript modules migration)
  • Future-Proofed Instructions: Documents planned architectural improvements including:
    • CDN migration from cdn.bootcss.com to unpkg.com
    • Authentication upgrade from hardcoded tokens to OAuth system
    • Module system modernization from RequireJS to ECMAScript modules
  • Project Structure: Detailed file and directory layout with descriptions of key components
  • Validation Scenarios: Working commands to verify HTTP server functionality, static file serving, and application structure
  • Troubleshooting: Current limitations with migration roadmap clearly documented

Key Features

  • JavaScript-First Approach: Completely focused on Node.js tooling without alternative language references
  • Imperative Instructions: Uses firm directive tone ("Run this command", "NEVER do that") for clear guidance
  • Validated Commands: Every command has been tested and works correctly in the development environment
  • Timing Documentation: Includes "NEVER CANCEL" warnings with specific time expectations for operations
  • Security Considerations: Documents current hardcoded GitHub API token with planned OAuth migration
  • Network Dependencies: Explains external CDN requirements and potential blocking issues with migration plans

Example Usage

The instructions enable developers to immediately start with JavaScript tooling:

# Start the application with Node.js (JavaScript project)
cd /home/runner/work/GitHub/GitHub
npx http-server -p 8080
# Access at http://localhost:8080

# Verify file serving
curl -s http://localhost:8080/page/index.json | head -3
# Should return JSON with "GitHub 中文版" title

This provides GitHub Copilot agents with everything needed to understand the current architecture while being aware of planned improvements in upcoming refactoring PRs.

Fixes #3.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits August 11, 2025 15:50
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copilot AI changed the title [WIP] ✨Set up Copilot instructions Add comprehensive Copilot instructions for GitHub Chinese client development Aug 11, 2025
Copilot AI requested a review from TechQuery August 11, 2025 15:51
Copilot finished work on behalf of TechQuery August 11, 2025 15:51

### Required HTTP server test
```bash
cd /home/runner/work/GitHub/GitHub && python3 -m http.server 8080
Copy link
Owner

Choose a reason for hiding this comment

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

是一个 JavaScript 全栈项目,不要用其它语言。

Copy link
Owner

Choose a reason for hiding this comment

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

“不要用其它语言”的意思是:完全删除 Python 等语言的文字,我不需要任何替代方案。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed all Python references from the Copilot instructions. The file now exclusively uses JavaScript/Node.js tooling with npx http-server as the only server option, reflecting the JavaScript full-stack nature of this project. Commit: 27b4565

@TechQuery
Copy link
Owner

@copilot 请根据 review 继续修改……

….js and note future refactoring plans

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 11, 2025

@copilot 请根据 review 继续修改……

I've updated the Copilot instructions based on your review feedback:

Prioritized Node.js - Changed the primary HTTP server recommendation to npx http-server since this is a JavaScript full-stack project
Updated future refactoring notes - Added migration plans for:

  • CDN dependencies (cdn.bootcss.com → unpkg.com)
  • API authentication (hardcoded token → OAuth system)
  • Module system (RequireJS → ECMAScript modules)

The instructions now properly reflect the JavaScript-first approach while documenting the planned architectural improvements. Commit: 1bb7bc4

Copilot AI changed the title Add comprehensive Copilot instructions for GitHub Chinese client development Add comprehensive Copilot instructions for GitHub Chinese client development with JavaScript-first approach Aug 11, 2025
Copilot AI requested a review from TechQuery August 11, 2025 16:38
Copilot finished work on behalf of TechQuery August 11, 2025 16:38
@TechQuery
Copy link
Owner

@copilot 这一点没改完:#4 (comment)

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copilot AI changed the title Add comprehensive Copilot instructions for GitHub Chinese client development with JavaScript-first approach Add JavaScript-focused Copilot instructions for GitHub Chinese client development Aug 11, 2025
Copilot finished work on behalf of TechQuery August 11, 2025 16:50
@TechQuery TechQuery marked this pull request as ready for review August 11, 2025 16:52
@TechQuery TechQuery merged commit f168366 into master Aug 11, 2025
@TechQuery TechQuery deleted the copilot/fix-3 branch August 11, 2025 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨Set up Copilot instructions

2 participants