Skip to content

docs: document per-session config support across all plugins and the spec - #40

Merged
rmyndharis merged 1 commit into
mainfrom
docs/per-session-config-documentation
Jul 18, 2026
Merged

docs: document per-session config support across all plugins and the spec#40
rmyndharis merged 1 commit into
mainfrom
docs/per-session-config-documentation

Conversation

@rmyndharis

Copy link
Copy Markdown
Owner

Summary

Make per-session config support explicit and discoverable at three layers. Until now, whether a plugin honors per-session config overrides (different settings for different WhatsApp sessions under one plugin instance) was implicit — readable only from code. This surfaced concretely as the bug class fixed in PRs #38 and #39 (cache-at-enable ignoring overrides).

Problem

OpenWA's sessionScoped plugins (the default) may carry per-session config overrides set via the dashboard. But a plugin only honors them if it re-reads ctx.config inside its hook (not a cached snapshot from onEnable). This requirement was undocumented in the spec, so:

  • Contributors didn't know the requirement when building a new plugin → the cache-at-enable anti-pattern recurred.
  • Operators couldn't tell from docs whether a given plugin honors per-session overrides → had to read source.

Changes

1. PLUGIN-STANDARD.md (spec) — the requirement

Expanded the existing Per-session config (v0.7) section with:

2. Root README.md — operator-facing matrix

Added a Per-session config support table after the plugin catalog with a ✅/⚠️/❌ indicator and a one-line note per plugin, linking to each plugin's README for details. This lets an operator see support status at a glance.

Tier Plugins
✅ Full after-hours, chat-flow, chatwoot-adapter, faq-bot, http-action, supabase-otp-hook, typebot-connector
⚠️ Caveat (config-signature caching; multi-backend isolation needs one instance/session) group-translate, voice-transcription
❌ Not supported (single-sink design) gsheets-logger

3. Each plugin README.md — per-plugin detail

Added a ### Per-session config subsection under each plugin's Compatibility section, listing the overridable fields, when an override takes effect, and any caveat/workaround. gsheets-logger's existing note (from #39) is aligned to the same heading format.

Verification

  • Documentation-only change — no code, no manifest, no version bump.
  • npm run catalog:check — up to date (no generated blocks touched).
  • All 10 plugin READMEs confirmed to have exactly one ### Per-session config heading.

…spec

Make per-session config support explicit and discoverable at three layers:

1. PLUGIN-STANDARD.md (spec) — expand the Per-session config section with
   the author requirement (re-read ctx.config inside the hook, not a
   cached snapshot), the two correct patterns (per-event re-parse for
   plain config; config-signature caching for stateful coordinators), an
   explicit anti-pattern callout (cache-at-enable breaks overrides, the
   source of PRs #38/#39), and a documentation requirement for READMEs.

2. Root README — add a 'Per-session config support' matrix table after
   the plugin catalog so operators can see at a glance which plugins
   honor per-session overrides (✅/⚠️/❌) and the caveat for each.

3. Each plugin README — add a '### Per-session config' subsection under
   Compatibility with the support tier (full / caveat / not supported),
   the fields that may be overridden, and any workaround (e.g. one
   instance per session for multi-backend isolation or single-sink
   designs). gsheets-logger's existing note is aligned to the same
   heading format.
@rmyndharis
rmyndharis merged commit dbebbcf into main Jul 18, 2026
1 check passed
@rmyndharis
rmyndharis deleted the docs/per-session-config-documentation branch July 18, 2026 13:06
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