Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .changeset/datasource-preview-drop-read-replicas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
"@object-ui/app-shell": patch
---

Datasource preview stops reporting read replicas

`DatasourcePreview` rendered a "2 read replicas" pill from
`datasource.readReplicas`. That key is retired in `@objectstack/spec` 17
(objectstack#4468): nothing in the platform ever opened a replica connection —
no driver reads the key and no query path splits reads from writes — so the
pill confirmed a configuration that did not exist.

It is worth being precise about what the pill did wrong, because a preview
panel echoing the draft back is normally harmless. This one did not echo, it
concluded: an author who configured replicas, saved, and saw the pill light up
got the platform telling them it had understood. It was the only surface in
either repo that acknowledged the key at all, which made it the whole of the
evidence that the feature worked. `packages/spec/liveness/README.md` has the
standing rule — an authoring or preview renderer is never a runtime consumer —
and a 2026-06 sweep that classified 13 properties on preview-renderer evidence
alone was later found wrong on 10 of them.

Read-replica routing does not exist yet; it is tracked as a feature request
rather than reflected in the UI as though it shipped.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@
* verbatim; nested objects render as their key count.
* • Pool, SSL, retry, health-check pills derived from optional
* sibling blocks.
* • Read-replica count and capabilities chip strip.
* • Capabilities chip strip.
*
* A read-replica count pill used to sit in that strip. It is gone with
* `datasource.readReplicas` itself (objectstack#4468): nothing in the
* platform ever opened a replica connection, so the pill reported a
* configuration that did not exist — and, being the only surface that
* acknowledged the key at all, it was the strongest signal an author had
* that it worked. A preview echoes what was typed; it can never stand in
* for a runtime consumer (`packages/spec/liveness/README.md`).
*
* The preview never attempts a live "test connection" — it runs
* inside the editor sandbox and must remain side-effect free.
Expand All @@ -24,7 +32,6 @@
import * as React from 'react';
import {
Activity,
Copy,
Database,
HardDrive,
Lock,
Expand Down Expand Up @@ -70,7 +77,6 @@ export function DatasourcePreview({ name, draft }: MetadataPreviewProps) {
const ssl = d.ssl as Record<string, unknown> | boolean | undefined;
const retryPolicy = d.retryPolicy as Record<string, unknown> | undefined;
const healthCheck = d.healthCheck as Record<string, unknown> | undefined;
const readReplicas = Array.isArray(d.readReplicas) ? d.readReplicas : [];
const capabilities = Array.isArray(d.capabilities) ? (d.capabilities as string[]) : [];

// External Datasource Federation (ADR-0015): a non-'managed' schemaMode
Expand Down Expand Up @@ -113,9 +119,6 @@ export function DatasourcePreview({ name, draft }: MetadataPreviewProps) {
</span>
<Pill icon={Power} label={active ? 'Active' : 'Disabled'} tone={active ? 'green' : 'gray'} />
{isDefault && <Pill icon={Star} label="default" tone="amber" />}
{readReplicas.length > 0 && (
<Pill icon={Copy} label={`${readReplicas.length} read replica${readReplicas.length === 1 ? '' : 's'}`} />
)}
</div>
</div>
</div>
Expand Down
Loading