MotirBuilding in public
MOTIR · moooon
onMotir
You’re viewing a public project. Anyone can view it — no account needed. Sign in to submit, upvote, or comment on requests.View-only — you can’t edit work items
MOTIR-383

6.9.2 Link/blocker picker retrofit — candidate read becomes query-driven server-side (closes finding #98); both link surfaces

Done
Description

Estimate: 24m · Depends on: 6.9.1

Make the link picker actually find any issue — the finding-#98 fix. UI behaviour change on an EXISTING surface (no new component, no design subtask).

Backend: replace findLinkCandidates’ newest-50 window with the 6.9.1 quick-search composed with the existing direction-aware exclusionslistLinkCandidates passes the typed query + the (self + already-linked-for-this-relationship) exclude set + the bound into quickSearch, so the result is a SEARCHED, excluded, bounded candidate page (not a recent slice). listLinkCandidatesAction grows a query parameter.

Frontend (AddLinkControl + LinkAddForm): the issue-search Combobox goes query-driven — debounced server fetch as the user types (the same Combobox already shows loading / no-results / selected states), instead of fetching newest-50 once and filtering client-side. Re-fetch on relationship change (the exclusion set differs) is preserved. Keep the immediate-write Add path (createLinkAction → refresh) and the typed-error banner unchanged. The 2.4.10 create-modal control (CreateIssueLinksField) rides the same shared form, so it is fixed in lockstep.

Acceptance criteria

  • The #98 repro passes: from a late-plan issue, typing an early-plan issue’s key or title fragment surfaces it and links it (it is outside any newest-N window); the newest-50 cap is gone.
  • Exclusions hold (self + already-linked for the chosen relationship never appear); permission scope holds (6.9.1); both the detail panel and the create modal search server-side; the Combobox debounces and shows loading / no-results states; colour via --el-*, shape via element tokens; axe-clean; next-intl.
  • Integration tests over the searched candidate read (query + exclusion + bound) and the action; pnpm test:coverage ≥ 90%.

Context refs

  • finding #98 (the bug + root cause); 6.9.1 (the read it composes)
  • app/(authed)/issues/[key]/_components/AddLinkControl.tsx, components/issues/LinkAddForm.tsx, the listLinkCandidatesAction action, workItemsService.listLinkCandidates, workItemRepository.findLinkCandidates
  • design/work-items/links.mock.html + design-notes (2.4.9 — the EXISTING picker design; data-source change only, layout unchanged) — THE authority
  • The i18n threading pattern; the Combobox primitive (debounced async options)