Repository navigation
Description
Overview
The @ mention picker offers archived nodes. An archived node shouldn't participate anywhere it isn't explicitly asked for: search, mentions, lists or automation. Semantic search already excludes archived nodes (packages/core/src/ops/search_ops.rs, the include_archived check), but the mention picker doesn't.
Problem Statement
SqliteStore::mention_autocomplete (packages/core/src/db/sqlite_store/search.rs) runs:
SELECT * FROM node WHERE title IS NOT NULL
AND node_type NOT IN ('collection', 'schema', 'ai-chat')
AND LOWER(title) LIKE ?1 ESCAPE '\' LIMIT nThere's no lifecycle_status condition, so typing @ plus part of an archived node's title offers that node, and selecting it writes a mention of a node the user archived.
Proposed Solution
Add lifecycle_status = 'active' to the query, so archived nodes are excluded. Keep the existing type exclusions unchanged; they're tracked separately with the schema alignment work.
Acceptance Criteria
-
mention_autocompletereturns no node whoselifecycle_statusisarchived(test: an active and an archived node with matching titles; only the active one is returned) - Unarchiving the node makes it appear again (test)
- The existing mention autocomplete tests pass (wildcard escaping; dates offered, schemas not)
-
bun run test:changedpasses;bun run quality:fixclean
Technical Specifications
Reference Files
- Query:
packages/core/src/db/sqlite_store/search.rs(mention_autocomplete) - Service:
packages/core/src/services/node_service/query.rs(NodeService::mention_autocomplete) - Daemon RPC:
packages/daemon/src/services/node_service.rs(mention_autocomplete) - Precedent:
packages/core/src/ops/search_ops.rs(semantic search's archived filter)
Architecture Impact
No prior ADR covers the picker's lifecycle filtering. This aligns it with the agreed rule that archived nodes don't participate anywhere. That rule will later move into one shared participation check, which will replace this condition along with every other scattered lifecycle_status comparison.
Non-Goals
- The shared participation check itself
- Replacing the literal type-exclusion list with a per-type "mentionable" rule
Activity
malibio commentedon Oct 1, 2026
Baseline — Frontend: 298 test files passed (5510 tests), 0 failed.
Keep archived nodes out of the @ mention picker (closes #3428)