feat(app-shell/react): adapt to framework 15.1 — atomic publish rendering + honest discovery#2630
Merged
Merged
Conversation
…ring + honest discovery
ADR-0067 D2 (all-or-nothing publishes):
- formatPublishFailures renders a rolled-back batch as ONE banner anchored
on the causal item; batch_aborted entries are summarized, not listed as
N parallel errors. Pre-15.1 partial responses keep per-item rendering.
- PackagesPage: "rolled back because X" (new publishDraftsRolledBack i18n
en/zh) instead of "{n} failed" when the batch aborted.
- AiChatPage publish toast: surface the causal reason via
formatPublishFailures instead of throwing String(failedCount) (a toast
that read just "3").
ADR-0076 D12 (honest capabilities, console slice):
- DiscoveryServiceStatus: + handlerReady, + degraded/stub statuses.
- isServiceUsable(): backward-tolerant gate — absent fields keep the
pre-15.1 default (usable); stub/handlerReady:false gate off; degraded
stays usable (it serves). Consumed by isAuthEnabled / isAiEnabled and
ConditionalAuthWrapper (the load-bearing auth gate).
- ConditionalAuthWrapper: also attach cause to the timeout error
(preserve-caught-error).
Tests: metadataError suite +2 cases, new useDiscovery.usable suite (8),
adjacent suites green (106 tests incl. ConditionalAuthWrapper/i18n).
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
❌ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…ror ctor needs ES2022 lib the tsconfig doesn't target (Bundle Analysis TS2554)
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
…ach run, both unrelated to diff)
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 17, 2026 06:30
os-zhuang
pushed a commit
that referenced
this pull request
Jul 17, 2026
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
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.
Summary
Console-side adaptation to two framework 15.1.0 changes, both shipped in
@objectstack/*@15.1.0:1. ADR-0067 D2 — publishes are now all-or-nothing (framework#3074)
A failed batch publish now returns
publishedCount: 0with every draft infailed[]— the causal item with its real error, the rest markedcode: 'batch_aborted'. Three consumers rendered this as N parallel errors (or worse):formatPublishFailures(metadataError.ts, used by StudioDesignSurface's publish toast): a rolled-back batch now renders as one banner — "Nothing was published — the batch rolled back", the causal item with its field-anchored issues, and a "{n} other drafts aborted with it" summary. Pre-15.1 partial responses keep the existing per-item rendering (both shapes handled).PackagesPage.publishDrafts: detectsbatch_abortedand throws the newpublishDraftsRolledBackmessage ("发布未生效 — 批次已整体回滚:{cause}", en+zh added) instead of the misleading "{published} published; {failed} failed".AiChatPage.onPublishDrafts: previouslythrow new Error(String(failedCount))— the failure toast literally read "3". Now formatsfailed[]through the shared helper.2. ADR-0076 D12 — honest discovery (framework 15.1, #2462/#3037)
Discovery no longer hardcodes every service as
available; stubs reportstub, serving fallbacks reportdegraded, andhandlerReadysays whether a real handler exists. Console slice (the "trust only handlerReady" remainder named in ADR-0076's status):DiscoveryServiceStatustype: +handlerReady?, status union widened withdegraded/stub.isServiceUsable()helper — deliberately backward-tolerant: absent fields keep the pre-15.1 default (usable);enabled:false/handlerReady:false/stub/unavailablegate off;degradedstays usable (it serves — callers may warn, never disable).isAuthEnabled/isAiEnabled(useDiscovery) andConditionalAuthWrapper(the load-bearing auth gate — a stub auth service no longer wraps the app in a real AuthProvider).{ cause }(repo lint rule).Test plan
metadataErrorsuite +2 cases (rolled-back banner; all-aborted defensive), newuseDiscovery.usablesuite (8 cases pinning the backward-tolerance contract).🤖 Generated with Claude Code
Generated by Claude Code