Skip to content

Update coding standards guidance and add publishers helper foundation - #57

Open
Thedezinevipul wants to merge 1 commit into
github-samples:mainfrom
Thedezinevipul:vipul_dev
Open

Update coding standards guidance and add publishers helper foundation#57
Thedezinevipul wants to merge 1 commit into
github-samples:mainfrom
Thedezinevipul:vipul_dev

Conversation

@Thedezinevipul

Copy link
Copy Markdown

Description

Updates the Copilot coding guidance and introduces a small data-layer foundation for upcoming game filtering work.

Related Issue

Closes #9

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 📚 Documentation update
  • 🧪 Test update
  • 🔧 Refactor (no functional changes)

Changes Made

  • Updated coding standards in .github/copilot-instructions.md to require:
    • TSDoc on exported functions
    • file-purpose comment blocks before imports/code
  • Added src/lib/publishers.ts with an injectable-db helper getAllPublishers(db)
  • Ensured getAllPublishers(db) returns stable, ordered publisher summaries (id, name) to support upcoming filter UI/data wiring

Testing

Data Layer Changes

  • Ran npm run test:unit - all tests pass
  • Added/updated Vitest tests for data-layer changes
  • Generated a migration (npm run db:generate) for any schema change

Frontend Changes

  • Ran npm run test:e2e - all tests pass
  • Added data-testid attributes to interactive elements
  • Verified build succeeds (npm run build)

Checklist

  • My code follows the project's coding standards
  • I have used explicit TypeScript types for function parameters and return values
  • I have built the UI with Astro components and Tailwind CSS utility classes (dark theme)
  • I have updated documentation (README, instruction files) if needed
  • My changes are focused on a single concern
  • I have written clear commit messages explaining what and why

Additional Notes

This PR intentionally includes the publishers helper as a foundation for the upcoming filtering work tracked in issue #8 (category/publisher filtering), so follow-up UI and page-query changes can build on a shared data-access utility.

Copilot AI lite review requested due to automatic review settings August 26, 2026 11:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates repository Copilot guidance and adds a new data-layer helper to fetch publisher summaries for upcoming filtering work in the Astro build-time data layer.

Changes:

  • Expanded .github/copilot-instructions.md with additional documentation/commenting expectations.
  • Added src/lib/publishers.ts with an injectable getAllPublishers(db) helper returning stable, name-ordered publisher summaries.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/copilot-instructions.md Updates documented coding standards for comments/TSDoc and file-purpose headers.
src/lib/publishers.ts Introduces a new Drizzle data-access helper for ordered publisher summaries.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 35 to 39
### Code formatting requirements

- Every exported function should have a TSDoc comment describing its purpose, parameters, and return value.
- Before imports or any code, add a comment block to the file that explains its purpose.
- Use TypeScript with explicit types for function parameters and return values, especially in the data layer (`db/`, `src/lib/`)
- Frontend code (TypeScript, Astro) must pass ESLint checks (`npm run lint`)
Comment thread src/lib/publishers.ts
Comment on lines +21 to +26
export async function getAllPublishers(db: Database): Promise<Publisher[]> {
const rows = await db
.select({ id: publishers.id, name: publishers.name })
.from(publishers)
.orderBy(asc(publishers.name));

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.

Update our repository coding standards

2 participants