Conversation
Operations can now be disabled by adding a "disabled" property to their definition in api-definitions.json. Disabled operations appear grayed out in the dropdown with "(Disabled)" suffix, show a red warning with the disable reason, and have the execute button disabled. Disables platform address operations (not yet available on testnet) and getIdentitiesContractKeys (upstream issue #3028). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Users can now select disabled operations to see their inputs and description. The execute button remains disabled. Updated disabled reason message for platform address operations. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe changes introduce a disabled state mechanism for API endpoints. A "disabled" field is added to nine endpoints in the API definitions, with corresponding UI updates to display disabled status, prevent execution of disabled operations, and apply visual styling for the disabled state. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
public/app.js (1)
686-693:⚠️ Potential issue | 🟡 MinorDisabled options won’t appear greyed out.
You removed
option.disabledto allow selection, but the CSS rule targetsoption:disabled, so the “disabled” styling won’t apply. Consider adding a data attribute/class to options and styling that instead.🛠️ Proposed fix (keep selectable + add styling hook)
- if (def?.disabled) { - // option.disabled = true; // Allow clicking to see operation details - option.textContent += ' (Disabled)'; - } + if (def?.disabled) { + // option.disabled = true; // Allow clicking to see operation details + option.textContent += ' (Disabled)'; + option.dataset.disabled = 'true'; + option.setAttribute('aria-disabled', 'true'); + }- select option:disabled { + select option[data-disabled="true"] { color: `#999`; }
Summary
Adds support for disabling operations in the UI without removing them from the codebase. Operations with a
disabledproperty inapi-definitions.jsonare shown with a "(Disabled)" suffix in the dropdown and display a warning message explaining why. Users can still view operation details, but the execute button is disabled.Changes
disabledproperty support to operation definitions inapi-definitions.jsonDisabled Operations
getIdentitiesContractKeys- Requires fix for upstream issue #3028Usage
To disable an operation, add a
disabledproperty to its definition:{ "operationName": { "label": "Operation Label", "description": "...", "disabled": "Reason for disabling", "inputs": [...] } }Example:
Summary by CodeRabbit
New Features
Style