Skip to content

Conversation

@knightedcodemonkey
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 17, 2026 17:02
@codecov
Copy link

codecov bot commented Jan 17, 2026

Codecov Report

❌ Patch coverage is 94.21965% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.17%. Comparing base (99eaebc) to head (3c19b7a).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/css/src/generateTypes.ts 94.21% 9 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #57      +/-   ##
==========================================
+ Coverage   91.56%   92.17%   +0.60%     
==========================================
  Files          13       13              
  Lines        3700     3859     +159     
  Branches      647      681      +34     
==========================================
+ Hits         3388     3557     +169     
+ Misses        284      275       -9     
+ Partials       28       27       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

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 pull request introduces unified proxy CLI generation for .knighted-css imports. When the knighted-css-generate-types CLI processes imports targeting JavaScript/TypeScript modules (rather than stylesheets), it now generates proxy modules that re-export the original module's exports, knightedCss, and stableSelectors in a single import.

Changes:

  • Generated proxy modules for JS/TS modules now include export *, export { default } (when applicable), and export { knightedCss } alongside the selector map
  • Extension fallback logic added to resolve module paths with various extensions (.ts, .tsx, .jsx, .mjs, .cjs)
  • Trailing whitespace removed from generated files for CSS-only imports
  • Comprehensive documentation updates explaining the new unified proxy pattern and migration path from ?knighted-css&combined

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/css/src/generateTypes.ts Core implementation: adds proxy info resolution, extension fallback logic, and proxy export generation
packages/css/test/generateTypes.test.ts Test verification that generated proxies include re-exports and knightedCss
packages/playwright/src/auto-stable/lit-host.ts Demonstrates unified proxy usage by importing ShadowTree, knightedCss, and stableSelectors from single module
packages/playwright/src/auto-stable/shadow-tree.knighted-css.ts Generated proxy module for shadow-tree component
packages/playwright/src/auto-stable/shadow-tree.tsx.knighted-css.ts Generated proxy module (appears to be duplicate)
packages/playwright/test/auto-stable.spec.ts End-to-end test verifying proxy provides exports, CSS, and selectors
packages/playwright/src/auto-stable/constants.ts Adds test ID constant for proxy marker element
packages/playwright/src/lit-react/cards/*/*.knighted-css.ts Formatting cleanup (trailing whitespace removal)
packages/css/README.md Documents new unified proxy import pattern
docs/type-generation.md Comprehensive documentation of proxy generation and rspack watch integration
docs/combined-queries.md Migration guidance from combined queries to proxy imports
Comments suppressed due to low confidence (1)

packages/playwright/src/auto-stable/shadow-tree.tsx.knighted-css.ts:17

  • Two nearly identical proxy files are being generated for the same source module: shadow-tree.knighted-css.ts and shadow-tree.tsx.knighted-css.ts. Both proxy the same module (./shadow-tree.js) and export the same selectors. This appears to be redundant. Consider whether both files are necessary, or if the generation logic should be updated to avoid creating duplicate proxies for the same underlying module.
// Generated by @knighted/css/generate-types
// Do not edit.
export * from './shadow-tree.js'
export { knightedCss } from './shadow-tree.js?knighted-css'

export const stableSelectors = {
  badge: 'knighted-badge',
  card: 'knighted-card',
  copy: 'knighted-copy',
  stack: 'knighted-stack',
  title: 'knighted-title',
  token: 'knighted-token',
} as const

export type KnightedCssStableSelectors = typeof stableSelectors
export type KnightedCssStableSelectorToken = keyof typeof stableSelectors


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

Copilot AI review requested due to automatic review settings January 17, 2026 17:45
Copy link

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

Copilot reviewed 13 out of 14 changed files in this pull request and generated 3 comments.


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

@knightedcodemonkey knightedcodemonkey merged commit 12daec6 into main Jan 17, 2026
6 checks passed
@knightedcodemonkey knightedcodemonkey deleted the unified-double-extension branch January 17, 2026 18:01
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