5.8.5 Editor — unified `@` mention picker (people + work items) in `MarkdownEditor`
Type: code · Executor: coding_agent · Repo: motir-core. Blocked by 5.8.1 (design) + 5.8.2 (token) + 5.8.4 (candidates). UI — design-gated.
Make @ in the shared MarkdownEditor offer work items as well as people (the Linear-faithful unified @, rung 1), so a user can type @MOTIR / @<title words> and insert a live work-item reference. Extends the shipped mention extension WITHOUT regressing user mentions.
Editor side (components/ui/markdownEditorMentions.tsx, MarkdownEditor.tsx):
- Extend the
@-triggered suggestion so itsitems()returns BOTH member candidates (the existingmentionCandidatesprop) AND work-item candidates fetched query-driven from 5.8.4 (debounced; the primitive stays data-source-agnostic — aworkItemSearchwiring callback supplied by the host surface, OFF when absent so existing consumers are untouched).MentionListrenders the two as labelled sections (people / work items) with the work-item row vocabulary from 5.8.1. - On selecting a work item, insert a work-item mention node that serializes to
[MOTIL-PLACEHOLDER]— i.e. the[<key>](motir:<id>)token from 5.8.2 — via anaddStorage.markdown.serializehandler, and round-trips back through a high-priorityparseHTMLrule ona[href^="motir:"](exactly themention:round-trip the user node uses).renderText-> the bare key. - Keep the member path byte-identical; the two node types coexist.
Acceptance criteria
- Typing
@shows people and (on a matching query) work items, sectioned; picking a work item inserts a chip that serializes to[MOTIR-N](motir:<id>)and survives a load->save round-trip unchanged. - Work-item search is query-driven + debounced via 5.8.4; empty/short query shows the "type to search" state; a11y matches the member listbox (
role=listbox,aria-activedescendant, arrow/enter/esc). - Surfaces that already use
MarkdownEditorwith onlymentionCandidates(and no work-item wiring) behave exactly as before. - Wire the work-item search on the real host surfaces (issue detail description editor, edit form, comment composer) — not just the primitive.
- New picker copy in en + zh.
- Component test: work-item pick -> token serialization; mixed people+items list; absent-wiring fallback.
Context refs: components/ui/markdownEditorMentions.tsx (buildMentionExtension, MentionList, filterMentionCandidates, MENTION_ID_RE), components/ui/MarkdownEditor.tsx (buildEditorExtensions, MentionWiring), 5.8.4 route, 5.8.2 token, design/work-items/internal-links.mock.html (5.8.1).