Skip to content

Remove the top-right NodeSpace Pro pill; add Settings > Account - #2627

Merged
mstomar125 merged 2 commits into
mainfrom
issue-2545-pro-badge-removal
Sep 15, 2026
Merged

mstomar125 merged 2 commits into
mainfrom
issue-2545-pro-badge-removal

Conversation

@mstomar125

@mstomar125 mstomar125 commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Removes the pro-sync-pill.svelte / pro-teaser-pill.svelte overlay from app-shell.svelte's .pro-sync-pill-slot, and the third pill sharing that slot (enable-sync-pill.svelte), per the acceptance criteria in Add Labs settings section (AI Chat, Team synchronization) and remove NodeSpace Pro badge #2545.
  • Adds a new Settings > Account section (account-settings.svelte) that is the sole remaining home for the capabilities that were only reachable through the removed pill: signing out, opening the Invitations inbox manually, and reopening the publish-consent modal (Turn on sync) for a signed-in user who declined it on first sign-in. Sign-in itself is not duplicated there — it already has an independent full flow via Settings > Database > "Add synced database…" (add-synced-database-dialog.svelte, shipped after the original blocking investigation on this issue).
  • Updates doc comments in pro-plugin.ts, app-shell.svelte, collaboration-locked.svelte, first-pro-consent-slot.svelte, pro-relogin-slot.svelte, and add-synced-database-dialog.svelte to describe the new state of the overlay slot (now empty, reserved for future app-shell-overlay contributions) and where account access now lives.
  • Updates free-user-guardrail.test.ts, ui-extensions.test.ts, and shared-node-store-eviction.test.ts for the removed overlay contributions; deletes the three removed components' dedicated test files; adds account-settings.test.ts (9 tests).

Why this was previously blocked

An earlier pass on #2545 found the pill was the sole entry point for sign-in itself and left the removal blocked. Re-validated against current main: sign-in is no longer pill-exclusive (add-synced-database-dialog.svelte now does its own full pro_initiate_oauth flow), closing the serious part of that blocker. Two narrower capabilities — sign-out and the Invitations inbox — were still pill-only; this PR gives them a home in Settings > Account before removing the pill, so nothing regresses.

Decision: enable-sync-pill.svelte

Deleted. It only reopened the publish-consent modal for a signed-in, not-yet-consented Pro user. Settings > Account now carries the same "Turn on sync" action for that state (see the adversarial-review section below — the initial claim that collaboration-locked.svelte's own button made a replacement unnecessary turned out to be wrong: that button only exists inside a specific collection's Collaboration tab, not globally reachable like the deleted pill was).

Second-pass adversarial validation + code review (this session)

Live click-through, beyond the unit tests: launched the real frontend against an isolated daemon (NODESPACE_HOME/NODESPACED_SOCKET scoped to a scratch dir, never touching live ~/.nodespace) via dev-proxy + vite dev, driven with headless Playwright. Confirmed .pro-sync-pill-slot renders empty on load (no pill anywhere), the Settings sidebar shows Database, Account, Display, AI Models, Import Sources, Integrations, Labs, About in order, Settings > Account renders the real community-tier "Not available" state live, and the Add-synced-database dialog opens with its sign-in framing intact when Pro is forced on. Re-confirmed via grep that proSync.signOut() and InvitationsInbox now have exactly one production call/render site each.

Full /pragmatic-code-review pass (extra-high effort, 10 finder angles + verification + gap-sweep) surfaced two real, live-reproducible bugs, which are fixed in the second commit:

  1. account-settings.svelte's signed-in check read proSync.userEmail, which is forced empty for any database with no bound tenant (ADR-053) regardless of the daemon's actual global OAuth session — a genuinely signed-in Pro user whose active database happened to be local-only would see "Signed out" and lose Sign out/Invitations entirely. Fixed by switching to pro_current_person() (the daemon's global identity), the same fix add-synced-database-dialog.svelte already uses for this exact trap. Added a regression test that seeds an unbound active database alongside a real global identity.
  2. Deleting enable-sync-pill.svelte narrowed "Turn on sync" reachability to only inside a specific collection's Collaboration tab (see Decision above) — fixed by adding the same action to Settings > Account.

Lower-severity/nit findings addressed: missing disabled={signingOut} on the Invitations button, missing cleanup()/membership.reset() in the new test file's afterEach, a missing "inert in community" assertion in free-user-guardrail.test.ts (its own stated convention), and two stale doc cross-references to the deleted pro-sync-pill.svelte. Two findings were verified as pre-existing (not introduced by this diff — carried forward unchanged from the deleted pill) and left as follow-up candidates rather than fixed here, and one (the auto-show-Invitations nudge) was already an explicit, documented scope decision.

bun run test:all and the full pre-push gate (test:coverage, Rust integration tests, test:e2e) pass clean on both commits. bun run quality:fix reports 0 lint/format/type errors.

Closes #2545.

🤖 Generated with Claude Code

The top-right pro-sync-pill / pro-teaser-pill overlay was the app's only
entry point for signing out and opening the Invitations inbox manually
(sign-in itself is already independently reachable from the Add-synced-
database dialog in Settings > Database). Add a minimal Settings > Account
section that shows the signed-in email, a Sign out button, and an
Invitations button, so removing the pill doesn't strand a signed-in user.

Remove pro-sync-pill.svelte, pro-teaser-pill.svelte, and their
app-shell-overlay registrations in pro-plugin.ts. Also remove
enable-sync-pill.svelte (the third pill in the same overlay slot, for the
signed-in-not-consented state): collaboration-locked.svelte's existing
"Turn on sync" button already reopens the same publish-consent modal for
that variant, so a fourth account-only surface isn't needed to reach it.

Not carried over: the removed pill's auto-show-Invitations-for-a-signed-
in-user-with-no-collection-access nudge — it was tied to the pill being
always-mounted in the app chrome and doesn't map onto a settings page a
user visits deliberately.

Update collaboration-locked.svelte's sign-in copy to point at Settings >
Database instead of the removed toolbar pill, and the overlay slot's
doc comments in app-shell.svelte / pro-plugin.ts to reflect the removal.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
… reachability

account-settings.svelte's signed-in check read proSync.userEmail, which
pro-sync.svelte.ts forces empty for any database with no bound tenant
(ADR-053) regardless of the daemon's actual global OAuth session — a
genuinely signed-in Pro user with a local-only active database would see
"Signed out" and lose Sign out/Invitations entirely. Switch to the same
fix add-synced-database-dialog.svelte already uses for this exact trap:
check the daemon's global identity directly via pro_current_person(),
with a brief "Loading…" state while it resolves.

Also close a reachability gap introduced by deleting enable-sync-pill.svelte:
it was the only globally-reachable way to reopen the first-Pro consent modal
after a decline. collaboration-locked.svelte's "Turn on sync" button reopens
the same modal but only exists inside a specific collection's Collaboration
tab. Add the same action to Settings > Account for the 'consent' variant, so
reopening consent doesn't require navigating into a collection first.

Add disabled={signingOut} to the Invitations button (the Sign out button
already had it), add cleanup()/membership.reset() to account-settings.test.ts's
afterEach (both present in every deleted predecessor test file), and add
Settings > Account's own inert-in-community assertion to
free-user-guardrail.test.ts per that suite's stated convention. Fix two stale
doc-comment cross-references to the deleted pro-sync-pill.svelte.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
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.

Add Labs settings section (AI Chat, Team synchronization) and remove NodeSpace Pro badge

1 participant