Skip to content

Delete unused node models, plugins and compatibility shims #3430

Closed

Description

@malibio

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)

  1. 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").
  2. The typed wrappers TextNode, DateNode, CodeBlockNode, QuoteBlockNode, OrderedListNode and CollectionNode (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 as language, timezone and is_holiday.

Unused frontend

  1. The user and document plugin definitions (packages/desktop-app/src/lib/plugins/core-plugins.ts). No backend type exists for either.
  2. embeddingVector and memberOf on the TypeScript Node (packages/desktop-app/src/lib/types/node.ts). The backend never sends them.
  3. icon and color on the TypeScript CollectionNode. Nothing stores or uses them.

Compatibility shims

  1. The camelCase field-name fallback toCamelCase() in packages/desktop-app/src/lib/components/query/query-node-model.ts and table-row.svelte. Stored field names are snake_case (naming standard), so the lookup uses the stored name only.
  2. The properties.play.rules fallback in packages/core/src/playbook/types.rs (rules read from a second location).
  3. The legacy target_type action parameter in packages/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, the user/document plugins, embeddingVector, memberOf, collection icon/color, toCamelCase in query rendering, the play.rules fallback, or target_type
  • The query table renders snake_case custom fields correctly (test)
  • Companion docs: the icon/color rows are removed from components/node-types.md (Collection), and any doc describing the removed wrappers or default_metadata is corrected
  • bun run test:changed passes; bun run quality:fix clean

Technical Specifications

Reference Files

  • packages/core/src/behaviors/mod.rs
  • packages/core/src/models/ (the six wrapper files and their mod.rs re-exports)
  • packages/desktop-app/src/lib/plugins/core-plugins.ts
  • packages/desktop-app/src/lib/types/node.ts
  • packages/desktop-app/src/lib/components/query/query-node-model.ts, table-row.svelte
  • packages/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

Non-Goals

Activity

  1. malibio commented on Oct 1, 2026

    @malibio
    CollaboratorAuthor

    Baseline — Frontend: 298 test files passed, 5513 tests passed

  2. self-assigned this
    on Oct 1, 2026
  3. added 2 commits that reference this issue on Oct 1, 2026
    2d12a13
    7989dee
  4. added a commit that references this issue on Oct 1, 2026
    ef11f7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions