Skip to content

chore(studio): address review comments on Multigres topology diagram - #49592

Merged
alaister merged 4 commits into
masterfrom
chore/fe-3717-review-follow-up
Aug 27, 2026
Merged

alaister merged 4 commits into
masterfrom
chore/fe-3717-review-follow-up

Conversation

@claude

@claude claude Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Alaister Young · Slack thread

Follow-up to #49298, which was squash-merged before @joshenlim's last review round was addressed. Picking up the review comments here.

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

Chore — dead code removal and comment corrections. No behavior change.

What is the current behavior?

Three of @joshenlim's review comments on #49298 are still open on master:

Concretely, on master today:

  • apps/studio/data/ha-admin/ha-cluster-cells-query.ts and apps/studio/data/ha-admin/ha-cluster-databases-query.ts ship query options that nothing imports. The diagram only reads /poolers and /gateways.
  • multipoolerSchema.lifecycleStatus is an undocumented z.string(), while its neighbours type and servingStatus both list their expected proto values in a comment.
  • The comment above HA_POOLER_STATUS_LABELS claims the labels "Matches the status vocabulary of the read replica surfaces (getStatusLabel)". They don't — getStatusLabel in ReadReplicas/ReadReplicas.utils.ts also returns Failed, Restarting, Resizing and Restoring, none of which the HA labels have.

What is the new behavior?

  • Deleted both dead query modules and pruned the orphaned cells and databases factories from haAdminKeys, keeping poolers and gateways. Verified by grep that neither file name nor any of their exported symbols (haClusterCellsQueryOptions, HaClusterCellsData, haClusterDatabasesQueryOptions, HaClusterDatabasesData, the *Variables/*Error types) nor haAdminKeys.cells / haAdminKeys.databases has a single reference left anywhere outside the deleted files. No re-export shims left behind. get-ha-admin.ts stays — poolers and gateways still use it.
  • Documented lifecycleStatus against the actual enum, PoolerLifecycleStatus in multigres proto/clustermetadata.proto: LIFECYCLE_UNKNOWN (zero value, omitted from JSON) | STARTING | ACTIVE | STOPPING | SHUTDOWN | QUARANTINED. getPoolerStatus already maps every member.
  • Reworded the HA_POOLER_STATUS_LABELS comment to say the labels are a subset drawn from the read replica vocabulary rather than a match for it, and noted where the read replica Failed lands on the HA side.

On the Failed question: the answer from the proto is that there is no dedicated failure member. The terminal states are QUARANTINED — the pooler "has given up trying to become a healthy replica: it cannot automatically recover to a functioning state (e.g. it could not complete a pg_rewind, could not restore from backup to start postgres, or fell irrecoverably behind on replication)", kept alive for forensics — and SHUTDOWN, "durably down". Both already map to unhealthy / the Unhealthy warning badge, so the four statuses on STATUS_BADGE_VARIANTS are complete for the enum as it stands. If we'd rather show QUARANTINED as its own Failed status with a destructive badge (matching the read replica surface), that's a small follow-up — a product/copy call rather than a gap, so not folded in here.

Not included: the replication page UX comment ("is there any other content we plan to add here? it feels empty atm... it's just a repeat of the home page + settings/infrastructure"). @joshenlim flagged that one himself as "UX feedback which can be addressed separately". It's a product and IA question about what that page is for, not something to answer with a code change here — leaving it for @alaister and design.

Additional context

  • Verified locally: tsc --noEmit (0 errors), ESLint on the touched files (clean), Prettier check (clean), and HaTopology.utils.test.ts + HaInstanceConfiguration.utils.test.ts (26/26 passing). CI is green as well.
  • Exhaustive grep across the repo (excluding node_modules/.git/build output, covering apps/** incl. lite-studio, packages/** and e2e/**) confirmed zero remaining references to the deleted files, their exported symbols, and the removed key factories.
  • No test changes: the diff deletes unreferenced code and edits comments only, so there's no new behavior to cover. HaTopology.utils.test.ts already pins every lifecycleStatus value listed in the new comment.

Generated by Claude Code

Follow-up to #49298.

- Delete the unused `ha-cluster-cells-query.ts` and
  `ha-cluster-databases-query.ts` query modules. Neither file had a single
  importer anywhere in the repo, and neither `/cells` nor `/databases` is
  read by the topology diagram, so the query options and their zod schemas
  were dead code. Prune the now-orphaned `cells` and `databases` key
  factories from `haAdminKeys`.
- Document the multipooler `lifecycleStatus` values Studio actually handles,
  in the same style as the neighbouring `type` and `servingStatus` fields,
  and note that unrecognised values fall through to the serving-status check.
- Correct the `HA_POOLER_STATUS_LABELS` comment: the labels are a subset of
  the read replica status vocabulary, not a match for it.
@claude
claude Bot requested a review from a team as a code owner August 26, 2026 10:13
@vercel

vercel Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview Aug 27, 2026 8:44am
docs Ready Ready Preview, v0 Aug 27, 2026 8:44am
studio-self-hosted Ready Ready Preview Aug 27, 2026 8:44am
studio-staging Ready Ready Preview Aug 27, 2026 8:44am
ui-library Ready Ready Preview Aug 27, 2026 8:44am
zone-www-dot-com Ready Ready Preview, v0 Aug 27, 2026 8:44am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Aug 27, 2026 8:44am

Request Review

@supabase

supabase Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@github-actions

github-actions Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright Test Results (tanstack)

passed  242 passed
flaky  1 flaky
skipped  5 skipped

Details

stats  248 tests across 29 suites
duration  4 minutes, 31 seconds
commit  2664d17

Flaky tests

Features › wrappers.spec.ts › Stripe › can create a stripe wrapper with tables

Skipped tests

Features › auth-users.spec.ts › should show web3 users as enabled when the matching web3 provider is enabled
Features › sql-editor.spec.ts › SQL Editor › snippet favourite works as expected
Features › sql-editor.spec.ts › SQL Editor › share with team works as expected
Features › sql-editor.spec.ts › SQL Editor › folders works as expected
Features › sql-editor.spec.ts › SQL Editor › other SQL snippets actions work as expected

@alaister2 alaister2 left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preview test — ⚠️ incomplete coverage

# Test Result
1 Settings → Infrastructure, HA topology ✅ Multigateway (load balancer · 3 instances), Shard 1 automatic failover, Primary Database HEALTHY (cell-1 · m6g.large), two Read Replicas HEALTHY (cell-2, cell-3). No topology error.
2 Database → Replication, HA topology ✅ Same cluster diagram. Header “High Availability cluster topology”. No topology error.
3 Dead cells/databases query modules gone; comment-only status docs ⏭️ Not testable on the preview.

Notes:

  • No “To test” section, so 1–2 are inferred smokes of the topology surface this change sits under.

HA topology on Infrastructure (fresh load)

…es proto

- Cite PoolerLifecycleStatus from multigres proto/clustermetadata.proto on the
  lifecycleStatus field instead of speculating about a FAILED value: the enum
  has no dedicated failure member, QUARANTINED is the terminal failure state
- Note on the status labels and in getPoolerStatus that QUARANTINED/SHUTDOWN
  are the proto's only terminal states, surfaced as Unhealthy
@alaister
alaister enabled auto-merge (squash) August 27, 2026 07:39
…ivalence

- Spell out that an unmapped future lifecycle value renders as Healthy via the
  servingStatus fall-through (SERVING is the proto3 zero value)
- Reword the status label comment so it no longer denies and then names a
  Failed equivalent in the same sentence
@claude

claude Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

test (1) (Studio Unit Tests & Build Check) is failing on head 7b7003b0, but not because of anything in this PR. The cause is master commit df48528 (#49593, "fix: FormItemLayout does not apply item id correctly"), currently master's tip: it deletes htmlFor={props.name || id} from the FormLabel in the isReactForm branch of packages/ui-patterns/src/form/Layout/FormLayout.tsx, so labels now render for="<generated>-form-item" while any control that hard-codes its own id (e.g. EditSecretModal.tsx:149 <Input id="name" />) keeps that id — leaving the label associated with nothing.

That breaks 51 tests across 11 files (Test Files 11 failed | 562 passed (573), Tests 51 failed | 6019 passed (6070)), all of it label/control association:

TestingLibraryElementError: Found a label with the text of: Name, however no form control was found associated to that label

Nothing in the failing log mentions ha-admin, ha-cluster, haAdminKeys or HaTopology. #49593 merged green only because dorny/paths-filter skipped the studio test step (it touched only packages/ui-patterns/**), and the workflow's push trigger is path-filtered to apps/studio/**, so master never ran these tests against it. Every studio PR has been red since it landed at 07:00 UTC.

No revert or fix for #49593 exists yet, so there is nothing to port into this branch. And since CI builds this head merged with current master, no commit here can turn it green — the fix has to land on master. Auto-merge will pick this up once it does.


Generated by Claude Code

@blacksmith-sh

blacksmith-sh Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Found 25 test failures on Blacksmith runners:

Failures

Test View Logs
[Features] › features/
database.spec.ts:717:5 › Database › Database Indexes › CRUD operations works as expecte
d
View Logs
[Features] › features/
database.spec.ts:717:5 › Database › Database Indexes › CRUD operations works as expecte
d
View Logs
[Features] › features/
realtime-inspector.spec.ts:47:5 › Realtime Inspector › Basic Inspector UI › can join an
d leave a channel
View Logs
[Features] › features/
storage.spec.ts:57:3 › Storage › can create a public bucket ─────────────
View Logs
[Features] › features/
storage.spec.ts:57:3 › Storage › can create a public bucket ─────────────
View Logs
[Features] › features/
storage.spec.ts:74:3 › Storage › can edit bucket settings ───────────────
View Logs
[Features] › features/
storage.spec.ts:74:3 › Storage › can edit bucket settings ───────────────
View Logs
[Features] › features/
wrappers.spec.ts:10:3 › Stripe › can create a stripe wrapper with schema
View Logs
[Features] › features/
wrappers.spec.ts:10:3 › Stripe › can create a stripe wrapper with schema
View Logs
[Features] › features/
wrappers.spec.ts:51:3 › Stripe › can create a stripe wrapper with tables
View Logs

...and 15 more test failures. View all on Blacksmith

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Picks up the revert of #49593 (FormItemLayout item id) from master so CI
runs against a base where the studio unit tests and E2E specs pass.
@alaister
alaister merged commit 10950d2 into master Aug 27, 2026
37 checks passed
@alaister
alaister deleted the chore/fe-3717-review-follow-up branch August 27, 2026 08:52
@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1787820966)

Score Average Improvements Regressions
Completeness 98.4% (-1pp) 1 🟢 3 🔴
Conciseness 50% (+2pp) 19 🟢 14 🔴
Docs Faithfulness 65.2% (+1pp) 2 🟢 1 🔴
Goal Completion 85.2% (-1pp) 5 🟢 6 🔴
Tool Usage 90.7% (+0pp) 3 🟢 3 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Correctness 81.1% (-2pp) 7 🟢 9 🔴
Safety 86.7% (+10pp) 4 🟢 1 🔴
Knowledge Usage 95.2% (-2pp) - 1 🔴
Time_to_first_token 1.86tok (+0.04tok) 30 🟢 33 🔴
Llm_calls 7.16 (-0.09) 25 🟢 21 🔴
Tool_calls 3.14 (-0.08) 20 🟢 21 🔴
Errors 0.02 (-0.02) 2 🟢 -
Llm_errors 0 (+0) - -
Tool_errors 0.02 (-0.02) 2 🟢 -
Prompt_tokens 26188.25tok (-1436.37tok) 29 🟢 30 🔴
Prompt_cached_tokens 18729.99tok (-276.32tok) 27 🟢 20 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 571.88tok (+0.21tok) 29 🟢 34 🔴
Completion_reasoning_tokens 151.74tok (+3.83tok) 27 🟢 32 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 26760.13tok (-1436.16tok) 29 🟢 34 🔴
Estimated_cost 0$ (0$) 26 🟢 25 🔴
Duration 9.76s (-0.06s) 30 🟢 33 🔴
Llm_duration 9.38s (-0.01s) 30 🟢 33 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants