Skip to content

moooon

Motir

Vibe your whole project. Bring an idea — Motir's three AI layers plan it, track it, and ship it, end to end. You're looking at Motir, built in Motir.

  • Vibe Project
  • Open Source
  • AI Agent
  • AI Loop
1
requests
0
upvotes
145
planned
1,361
shipped

Motir · Work items

MOTIR-1405Done

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 its items() returns BOTH member candidates (the existing mentionCandidates prop) AND work-item candidates fetched query-driven from 5.8.4 (debounced; the primitive stays data-source-agnostic — a workItemSearch wiring callback supplied by the host surface, OFF when absent so existing consumers are untouched). MentionList renders 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 an addStorage.markdown.serialize handler, and round-trips back through a high-priority parseHTML rule on a[href^="motir:"] (exactly the mention: 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 MarkdownEditor with only mentionCandidates (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).