chore(lotus): clear pre-existing lint/prettier debt ahead of the CI gate

`pnpm lint:eslint` and `pnpm prettier:check` were never run by fork CI (#5),
and lotus HEAD failed both: a missing return type in lotusDecorations, a
type-only import in lotusWidget, and formatting drift in lotusAudioInject,
lotusFocus, lotusWidget and .gitea/workflows/ci.yml. No behaviour change.
Both gates now pass clean so they can be turned on.

Refs #5

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
This commit is contained in:
Lotus CI
2026-09-12 11:43:14 -04:00
co-authored by Claude Opus 5
parent cbd42bf975
commit d1b0bad7f7
5 changed files with 27 additions and 18 deletions
+8 -8
View File
@@ -16,13 +16,13 @@ name: CI
on: on:
push: push:
branches: [lotus] branches: [lotus]
tags: ['v*'] tags: ["v*"]
pull_request: pull_request:
branches: [lotus] branches: [lotus]
env: env:
# element-call's build:full sets 16384 already; keep parity for safety. # element-call's build:full sets 16384 already; keep parity for safety.
NODE_OPTIONS: '--max-old-space-size=16384' NODE_OPTIONS: "--max-old-space-size=16384"
# Stamp the build so analytics/rageshakes aren't labelled "dev". # Stamp the build so analytics/rageshakes aren't labelled "dev".
VITE_APP_VERSION: ${{ github.ref_name }} VITE_APP_VERSION: ${{ github.ref_name }}
@@ -37,10 +37,10 @@ jobs:
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version-file: '.node-version' # Node 24 node-version-file: ".node-version" # Node 24
# registry-url wires up the Gitea-scoped registry + auth for publish # registry-url wires up the Gitea-scoped registry + auth for publish
registry-url: 'https://code.lotusguild.org/api/packages/LotusGuild/npm/' registry-url: "https://code.lotusguild.org/api/packages/LotusGuild/npm/"
scope: '@lotusguild' scope: "@lotusguild"
- name: Enable corepack (pnpm from packageManager field) - name: Enable corepack (pnpm from packageManager field)
run: corepack enable run: corepack enable
@@ -88,9 +88,9 @@ jobs:
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version-file: '.node-version' node-version-file: ".node-version"
registry-url: 'https://code.lotusguild.org/api/packages/LotusGuild/npm/' registry-url: "https://code.lotusguild.org/api/packages/LotusGuild/npm/"
scope: '@lotusguild' scope: "@lotusguild"
- name: Enable corepack - name: Enable corepack
run: corepack enable run: corepack enable
+4 -1
View File
@@ -240,7 +240,10 @@ async function playInjectedClip(
const durationMs = Number.isFinite(buffer.duration) const durationMs = Number.isFinite(buffer.duration)
? buffer.duration * 1000 + 500 ? buffer.duration * 1000 + 500
: MAX_CLIP_MS; : MAX_CLIP_MS;
const guard = setTimeout(cleanup, Math.min(MAX_CLIP_MS, Math.max(0, durationMs))); const guard = setTimeout(
cleanup,
Math.min(MAX_CLIP_MS, Math.max(0, durationMs)),
);
source.addEventListener("ended", () => clearTimeout(guard)); source.addEventListener("ended", () => clearTimeout(guard));
source.start(); source.start();
+1 -1
View File
@@ -84,7 +84,7 @@ export function startLotusDecorations(): () => void {
emit(); emit();
}; };
w.lazyActions.on(LotusWidgetActions.Decorations, handler); w.lazyActions.on(LotusWidgetActions.Decorations, handler);
unregister = () => unregister = (): void =>
w.lazyActions.off(LotusWidgetActions.Decorations, handler); w.lazyActions.off(LotusWidgetActions.Decorations, handler);
} }
registrations += 1; registrations += 1;
+1 -2
View File
@@ -38,6 +38,5 @@ export function startLotusFocus(vm: CallViewModel): () => void {
}; };
w.lazyActions.on(LotusWidgetActions.FocusParticipant, handler); w.lazyActions.on(LotusWidgetActions.FocusParticipant, handler);
return () => return () => w.lazyActions.off(LotusWidgetActions.FocusParticipant, handler);
w.lazyActions.off(LotusWidgetActions.FocusParticipant, handler);
} }
+13 -6
View File
@@ -17,7 +17,7 @@ Please see LICENSE in the repository root for full details.
import { logger } from "matrix-js-sdk/lib/logger"; import { logger } from "matrix-js-sdk/lib/logger";
import { widget } from "../widget"; import { widget } from "../widget";
import { LotusWidgetActions } from "./lotusActions"; import { type LotusWidgetActions } from "./lotusActions";
export { LotusWidgetActions } from "./lotusActions"; export { LotusWidgetActions } from "./lotusActions";
@@ -33,7 +33,9 @@ export function lotusParam(name: string): string | null {
// Match EC's own ParamParser precedence: the hash fragment wins over the // Match EC's own ParamParser precedence: the hash fragment wins over the
// query string. So seed from the fragment first, then fill gaps from query. // query string. So seed from the fragment first, then fill gaps from query.
const hash = window.location.hash.replace(/^#\/?/, ""); const hash = window.location.hash.replace(/^#\/?/, "");
const hashQuery = hash.includes("?") ? hash.slice(hash.indexOf("?") + 1) : ""; const hashQuery = hash.includes("?")
? hash.slice(hash.indexOf("?") + 1)
: "";
cachedParams = new URLSearchParams(hashQuery); cachedParams = new URLSearchParams(hashQuery);
for (const [k, v] of new URLSearchParams(window.location.search)) { for (const [k, v] of new URLSearchParams(window.location.search)) {
if (!cachedParams.has(k)) cachedParams.append(k, v); if (!cachedParams.has(k)) cachedParams.append(k, v);
@@ -53,11 +55,16 @@ export function lotusFlag(name: string): boolean {
* rejection when the host hasn't (yet) registered a handler for it. Returns * rejection when the host hasn't (yet) registered a handler for it. Returns
* true if the widget transport was available to attempt the send. * true if the widget transport was available to attempt the send.
*/ */
export function lotusSendToHost(action: LotusWidgetActions, data: unknown): boolean { export function lotusSendToHost(
action: LotusWidgetActions,
data: unknown,
): boolean {
const api = widget?.api; const api = widget?.api;
if (!api) return false; if (!api) return false;
void api.transport.send(action, data as Record<string, unknown>).catch((e) => { void api.transport
logger.debug(`[lotus] host did not ack ${action}`, e); .send(action, data as Record<string, unknown>)
}); .catch((e) => {
logger.debug(`[lotus] host did not ack ${action}`, e);
});
return true; return true;
} }