Commit 71d39bc
v1.1.0: rename provider id to ultimate-ai-connector-anthropic-max + fix render clobber
This commit makes two coordinated changes that have to ship together:
1. RENAME the AI Client provider id from 'anthropic-max' to
'ultimate-ai-connector-anthropic-max', and the JS registerConnector()
slug from 'ai-provider-for-anthropic-max/connector' to the same
'ultimate-ai-connector-anthropic-max'. This:
- Matches the naming convention used by the sister plugins
(ultimate-ai-connector-webllm, ultimate-ai-connector-compatible-endpoints).
- Claims the 'ultimate-ai-connector-' namespace properly so a future
third-party 'anthropic-max' plugin can't collide with this one.
- Causes the WP Connectors page to render ONE card instead of two —
previously a hidden duplicate auto-registered ApiKeyConnector card
existed alongside the custom-rendered card because the slugs differed.
This is a BREAKING change for any caller that hardcoded the old
provider id (e.g. AiClient::defaultRegistry()->getProvider('anthropic-max')).
Stored OAuth tokens, REST endpoint URLs, option keys, transient prefixes,
plugin folder name, text domain, and css class are unchanged.
2. WORKAROUND for WP core's registerDefaultConnectors() clobbering custom
renders. The rename in (1) makes the slugs match, which exposes this
plugin to the same race the other Ultimate-Multisite connector plugins
hit: WP core's routes/connectors-home/content module runs
registerDefaultConnectors() inside an async dynamic import, after our
top-level registerConnector() has already populated the store, and the
reducer's spread overwrites our custom render with the generic
ApiKeyConnector. Re-assert the registration on five ticks (sync +
microtask + setTimeout 0/50/250/1000ms) so we always end up last.
The proper upstream fix is in WordPress/gutenberg#77116. Once that ships
in a Gutenberg release, the 5-tick workaround can be removed; the rename
is permanent.
CSS class on the rendered card also updated from
`connector-item--anthropic-max` to `connector-item--ultimate-ai-connector-anthropic-max`
to match the new slug and the convention used by the sister plugins.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 116cb06 commit 71d39bc
File tree
5 files changed
+34
-22
lines changed- js
- src/Provider
5 files changed
+34
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
525 | 529 | | |
526 | 530 | | |
527 | 531 | | |
| |||
534 | 538 | | |
535 | 539 | | |
536 | 540 | | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
545 | 547 | | |
546 | 548 | | |
547 | 549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
82 | 85 | | |
83 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
88 | 96 | | |
89 | 97 | | |
90 | | - | |
| 98 | + | |
91 | 99 | | |
92 | 100 | | |
93 | 101 | | |
| |||
0 commit comments