Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/frontend-react-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,20 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
with:
# `--scope changed` diffs against origin/master to report only new issues.
fetch-depth: 0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Priority: P2

React Doctor's changed-file scope can't resolve its base on this trigger.

frontend/package.json:11 now runs react-doctor . -y --blocking error --scope changed --base origin/master, and this step adds fetch-depth: 0 to support it. Two problems with the workflow as written (on: push only, no pull_request trigger):

  1. Feature-branch pushes: actions/checkout fetches a branch-scoped refspec (+refs/heads/<branch>*:refs/remotes/origin/<branch>*) — fetch-depth: 0 removes the depth limit but does not widen the refspec. So refs/remotes/origin/master does not exist on a non-master push, and --base origin/master has nothing to diff against.
  2. Master pushes: checked-out HEAD is origin/master, so the changed set is empty and newly merged issues are never scanned.

Either way the job is not doing the work its name implies, and because --blocking error only trips on findings, an empty or unresolvable scope reports green.

Correction: fetch the base explicitly and diff against the real merge base. For a push event that is the event's before-SHA, not the branch tip:

      - name: Checkout
        uses: actions/checkout@v6
        with:
          fetch-depth: 0
      - name: Fetch base
        run: git fetch --no-tags origin master:refs/remotes/origin/master

and run the unscoped full scan when github.ref == 'refs/heads/master'. Adding a pull_request trigger would make --scope changed meaningful in the place it is actually useful.

Verify: on a branch push, git rev-parse origin/master inside the job; then bun run doctor and confirm the log lists a non-empty changed-file set.

Automated /review.

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
# Pinned: bun generates yarn.lock (bunfig print = "yarn") and the output
# changes between bun versions, which trips the lint job's dirty-tree check.
bun-version-file: frontend/.bun-version
- name: Setup Node
uses: actions/setup-node@v6
with:
# Matches package.json engines; native deps (isolated-vm) ship no Node 20 prebuilds.
node-version-file: frontend/.nvmrc
- name: Cache dependencies
uses: actions/cache@v5
with:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/frontend-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:
# Pinned: bun generates yarn.lock (bunfig print = "yarn") and the output
# changes between bun versions, which trips the lint job's dirty-tree check.
bun-version-file: frontend/.bun-version
- name: Setup Node
uses: actions/setup-node@v6
with:
# Matches package.json engines; native deps (isolated-vm) ship no Node 20 prebuilds.
node-version-file: frontend/.nvmrc
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Get Biome version
Expand Down Expand Up @@ -57,6 +62,11 @@ jobs:
# Pinned: bun generates yarn.lock (bunfig print = "yarn") and the output
# changes between bun versions, which trips the lint job's dirty-tree check.
bun-version-file: frontend/.bun-version
- name: Setup Node
uses: actions/setup-node@v6
with:
# Matches package.json engines; native deps (isolated-vm) ship no Node 20 prebuilds.
node-version-file: frontend/.nvmrc
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run typecheck
Expand All @@ -77,6 +87,11 @@ jobs:
# Pinned: bun generates yarn.lock (bunfig print = "yarn") and the output
# changes between bun versions, which trips the lint job's dirty-tree check.
bun-version-file: frontend/.bun-version
- name: Setup Node
uses: actions/setup-node@v6
with:
# Matches package.json engines; native deps (isolated-vm) ship no Node 20 prebuilds.
node-version-file: frontend/.nvmrc
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Restore Rspack build cache
Expand Down Expand Up @@ -115,6 +130,11 @@ jobs:
# Pinned: bun generates yarn.lock (bunfig print = "yarn") and the output
# changes between bun versions, which trips the lint job's dirty-tree check.
bun-version-file: frontend/.bun-version
- name: Setup Node
uses: actions/setup-node@v6
with:
# Matches package.json engines; native deps (isolated-vm) ship no Node 20 prebuilds.
node-version-file: frontend/.nvmrc
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run unit tests
Expand Down Expand Up @@ -147,6 +167,11 @@ jobs:
# Pinned: bun generates yarn.lock (bunfig print = "yarn") and the output
# changes between bun versions, which trips the lint job's dirty-tree check.
bun-version-file: frontend/.bun-version
- name: Setup Node
uses: actions/setup-node@v6
with:
# Matches package.json engines; native deps (isolated-vm) ship no Node 20 prebuilds.
node-version-file: frontend/.nvmrc
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run integration tests
Expand Down
2 changes: 1 addition & 1 deletion frontend/.bun-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.4.0
1.4.2
22 changes: 14 additions & 8 deletions frontend/biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["ultracite/core", "ultracite/react"],
"extends": ["ultracite/biome/core", "ultracite/biome/react"],
"vcs": {
"enabled": true,
"clientKind": "git",
Expand All @@ -20,6 +20,8 @@
"!**/coverage/**/*",
"!**/.nyc_output/**/*",
"!**/*.css",
"!**/*.svg",
"!**/*.html",
"!**/tests/global-setup.mjs",
"!**/tests/console",
"!**/tests/console-enterprise",
Expand Down Expand Up @@ -55,17 +57,17 @@
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"preset": "recommended",
"correctness": {
"useImageSize": "off",
"useJsonImportAttributes": "error" // this may slow down the linting process
},
"performance": {
"noJsxPropsBind": "off" // React Compiler (rsbuild.config.ts) memoizes inline callbacks
},
"nursery": {
"noReactForwardRef": "off", // enable once we use React 19+
"noDeprecatedImports": "error", // this may slow down the linting process
"noFloatingPromises": "off", // Disabled - navigate() and similar fire-and-forget promises are intentional
"noMisusedPromises": "error", // this may slow down the linting process
"noImportCycles": "off", // this may slow down the linting process
"useExhaustiveSwitchCases": "error" // this may slow down the linting process
},
"style": {
Expand All @@ -89,7 +91,10 @@
"useReactFunctionComponents": "off"
},
"suspicious": {
"noConsole": "error"
"noConsole": "error",
"noReactForwardRef": "off",
"noDeprecatedImports": "error",
"noImportCycles": "off"
}
}
},
Expand Down Expand Up @@ -135,9 +140,10 @@
},
"overrides": [
{
"includes": ["**/*.{test,spec}.{ts,tsx,js,jsx}", "**/__tests__/**/*", "rstest.setup*.ts"],
"includes": ["**/*.{test,spec}.{ts,tsx,js,jsx}", "**/__tests__/**/*", "rstest.setup*.ts", "**/*-test-helpers.ts"],
"javascript": {
"globals": ["rs"]
// rstest `globals: true` injects these at runtime (typed via @rstest/core/globals)
"globals": ["rs", "test", "it", "expect", "describe", "beforeEach", "afterEach", "beforeAll", "afterAll"]
},
"linter": {
"rules": {
Expand Down
Loading
Loading