style: fix lint across client packages

eslint --fix autofixes plus manual repairs: max-len line splits
(fake-api handlers, notifier/slots JSDoc, spec signatures), charAt over
non-null-asserted indexing in slash detect/menu cores, Array.from for
code-point capping, typeof assertions for unbound-method in specs,
generic getByRole for the send-button cast, effect disposer void-wrap in
command register, and dropped unused type imports.
This commit is contained in:
imccyu
2026-07-27 04:08:02 +08:00
parent a27be43ac1
commit f6396f2573
35 changed files with 122 additions and 89 deletions

View File

@@ -211,7 +211,10 @@ export class SlashController {
return undefined
}
/** Drop the menu group of a disposed source (root registry change notification). */
/**
* Drop the menu group of a disposed source (root registry change notification).
* @param source - the source whose registration was disposed.
*/
sourceRemoved(source: SlashSource): void {
const state = this.menu.getSnapshot()
if (state.open && state.hit !== null && state.hit.trigger === source.trigger) {

View File

@@ -52,7 +52,7 @@ export function apply(ctx: ClientContext): void {
inject: (sessionId): MenuViewInjected => {
// Session-scoped slot: resolve this session's controller (the slot
// frame hands ids, not ctx — the registered id→ctx interchange).
const actx = sessions.scope(sessionId as Parameters<typeof sessions.scope>[0])
const actx = sessions.scope(sessionId)
if (actx === undefined) throw new Error(`ui-slash: session "${String(sessionId)}" resolved no scope`)
const controller = slash.sessionOf(actx)
return {