From 9dbe18a47bb545751d86bab27f673ff684477eed Mon Sep 17 00:00:00 2001 From: vjan-nie Date: Sat, 3 Oct 2026 13:00:39 +0200 Subject: [PATCH 1/2] fix(types): export FieldValidationState from email-validation f29a5d7 moved the email checks into src/lib/email-validation.ts and deleted the FieldValidationState alias from main.ts without exporting it, leaving three ts(2304) errors that keep `astro check` red. Type-only, so no runtime effect; this is the last error blocking a typecheck gate in the image build. --- src/lib/email-validation.ts | 4 +++- src/scripts/main.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/email-validation.ts b/src/lib/email-validation.ts index afcbf562..5592cf25 100644 --- a/src/lib/email-validation.ts +++ b/src/lib/email-validation.ts @@ -1,8 +1,10 @@ import { validateEmail } from '../hooks/useAuth'; +export type FieldValidationState = 'idle' | 'warning' | 'error' | 'success'; + export type EmailValidationResult = { valid: boolean; - state: 'idle' | 'warning' | 'error' | 'success'; + state: FieldValidationState; message: string; }; diff --git a/src/scripts/main.ts b/src/scripts/main.ts index 630f425c..70887d54 100644 --- a/src/scripts/main.ts +++ b/src/scripts/main.ts @@ -1284,7 +1284,7 @@ function messageMentions(message: string, ...needles: string[]): boolean { -import { validateEmailFormat, type EmailValidationResult } from '../lib/email-validation'; +import { validateEmailFormat, type EmailValidationResult, type FieldValidationState } from '../lib/email-validation'; function emailValidationResult(field: HTMLInputElement): EmailValidationResult { return validateEmailFormat(field.value.trim(), field.required, field.validity.valid); From 6e2005ff50f72d4fd1aa8eb456742c9c7f725f5d Mon Sep 17 00:00:00 2001 From: vjan-nie Date: Sat, 3 Oct 2026 13:09:00 +0200 Subject: [PATCH 2/2] ci: run astro check on every pull request astro build strips types and never typechecks, and publish.yml only builds images, so 5333085's missing themeIcon import shipped as a runtime ReferenceError. astro check reports it as ts(2304). It gates the PR, not the image build: a type-only error must never break a local make all. Runs in node:22-alpine with pnpm 11.5.1, as the web Dockerfile does. --- .github/workflows/typecheck.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/typecheck.yml diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 00000000..ea9f5e38 --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,34 @@ +# ================================================================ +# Prismatica (opposite-osiris) — astro check on every pull request +# ================================================================ +# The web image runs `astro build`, which strips types and never typechecks, so a +# missing import ships as a runtime ReferenceError (5333085: themeIcon). The check +# lives here, not in the Dockerfile: a type-only error blocks the merge, never a build. +# Runs in the Dockerfile's own base image so Node and pnpm match it exactly. +# ================================================================ + +name: Typecheck + +on: + pull_request: + +permissions: + contents: read + +jobs: + astro-check: + name: 🔎 astro check + runs-on: ubuntu-latest + container: node:22-alpine + env: + TRACK_BINOCLE_IN_DOCKER: "1" + steps: + - uses: actions/checkout@v4 + + - name: Install + run: | + corepack enable && corepack prepare pnpm@11.5.1 --activate + pnpm install --frozen-lockfile --ignore-scripts --config.node-linker=hoisted + + - name: astro check + run: node_modules/.bin/astro check