diff --git a/.agents/skills/modwerk-diagnostics/SKILL.md b/.agents/skills/modwerk-diagnostics/SKILL.md index 832667edde..496ab94b61 100644 --- a/.agents/skills/modwerk-diagnostics/SKILL.md +++ b/.agents/skills/modwerk-diagnostics/SKILL.md @@ -9,7 +9,7 @@ If the developer is not the owner, say that shared diagnostics are private to th The records are private. Tester names and anything quoted from a record stay in chat and in `~/.cache/modwerk-local/`: never in a commit, pull request, issue, changelog or document. There, write "a tester" and only the technical fact. -1. **Pull.** `git fetch`, then `npm run diagnostics:pull` on Node 24. The summary is long, so write it to `~/.cache/modwerk-local/diagnostics/pull-.txt` and read its Problems section first; every record is in `~/.cache/modwerk-local/diagnostics/latest.json` (UTC). What the summary means, its known noise and an HTTP 403 are in `docs/MAINTENANCE.md#beta-worker`; the record schema is `src/community/octatrack-diagnostics-contract.ts`. With an argument, read only that member's, module's or symptom's records. +1. **Pull.** `git fetch`, then `npm run diagnostics:pull` on Node 24. The summary is long, so write it to `~/.cache/modwerk-local/diagnostics/pull-.txt` and read its Problems section first; every record is in `~/.cache/modwerk-local/diagnostics/latest.json` (UTC). What the summary means, its known noise and an HTTP 403 are in `docs/MAINTENANCE.md#beta-worker`; the record schema is `src/community/octatrack-diagnostics-contract.ts`. With an argument, read only that member's, module's or symptom's records. A member who does not share can hand over the same records themselves: Copy details or a saved `modwerk-support-*.txt` after a USB error, or the USB events block of a report they posted; read their JSON lines with `parseSupportFile` (`src/community/support-report.ts`). 2. **Sort the failures into causes**, not records: sync and link failures, build failures, browser errors, unresponsive units, stalls and crashes in device logs, restores that were not `RESTORED`, CPU or DSP near the limit. One cause is one line: what happens, on which base, set, browser and OS, how many units, first and last seen. 3. **Drop what is not open.** For each cause check, in this order: the unit's base and module versions against what is live (an old build's bug that `changelog/` or the module's changelog already fixed is done), the open issues and pull requests (`gh issue list`, `gh pr list`), the findings in `docs/OCTATRACK_BETA_TEST_PLAN.md`, and the stock OS's own behaviour. Say which it was. 4. **Prove the rest before fixing it.** Find the code the record points at and reproduce the failure in a test, over HTTP, or with the developer MCP. On the owner's computer, take a turn through the [unit queue](../../../docs/OCTATRACK_DRIVING.md#taking-turns-on-the-unit) for hardware reproduction (`/modwerk-test-on-unit`). Confirm the shared emulator is free before starting it. A cause you cannot reproduce is a hypothesis: say what would confirm it, and add the missing diagnostic field or log line as the fix if that is what stands in the way. Never ask a tester to run tests. diff --git a/.claude/skills/modwerk-diagnostics/SKILL.md b/.claude/skills/modwerk-diagnostics/SKILL.md index 832667edde..496ab94b61 100644 --- a/.claude/skills/modwerk-diagnostics/SKILL.md +++ b/.claude/skills/modwerk-diagnostics/SKILL.md @@ -9,7 +9,7 @@ If the developer is not the owner, say that shared diagnostics are private to th The records are private. Tester names and anything quoted from a record stay in chat and in `~/.cache/modwerk-local/`: never in a commit, pull request, issue, changelog or document. There, write "a tester" and only the technical fact. -1. **Pull.** `git fetch`, then `npm run diagnostics:pull` on Node 24. The summary is long, so write it to `~/.cache/modwerk-local/diagnostics/pull-.txt` and read its Problems section first; every record is in `~/.cache/modwerk-local/diagnostics/latest.json` (UTC). What the summary means, its known noise and an HTTP 403 are in `docs/MAINTENANCE.md#beta-worker`; the record schema is `src/community/octatrack-diagnostics-contract.ts`. With an argument, read only that member's, module's or symptom's records. +1. **Pull.** `git fetch`, then `npm run diagnostics:pull` on Node 24. The summary is long, so write it to `~/.cache/modwerk-local/diagnostics/pull-.txt` and read its Problems section first; every record is in `~/.cache/modwerk-local/diagnostics/latest.json` (UTC). What the summary means, its known noise and an HTTP 403 are in `docs/MAINTENANCE.md#beta-worker`; the record schema is `src/community/octatrack-diagnostics-contract.ts`. With an argument, read only that member's, module's or symptom's records. A member who does not share can hand over the same records themselves: Copy details or a saved `modwerk-support-*.txt` after a USB error, or the USB events block of a report they posted; read their JSON lines with `parseSupportFile` (`src/community/support-report.ts`). 2. **Sort the failures into causes**, not records: sync and link failures, build failures, browser errors, unresponsive units, stalls and crashes in device logs, restores that were not `RESTORED`, CPU or DSP near the limit. One cause is one line: what happens, on which base, set, browser and OS, how many units, first and last seen. 3. **Drop what is not open.** For each cause check, in this order: the unit's base and module versions against what is live (an old build's bug that `changelog/` or the module's changelog already fixed is done), the open issues and pull requests (`gh issue list`, `gh pr list`), the findings in `docs/OCTATRACK_BETA_TEST_PLAN.md`, and the stock OS's own behaviour. Say which it was. 4. **Prove the rest before fixing it.** Find the code the record points at and reproduce the failure in a test, over HTTP, or with the developer MCP. On the owner's computer, take a turn through the [unit queue](../../../docs/OCTATRACK_DRIVING.md#taking-turns-on-the-unit) for hardware reproduction (`/modwerk-test-on-unit`). Confirm the shared emulator is free before starting it. A cause you cannot reproduce is a hypothesis: say what would confirm it, and add the missing diagnostic field or log line as the fix if that is what stands in the way. Never ask a tester to run tests. diff --git a/LICENSES/platform.json b/LICENSES/platform.json index 50842fca41..4393ed618b 100644 --- a/LICENSES/platform.json +++ b/LICENSES/platform.json @@ -42,6 +42,7 @@ "src/community/profile-links.ts", "src/community/remote-session-contract.ts", "src/community/report-closure.ts", + "src/community/support-report.ts", "src/community/usage-contract.ts", "src/community/usage-pages.ts", "src/config/beta-invitation.ts", diff --git a/changelog/2026-11-24-usb-support-details.md b/changelog/2026-11-24-usb-support-details.md new file mode 100644 index 0000000000..15d5153cea --- /dev/null +++ b/changelog/2026-11-24-usb-support-details.md @@ -0,0 +1 @@ +Your Octatrack: after a failed sync, connection, self-test or base update, **Copy details** and **Save report** next to the error give you what went wrong, the base with its USB Audio layout and the last USB events, to paste in a message or keep as a file. The page keeps its last 100 USB events in memory whether or not you share diagnostics, and sends none of them by itself. **Report a problem** now fills in what the Octatrack runs and the last error, and offers to attach those events; you see what is attached and can remove it before posting. A failed base update that changes only the USB Audio layout now names the layout ("came back on base 0.8.1 (USB Audio off)") instead of reading like the same base. diff --git a/public/licenses/THIRD_PARTY_NOTICES.html b/public/licenses/THIRD_PARTY_NOTICES.html index 77e00d348a..ee25d82537 100644 --- a/public/licenses/THIRD_PARTY_NOTICES.html +++ b/public/licenses/THIRD_PARTY_NOTICES.html @@ -89,6 +89,7 @@ src/community/profile-links.ts src/community/remote-session-contract.ts src/community/report-closure.ts +src/community/support-report.ts src/community/usage-contract.ts src/community/usage-pages.ts src/config/beta-invitation.ts diff --git a/public/licenses/THIRD_PARTY_NOTICES.txt b/public/licenses/THIRD_PARTY_NOTICES.txt index 10ac7f8491..3852d1c198 100644 --- a/public/licenses/THIRD_PARTY_NOTICES.txt +++ b/public/licenses/THIRD_PARTY_NOTICES.txt @@ -88,6 +88,7 @@ src/community/ot-log.ts src/community/profile-links.ts src/community/remote-session-contract.ts src/community/report-closure.ts +src/community/support-report.ts src/community/usage-contract.ts src/community/usage-pages.ts src/config/beta-invitation.ts diff --git a/server/configuration-reports.ts b/server/configuration-reports.ts index 3f84403913..b35db22fd8 100644 --- a/server/configuration-reports.ts +++ b/server/configuration-reports.ts @@ -5,11 +5,13 @@ import { followReportedModules } from './module-updates' import type { Database, Env, User } from './platform' import { HttpError, jsonBody, optional, required, response } from './security' import { configurationSummary, validateConfigurationReportContext } from '../src/community/configuration-report' -import { IssueInputError } from '../src/community/issue-context' +import { IssueInputError, isDigiIssue } from '../src/community/issue-context' import { OT_LOG_MAX_BYTES, OtLogError, parseOtLog } from '../src/community/ot-log' import { communityModule } from '../src/community/modules' +import { SUPPORT_ATTACHMENT_BYTES } from '../src/community/support-report' +import { validateSupportAttachment } from './support-attachment' -const FIELDS = ['title', 'steps', 'expected', 'actual', 'context', 'log', 'maintainerSharing', 'visibility', 'notifyUpdates'] +const FIELDS = ['title', 'steps', 'expected', 'actual', 'context', 'log', 'usbEvents', 'maintainerSharing', 'visibility', 'notifyUpdates'] function input(read: () => T): T { try { return read() } catch (error) { if (error instanceof IssueInputError || error instanceof OtLogError) throw new HttpError(400, error.message); throw error } } /** @@ -19,7 +21,7 @@ function input(read: () => T): T { try { return read() } catch (error) { if ( */ export async function createConfigurationReport(request: Request, env: Env, db: Database, user: User | null) { const owner = needMember(user) - const body = await jsonBody(request, OT_LOG_MAX_BYTES + 32 * 1024) + const body = await jsonBody(request, OT_LOG_MAX_BYTES + SUPPORT_ATTACHMENT_BYTES + 32 * 1024) if (Object.keys(body).some(key => !FIELDS.includes(key))) throw new HttpError(400, 'Unexpected report field. Files and firmware are not accepted.') if (body.notifyUpdates !== undefined && typeof body.notifyUpdates !== 'boolean') throw new HttpError(400, 'Choose whether to follow module updates.') if (body.visibility !== undefined && body.visibility !== 'forum' && body.visibility !== 'private') throw new HttpError(400, 'Choose a public forum report or a private report.') @@ -31,6 +33,11 @@ export async function createConfigurationReport(request: Request, env: Env, db: const log = attached ? input(() => parseOtLog(body.log as string)) : null // An attached log records the configuration the device ran; otherwise the reporter names it. const { context, modules } = input(() => validateConfigurationReportContext(body.context, log?.summary ?? null)) + // USB events the reporter chose to attach (support-report.ts): kept with the configuration, which reaches GitHub on the + // same terms as the log. + const usb = body.usbEvents === undefined || body.usbEvents === null ? undefined : validateSupportAttachment(body.usbEvents) + if (usb && isDigiIssue(context)) throw new HttpError(400, 'USB events come from an Octatrack. Remove them and post the report again.') + if (usb && JSON.stringify(usb).length > SUPPORT_ATTACHMENT_BYTES) throw new HttpError(400, 'The attached USB events are too long. Remove them and post the report again.') // Member first, so one member's refused reports never fill the address's or the site's counter. await throttle(db, 'issue-member:' + owner.id, 10) await throttle(db, 'issue-ip:' + (request.headers.get('CF-Connecting-IP') ?? 'local'), 10) @@ -47,7 +54,7 @@ export async function createConfigurationReport(request: Request, env: Env, db: db.prepare('INSERT INTO forum_posts(id,thread_id,user_id,body) VALUES(?,?,?,?)').bind(postId, threadId, owner.id, 'Configuration (' + configurationSummary(modules.length) + '): ' + modules.map(module => module.name + ' ' + module.version).join(', ') + '\n\n' + details), db.prepare('INSERT INTO forum_follows(thread_id,user_id) VALUES(?,?)').bind(threadId, owner.id), ] : [] - statements.push(db.prepare("INSERT INTO issues(id,module_id,author_login,reporter_id,title,body,context_json,github_state,maintainer_sharing,forum_thread_id,public_json,scope) VALUES(?,?,?,?,?,?,?,?,?,?,?,'configuration')").bind(id, anchor.id, anchor.author, owner.id, title, details, JSON.stringify(context), github ? 'pending' : 'none', Number(publicReport || body.maintainerSharing === true), threadId, publicDetails && JSON.stringify(publicDetails))) + statements.push(db.prepare("INSERT INTO issues(id,module_id,author_login,reporter_id,title,body,context_json,github_state,maintainer_sharing,forum_thread_id,public_json,scope) VALUES(?,?,?,?,?,?,?,?,?,?,?,'configuration')").bind(id, anchor.id, anchor.author, owner.id, title, details, JSON.stringify(usb ? { ...context, usb } : context), github ? 'pending' : 'none', Number(publicReport || body.maintainerSharing === true), threadId, publicDetails && JSON.stringify(publicDetails))) for (const module of modules) statements.push(db.prepare('INSERT INTO issue_modules(issue_id,module_id,version) VALUES(?,?,?) ON CONFLICT DO NOTHING').bind(id, module.id, module.version)) if (log) statements.push(db.prepare('INSERT INTO issue_logs(issue_id,text,bytes,summary_json) VALUES(?,?,?,?)').bind(id, log.text, log.text.length, JSON.stringify(log.summary))) if (body.notifyUpdates !== false) statements.push(...followReportedModules(db, modules.map(module => module.id), owner.id)) diff --git a/server/github.ts b/server/github.ts index 0d098b2640..438a3f9883 100644 --- a/server/github.ts +++ b/server/github.ts @@ -8,6 +8,7 @@ import { profilePath } from '../src/community/forum-links' import { FLASH_STATES, type IssueContext } from '../src/community/issue-context' import { REPORT_CLOSURE_REASONS, REPORT_COMMANDS, type ReportClosureReason } from '../src/community/report-closure' import { digest } from './security' +import { supportBlock, type SupportAttachment } from '../src/community/support-report' const API = 'https://api.github.com' const BODY_LIMIT = 60000 @@ -69,7 +70,7 @@ const quote = (text: string) => inert(text).split(/\r?\n/).map(line => '> ' + li */ export type PublicBugDetails = { device: string; version: string; steps: string; expected: string; actual: string; modules?: { id: string; name: string; version: string }[]; full?: boolean } /** A whole-configuration report lists every module in `moduleIds`; `module_id` is then only the first of them. */ -export type MirroredIssue = { id: string; module_id: string; scope?: 'module' | 'configuration'; moduleIds?: string[]; title: string; reporter: string | null; owners: string[]; details: PublicBugDetails; context?: IssueContext; log?: string } +export type MirroredIssue = { id: string; module_id: string; scope?: 'module' | 'configuration'; moduleIds?: string[]; title: string; reporter: string | null; owners: string[]; details: PublicBugDetails; context?: IssueContext; log?: string; usb?: SupportAttachment } export function issueTitle(issue: Pick) { return ('[' + (issue.scope === 'configuration' ? 'configuration' : issue.module_id) + '] ' + issue.title).slice(0, 256) } const GITHUB_LOGIN = /^[A-Za-z0-9-]{1,39}$/ @@ -115,8 +116,10 @@ export function issueMarkdown(issue: MirroredIssue, app?: string) { 'Only the registered release author can use `resolve`, after verifying that exact published download fixes the report on their unit. Ordinary closures claim no new firmware fix.', '', 'A merged PR alone does not resolve a report. [Author release steps](https://github.com/repeat98/modwerk/blob/main/docs/MODULE_AUTHOR_UPDATES.md).', ] - const log = issue.log ? ['### Device log', '', ...logBlock(issue.log, BODY_LIMIT - [...report, ...rest].join('\n').length)] : [] - return [...report, ...log, ...rest].join('\n').slice(0, BODY_LIMIT) + // The reporter attached them themselves (support-report.ts); checked to numbers, codes and hashes when they posted. + const usb = issue.usb ? ['### USB events', '', ...supportBlock(issue.usb)] : [] + const log = issue.log ? ['### Device log', '', ...logBlock(issue.log, BODY_LIMIT - [...report, ...usb, ...rest].join('\n').length)] : [] + return [...report, ...usb, ...log, ...rest].join('\n').slice(0, BODY_LIMIT) } export async function createGithubIssue(config: GithubConfig, issue: MirroredIssue, app?: string) { @@ -178,8 +181,8 @@ export async function mirrorIssue(db: Database, env: Env, id: string, stale = fa const details = JSON.parse(row.public_json) as PublicBugDetails // Only reporters who agreed to publish them get their configuration and log on GitHub. const log = details.full ? (await db.prepare('SELECT text FROM issue_logs WHERE issue_id=?').bind(id).first<{ text: string }>())?.text : undefined - const context = details.full && row.context_json ? JSON.parse(row.context_json) as IssueContext : undefined - const created = await createGithubIssue(config, { id: row.id, module_id: row.module_id, scope: row.scope, moduleIds, title: row.title, reporter: row.reporter, owners, details, context, log }, env.APP_URL) + const context = details.full && row.context_json ? JSON.parse(row.context_json) as IssueContext & { usb?: SupportAttachment } : undefined + const created = await createGithubIssue(config, { id: row.id, module_id: row.module_id, scope: row.scope, moduleIds, title: row.title, reporter: row.reporter, owners, details, context, log, ...(context?.usb ? { usb: context.usb } : {}) }, env.APP_URL) await db.prepare("UPDATE issues SET github_state='synced',github_number=?,github_url=?,github_error='' WHERE id=?").bind(created.number, created.url, id).run() return { state: 'synced' as const, url: created.url } } catch (error) { diff --git a/server/support-attachment.ts b/server/support-attachment.ts new file mode 100644 index 0000000000..d137dc9ca5 --- /dev/null +++ b/server/support-attachment.ts @@ -0,0 +1,38 @@ +import { HttpError } from './security' +import { validateDiagnostic } from './octatrack-diagnostics' +import { DIAGNOSTIC_USB_EVENTS } from '../src/community/octatrack-diagnostics-contract' +import { SUPPORT_ATTACHED_EVENTS, SUPPORT_LAYOUTS, type SupportAttachment, type SupportEvent } from '../src/community/support-report' + +const object = (v: unknown): v is Record => !!v && typeof v === 'object' && !Array.isArray(v) +const hash = (v: unknown) => typeof v === 'string' && /^[a-f0-9]{64}$/.test(v) +/** validateDiagnostic wants a record id; an attached event has none of its own. */ +const NO_ID = '00000000-0000-4000-8000-000000000000' +/** The link's own events: no device log (the collector reads that, not the link) and no browser or build events. */ +const LINK_EVENTS: readonly string[] = [...DIAGNOSTIC_USB_EVENTS.filter(event => event !== 'device_log'), 'link_failed'] +const refuse = (): never => { throw new HttpError(400, 'The attached USB events are unreadable. Remove them and post the report again.') } +const checked = (record: Record) => { try { return validateDiagnostic({ id: NO_ID, ...record }) } catch { return refuse() } } + +/** + * USB events a member attached to a problem report (support-report.ts): the trail's records, each held to the shared + * diagnostics' field rules (validateDiagnostic), with when the page saw it, plus the unit's base, version, layout, model + * text and running set, and the browser family. Anything else is refused, so no free text reaches the issue. + */ +export function validateSupportAttachment(value: unknown): SupportAttachment { + if (!object(value) || value.schema !== 1 || !Object.keys(value).every(key => ['schema', 'unit', 'client', 'events'].includes(key))) return refuse() + const { unit, client, events } = value + if (unit !== undefined && !(object(unit) && Object.keys(unit).every(key => ['base', 'version', 'layout', 'model', 'active'].includes(key)) && hash(unit.base) + && (unit.version === undefined || typeof unit.version === 'string' && /^[0-9]{1,3}(?:\.[0-9]{1,3}){1,3}$/.test(unit.version)) + && (unit.layout === undefined || SUPPORT_LAYOUTS.includes(unit.layout as string)) + && (unit.model === undefined || typeof unit.model === 'string' && /^[A-Za-z0-9 ._+-]{1,16}$/.test(unit.model)) + && (unit.active === undefined || hash(unit.active)))) return refuse() + if (client !== undefined) checked({ event: 'connected', phase: 'ready', client }) + if (!Array.isArray(events) || !events.length || events.length > SUPPORT_ATTACHED_EVENTS) return refuse() + const list = events.map(entry => { + if (!object(entry) || typeof entry.at !== 'string' || entry.at.length > 30 || !/^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(?:\.\d{1,3})?Z$/.test(entry.at) || !Number.isFinite(Date.parse(entry.at))) return refuse() + const { at, ...record } = entry + if (!LINK_EVENTS.includes(record.event as string) || 'modules' in record || 'client' in record) return refuse() + checked(record) + return { at, ...record } as SupportEvent + }) + return { schema: 1, ...(unit ? { unit: unit as unknown as SupportAttachment['unit'] } : {}), ...(client ? { client: client as SupportAttachment['client'] } : {}), events: list } +} diff --git a/src/community/ConfigurationReport.tsx b/src/community/ConfigurationReport.tsx index 4c3cbbe739..92ebbd2327 100644 --- a/src/community/ConfigurationReport.tsx +++ b/src/community/ConfigurationReport.tsx @@ -1,4 +1,6 @@ -import { useEffect, useId, useRef, useState, type FormEvent } from 'react' +import { useContext, useEffect, useId, useRef, useState, type FormEvent } from 'react' +import { OctatrackLinkContext } from '../hooks/useOctatrackLink' +import { SUPPORT_ATTACHED_EVENTS, supportBase, supportLines } from './support-report' import { createPortal } from 'react-dom' import { Icon } from '../components/Icon' import { DEVICES_BY_ID } from '../devices/registry' @@ -23,7 +25,13 @@ export function ConfigurationReportDialog({ machine, configurationId, onClose }: const dialog = useRef(null), heading = useId(), success = useRef(null), logHelp = useId() const { session } = useCommunity(), workspace = useWorkspaceReportContext(machine), device = DEVICES_BY_ID[machine] const { file, input: logInput, read: readLog, remove: removeLog } = useOtLogFile(), digi = machine !== 'octatrack' - const [model, setModel] = useState(''), [flash, setFlash] = useState('') + // The USB link fills in what it knows, all of it editable: what the Octatrack runs, the last error the page showed, + // and its recent USB events, which the reporter sees and can remove before posting (support-report.ts). IDENTIFY names + // the stock OS, not MKI or MKII, so the model stays the reporter's choice. + const link = useContext(OctatrackLinkContext), usbLink = digi ? null : link + const [attachment] = useState(() => usbLink?.supportAttachment?.(SUPPORT_ATTACHED_EVENTS)) + const [attach, setAttach] = useState(() => !!attachment?.events.length), lastError = usbLink?.trail?.lastError?.text ?? '' + const [model, setModel] = useState(''), [flash, setFlash] = useState(() => usbLink?.getState().identity ? 'usb' : '') const [sent, setSent] = useState(null), [busy, setBusy] = useState(false), [error, setError] = useState('') useEffect(() => { const element = dialog.current, previousFocus = document.activeElement @@ -50,7 +58,7 @@ export function ConfigurationReportDialog({ machine, configurationId, onClose }: const context: IssueContext = digi ? { machine: machine as 'digitakt' | 'digitone', model: fields.model, flash: fields.flash as FlashState, os: fields.os, moduleVersion: resolved.modules[0]?.version ?? '', modules: resolved.modules, keepStockFx2: null, build: '' } : { model: model as OtModel, flash: flash as FlashState, os: file.log?.summary.os ?? REPORT_OS, modules: resolved.modules, keepStockFx2: resolved.keepStockFx2, build: resolved.build } - const result = await post('/configuration-reports', { title: fields.title, steps: fields.steps, expected: fields.expected, actual: fields.actual, context, visibility: 'forum', notifyUpdates: fields.notifyUpdates === 'on', ...(file.log ? { log: file.log.text } : {}) }) + const result = await post('/configuration-reports', { title: fields.title, steps: fields.steps, expected: fields.expected, actual: fields.actual, context, visibility: 'forum', notifyUpdates: fields.notifyUpdates === 'on', ...(file.log ? { log: file.log.text } : {}), ...(!digi && attach && attachment?.events.length ? { usbEvents: attachment } : {}) }) setSent(result) for (const module of catalogued) refreshModuleIssues(module.id) window.dispatchEvent(new Event('modwerk-module-updates')) @@ -90,8 +98,15 @@ export function ConfigurationReportDialog({ machine, configurationId, onClose }: {modules > catalogued.length && catalogued.length > 0 &&

{modules - catalogued.length} {modules - catalogued.length === 1 ? 'module is' : 'modules are'} no longer in the catalog and cannot be notified.

} -