You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(console): gate AI surface on the access-filtered agent catalog, not discovery (per-user AI seat) (#1993)
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>
fix(console): gate the AI surface on the access-filtered agent catalog (per-user), not the deployment-wide service-ai capability
6
+
7
+
`useAiSurfaceEnabled` keys off `GET /api/v1/ai/agents` again (>= 1 agent → AI shows), reverting objectui#1992. The agent-catalog route is now access-filtered server-side (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 whole AI surface (FAB, `/ai` routes, top-bar + designer "Ask AI") hides for them — instead of showing a control that 403s on click. The discovery `services.ai` flag is deployment-wide and cannot express per-user seating, so it is the wrong signal for the AI-seat gate. Community-Edition gating is unaffected: no service-ai → no agents → empty catalog → hidden.
0 commit comments