Repository navigation
Description
Summary
Delete core's Pro "Account" settings section, and everything that exists only to serve it:
- the "NodeSpace Pro" card (
account-settings.svelte); - the workspace-members card for tenant admission;
- its Invitations inbox modal, with the inbox's design-token baseline entry;
- the tenant-admission half of
membership-service.ts; databaseStore.proSyncSettled();- the core
accountsettings category and its Labs gate; - all their tests.
The Pro app gets the section back from the Pro package, which registers it through ADR-082's settingsSections (built in #3312).
Context
Classification. ADR-081 (proposed) puts the Account section in category A: it moves to the Pro package through a settings-section extension point. Its Labs gating is category C, which "goes with the Account section". Both belong to step 4(b) of ADR-081 §7.
What #3312 leaves behind. #3312 lands first and reshapes the settings host:
- It moves the category list out of
settings-sidebar.svelteinto a newsrc/lib/components/settings/settings-categories.ts. ItsCORE_SETTINGS_CATEGORIESlists each core category with an optionalvisible()gate. Account is there, with its Labs gatevisible: () => labsFlags.syncEnabled. - The sidebar merges those categories with contributed
settingsSections. A contributed section whose id equals a core category id is ignored and logged (core wins). - The pane's fallback
$effectbecomes generic:if (!isSettingsCategoryVisible(activeCategory)) activeCategory = 'database'. It covers unknown and unregistered ids. - Add settings-section and database settings-slot extension points #3312 keeps the pane's hard-coded
{:else if activeCategory === 'account'}→<AccountSettings onNavigateToDatabase={…} />branch until this issue.
So in this PR the Account code to remove is the entry in settings-categories.ts and the import and dispatch branch in settings-pane.svelte. Nothing in the sidebar's list or the pane's $effect needs to change.
Consequence of core-wins. While core's account entry exists, the Pro package's account section is silently ignored. So sync's replacement can only be seen working on this branch, which is why the SYNC gate reviews it against this branch.
Consumers at main @ af8ddb6, checked with git grep:
account-settings.svelte:- imported only by
settings-pane.svelte(line 7), rendered at 47-48; - tests:
account-settings.test.ts, andfree-user-guardrail.test.ts(import at 52, render at 170).
- imported only by
workspace-members-card.svelte: imported only byaccount-settings.svelte(35), rendered at 224.collaboration/invitations-inbox.svelte:- imported only by
account-settings.svelte(34), rendered at 230-234; - test:
src/tests/components/invitations-inbox.test.ts; - one entry in
design-tokens-baseline.json(lines 29-33,rgba(0, 0, 0, 0.5)). - The inventory sweep assigned it to Move the Pro sync and collaboration UI out of core #3333. It is deleted here because its only consumer is deleted here, and Delete the Collaboration tab, membership store and service, and the Pro plugin from core #3331 drops it from its scope.
- imported only by
- The tenant-admission part of
membership-service.ts:- used only by
workspace-members-card.svelte(26); - no case in
membership-service.test.tscovers it. Its coverage lives inworkspace-members-card.test.ts.
- used only by
databaseStore.proSyncSettled():- used only by
workspace-members-card.svelte(85), and spied atworkspace-members-card.test.ts:378; - listed under Move the Pro sync and collaboration UI out of core #3333 by the sweep. It becomes dead code here, so it is deleted here, and Stop driving Pro sync lifecycle from the app shell, database store and debug channel #3329 only confirms it is gone.
- used only by
- A stale header comment in
src/tests/components/settings/database-settings.test.ts(lines 4-8) says "same asaccount-settings.test.tscovers for the "NodeSpace Pro" card", unless Delete the Add synced database dialog and tenant badge from Database settings #3326 has already rewritten that file.
Free-app impact. In the community app the Account tab is hidden unless labsFlags.syncEnabled is on, and the Labs switch for that flag is disabled. Default users never see the tab.
Locating code. Line numbers are at af8ddb6. #3309 / #3310 and #3312 edit several of these files first, so find code by symbol.
Scope
Delete (paths under packages/desktop-app/):
src/lib/components/settings/sections/account-settings.svelte(1-235)src/lib/components/settings/sections/workspace-members-card.svelte(1-336)src/lib/components/collaboration/invitations-inbox.svelte(1-399)src/tests/components/settings/account-settings.test.ts(1-348, 15 cases)src/tests/components/settings/workspace-members-card.test.ts(1-422, 25 cases)src/tests/components/settings/settings-pane-account-gating.test.ts(1-78, 3 cases)src/tests/components/settings/settings-sidebar-account-gating.test.ts(1-77, 4 cases)src/tests/components/invitations-inbox.test.ts(1-132, 9 cases)
Edit:
-
src/lib/components/settings/settings-categories.ts(created by Add settings-section and database settings-slot extension points #3312):- remove the
accountentry fromCORE_SETTINGS_CATEGORIES, including itsvisible: () => labsFlags.syncEnabledgate; - remove any exported position or order value that exists only for Account (Add settings-section and database settings-slot extension points #3312's draft gave Account order 150);
- reword any comment that names Account, "Team synchronization" or "NodeSpace Pro", so it names only the AI Models and Playbooks gates.
- remove the
-
src/lib/components/settings/settings-pane.svelte:- delete
import AccountSettings(af8ddb6: line 7); - delete the
{:else if activeCategory === 'account'}branch (47-48); - leave the fallback
$effectalone, since it is generic after Add settings-section and database settings-slot extension points #3312; - reword any remaining comment that lists Account among the gated sections (af8ddb6: 25-30).
- delete
-
src/lib/components/settings/settings-sidebar.svelte: no code change is expected. If a comment still mentions the Account tab or "NodeSpace Pro" (af8ddb6: 12-19), reword it. -
src/lib/services/membership-service.ts: delete these symbols:TenantMember(85-98) andAdmissionResult(100-107);TENANT_ADMIN_ROLES(109-110) andisTenantAdmin(112-119);RawTenantMember(147-152) andRawAdmission(153-157);- the methods
listTenantMembers(315-328),approveAdmission(330-334),removeFromTenant(336-345) andinitiateAdmission(347-356).
Keep everything else. The collection-membership types and methods,
Person,currentPerson()and the module doc belong to Move the Pro sync and collaboration UI out of core #3333. -
src/lib/stores/database.svelte.ts: deleteproSyncSettled()and its doc comment (295-304). KeepproActivateChainandactivateProSync, which Stop driving Pro sync lifecycle from the app shell, database store and debug channel #3329 removes. -
src/tests/free-user-guardrail.test.ts:- delete
import AccountSettings(52); - delete the banner comment and the describe
'Settings > Account renders no interactive Pro controls in community'(163-176); - in the Pro-UI registry banner comment (131-137), drop "account access lives in Settings → Account, sign-in in Settings → Database".
- delete
-
src/tests/components/settings/database-settings.test.ts: if its header still says "same asaccount-settings.test.tscovers for the "NodeSpace Pro" card" (4-8), drop that clause. -
Add settings-section and database settings-slot extension points #3312's settings tests (
src/tests/components/settings/settings-extension-sections.test.tsin Add settings-section and database settings-slot extension points #3312's plan): if one uses'account'as its core-id collision example, or lists Account among the core categories, switch it to'database'or update the list. -
packages/desktop-app/design-tokens-baseline.json: re-record it. Deletinginvitations-inbox.sveltefixes a recorded violation, and the design-token check that runs at push fails on stale entries.
New: src/tests/components/settings/settings-core-categories.test.ts (see Tests).
Out of scope
- Move the Pro sync and collaboration UI out of core #3333:
proSync, themembershipstore,resolveProSyncVariant,isProSyncActive;pro-plugin.ts, the collaboration view, the locked and tab components, and the consent and re-login modals;- the rest of
membership-service.ts,proActivateChainandactivateProSync; - stale "Settings → Account" comments in files Move the Pro sync and collaboration UI out of core #3333 owns (
pro-plugin.ts,collaboration-locked.svelte). They go when those files go.
- Move the Pro variant machine and DATABASE_SETTINGS_NODE_ID out of the generic registry files #3309 / Adopt ADR-082's contribution contract: ids, when() predicates, keyed and isolated outlets #3310: the app-shell overlay-slot comment that mentions Settings → Account. Move the Pro variant machine and DATABASE_SETTINGS_NODE_ID out of the generic registry files #3309 / Adopt ADR-082's contribution contract: ids, when() predicates, keyed and isolated outlets #3310 rewrites it.
- Add settings-section and database settings-slot extension points #3312: the settings host itself,
isSettingsCategoryVisibleand the pane fallback. - Add the "Share / Sync this database" entry point that opens nodespace.ai #3362:
labsFlags.syncEnabled, the Labs "Team synchronization" card, and thesyncEnabledlines insettings-*-labs-gating.test.ts. - Remove tenant and sync wording shown to free users in Database settings #3324 and Delete the Add synced database dialog and tenant badge from Database settings #3326:
database-settings.svelte.
Steps
- Startup sequence (CLAUDE.md), with the worktree named
issue-<N>-remove-pro-account-section:- On the primary checkout:
git status, thengit fetch origin && git pull origin main. - Create the worktree with
EnterWorktree. - Inside it:
bun install,bun run testfor the baseline, thenbun run gh:comment. Self-assign withbun run gh:assign <N> "@me", thenbun run gh:status <N> "In Progress".
- On the primary checkout:
- Check the gates:
- Turn the UI-extension registry into ADR-082's build-time frontend extension API #3317 is on main:
settings-categories.tsexists, contributed sections render in the sidebar and pane with a{ navigate }prop, the pane falls back throughisSettingsCategoryVisible, the Pro build can injectvirtual:nodespace-extensions(Add the virtual:nodespace-extensions build entry and the extension-api import alias #3311, Stop importing the Pro extension in core; register it only through the build entry #3316), and the host API exists (Publish the extension host API: services, ui and testing entries, version policy #3315). - Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299 is on main.
- The pin gate is met: sync builds the Pro app and the Pro daemon from one pinned core revision.
- sync's Account replacement is an open PR and has been built against this branch's head. Link it in the PR description.
- Turn the UI-extension registry into ADR-082's build-time frontend extension API #3317 is on main:
- Delete the eight files listed under Scope.
- Edit
membership-service.ts. Runbunx svelte-checkfrompackages/desktop-appand confirm there is no danglingTenantMemberorisTenantAdminimport. - Delete
proSyncSettled()fromdatabase.svelte.ts. - Edit
settings-categories.tsas listed under Scope. - Edit
settings-pane.svelte, and the sidebar comment if needed. - Verify the fallback. No code change. Add settings-section and database settings-slot extension points #3312 already falls back to Database for any id that is not visible, and with the entry gone
'account'is such an id. Run Add settings-section and database settings-slot extension points #3312's settings tests and the new test file. - Update Add settings-section and database settings-slot extension points #3312's tests if they use
'account'(see Scope). - Edit
free-user-guardrail.test.ts, and thedatabase-settings.test.tsheader if needed. - Add
settings-core-categories.test.tsas described under Tests. - Re-record the design-token baseline:
bun run --cwd packages/desktop-app quality:design-tokens --update. The diff must remove only theinvitations-inbox.svelteentry. - Check for leftovers:
Expect no matches.
git grep -n -w -E "account-settings|AccountSettings|workspace-members-card|WorkspaceMembersCard|invitations-inbox|InvitationsInbox|isTenantAdmin|listTenantMembers|approveAdmission|removeFromTenant|initiateAdmission|proSyncSettled|TenantMember|AdmissionResult|TENANT_ADMIN_ROLES" -- packages/desktop-app/src packages/desktop-app/design-tokens-baseline.json-wkeepsTenantMemberfrom matchingTenantMembershipin the dialog, which Delete the Add synced database dialog and tenant badge from Database settings #3326 owns. - Lower the ratchet. Run
bun run scripts/check-pro-boundary.tsand paste the printedBASELINESblock intoscripts/check-pro-boundary.ts. Every change must be a decrease. Use--list <marker>to confirm that the new test file adds no hit. - Finish as in CLAUDE.md:
bun run test:changed;bun run quality:fix, then commit;git push origin HEAD:issue-<N>-remove-pro-account-section;gh pr create --repo NodeSpaceAI/nodespace-core --base main --head issue-<N>-remove-pro-account-section, thenbun run gh:status <N> "In Review";/pragmatic-code-review, then/address-review;- merge only after the user approves, with
bun run merge <PR#>running in the background, thenExitWorktree({action: "remove", discard_changes: true}).
Standards:
- No GitHub issue numbers in code comments.
- Mock Tauri with
vi.mock('@tauri-apps/api/core', () => mockTauriCore({...}))where a test needs it, as the existing tests do. - Use
bun run test, neverbun test. - No lint suppression.
Acceptance criteria
- The eight files are deleted, and no source or test file imports them.
-
membership-service.tshas none ofTenantMember,AdmissionResult,TENANT_ADMIN_ROLES,isTenantAdmin,RawTenantMember,RawAdmission,listTenantMembers,approveAdmission,removeFromTenantorinitiateAdmission. - Its collection-membership API is unchanged, and
membership-service.test.tspasses untouched. -
database.svelte.tshas noproSyncSettled, anddatabase.test.tspasses untouched. -
git grep -n -i -E "account|syncEnabled|Team synchronization|NodeSpace Pro" -- packages/desktop-app/src/lib/components/settings/settings-sidebar.svelte packages/desktop-app/src/lib/components/settings/settings-pane.svelte packages/desktop-app/src/lib/components/settings/settings-categories.tsfinds nothing. - With nothing registered, the sidebar shows exactly Database, Display, Import Sources, Integrations, Labs and About while the AI Chat and Playbooks flags are off.
- With nothing registered, opening Settings with
settingsStore.initialCategory = 'account'shows Database. -
settings-pane-labs-gating.test.ts,settings-sidebar-labs-gating.test.tsand Add settings-section and database settings-slot extension points #3312's settings and database-extension tests pass. -
bun run --cwd packages/desktop-app test:free-userspasses. - The only change to
design-tokens-baseline.jsonis the removedinvitations-inbox.svelteentry. -
bun run scripts/check-pro-boundary.tsexits 0,BASELINESis lowered in this PR, and no marker count rose. -
bun run quality:fixis clean andbun run test:changedpasses. - The PR links sync's replacement PR, built against this branch.
Tests and verification
Deleted tests. Delete the five test files listed under Scope. Their cases move to the Pro package with the components, as part of sync's replacement.
New src/tests/components/settings/settings-core-categories.test.ts. This is a lasting core test. It is not added to free-user-guardrail.test.ts, which #3332 retires.
- Use the harness of
settings-pane-account-gating.test.ts: mock$lib/utils/loggerand@tauri-apps/plugin-dialog, with no Tauri bridge. - Before and after each test, clear
localStorage, setlabsFlags.aiChatEnabledandlabsFlags.playbooksEnabledtofalse, and setsettingsStore.initialCategory = null. Don't touchsyncEnabled: Add the "Share / Sync this database" entry point that opens nodespace.ai #3362 owns it, and it is a ratchet marker. lists only core categories when no extension is registered: renderSettingsSidebarwith{ activeCategory: 'database', onCategoryChange: vi.fn() }, collect the trimmed labels ofnav button, and assert they equal['Database', 'Display', 'Import Sources', 'Integrations', 'Labs', 'About'].opens Database for a category id that nothing provides: setsettingsStore.initialCategory = 'account', renderSettingsPane, wait forgetByText('Databases'), and assert thatqueryByText('Account')is null.- Keep the file free of ratchet markers, per Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299's absence-test convention: no "Pro", "tenant",
syncEnabledorpro_strings.
Mutation checks. Mutation-check each new test:
- add
{ id: 'account', label: 'Account' }toCORE_SETTINGS_CATEGORIESwithout a gate, and confirm both tests fail; - make
isSettingsCategoryVisiblereturntruefor every id, and confirm the second test fails.
Commands:
bun run --cwd packages/desktop-app test src/tests/components/settings/ src/tests/free-user-guardrail.test.ts
bun run --cwd packages/desktop-app test:free-users
bun run --cwd packages/desktop-app quality:design-tokens
bun run scripts/check-pro-boundary.ts
bun run test:changed
bun run quality:fix
Manual check: run bun run dev:browser, open Settings, and confirm the categories are Database, Display, Import Sources, Integrations, Labs and About. AI Models and Playbooks also appear if their Labs flags are on.
Notes for sync's replacement (what the SYNC gate must cover)
These use the ADR-082 (proposed) contract.
- Registration.
settingsSections: [{ id: 'account', label: 'Account', after: 'database', when: …, load: () => import(…) }].after: 'database'keeps today's position. Core's settings host ignores a contributed id that equals a core category id, so the section only appears on this branch and later. - Navigation. The component receives
{ navigate }. Today'sonNavigateToDatabasebecomesnavigate('database'). - Imports. Only
@nodespace/extension-apiand itsuiandtestingentries,@tauri-apps/api,svelte, and the package's own files (ADR-082 §2.6):Badge,Button,Card,InputandfocusTrapcome from theuientry;createLoggerandtoErrorcome from the host API;databaseStore.activeDatabaseId, which keys the members card today, becomes thedatabasesactive id.
- Pro stores. The package uses its own
proSync,membership,resolveProSyncVariantand membership service. That is Move the Pro sync and collaboration UI out of core #3333's SYNC gate, so ship both together. - Replacing
proSyncSettled(). ADR-082 has no core "hooks settled" API. The Pro package keeps its own serialized activation chain (today'sproActivateChain) behind itslifecycle.onDatabaseActivatedhook (ADR-082 §2.5), and exposes its own settled promise for the members card to await. - Visibility.
when()reads Pro state only.labsFlagsis not in the host API, and Add the "Share / Sync this database" entry point that opens nodespace.ai #3362 removessyncEnabled(ADR-082 §2.3). If Pro wants an opt-in, it keeps its own setting. - Tests. Carry over the 15 + 25 + 9 cases deleted here, on the host API's
testingentry. The 3 + 4 Labs-gating cases test a core gate that no longer exists. Replace them with tests of the section's ownwhen().
Dependencies
- Add the Pro-boundary ratchet check and the CLAUDE.md Pro/sync placement rule #3299: the ratchet this PR lowers.
- Turn the UI-extension registry into ADR-082's build-time frontend extension API #3317: Add settings-section and database settings-slot extension points #3312's settings host (
settings-categories.ts, contributed sections, the generic fallback), plus Add the virtual:nodespace-extensions build entry and the extension-api import alias #3311, Stop importing the Pro extension in core; register it only through the build entry #3316 and Publish the extension host API: services, ui and testing entries, version policy #3315, which sync's replacement needs before it can be built against this branch. - SYNC: the canonical pin gate.
- SYNC: the Account replacement, built and reviewed against this branch.
Risks and rollback
- Pro build without the replacement. A Pro app built from a core revision that contains this PR, but without sync's replacement, would lose sign-out, invitations and admission approval. The pin gate prevents this, so do not merge before it is met.
- Stale category id. A stale
'account'id falls back to Database through Add settings-section and database settings-slot extension points #3312's generic fallback. The new test covers it. - Move the Pro sync and collaboration UI out of core #3333 ordering. If Move the Pro sync and collaboration UI out of core #3333 deletes
proSyncormembershipbefore this PR merges,account-settings.sveltebreaks the build. This ordering is recorded on the parent. - Rollback: revert the PR, including its
BASELINESand design-token baseline changes. sync stays on its previous pin until it bumps.
Plan key: C5.2 (pro-boundary DAG).
🤖 Generated with Claude Code
Activity
mstomar125 commentedon Oct 1, 2026
Superseded by #3412 (umbrella against the final ADR-081–085)