feat(console): API 浏览器按诚实能力标记过滤服务分组(ADR-0076 D12)#2637
Merged
Conversation
… D12) Framework discovery now reports honest capability markers (__serviceInfo: status + handlerReady, framework#2462). Consumers that gated UI on services.<x>.enabled alone would light up for dev stubs whose routes 404/501. - data-objectstack: add DiscoveryServiceInfo type + isServiceUsable() predicate — enabled && (handlerReady ?? status === 'available'). Degraded services with a live handler stay usable; stubs do not. - react useDiscovery: isAuthEnabled / isAiEnabled now use the predicate (auth stays fail-open when the discovery entry is absent). - app-shell ConditionalAuthWrapper: same predicate for the auth gate. - console useApiDiscovery: replace ad-hoc enabled/handler check with the shared predicate so degraded to unusable services stop rendering endpoint groups. - tests: table-driven unit coverage for isServiceUsable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1BtxNeUaGmvUYr8FwtUNu
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Main already shipped the canonical honest-capabilities helper in @object-ui/react (PR #2630) covering useDiscovery and ConditionalAuthWrapper. Take main's versions wholesale, drop the duplicate predicate this branch had added to data-objectstack, and keep only the remaining net-new piece: console useApiDiscovery now gates endpoint groups on the shared isServiceUsable (fail-closed for services absent from discovery, preserving this page's historical behavior). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1BtxNeUaGmvUYr8FwtUNu
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 17, 2026 12:50
6 tasks
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.
背景
framework 侧 D12(objectstack-ai/framework#2462,ADR-0076)让 discovery 输出诚实的能力标记(
status+handlerReady)。react/app-shell 侧的消费端改造已由 #2630 合入(@object-ui/react提供规范版isServiceUsable(),覆盖useDiscovery与ConditionalAuthWrapper)。本分支最初与 #2630 并行做了重复实现,合并 main 后已收敛:删除本分支在
data-objectstack里的重复谓词,只保留 #2630 未覆盖的净增量——console API 浏览器。变更
useApiDiscovery:endpoint 分组改用@object-ui/react的共享isServiceUsable()门控 —stub/unavailable/handlerReady:false的服务不再渲染 endpoint 分组(degraded仍在服务,保持可见)。不在 discovery 里的服务保持本页历史上的 fail-closed 行为(无条目 → 不渲染)。DiscoveryServiceStatus(来自@object-ui/react),消除 ad-hoc 结构重复。验证
@object-ui/react、@object-ui/app-shell、@object-ui/data-objectstack测试全绿(各 89)turbo run build --filter=@object-ui/console全绿(tsc + vite)Refs: objectstack-ai/framework#2462(ADR-0076 D12);接续 #2630
🤖 Generated with Claude Code
https://claude.ai/code/session_01A1BtxNeUaGmvUYr8FwtUNu