fix(console): gate AI surface on the access-filtered agent catalog, not discovery (per-user AI seat)#1993
Merged
Merged
Conversation
…ot discovery (per-user AI seat) Reverts objectui#1992. `useAiSurfaceEnabled` keys off `GET /api/v1/ai/agents` again (>= 1 agent → AI shows). That route is now access-filtered server-side (framework ADR-0049 / ADR-0068): it returns only the agents the CALLER may chat, so a user WITHOUT the per-user AI seat (`ai_seat`) gets an empty catalog and the ENTIRE AI surface — FAB, `/ai` routes, top-bar + designer "Ask AI" — hides for them, instead of showing a control that 403s on click. #1992 had moved the gate to the deployment-wide discovery `services.ai` capability, which is identical for every user and so cannot express per-user seating — the wrong signal for the AI-seat gate. Community-Edition gating is unaffected (no service-ai → no agents → empty catalog → hidden). Updated the hook docs with a "do NOT flip back to discovery" note so the per-user dimension isn't dropped again. app-shell builds clean; useAiSurface tests (4) green. The catalog's per-user filtering is proven server-side (framework branch feat/ai-seat-catalog-filter): seated user → ['build','ask'], seat-less → []. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Reverts #1992.
useAiSurfaceEnabledkeys offGET /api/v1/ai/agentsagain (≥1 agent → AI shows). That route is now access-filtered server-side (framework ADR-0049/ADR-0068): it returns only the agents the caller may chat, so a user without the per-user AI seat (ai_seat) gets an empty catalog and the entire AI surface — FAB,/airoutes, top-bar + designer "Ask AI" — hides for them, instead of a control that 403s on click.#1992 had moved the gate to the deployment-wide discovery
services.aicapability, identical for every user → can't express per-user seating. CE gating unaffected (no service-ai → no agents → empty → hidden). Added a "do NOT flip back to discovery" doc note.app-shell builds clean;
useAiSurfacetests (4) green. Pairs with framework#2320 and the cloud env-side gate (ADR-0068).🤖 Generated with Claude Code