From 940ba24acc0d7483e0d31d90f713659fa7de3775 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 1 Aug 2026 09:23:38 +0000 Subject: [PATCH] fix(app-shell): drop the read-replica pill from the datasource preview MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `datasource.readReplicas` is retired in @objectstack/spec 17 (objectstack-ai/objectstack#4468) — nothing in the platform ever opened a replica connection, so the pill reported a configuration that did not exist. The pill did not merely echo the draft back, which is what a preview panel is for and is harmless. It concluded: an author who configured replicas and saw "2 read replicas" light up got the platform telling them it had understood. It was also the only surface in either repo that acknowledged the key at all, so it was the whole of the evidence that the feature worked. packages/spec/liveness/README.md has the standing rule this violated — an authoring or preview renderer is never a runtime consumer — and the 2026-06 sweep that classified 13 properties on preview-renderer evidence alone was later found wrong on 10 of them. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01WsgTqRF58HsQYKLsrZ5pQY --- .../datasource-preview-drop-read-replicas.md | 24 +++++++++++++++++++ .../previews/DatasourcePreview.tsx | 15 +++++++----- 2 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 .changeset/datasource-preview-drop-read-replicas.md diff --git a/.changeset/datasource-preview-drop-read-replicas.md b/.changeset/datasource-preview-drop-read-replicas.md new file mode 100644 index 0000000000..f284d02658 --- /dev/null +++ b/.changeset/datasource-preview-drop-read-replicas.md @@ -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. diff --git a/packages/app-shell/src/views/metadata-admin/previews/DatasourcePreview.tsx b/packages/app-shell/src/views/metadata-admin/previews/DatasourcePreview.tsx index bdd3b0aea4..77fb3684f6 100644 --- a/packages/app-shell/src/views/metadata-admin/previews/DatasourcePreview.tsx +++ b/packages/app-shell/src/views/metadata-admin/previews/DatasourcePreview.tsx @@ -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. @@ -24,7 +32,6 @@ import * as React from 'react'; import { Activity, - Copy, Database, HardDrive, Lock, @@ -70,7 +77,6 @@ export function DatasourcePreview({ name, draft }: MetadataPreviewProps) { const ssl = d.ssl as Record | boolean | undefined; const retryPolicy = d.retryPolicy as Record | undefined; const healthCheck = d.healthCheck as Record | 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 @@ -113,9 +119,6 @@ export function DatasourcePreview({ name, draft }: MetadataPreviewProps) { {isDefault && } - {readReplicas.length > 0 && ( - - )}