diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b2cf86a716..5705f1ad26 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -112,7 +112,7 @@ trivy_scan: web: stage: build image: node:24-bullseye - rules: + rules: ®eln_build # Release-Tags bauen immer (docker_web/desktop_* brauchen web als needs) - if: $CI_COMMIT_TAG =~ /^v/ # Scheduled Pipelines gehoeren dem trivy_scan - kein wochentlicher Leerbuild @@ -136,6 +136,50 @@ web: - apps/web/webapp expire_in: 1 day +# Typpruefung. Der web-Job baut nur - webpack entfernt Typen, ohne sie zu pruefen, ein +# unbekannter Einstellungsschluessel ist zur Bauzeit bloss ein String. So ging am +# 19.08. v0.6.0-rc.2 in Produktion: in RoomListItemViewModel.ts zeigte eine +# getValue-Zeile auf den von Upstream entfernten Schalter feature_room_list_sections, +# und die Raumliste stuerzte bei jedem Eintrag ab. tsc meldet genau das (TS2345 und +# TS6133) - gefragt hatte ihn nur niemand. +# +# Massstab ist "kein Fehler ausserhalb von node_modules", nicht "tsc sauber": Upstream +# v1.12.26 ist selbst nicht typrein, matrix-js-sdk 42.2.0 wirft drei Fehler in der +# eigenen Quelle (skipLibCheck deckt nur .d.ts ab). Nachgeprueft in einem sauberen +# v1.12.26-Checkout - dieselben drei, sonst nichts. Faellt das bei einem Upstream-Wechsel +# weg, verschaerft sich der Job von allein, ohne Anpassung. +typecheck: + stage: build + image: node:24-bullseye + rules: *regeln_build + variables: + NODE_OPTIONS: "--max-old-space-size=6144" + before_script: + - corepack enable + script: + - pnpm install --frozen-lockfile + # tsc darf rot sein - bewertet wird unten, sonst bricht der Job an Upstreams Fehlern ab. + # Farbcodes muessen raus: nx faerbt auch in der Pipe, und dann steht zwischen "error" + # und "TS" eine Escape-Sequenz - ein grep auf "error TS" liefe ins Leere und das Tor + # waere immer gruen, ohne je zu pruefen. + - pnpm --dir apps/web lint:types 2>&1 | sed -r 's/\x1b\[[0-9;]*[mK]//g' | tee tsc.log || true + - | + if grep -E "error TS[0-9]+" tsc.log | grep -v node_modules; then + echo "FEHLER: Typfehler im eigenen Code (siehe oben)." + exit 1 + fi + # Kein stiller Erfolg bei leerem Log: ohne tsc-Ausgabe hat nichts geprueft + if ! grep -qE "Successfully ran|error TS[0-9]+" tsc.log; then + echo "FEHLER: tsc hat keine auswertbare Ausgabe geliefert - Tor haelt nicht." + exit 1 + fi + echo "Keine Typfehler ausserhalb von node_modules." + artifacts: + paths: + - tsc.log + expire_in: 7 days + when: always + # Baut das kanonische Web-Image (apps/web/Dockerfile, Kontext = Monorepo-Root) und pusht # es in die rohana-Registry, aus der Flux/k8s zieht. Deploy bleibt ein manueller Tag-Bump # im gitops-Repo. Bewusster Doppel-Build (webpack laeuft im web-Job UND im Dockerfile) - @@ -146,6 +190,9 @@ docker_web: needs: - job: web artifacts: false + # Kein Image ohne Typpruefung - genau diese Luecke lieferte rc.2 aus + - job: typecheck + artifacts: false rules: # Nur bei Release-Tags (v*) - "releasen" ist ein bewusster Akt: # Tag pushen -> Image entsteht -> Tag-Bump im gitops-Repo deployt es diff --git a/apps/web/src/SdkConfig.ts b/apps/web/src/SdkConfig.ts index 9fd10e9fb7..d1e97596da 100644 --- a/apps/web/src/SdkConfig.ts +++ b/apps/web/src/SdkConfig.ts @@ -13,7 +13,6 @@ import { type DeepReadonly } from "shared-types"; import { SnakedObject } from "./utils/SnakedObject"; import { type IConfigOptions, type ConfigOptions } from "./IConfigOptions"; import { isObject, objectClone } from "./utils/objects"; -import ElementDesktopLogoSvg from "../res/img/element-desktop-logo.svg"; // see element-web config.md for docs, or the IConfigOptions interface for dev docs export const DEFAULTS = { diff --git a/apps/web/src/viewmodels/room-list/RoomListItemViewModel.ts b/apps/web/src/viewmodels/room-list/RoomListItemViewModel.ts index 5ab5d58d38..91d0eb6af1 100644 --- a/apps/web/src/viewmodels/room-list/RoomListItemViewModel.ts +++ b/apps/web/src/viewmodels/room-list/RoomListItemViewModel.ts @@ -396,8 +396,6 @@ export class RoomListItemViewModel }) : undefined; - const canMoveToSection = SettingsStore.getValue("feature_room_list_sections"); - // Build sections list for the "Move to section" submenu const sections: Section[] = RoomListItemViewModel.buildSections(roomTags, availableSections); const areSectionsEnabled = SettingsStore.getValue("RoomList.showSections");