affaan-m/ECC · error · Error
Unknown control-pane action
Error message
Unknown control-pane action: ${actionId} What it means
Registry lookup guard in buildControlPaneAction: the given actionId has no entry in ACTION_DEFINITIONS, so callers (including the runTests alias) cannot invoke a control-pane action that does not exist.
Solutions
- Use an action id defined in ACTION_DEFINITIONS.
- Check for renamed ids after refactors and update callers.
- Register the new action definition if it is intentionally new.
Example fix
// before
buildControlPaneAction('run-tests'); // unknown
// after
const { ACTION_DEFINITIONS } = require('./actions');
if (ACTION_DEFINITIONS.has('run-tests')) buildControlPaneAction('run-tests'); Defensive patterns
Strategy: validation
Validate before calling
const { ACTION_DEFINITIONS } = require('./actions');
if (!ACTION_DEFINITIONS.has(actionId)) throw new Error(`unknown action: ${actionId}`); Type guard
const isValidAction = (id) => typeof id === 'string' && ACTION_DEFINITIONS.has(id);
Try / catch
try { const a = buildControlPaneAction(id, opts); } catch (e) {
if (String(e.message).startsWith('Unknown control-pane action')) console.error(`'${id}' not registered; check ACTION_DEFINITIONS`);
else throw e;
} Prevention
- Derive action ids from ACTION_DEFINITIONS keys, not string literals
- Use constants/enums for action ids across the codebase
- After upgrades, grep for renamed/removed action ids
- Validate user-supplied action ids against the registry
When it happens
Trigger: Calling buildControlPaneAction(actionId, options) with an actionId string that is not a key of ACTION_DEFINITIONS (typo, renamed action, or dynamic id built at runtime).
Common situations: Typo in an action id; an action was removed or renamed in a newer version of the library; generating ids programmatically from user input without checking the registry.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Expected JSON response from control pane
- fps must be positive, got
- image_to_3d needs at least one image
- image_to_3d needs at least one image
- Invalid Claude plugin root: expected a string
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/7d1e295a8ad707aa.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/lib/control-pane/actions.js:99
const text = String(value);
if (text.length === 0) return "''";
if (/^[A-Za-z0-9_./:=@%+-]+$/.test(text)) return text;
return `'${text.replace(/'/g, `'\\''`)}'`;
}
function commandLineFor(action) {
return [
`cd ${shellQuote(action.cwd)}`,
'&&',
shellQuote(action.command),
...action.args.map(shellQuote),
].join(' ');
}
function buildControlPaneAction(actionId, options = {}) {
const definition = ACTION_DEFINITIONS.get(actionId);
if (!definition) {
throw new Error(`Unknown control-pane action: ${actionId}`);
}
const repoRoot = path.resolve(options.repoRoot || process.cwd());
const cwd = path.join(repoRoot, 'ecc2');
const limit = normalizeLimit(options.limit);
const query = String(options.query || '').trim();
const args = definition.args({ limit, query });
const action = {
id: actionId,
label: definition.label,
description: definition.description,
command: 'cargo',
args,
cwd,
executable: definition.executable,
};
return {View on GitHub (pinned to 8321021c54)