Skip to content

Commit b3f0724

Browse files
committed
docs: default record page remedies name the page, not the package; AppPlugin.bundle names its readers
The save door's refusal, PageSchema.isDefault's TSDoc and the error-code ledger comment now say what the registry's remedy says: compose the deployment without the other package's page, not without the whole package. The save door's pin moves with its text. AppPlugin's private bundle field names the three structural readers outside the class. Claude-Session: https://claude.ai/code/session_01CN3bgHivgMGBHWTNUbYCDp Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1ecb08a commit b3f0724

5 files changed

Lines changed: 15 additions & 5 deletions

File tree

‎packages/metadata-protocol/src/protocol.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21757,7 +21757,7 @@ export class ObjectStackProtocolImplementation implements
2175721757
const others = named.length === 1 ? `${named[0]} already is` : `${named.join(' and ')} already are`;
2175821758
const remedy = unique.some((h) => h.shipped)
2175921759
? `Save '${saveName}' with \`isDefault: false\`: a page a package ships stays the default unless the `
21760-
+ `deployment is composed without that package.`
21760+
+ `deployment is composed without that package's page.`
2176121761
: `Save '${saveName}' with \`isDefault: false\`, or first save ${unique.map((h) => `'${h.page}'`).join(' and ')} `
2176221762
+ `with \`isDefault: false\` to make '${saveName}' the default instead.`;
2176321763
const err = new Error(

‎packages/objectql/src/default-record-page-save-door.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe.each(TOPOLOGIES)('%s kernel — a page saved as a second default record
194194
expectRefusal(outcome, 'env_org_detail', 'acme_org', `page 'acme_org_detail' of package '${PKG}'`);
195195
expect(String((outcome as { error?: any }).error?.message)).toContain(
196196
"Save 'env_org_detail' with `isDefault: false`: a page a package ships stays the default unless the deployment "
197-
+ 'is composed without that package.',
197+
+ "is composed without that package's page.",
198198
);
199199
expect(storedPages()).toEqual([]);
200200
});

‎packages/runtime/src/app-plugin.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,16 @@ export class AppPlugin implements Plugin {
150150
*/
151151
requiresServices: string[] = ['manifest'];
152152

153+
/**
154+
* Private to the type checker only: three readers outside this class read
155+
* `bundle` structurally off a plugin entry, with no type to break when it
156+
* changes. `stackDeclaresOrganizationRecordPage` (`@objectstack/core`,
157+
* `stack-organization-record-page.ts`) looks for an app's own
158+
* `sys_organization` record page; `@objectstack/cli`'s `serve.ts` looks for
159+
* declared translations, and its `graft-runtime-hooks.ts` finds an app's
160+
* bundle by manifest id to graft hooks onto. Renaming or reshaping this field silently blinds all
161+
* three; change them together.
162+
*/
153163
private bundle: any;
154164
/** Memoized backing store for {@link collections}. */
155165
private resolvedCollections?: any;

‎packages/spec/src/api/error-code-ledger.zod.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ export const ERROR_CODE_LEDGER = {
946946
// two HTTP install doors call `installPackage`. Its own code rather than
947947
// `NAMESPACE_CONFLICT`: no name is taken — an object's one default slot is
948948
// held — and renaming fixes nothing; the remedy is `isDefault: false` on
949-
// one page, or composing the deployment without the other package. Not a
949+
// one page, or composing the deployment without the other package's page. Not a
950950
// synonym of any standard member: the manifest is well-formed, and the
951951
// refusal comes from what the deployment already holds.
952952
'DEFAULT_RECORD_PAGE_CONFLICT',

‎packages/spec/src/ui/page.zod.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,8 +1871,8 @@ export const PageSchema = lazySchema(() => strictObject({
18711871
* objectstack#23015, record 6134056653.)
18721872
*
18731873
* To change which page opens: set `isDefault: false` on one of the two, or
1874-
* compose the deployment without the package that ships the other. Shipping
1875-
* a second default is not an override path.
1874+
* compose the deployment without the other package's page. Shipping a
1875+
* second default is not an override path.
18761876
*
18771877
* `isDefault: true` on a page that is not a record page bound to an object
18781878
* is REFUSED, at the same doors (maintainer ruling A on objectstack#23610,

0 commit comments

Comments
 (0)