Repository navigation
Remove the frontend Pro code, render the contact card in the collaboration.entry slot, and bump the extension API to 2.0 - #3425
Conversation
Pragmatic code review (round 1): independent review subagent at medium depth, on the local branch before the PR was openedCode Review SummaryThis is a clean slice. It deletes about 9k lines of Pro frontend code, and the slice grep finds nothing left behind. The new What the reviewer checked:
It found one real defect, in the new slot outlet: the rendered contribution remounts on every recompute. Requirements Validation
FindingsCritical Issues
Suggested Improvements
Nitpicks
VerdictREQUEST CHANGES. The fix is two lines plus a regression test. 🤖 Generated with Claude Code |
Address review (round 1)All three findings are fixed in 7bbea9b8 ("Keep a replaceable slot's contribution mounted while its when() inputs change").
The fix changes logic, so a re-review was run (round 2, below). 🤖 Generated with Claude Code |
Pragmatic code review (round 2): re-review of 7bbea9b8Code Review SummaryCommit 7bbea9b8 fixes the critical finding and both nits from round 1:
Checks:
Requirements Validation
Findings
VerdictAPPROVE 🤖 Generated with Claude Code |
Address review (round 2)
No logic changed, so no re-review is needed. 🤖 Generated with Claude Code |
…tion.entry slot
Deletes the Pro stores and services (pro-sync, membership, membership-service),
the Pro plugin and its variant machine, the collaboration components, the
first-Pro-consent and re-login modals, the Account settings section, the
workspace-members card and the add-synced-database dialog, with their tests and
the free-user guardrail suite.
app-shell no longer starts a proSync listener; debug-channel no longer dumps it.
database.svelte.ts drops the sync re-target chain, the settings-node pin and
refresh, the membership cache invalidation, and boundTenantSchema /
boundTenantCollection from DatabaseInfo. Settings loses the Account category,
and the Databases page its tenant badge and "Add synced database…" action. The
Labs syncEnabled flag is gone.
The Labs "Team synchronization" card now reads "Want team collaboration?
Contact us" and opens TEAM_COLLABORATION_CONTACT_URL (mailto:) through openUrl,
which now accepts mailto: URLs. It renders as the default content of the new
replaceable slot collaboration.entry: ReplaceableSlotOutlet shows the default
only while no contribution is registered for the slot, and otherwise the
visible contribution with the highest priority (ties by registration order)
through ExtensionOutlet, or nothing.
Extension API 2.0 (TypeScript side): EXTENSION_API_VERSION is { major: 2,
minor: 0 }; NodespaceExtension gains replaceableSlots, and the host API exports
ReplaceableSlot and ReplaceableSlotContribution; databases.refreshDatabaseSettings
and DATABASE_SETTINGS_NODE_ID are removed; DatabaseInfo.status documents
"requires_extension". The surface snapshot is re-recorded and a test asserts the
TypeScript and Rust constants agree. ADR-082 citations move to the accepted
section numbers.
Comments and tests describe event bursts, echoes and in-process writers
without sync, tenant or nodespace-sync wording; the dead collections hasLoaded
field is deleted.
Part of #3412
Part of #3413
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s change ReplaceableSlotOutlet passed `slot.active.load` from a derivation that getReplaceableSlot rebuilds on every pass, so any change to state a when() read re-ran ExtensionOutlet's load() and remounted the contribution, even when the chosen contribution was unchanged. The outlet now derives `registered` and `active` separately; `active` is the registry's own entry and compares equal until the choice changes. Two tests pin it: a visible contribution whose when() reads changing state, and a hidden higher-priority one that re-evaluates. The card's failed-open test now asserts the logged error. Part of #3412 Part of #3413 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The app library's constant matches the TypeScript host API's 2.0, which the frontend test extension-api-version-agreement checks. The fixture test asserts the new value. Part of #3412 Part of #3413 Co-Authored-By: Claude Opus 5.5 <[email protected]>
c854bbb to
540d9b4
Compare
Part of #3412
Part of #3413
Slice S4 of the one-pass strip: removes the frontend Pro code, turns the Labs "Team synchronization" card into core's contact entry point, renders it as the default of the new replaceable slot
collaboration.entry, and makes the single extension API bump, 1.0 → 2.0.Acceptance
pro-sync.svelte.ts,membership.svelte.ts,membership-service.ts),pro-sync-variant.svelte.ts, the Pro plugin and its import,components/collaboration/*, and the first-Pro-consent and Pro-re-login modals. Done.workspace-members-card.svelte,add-synced-database-dialog.svelte, and the Account gating insettings-sidebar.svelte/settings-pane.svelte. The Pro residue is gone fromapp-shell.svelte,database.svelte.tsanddebug-channel.ts. Done. The Account gating lived insettings-categories.ts, which the sidebar renders; the category is removed there and the pane loses its Account branch.syncEnabledflag and the disabled switch on the "Team synchronization" card are removed. The card text is reworded in the step-3 issue (you do the rewording here, see 5). Done.test:free-usersscript and the deleted files' design-token baseline entries (50 → 43).mailto:[email protected]link opened throughopenUrl. Core sends nothing else and makes no network request for it. Done.openUrlnow acceptsmailto:as well as http(s); Tauri'sopener:defaultalready allowsmailto:*.collaboration.entry. The default renders only while no contribution is registered for the slot, and stays suppressed even if a registered contribution is hidden, throws or fails to load. Done.type ReplaceableSlot = 'collaboration.entry',type ReplaceableSlotContribution = Contribution & { slot: ReplaceableSlot }andreplaceableSlots?: ReplaceableSlotContribution[]on NodespaceExtension, keyed and validated like the other kinds, and export both types from index.ts; change the TS DatabaseInfo.status doc to '"closed" | "open" | "missing" | "requires_extension" | "unknown"'; move every apiVersion: 1 fixture to 2; change ui-extensions.test.ts's 'unsupported apiVersion' case to EXTENSION_API_VERSION.major + 1; add a frontend test that reads app-lib/src/extensions/mod.rs and asserts its (major, minor) equals the TS EXTENSION_API_VERSION. Done.lib/constants/database-settings.tsand its barrel export are deleted (nothing uses them). The Rust constant and its assert are the last commit, made after S1 merged.hasLoadedfield and its assertion are deleted; the RBAC / signed-in-user comment is a plain local reason; no "Collaboration tab"; cloud-sync wording is removed from the structure tree, logger, sync listener and remote-update policy and from their tests; the legacy workspace-root test is deleted. Done. The sync listener also loses its "(all tiers)" / "tier-independent" wording.Design: the
collaboration.entryslotUiExtensionRegistry.replaceableSlotFor(slot)returns every contribution registered for the slot, in descending priority with ties in registration order. It never evaluateswhen().getReplaceableSlot(slot)(ui-extensions.svelte.ts) returns{ registered, active }.registereddepends on registration only.activeis the first contribution whosewhen()holds, and a throwingwhen()counts as false and is logged once.ReplaceableSlotOutletrenders itsdefaultContentsnippet only whileregisteredis false. Otherwise it rendersactivethroughExtensionOutlet(keyed by contribution key, whose{:catch}and<svelte:boundary>isolate a failed load or a throwing component), or nothing.labs-settings.sveltehostscollaboration.entrywithTeamCollaborationCardas the default. The card imports only its card UI, the contact constant,openUrland the logger.collaboration.entrycontributions, each gated by a flag that defaults to off: plain, higher priority,when()throws,load()rejects, component throws.Extension API
databases.refreshDatabaseSettings,DATABASE_SETTINGS_NODE_ID,DatabaseInfo.boundTenantSchemaandDatabaseInfo.boundTenantCollection.NodespaceExtension.replaceableSlots,ReplaceableSlotContributionandReplaceableSlot('collaboration.entry').DatabaseInfo.statusmay be'requires_extension'.DaemonProfile.productis removed;DaemonProfileis{ binary_name, service_env }(ADR-082 §4.5).pro:tier-detectedevent is removed.nodespace_proto::socket::{daemon_socket_name, daemon_socket_relative, ui_pid_name, ui_pid_relative, incompatible_database_name}take onlyis_debug.DAEMON_SOCKET_NAMES,UI_PID_NAMESandINCOMPATIBLE_DATABASE_NAMEShold two entries (release, dev); the names themselves are unchanged.nodespace_daemon::incompatible_database::marker_path()takes no argument.set_bound_tenantreplaced byset_extensions;DatabaseEntry.extensionsis now string→string; protoDatabaseInfofields 8 and 9 removed.Tests
New:
components/settings/labs-collaboration-entry.test.ts: the slot on the real Labs page. Covers the default with nothing registered, and suppression while the contribution is visible, hidden, shown then hidden,when()throws,load()rejects and the component throws. Also covers single render by priority, fallback to the next visible contribution, and the first-registered tie-break.components/settings/labs-settings.test.ts(rewritten): the constant is pinned tomailto:[email protected]; the body reads exactly "Want team collaboration? Contact us"; the card has no switch; a click callsopenUrlonce with the constant, prevents navigation and makes noinvokeorfetch; the card's import list is pinned; no team-sync flag appears in the source.plugins/ui-extensions.test.ts: registry keying, ordering, shared id and key reservation, malformed input, unregistering and nowhen()evaluation for replaceable slots, plusgetReplaceableSlot.extension-api/extension-api-version-agreement.test.ts: the Rust(major, minor)inapp-lib/src/extensions/mod.rsequals the TS constant.extension-api/extension-api-facades.svelte.test.ts:databaseshas exactly its six members, and the API has no settings-node id.stores/database.test.ts:load()andswitchTo()send exactly their registry, routing and window-pin commands.components/settings/database-settings.test.ts(rewritten): the header actions are exactly New and Open existing…, no sync wording appears, and nothing renders from a database'sextensionskeys.stores/labs-flags.test.ts: the store holds exactlyaiChatEnabledandplaybooksEnabled.collection-sub-panel.test.ts: the title is "Open collection".utils/external-links.test.ts:openUrlacceptsmailto:.Mutation checks (each applied alone, the named test file run, the source restored). All 30 were killed:
preventDefault/ also callsfetchregistereddecided by visibility (some(isContributionActive))when()throws; ui-extensions:getReplaceableSlotwhen()throwsload()rejectsfind→findLastreplaceableSlotForignores priorityreplaceableSlotsnot registeredExtensionOutletboundary removedExtensionOutletload failure not loggedload()rejectsswitchTo/loadsend an extra commandopenUrlrefusesmailto:Ratchet (
bun run scripts/check-pro-boundary.ts)--changedlists no hit in any changed file. BASELINES is untouched; S5 tightens it.Left for later slices
requires_extensiondaemon status and the download-link constant. [Core release blocker] Refuse Pro databases on every surface and add the contact entry point (ADR-081 step 3) #3413's "Unit tests pin the mailto and download-link constants" checkbox is complete only after S6 pins the download link.requires_extensionrow marker on the Databases page.statusLabelstill shows "Unknown" for an unrecognized status.Verification
Run on the head of this branch, rebased on main 4ca90c2:
proSync|pro-sync|…|\bPro\boverpackages/desktop-app/src,package.jsonanddesign-tokens-baseline.json, excludingsrc/tests/stores/conflicts.test.ts): 0 hits.packages/desktop-app/src(git ls-files … | grep -P '(^|/|-)pro[-_.]'): 0.jq -c .version extension-api-surface.json:{"major":2,"minor":0}.app-lib/src/extensions/mod.rs:EXTENSION_API_VERSION: (u32, u32) = (2, 0).labs-settings.test.ts. In the source, "Contact us" is the link text inside the<a>, so a literal grep for the whole sentence finds nothing.git grep 'Want team collaboration?'findsteam-collaboration-card.svelte.bun run --cwd packages/desktop-app test src/tests/extension-api src/tests/plugins src/tests/components/settings src/tests/build: 28 files, 523 tests passed.bun run scripts/check-pro-boundary.ts: passes;--changedlists no hit in any changed file.bun run quality:fix(desktop-app): eslint clean, no new design-token violations (43 known), svelte-check 0 errors and 0 warnings.bun run test:changed: passed: frontend Happy-DOM, test:scripts, test:browser (Chromium) and rust:test (nextest, 156s).Review: the pragmatic review (round 1) found one real defect: the slot outlet remounted its contribution whenever state read by a
when()changed. It is fixed in a separate commit with two regression tests. The re-review (round 2) approves. Both rounds and the address-review notes are posted as comments.🤖 Generated with Claude Code