Skip to content

feat(padToggle): honor runtime settings.enablePluginPadOptions flag#9

Merged
JohnMcLear merged 1 commit intomainfrom
feat/honor-runtime-flag
May 7, 2026
Merged

feat(padToggle): honor runtime settings.enablePluginPadOptions flag#9
JohnMcLear merged 1 commit intomainfrom
feat/honor-runtime-flag

Conversation

@JohnMcLear
Copy link
Copy Markdown
Member

Summary

ether/etherpad#7698 (merged) added settings.enablePluginPadOptions (default false per AGENTS.MD §52) as the runtime gate on the ep_* padOptions passthrough. The helper was only checking the static PluginCapabilities flag (capability present in core) and not the runtime gate — so on a patched core where the admin hasn't opted in, the helper would still render the pad-wide checkbox even though the broadcast/persist path is off. Click → silent no-op → confused users.

Read the flag from loadSettings's args.settings.enablePluginPadOptions and feed it into both:

  • eejsBlock_padSettings — no-op when off (no checkbox rendered).
  • clientVars.ep_plugin_helpers.padToggle.<plugin>.padWideSupported — false when off, so the client's init() correctly skips wiring the pad-wide handler and logs the degradation warning instead.

Test plan

  • 2 new unit tests cover the runtime-flag-off case (eejsBlock no-op, clientVars false).
  • Full suite: 67 passing.
  • Live verification once etherpad-lite ships a release with #7698.

🤖 Generated with Claude Code

etherpad-lite #7698 (merged) added a feature flag —
settings.enablePluginPadOptions, default false per AGENTS.MD §52 — that
gates the ep_* padOptions passthrough at runtime. The helper was only
checking the static PluginCapabilities flag (capability present in core)
and not the runtime gate, so on a patched core where the admin hasn't
opted in the helper would still render the pad-wide checkbox even
though the broadcast/persist path was off.

Read the flag from loadSettings's args.settings.enablePluginPadOptions
and feed it into both eejsBlock_padSettings (no-op when off) and the
clientVars padWideSupported flag (lets the client wire correctly).

Tests cover three scenarios on top of the existing patch-not-installed
case:
  - core unpatched (existing): no-op, capability=false
  - core patched + flag missing: no-op, capability=false
  - clientVars reports padWideSupported=false when flag is off

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@JohnMcLear JohnMcLear merged commit a000cc9 into main May 7, 2026
4 checks passed
@JohnMcLear JohnMcLear deleted the feat/honor-runtime-flag branch May 7, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant