Repository navigation
Closed
Description
Overview
Several pieces of code are never used in production, or are compatibility shims, which CLAUDE.md forbids. They make the stored data shape look different from what it is, because some of them read keys that storage never holds. Delete them.
Problem Statement / Items
Unused Rust (core)
NodeBehavior::default_metadata()and every implementation (packages/core/src/behaviors/mod.rs). There is no production caller, and its defaults contradict the seeded schemas (for example, task priority "medium").- The typed wrappers
TextNode,DateNode,CodeBlockNode,QuoteBlockNode,OrderedListNodeandCollectionNode(packages/core/src/models/{text,date,code_block,quote_block,ordered_list,collection}_node.rs). They are used only in tests, and they read flat keys storage never holds, such aslanguage,timezoneandis_holiday.
Unused frontend
- The
useranddocumentplugin definitions (packages/desktop-app/src/lib/plugins/core-plugins.ts). No backend type exists for either. embeddingVectorandmemberOfon the TypeScriptNode(packages/desktop-app/src/lib/types/node.ts). The backend never sends them.iconandcoloron the TypeScriptCollectionNode. Nothing stores or uses them.
Compatibility shims
- The camelCase field-name fallback
toCamelCase()inpackages/desktop-app/src/lib/components/query/query-node-model.tsandtable-row.svelte. Stored field names are snake_case (naming standard), so the lookup uses the stored name only. - The
properties.play.rulesfallback inpackages/core/src/playbook/types.rs(rulesread from a second location). - The legacy
target_typeaction parameter inpackages/core/src/playbook/validation.rs.
Acceptance Criteria
- Items 1–8 are deleted, together with tests that only exercised them; tests that covered real behaviour through them are rewritten against the real path
- No remaining reference to
default_metadata, the six wrapper types, theuser/documentplugins,embeddingVector,memberOf, collectionicon/color,toCamelCasein query rendering, theplay.rulesfallback, ortarget_type - The query table renders snake_case custom fields correctly (test)
- Companion docs: the
icon/colorrows are removed fromcomponents/node-types.md(Collection), and any doc describing the removed wrappers ordefault_metadatais corrected -
bun run test:changedpasses;bun run quality:fixclean
Technical Specifications
Reference Files
packages/core/src/behaviors/mod.rspackages/core/src/models/(the six wrapper files and theirmod.rsre-exports)packages/desktop-app/src/lib/plugins/core-plugins.tspackages/desktop-app/src/lib/types/node.tspackages/desktop-app/src/lib/components/query/query-node-model.ts,table-row.sveltepackages/core/src/playbook/types.rs,packages/core/src/playbook/validation.rs
Architecture Impact
No ADR is reversed. This applies CLAUDE.md's rules against unused code and compatibility shims. Docs that describe the wrappers (components/node-types.md) are corrected as noted.
Dependencies
- [Core release blocker] Strip all Pro code, edition branching and sync/ACL state from core in one pass (ADR-081 steps 0 and 2) #3412 (rewrites
behaviors/mod.rs, includingDatabaseSettingsNodeBehavior::default_metadata)
Non-Goals
- Core's duplicate
TaskNodeand its camelCase keys: removed when task is defined once innodespace-types merge_database_settings([Core release blocker] Strip all Pro code, edition branching and sync/ACL state from core in one pass (ADR-081 steps 0 and 2) #3412) andSkillNode's flat-key fallback (Seed built-ins from fixed-UUID tables with Markdown bodies, order agent guidance, and link skills to their schemas #3418)
Activity
malibio commentedon Oct 1, 2026
Baseline — Frontend: 298 test files passed, 5513 tests passed
Delete unused node models, plugins and compatibility shims (closes #3430
Delete unused node models, plugins and compatibility shims (closes #3430
Delete unused node models, plugins and compatibility shims (#3469)