Repository navigation
fix(frontend): use Biome 2.6.6, the version of the root configuration - #1908
Conversation
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>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The workflow installed Biome 2.4.0, but biome.json uses the 2.6.6 schema since #1908. The old CLI rejected the config on every backend pull request. The step now runs `pnpm exec biome`, so the version comes from the lockfile. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…scale) (#1910) * feat: upgrade old PGlite data on start, add optional trusted-header login PGlite upgrade: - Read PG_VERSION before any engine opens the data directory. - For a Postgres 17 directory (PGlite 0.4), dump a copy with the old engine (npm aliases pglite-pg17 / pglite-tools-pg17) and restore it into the current engine. Row counts are compared before the swap. - The old files stay in <data dir>/.pglite-backup-pg17-<time>/. A state file lets a restart finish an interrupted swap. - Runs in main.ts and datasource.config.ts (migration:run runs first in Docker). - Unknown majors and PGlite 0.3 data (template1) stop the start, files unchanged. Trusted-header login (self-hosted only, off by default): - TRUSTED_AUTH_HEADER names a header set by a trusted proxy, for example Tailscale-User-Login with tailscale serve. - POST /selfhosted/header-login signs in an existing user with that email and sets the usual session cookies. Unknown, ambiguous, suspended and 2FA users get 403. Every attempt goes to the sign-in audit (new TRUSTED_HEADER method). - The frontend tries it once at start when no session exists. - README documents the setup and the trust boundary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat: optional proxy secret and user auto-creation for header login - TRUSTED_AUTH_PROXY_SECRET: when set, /selfhosted/header-login also requires the X-RocketAdmin-Proxy-Secret header with that value (constant-time compare). - TRUSTED_AUTH_AUTO_CREATE_USERS=true: an unknown email gets a new user in the instance's single company with the USER role and no groups. The first user of an empty instance becomes ADMIN of a new company. More than one company refuses auto-creation. - The header value must be a valid email (rejects comma-joined duplicates). - Unit tests for the creation paths, e2e tests for the secret check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: serialize header-login user creation Two parallel first sign-ins could both see an empty instance and both become ADMIN of separate companies, and two requests for one new email could create two users. User creation now runs one at a time in the process and re-checks the email, the user count and the companies inside the queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: self-hosted API listens only on loopback behind nginx In the self-hosted Docker image the API on port 3000 now binds to 127.0.0.1, so other containers and published ports cannot bypass nginx (and with it the header-login trust boundary). nginx proxies to 127.0.0.1:3000 instead of localhost, which can resolve to ::1. SaaS mode (IS_SAAS set) keeps listening on all interfaces, because other services call port 3000 directly. BACKEND_LISTEN_HOST overrides the address. Without it, outside the image, the server listens on all interfaces as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: SaaS mode also listens only on loopback behind nginx Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: remove stale AWS CodeBuild buildspec It built with Node 16 from backend/ (no Dockerfile there) and mapped port 3000, which the image no longer exposes outside the container. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor: hardcode the API listen address to 127.0.0.1 Remove BACKEND_LISTEN_HOST. The API always listens only on loopback; clients reach it through nginx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(docker-compose): reach the backend through nginx The API now listens only on 127.0.0.1 inside the container, so: - the backend service runs the image's runner.sh (nginx + API) instead of 'pnpm start', and publishes 8080 instead of 3000; - the ws-server checks connection tokens at backend:8080/api/connection/token; - the SaaS microservice gets CORE_URL=http://backend:8080/api; - DATABASE_URL is set for the backend; .development.env has it commented out, so migrations failed on start before this change too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(ws-server): default token check URL goes through nginx on 8080/api The backend API listens only on 127.0.0.1:3000 inside its container, so the default http://autoadmin-internal-auth.local:3000/connection/token no longer reaches it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: run Biome from the lockfile in the code-quality workflow The workflow installed Biome 2.4.0, but biome.json uses the 2.6.6 schema since #1908. The old CLI rejected the config on every backend pull request. The step now runs `pnpm exec biome`, so the version comes from the lockfile. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * ci: build shared-code before the backend typecheck The backend imports the compiled files in shared-code/dist. The runner has no dist directory, so the typecheck step failed with 307 errors. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Artem Niehrieiev <r.tem@tuta.io>
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 lintfailed in CI before it checked a file.Lint exit 0, typecheck clean, vitest 2569/2569.
Summary by CodeRabbit