docs(plugin-chatbot): useAgents' shape table said the servers are unenveloped — they are not (objectstack#4053) - #3080
Merged
Conversation
…nveloped — they are not (objectstack#4053)
`extractAgentList` was written ahead of the server conversion, and its
docstring froze that moment: "mid-migration", "`{ agents }` today's shape,
both producers", "reading the envelope BEFORE any producer emits it". Both
producers have since converted — objectstack#4124 for the framework's
degraded fallback, cloud#929 for `service-ai` — so the table now names
`{ success: true, data: { agents } }` as the current wire and the bare
shapes as what they actually are: back-compat for deployments from before
the conversion, since a console release is not pinned to the server it runs
against.
The tolerance itself is unchanged, deliberately. Written down is why it must
stay: an unrecognised shape here does not throw or warn, it yields an empty
list, and `useAiSurfaceEnabled` turns that into "hide the entire AI surface" —
which is also the correct answer for a seat-less user (ADR-0068) and a
Community Edition deployment with no `service-ai`. A reader who believed the
old table would see four shapes read where "only one is real" and narrow them,
breaking exactly the deployments the comment appeared to be describing.
Verified: plugin-chatbot 232 passed (16 files), tsc clean. Comments and test
names only — no behavior change.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BZaiYNM5igzGk6JiibjShb
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 31, 2026 00:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to objectstack#4238, closing out objectstack#4053.
What was wrong
extractAgentListwas written ahead of the server conversion (objectui#2992), and its docstring froze that moment:None of that is true now. Both producers converted — the framework's degraded fallback in objectstack#4124, cloud's
service-aiin cloud#929 — so{ agents }is not "today's shape, both producers"; it is nobody's shape on a current server.What changed
Comments and test names only. The four-shape table now leads with what the wire actually carries and labels the rest honestly:
Why the tolerance stays, and why saying so is the point
extractAgentListis unchanged — a console release is not pinned to the server it runs against, so a deployment from before the conversion is ordinary rather than hypothetical.But "four shapes read, only one of them real" is an invitation to narrow this function, and narrowing it is uniquely unsafe here: an unrecognised shape does not throw, warn, or log. It yields an empty list, and
useAiSurfaceEnabledturns an empty list into "hide the entire AI surface" — which is also the correct answer for a seat-less user (ADR-0068) and a Community Edition deployment with noservice-ai.service-aiSo the docstring now says outright not to read the legacy branches as evidence the servers are bare, because a cleanup that "follows" the old comment would break exactly the deployments it appears to describe.
Verification
@object-ui/plugin-chatbottsc --noEmitNo behavior change.
Generated by Claude Code