Skip to content

fix(frontend): use Biome 2.6.6, the version of the root configuration - #1908

Merged
Artuomka merged 2 commits into
mainfrom
frontend_biome_2_6
Nov 17, 2026
Merged

Artuomka merged 2 commits into
mainfrom
frontend_biome_2_6

Conversation

@Artuomka

@Artuomka Artuomka commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

The root biome.json uses the 2.6.6 schema and the keys preset, markdown and yaml (4e2152c). The frontend still installed Biome 2.4.0, which does not know these keys. So pnpm lint failed in CI before it checked a file.

  • Pin @biomejs/biome 2.6.6 in frontend/package.json and the lockfile.
  • Exclude public/assets from Biome. Version 2.6 lints standalone SVG files and asks for a title. These files are images that loads, and the alt text gives the accessible name.
  • Remove five unsafe optional chains in three spec files. A missing element still fails the test.
  • Apply the 2.6 formatter to three spec files.

Lint exit 0, typecheck clean, vitest 2569/2569.

Summary by CodeRabbit

  • Tests
    • Updated automated checks to require an authorization call before evaluating its policy data.

The root biome.json uses the 2.6.6 schema and the keys preset, markdown and
yaml (4e2152c). The frontend still installed Biome 2.4.0, which does not
know these keys. So `pnpm lint` failed in CI before it checked a file.

- Pin @biomejs/biome 2.6.6 in frontend/package.json and the lockfile.
- Exclude public/assets from Biome. Version 2.6 lints standalone SVG files
  and asks for a title. These files are images that <img> loads, and the alt
  text gives the accessible name.
- Remove five unsafe optional chains in three spec files. A missing element
  still fails the test.
- Apply the 2.6 formatter to three spec files.

Lint exit 0, typecheck clean, vitest 2569/2569.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The staticPolicies test helper now returns a string from the latest authorization mock call. It throws The mock has no call. when the mock has no recorded call.

Changes: Frontend test assertion

Layer / File(s) Summary
Static policy helper
frontend/src/stores/cedar-permissions.spec.ts
The helper now throws when the authorization mock has no recorded call. Otherwise, it returns staticPolicies from the latest call.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: gugu

Merge Risk: Minimal · up to 634a3

This change pins the frontend Biome version and tightens a test helper. It has no production runtime impact, and no actionable merge-blocking risk is evident.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Inconclusive The title names the main change: pinning the frontend Biome version to 2.6.6 to match the root configuration. The raw summary covers only a test helper change in cedar-permissions.spec.ts and does not… Confirm that the changeset includes the Biome version bump in frontend/package.json and the lockfile, the public/assets lint exclusion, and the formatter changes. The raw summary lists only frontend/src/stores/cedar-permissions.spec.ts, so …
Passed Passed checks: 4 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Security Check Passed Summary: The reviewed range changes one file: frontend/src/stores/cedar-permissions.spec.ts (+4/-2). The change is test-only. The staticPolicies helper now throws The mock has no call. when …
Full details: Security Check

Explanation

Summary: The reviewed range changes one file: frontend/src/stores/cedar-permissions.spec.ts (+4/-2). The change is test-only. The staticPolicies helper now throws The mock has no call. when the mock has no recorded call. Before, it returned undefined through optional chaining. This makes the test fail on a missing call. It does not touch runtime code, authentication, authorization logic, input handling, or secrets. No OWASP-relevant surface is changed. Scope note: The PR description and objectives describe more changes. These include the Biome bump in frontend/package.json and the lockfile, the public/assets exclusion in frontend/biome.json, and optional-chain and formatter edits in three spec files. The PR-specific commit 5aef721b contains these changes. It is not an ancestor of the review base 624742f7. The review range base..head does not show them, so I could not confirm their state in the reviewed range. I reviewed the commit content anyway. The biome.json change adds a lint exclusion for public/assets. The package.json change pins the Biome dev tool to 2.6.6. Neither change alters runtime behavior or weakens an application security control. Lint configuration does not affect deployed security. No OWASP-relevant regression appears in either the reviewed range or the commit. Author: Provider-reported primary author is Artuomka (GitHub, rocket-admin/rocketadmin PR #1908). The author does not affect this security verdict. Conclusion: The PR introduces no explicit security failure condition under this check.

Full details: Title check

Explanation

The title names the main change: pinning the frontend Biome version to 2.6.6 to match the root configuration. The raw summary covers only a test helper change in cedar-permissions.spec.ts and does not show the Biome version bump, lockfile update, or lint config changes described in the objectives. The title therefore matches the stated PR objectives but is not supported by the file-level summary, which covers a single spec file.

Resolution

Confirm that the changeset includes the Biome version bump in frontend/package.json and the lockfile, the public/assets lint exclusion, and the formatter changes. The raw summary lists only frontend/src/stores/cedar-permissions.spec.ts, so the file-level summary should be regenerated to cover the full changeset. If the full changeset is confirmed, the title can stay as is.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

frontend/src/stores/cedar-permissions.spec.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

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

A rabbit checks the mock call log
Then finds the policies, clear and bright
No call? An error marks the gap
One string returns from the latest call
The test helper hops along its way

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8ed64144-4071-4bb8-996a-bcd0a548d0bb
Commits

Reviewing files that changed from the base of the PR and between 5aef721 and 634a3e1.

Files selected for processing: 1

  • frontend/src/stores/cedar-permissions.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@coderabbitai
coderabbitai Bot requested a review from gugu November 17, 2026 10:30
@Artuomka
Artuomka merged commit 717796a into main Nov 17, 2026
17 checks passed
@Artuomka
Artuomka deleted the frontend_biome_2_6 branch November 17, 2026 10:58
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