Skip to content

chore: code quality#196

Merged
dsh0416 merged 1 commit into
mainfrom
dsh0416/cq
May 23, 2026
Merged

chore: code quality#196
dsh0416 merged 1 commit into
mainfrom
dsh0416/cq

Conversation

@dsh0416

@dsh0416 dsh0416 commented May 23, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 23, 2026 02:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 improves repo “code quality” by centralizing platform/asset specifications for xtask, adding a new validate-versions command to keep version pins consistent across workspace files, and reducing workflow duplication via a reusable GitHub composite action.

Changes:

  • Centralize platform targets, artifact names, and required bundle/pack/validate file lists into xtask/src/platform.rs, and refactor pack/validate/bundle scripts to consume it.
  • Add cargo xtask validate-versions (+ CI job) to cross-check versions across Cargo.toml, Cargo.lock, package.json, and mise.toml.
  • Introduce .github/actions/setup-rust-cef and refactor workflows to use it; add unit tests for software popup compositing and update contributing docs.

Reviewed changes

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

Show a summary per file
File Description
xtask/src/validate.rs Switch validation loop to use centralized PLATFORM_SPECS.
xtask/src/validate_versions.rs New command to validate version/toolchain pins across workspace files.
xtask/src/platform.rs New single source of truth for platform targets/artifacts/required assets (+ tests).
xtask/src/pack.rs Use PLATFORM_SPECS for artifact copy/validation instead of local tuples.
xtask/src/main.rs Wire up validate-versions subcommand and new modules.
xtask/src/bundle_windows.rs Replace duplicated Windows target/assets constants with platform module specs.
xtask/src/bundle_linux.rs Replace duplicated Linux target/assets constants with platform module specs.
xtask/src/bundle_common.rs Remove required_paths_for_platform; make workspace_root public for version validation.
mise.toml Update cargo:export-cef-dir pin to match the current CEF version.
crates/software_render/src/lib.rs Add unit tests for composite_popup behavior (clipping/out-of-bounds).
CONTRIBUTING.md Update repo layout and add guidance for running tests + new validation commands.
.github/workflows/test.yml Refactor setup steps to the composite action; add validate-versions job.
.github/workflows/build.yml Refactor setup steps to the composite action; validate packaged addon after pack.
.github/actions/setup-rust-cef/action.yml New composite action to install deps/toolchain, cache Cargo/CEF, and download CEF.

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

Comment thread xtask/src/platform.rs
Comment on lines +175 to +180
fn runtime_assets_include_pack_validation_requirements() {
for target in [WINDOWS_X64_TARGET, WINDOWS_ARM64_TARGET] {
let Some(spec) = platform_spec(target) else {
assert!(platform_spec(target).is_some(), "windows spec should exist");
continue;
};
Comment thread xtask/src/platform.rs
Comment on lines +189 to +193
for target in [LINUX_X64_TARGET, LINUX_ARM64_TARGET] {
let Some(spec) = platform_spec(target) else {
assert!(platform_spec(target).is_some(), "linux spec should exist");
continue;
};
Comment on lines +11 to +13
let workspace_version = quoted_value(&cargo_toml, "version")
.ok_or("Cargo.toml is missing workspace.package version")?;
let package_version =
@dsh0416 dsh0416 merged commit a855ab6 into main May 23, 2026
26 checks passed
@dsh0416 dsh0416 deleted the dsh0416/cq branch May 23, 2026 02:55
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