Skip to content

Conversation

@ultmaster
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings November 10, 2025 13:32
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

This PR extends the copyright header checker script to support JavaScript/TypeScript files in addition to Python files, and adds comprehensive dashboard implementation with test setup files. The changes support multiple file extensions with appropriate comment prefixes.

Key Changes:

  • Extended check_headers.py to validate copyright headers in JS/TS files (.js, .jsx, .ts, .tsx, .mjs, .mts, .cjs, .cts)
  • Added comprehensive dashboard infrastructure including Vitest setup with Python server integration
  • Implemented test utilities, pages, components, and store configuration
  • Added numerous new files with proper copyright headers

Reviewed Changes

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

Show a summary per file
File Description
scripts/check_headers.py Extended to support multiple file types with configurable comment prefixes
dashboard/vitest.setup.mjs Vitest configuration with Python server lifecycle management
dashboard/vite.config.mjs Vite build and test configuration
dashboard/tsconfig.json TypeScript compiler configuration
dashboard/test-utils/*.ts Test utility functions and server setup helpers
dashboard/src/**/*.tsx Page components, layouts, and UI implementation
dashboard/src/**/*.ts State management, type definitions, and utilities
dashboard/static/mockServiceWorker.js MSW service worker for mocking
Comments suppressed due to low confidence (1)

scripts/check_headers.py:28

  • The condition not prefix.endswith(' ') is unnecessary since none of the prefixes in COMMENT_PREFIX_BY_SUFFIX end with a space. All prefixes are either # or //, neither of which ends with a space. This condition can be simplified to always use f'{prefix} {HEADER_TEXT}'.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
return a.createdAt - b.createdAt;
})
.at(-1)!;
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Using non-null assertion operator (!) after .at(-1) assumes the array is non-empty, but this is already checked at line 20-22. However, for clarity and type safety, consider returning the value directly from the sort instead of asserting non-null, or add an explicit check before the assertion.

Copilot uses AI. Check for mistakes.
return;
}

if (!disposed && activeController === controller) {
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

This negation always evaluates to true.

Copilot uses AI. Check for mistakes.
@ultmaster ultmaster changed the title Dashboard Dashboard - tests and infrastructure Nov 10, 2025
@ultmaster ultmaster merged commit 4e7748b into main Nov 10, 2025
14 checks passed
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.

2 participants