Skip to content

Remove tenant and sync wording shown to free users in Database settings - #3377

Merged
mstomar125 merged 2 commits into
mainfrom
issue-3324-db-settings-tenant-copy
Sep 30, 2026
Merged

mstomar125 merged 2 commits into
mainfrom
issue-3324-db-settings-tenant-copy

Conversation

@mstomar125

@mstomar125 mstomar125 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3324

Summary

Settings → Database showed cloud-tenant wording to every free user. This removes it:

  • The explainer paragraph under "Databases" keeps its element and classes and now reads "A database is a separate local store on this machine. Opening one switches the app to it." It has no "tenant", "sync", "cloud" or "workspace".
  • The per-row badge block is now {#if db.boundTenantSchema} around the wrapper <div>. The {:else} branch ("Local only · not synced") is gone, and an unbound database renders no empty badge wrapper under the status line.
  • The bound branch's markup ("Syncs to tenant · {tenantLabel(…)}" plus the raw schema name) is unchanged apart from moving inside the {#if}. tenantLabel(), the bound badge, the "Add synced database…" button and the proSync / labsFlags imports are untouched (out of scope, Delete the Add synced database dialog and tenant badge from Database settings #3326).

Tests

  • New: describes databases in neutral, local-only terms in database-settings.test.ts. It renders the section, waits for the implicit "Default" database, and asserts (1) the text has none of the removed wording, with the needle built from fragments so the test adds no line to the Pro-boundary ratchet, and (2) the row's info column holds no .mt-1.5 badge wrapper, not even an empty one.
  • The three existing "Add synced database…" tests pass unchanged.
  • Mutation-checked separately, each makes the new test fail (the other three keep passing):
    • restored the old paragraph (text assertion)
    • restored the {:else} "Local only · not synced" branch (text assertion)
    • moved the {#if} back inside an always-rendered wrapper with the unbound text removed (structural assertion only: expected <div class="mt-1.5 text-xs"></div> to be null)
  • bun run --cwd packages/desktop-app quality:fix is clean (eslint, design tokens, svelte-check: 0 errors, 0 warnings). bun run test:changed passes (frontend + browser tier) on the rebased tree.

Ratchet (Pro-boundary check)

scripts/check-pro-boundary.ts is PR #3376 (#3299) and is not on main yet, so there is no BASELINES to lower in this diff. I ran #3376's checker against plain origin/main and against this branch, both at faf64e3b:

marker origin/main this PR
tenantWording 507 504 (-3, the three explainer lines that said "tenant")
every other marker unchanged unchanged

(Marker counts on main already sit below #3376's recorded baselines for proEvents 87 -> 81, cloudWording 89 -> 88 and proWording 314 -> 312, because #3373 landed after #3376 branched. That is #3376's rebase to settle, not this PR's.)

Merge order. Whichever of #3376 and this PR lands second must carry the baseline change:

Deviation from the issue

None in the code. The only deviation is the ratchet step above: the check does not exist on main, so the BASELINES lowering the issue's step 4 asks for is deferred to whichever change lands second.

Notes

  • Until sync's database.row contribution ships, Pro users lose the explainer and the "Local only · not synced" label on unbound databases. This is cosmetic, and bound databases keep their "Syncs to tenant · X" badge.
  • The manual dev:browser check was not run in this session. The behaviour is covered by the rendered-DOM test above.

🤖 Generated with Claude Code

@mstomar125
mstomar125 force-pushed the issue-3324-db-settings-tenant-copy branch from d603456 to 604e802 Compare September 30, 2026 10:05
@mstomar125

Copy link
Copy Markdown
Contributor Author

Pragmatic code review (medium, initial review): APPROVE, review clean

Scope: 2 files, matches the issue. No Critical findings, no code defects.

Acceptance criteria

  • Unbound database shows no "tenant", "not synced" or "Local only" text and no empty wrapper: met. The {:else} badge is deleted and the wrapper renders only inside {#if db.boundTenantSchema}.
  • Bound branch markup unchanged apart from moving inside the {#if}: met.
  • Explainer keeps element, classes and position, copy has none of tenant / sync / cloud / workspace: met.
  • The three existing "Add synced database…" tests pass unchanged: met.
  • quality:fix clean, test:changed passes: met.
  • check-pro-boundary.ts exits 0 and BASELINES lowered in this PR: cannot be met literally, the script is not on origin/main (it is Add the Pro-boundary ratchet check and the Pro/sync placement rule #3376). The reviewer independently confirmed the 507 -> 504 tenantWording delta and that no other marker moves.

Findings

Also confirmed: no other user-visible tenant / sync / cloud / workspace copy remains in database-settings.svelte or the components it renders, apart from the items the issue lists as out of scope (Add synced button and dialog, tenantLabel(), the bound badge, proSync / labsFlags).

@mstomar125

Copy link
Copy Markdown
Contributor Author

Address review

  • Important, stale PR body: fixed. The body now references Add the Pro-boundary ratchet check and the Pro/sync placement rule #3376, states the measured delta against plain origin/main, and spells out which PR must carry the BASELINES change depending on merge order.
  • Suggestion, structural assertion: taken. The test now also asserts the row's info column has no .mt-1.5 badge wrapper. Mutation-checked: moving the {#if} back inside an always-rendered wrapper (unbound text removed) fails only this assertion.
  • Nit, test file header: taken, one docstring line added.

While adding the docstring line the ratchet measurement caught my own mistake: the first wording contained the word "tenant", which added a tenantWording line (delta was -2, not -3). Reworded; re-measured at exactly -3 with no other marker moving relative to origin/main.

The follow-up is test-only (one assertion and one comment) and is mutation-checked, so I did not run a second full review. Branch rebased onto origin/main (#3373, #3374), quality:fix and test:changed re-run and green, force-with-lease pushed as 604e8026.

mstomar125 and others added 2 commits September 30, 2026 12:10
…al copy

The explainer paragraph under "Databases" now describes a database as a
separate local store and says opening one switches the app to it, with no
tenant, sync, cloud or workspace wording. The per-row badge block renders
only for a database bound to a tenant, so an unbound database shows no
"Local only · not synced" label and no empty wrapper.

Adds a test that renders the settings section and asserts the removed
wording is absent, with its needles built from fragments so the check adds
no line to the Pro-boundary ratchet.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
The neutral-copy test now also checks that the row's info column holds no
badge wrapper, so moving the conditional back inside an always-rendered
wrapper fails it even though the visible text is unchanged. The test file
header notes the new check.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@mstomar125
mstomar125 force-pushed the issue-3324-db-settings-tenant-copy branch from 604e802 to a17ac0f Compare September 30, 2026 10:10
@mstomar125
mstomar125 merged commit 969f93f into main Sep 30, 2026
@mstomar125
mstomar125 deleted the issue-3324-db-settings-tenant-copy branch September 30, 2026 10:10
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.

Remove tenant and sync wording shown to free users in Database settings

1 participant