Skip to content

ci: add pull-request quality checks#737

Merged
meiiie merged 4 commits into
mainfrom
chore/ci-quality-gates
Jul 10, 2026
Merged

ci: add pull-request quality checks#737
meiiie merged 4 commits into
mainfrom
chore/ci-quality-gates

Conversation

@meiiie

@meiiie meiiie commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds a least-privilege code-quality workflow for pull requests and pushes to main. It performs one clean Node 22 install, then runs TypeScript, Biome lint, and the full Vitest suite. Translation parity remains visibly advisory while the existing, mergeable #710 supplies the missing locale content.

This also repairs the minimum baseline required by those checks: deterministic text/binary attributes, CSS Modules parsing, generated-output scanner ignores, duplicated Biome config, removal of the unused ESLint config, separate lint/format scripts, and eight mechanical typing/empty-callback lint findings.

Motivation

Recordly currently has no PR workflow that executes repository code. Type errors, lint regressions, and test failures can therefore reach main before the manual packaging workflows run.

Type of Change

  • New Feature
  • Bug Fix
  • Refactor / Code Cleanup
  • Documentation Update
  • Other: CI

Related Issue(s)

Architecture remediation phase 0. Translation hard-gating follows #710; this PR deliberately does not duplicate that contributor's nine locale files.

Testing Guide

npx tsc --noEmit
npm run lint
npm test

Results: typecheck passed; lint passed with 21 existing hook warnings; Vitest passed twice, with the concise run reporting 96/96 files and 841/841 tests. CSS Modules lint and workflow validation also passed.

Risk and non-goals

No user-visible runtime behavior is intended. Formatting is exposed as a separate check but is not required yet because current main needs a dedicated format-only normalization. After merge, a maintainer still needs to make the Repository quality check required in branch protection.

Checklist

  • I have performed a self-review of my code.
  • Screenshots/videos are not applicable.
  • Existing overlapping work is linked.

Summary by CodeRabbit

  • New Features

    • Added automated pull request quality checks (typechecking, linting, formatting check, and tests) plus advisory translation parity validation.
  • Improvements

    • Updated lint/format tooling and added a read-only formatting check.
    • Enhanced CSS module parsing and refined repo analysis scope to ignore build outputs.
    • Improved native helper path selection for Windows and improved thumbnail generation queue error behavior.
  • Maintenance

    • Strengthened event/worker message typing and adjusted a default prop return value.
    • Added line-ending/binary handling rules for consistent Git behavior.
  • Tests

    • Updated decoder-related mocks and added coverage for Windows architecture tag handling.

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c5ab6fae-b224-4a79-9f3e-a1b50e3832cd

📥 Commits

Reviewing files that changed from the base of the PR and between 7082547 and c97f67e.

📒 Files selected for processing (3)
  • .github/workflows/quality.yml
  • electron/ipc/paths/binaries.test.ts
  • electron/ipc/paths/binaries.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/quality.yml

📝 Walkthrough

Walkthrough

The changes add repository quality automation and file-handling rules, update Biome scripts, adjust Windows native helper resolution and thumbnail queue handling, and tighten TypeScript types and Electron API test references.

Changes

Tooling and quality automation

Layer / File(s) Summary
Repository and formatter configuration
.gitattributes, biome.json, .eslintrc.cjs
Adds Git text and binary handling rules, expands Biome file inclusion and CSS module parsing, and removes the ESLint configuration.
Quality scripts and CI workflow
package.json, .github/workflows/quality.yml
Uses Biome lint commands, adds format:check, and runs typechecking, linting, tests, and advisory i18n validation in CI.

Application maintenance

Layer / File(s) Summary
Runtime path and queue handling
electron/ipc/paths/binaries.ts, electron/ipc/paths/binaries.test.ts, electron/ipc/register/assets.ts
Resolves Windows helpers using architecture-specific paths, tests the Windows architecture tag, and changes thumbnail queue failure reset handling.
Type safety and cleanup
src/components/launch/*, src/components/video-editor/*
Types the HUD mouse-leave event and waveform worker messages, makes a default callback explicitly return undefined, and removes an unused import.
Electron API test access
src/lib/exporter/streamingDecoder.test.ts
Updates streaming decoder tests to use the typed window.electronAPI reference directly.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding PR quality checks in CI.
Description check ✅ Passed The description covers the required template sections and is mostly complete; screenshots/video are omitted but marked not applicable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ci-quality-gates

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (2)
.github/workflows/quality.yml (1)

42-60: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider adding a format check step to CI.

The format:check script (biome format .) was added to package.json but isn't exercised in CI. While the PR summary states formatting is not currently required, adding it as a non-blocking advisory step (like the i18n check) would surface formatting drift early without blocking PRs.

💡 Suggested addition after the Lint step
       - name: Lint
         if: ${{ !cancelled() && steps.install.outcome == 'success' }}
         run: npm run lint
+
+      - name: Check formatting (advisory)
+        if: ${{ !cancelled() && steps.install.outcome == 'success' }}
+        continue-on-error: true
+        run: npm run format:check
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/quality.yml around lines 42 - 60, Add a non-blocking
advisory CI step after the existing Lint step in the workflow, matching the
install-success and cancellation conditions used by the other checks, and run
the package.json format:check script to surface formatting drift without failing
the job.
electron/ipc/paths/binaries.ts (1)

56-56: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Avoid duplicating getNativeArchTag() and getPrebundledNativeHelperPath() logic.

Line 56 inlines the Windows arch-tag mapping that already exists in getNativeArchTag() (lines 37–39), and lines 65–71 reconstruct the same prebundled path that getPrebundledNativeHelperPath(binaryName) already returns. If the arch-tag convention or prebundled directory layout changes, both copies must be updated in sync.

Consider reusing the existing helpers:

♻️ Proposed refactor
 export function resolvePreferredWindowsNativeHelperPath(
 	helperDirectory: string,
 	binaryName: string,
 ): string {
-	const windowsArchTag = process.arch === "arm64" ? "win32-arm64" : "win32-x64";
 	const buildOutputPath = resolveUnpackedAppPath(
 		"electron",
 		"native",
 		helperDirectory,
 		"build",
 		"Release",
 		binaryName,
 	);
-	const prebundledPath = resolveUnpackedAppPath(
-		"electron",
-		"native",
-		"bin",
-		windowsArchTag,
-		binaryName,
-	);
+	const prebundledPath = getPrebundledNativeHelperPath(binaryName);

Also applies to: 65-71

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@electron/ipc/paths/binaries.ts` at line 56, Remove the duplicated Windows
architecture mapping and prebundled helper-path construction in the relevant
binary-resolution logic. Reuse getNativeArchTag() for the architecture tag and
getPrebundledNativeHelperPath(binaryName) for the prebundled path, preserving
the existing behavior while centralizing these conventions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/quality.yml:
- Around line 42-60: Add a non-blocking advisory CI step after the existing Lint
step in the workflow, matching the install-success and cancellation conditions
used by the other checks, and run the package.json format:check script to
surface formatting drift without failing the job.

In `@electron/ipc/paths/binaries.ts`:
- Line 56: Remove the duplicated Windows architecture mapping and prebundled
helper-path construction in the relevant binary-resolution logic. Reuse
getNativeArchTag() for the architecture tag and
getPrebundledNativeHelperPath(binaryName) for the prebundled path, preserving
the existing behavior while centralizing these conventions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: fa05f28c-05f6-448c-90dd-292d273cc4e2

📥 Commits

Reviewing files that changed from the base of the PR and between 641d223 and 7082547.

📒 Files selected for processing (12)
  • .eslintrc.cjs
  • .gitattributes
  • .github/workflows/quality.yml
  • biome.json
  • electron/ipc/paths/binaries.ts
  • electron/ipc/register/assets.ts
  • package.json
  • src/components/launch/SourceSelector.tsx
  • src/components/launch/contexts/HudInteractionContext.tsx
  • src/components/video-editor/VideoPlayback.tsx
  • src/components/video-editor/audio/waveform/waveform.worker.ts
  • src/lib/exporter/streamingDecoder.test.ts
💤 Files with no reviewable changes (2)
  • .eslintrc.cjs
  • src/components/video-editor/VideoPlayback.tsx

@meiiie meiiie merged commit aea12b6 into main Jul 10, 2026
4 checks passed
@meiiie meiiie deleted the chore/ci-quality-gates branch July 10, 2026 19:53
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.

1 participant