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:
co-authored by
Claude Opus 5
parent
cbd42bf975
commit
d1b0bad7f7
@@ -16,13 +16,13 @@ name: CI
|
||||
on:
|
||||
push:
|
||||
branches: [lotus]
|
||||
tags: ['v*']
|
||||
tags: ["v*"]
|
||||
pull_request:
|
||||
branches: [lotus]
|
||||
|
||||
env:
|
||||
# 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".
|
||||
VITE_APP_VERSION: ${{ github.ref_name }}
|
||||
|
||||
@@ -37,10 +37,10 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
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: 'https://code.lotusguild.org/api/packages/LotusGuild/npm/'
|
||||
scope: '@lotusguild'
|
||||
registry-url: "https://code.lotusguild.org/api/packages/LotusGuild/npm/"
|
||||
scope: "@lotusguild"
|
||||
|
||||
- name: Enable corepack (pnpm from packageManager field)
|
||||
run: corepack enable
|
||||
@@ -88,9 +88,9 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.node-version'
|
||||
registry-url: 'https://code.lotusguild.org/api/packages/LotusGuild/npm/'
|
||||
scope: '@lotusguild'
|
||||
node-version-file: ".node-version"
|
||||
registry-url: "https://code.lotusguild.org/api/packages/LotusGuild/npm/"
|
||||
scope: "@lotusguild"
|
||||
|
||||
- name: Enable corepack
|
||||
run: corepack enable
|
||||
|
||||
@@ -240,7 +240,10 @@ async function playInjectedClip(
|
||||
const durationMs = Number.isFinite(buffer.duration)
|
||||
? buffer.duration * 1000 + 500
|
||||
: 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.start();
|
||||
|
||||
@@ -84,7 +84,7 @@ export function startLotusDecorations(): () => void {
|
||||
emit();
|
||||
};
|
||||
w.lazyActions.on(LotusWidgetActions.Decorations, handler);
|
||||
unregister = () =>
|
||||
unregister = (): void =>
|
||||
w.lazyActions.off(LotusWidgetActions.Decorations, handler);
|
||||
}
|
||||
registrations += 1;
|
||||
|
||||
@@ -38,6 +38,5 @@ export function startLotusFocus(vm: CallViewModel): () => void {
|
||||
};
|
||||
|
||||
w.lazyActions.on(LotusWidgetActions.FocusParticipant, handler);
|
||||
return () =>
|
||||
w.lazyActions.off(LotusWidgetActions.FocusParticipant, handler);
|
||||
return () => w.lazyActions.off(LotusWidgetActions.FocusParticipant, handler);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ Please see LICENSE in the repository root for full details.
|
||||
import { logger } from "matrix-js-sdk/lib/logger";
|
||||
|
||||
import { widget } from "../widget";
|
||||
import { LotusWidgetActions } from "./lotusActions";
|
||||
import { type 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
|
||||
// query string. So seed from the fragment first, then fill gaps from query.
|
||||
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);
|
||||
for (const [k, v] of new URLSearchParams(window.location.search)) {
|
||||
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
|
||||
* 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;
|
||||
if (!api) return false;
|
||||
void api.transport.send(action, data as Record<string, unknown>).catch((e) => {
|
||||
logger.debug(`[lotus] host did not ack ${action}`, e);
|
||||
});
|
||||
void api.transport
|
||||
.send(action, data as Record<string, unknown>)
|
||||
.catch((e) => {
|
||||
logger.debug(`[lotus] host did not ack ${action}`, e);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user