docs(widget/wordpress): align integration & overview with the shipped plugin - #451
Conversation
Rewrite the WordPress widget docs to match the plugin's actual behavior (per L2 findings captured in the AgentBuddy review): - Remove the non-existent "CometChat UI Kit Builder" sidebar item, "Default User UID" field, and plugin-level "Display Mode" setting from the Configure Plugin Settings step. - Document the real auth model: the widget is gated by is_user_logged_in() and auto-maps each logged-in WordPress user to a CometChat UID with a securely generated auth token. - Drive docked/embedded display via the shortcode's `docked` attribute (not a Display Mode setting); rework the "every page" step accordingly. - Add "Anonymous & guest access" guidance (WP-side guest sign-in). - Add "Customize the widget with CSS" (Widget Builder Custom Code tab + --cometchat-* CSS variables) with the correct dashboard nav path, and a pointer from overview. - Fix button label "Get Embedded Code" -> "Get Embed Code" in overview. Fixes ENG-37952 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Review — verified against the shipped plugin sourceHow I verified this (sources)Since the whole point of this PR is "does the doc match what ships", I didn't review it against the L2 sheet — I reviewed it against the code. Two sources:
Every claim below cites a file and line so it can be checked independently. Anything I could not verify from source, I've marked as such rather than asserting it. VerdictThe direction is right — "CometChat UI Kit Builder", "Default User UID" and plugin-level "Display Mode" genuinely do not exist anywhere in the plugin, so removing them is correct and this PR is a real improvement. But I'd hold the merge. Two of the newly-added statements are inaccurate, one replaces a working plugin feature with harder manual work, and the single biggest remaining error in the file — the credentials list — isn't touched by this PR. Answers to the 5 verification items1. Plugin settings location →
2.
3. Guest access recipe → please replace this The suggested approach (sign the visitor into a shared guest account on page load) means a shared credential for strangers, session/nonce complications, and it defeats full-page caching. I'd rather not recommend that in writing. The plugin has no guest path and no filter hook to add one — Suggested honest framing: anonymous chat is not supported by the WordPress plugin today; use the HTML/JS embed with 4. "Get Embed Code" label — could not verify. That's dashboard UI, not in either repo I read. Scoping it to this PR is defensible, but a label fix landing in 1 of 13 files creates a fresh inconsistency. I'd either drop it here or do the 13-file sweep in one commit. 5. Both
.CometChatApp :root { --cometchat-primary-color: #6852D6; }
The working target is .cometchat-root {
--cometchat-primary-color: #6852D6;
--cometchat-font-family: "Inter", sans-serif;
}Please smoke-test this in the builder before merge — Not covered by this PR, but higher impactA. The credentials list is still wrong — lines 15 and 74 Line 74 still says "Paste your Widget ID, App ID, Region, and Auth Key". The actual settings screen (
There is no Widget ID field and no Auth Key field. The plugin never uses an Auth Key — it authenticates to the REST API with the REST API key as the This is a customer-blocking error and I suspect it's closer to the root of the original ticket than the items this PR fixes. B. API Version must be set to
C. The "every page" rewrite replaces a real feature with theme editing The old text was wrong, but the replacement points users at their theme's footer template. The plugin already ships the feature: Suggested replacement for that step:
D. Shortcode attribute values are aggressively sanitized
Worth a warning box here, plus a ticket for the plugin team. E. Minor
Suggested rewrite of the Configure step1. In WordPress Admin, go to **Settings → CometChat** (or click **Settings** on the
CometChat row under **Plugins**).
2. Fill in:
- **App ID** and **App Region** — Dashboard → App → Credentials
- **API Version** — select **3**. Leaving this unset falls back to the legacy v2 API
and user creation will fail.
- **Rest API Key** — Dashboard → App → Credentials → Rest API Keys.
This is the REST API key, not the Auth Key.
3. Click **Update Settings**.One process noteThe PR description says the L2/sheet findings were treated as source of truth because the plugin source wasn't available. Two of those findings didn't survive contact with the code — the guest recipe, and the implied absence of a sitewide setting. The plugin ZIP is one Happy to pair on the follow-up edits if useful. |
birendraprasad-gupta
left a comment
There was a problem hiding this comment.
Inline notes to go with my summary comment above, now re-checked against 2784f04 ("Replaced Widget ID -> Variant ID").
One correction to my earlier comment: it quoted line 74 as "Widget ID", which was the text at 431c8b3. 2784f04 changed it to "Variant ID". The underlying issue is unchanged — see the inline note on that line — but I was quoting stale text and wanted to flag that rather than leave it.
Same sources as before: plugin cometchat-pro v0.0.14 (downloaded from the Kernl link at line 22 of this doc) and @cometchat/chat-embed v1.0.36.
What & why
Addresses ENG-37952 (AgentBuddy DOCUMENTATION_GAP, ticket #45163, appears in both the Jul 15–22 and Jul 21–28 tabs). The WordPress widget docs described a plugin UI that doesn't match what ships, which led an AI agent to answer a support ticket incorrectly end-to-end.
Changes
integration.mdxis_user_logged_in(), and the plugin auto-maps each logged-in WP user to a CometChat UID with a securely generated auth token (no fixed UID in the plugin).dockedattribute; reworked the "every page" step to use the shortcode instead of a Display Mode setting.--cometchat-*variables) with the correct dashboard nav path.overview.mdxI don't have the shipped plugin source, so please confirm these before merge:
is_user_logged_in()gate + auto UID mapping + auto auth-token — stated per L2; confirm wording matches plugin behavior.snippets/widget/overview.mdx+ severalai-agents/*pages). If the real button is "Get Embed Code", those should be updated in a follow-up; I scoped this PR to the WordPress ticket only.--cometchat-*example values — the two variables shown are illustrative; confirm the canonical widget theming variables.Fixes ENG-37952
🤖 Generated with Claude Code