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-101

2.4.3 Parent breadcrumb + child list (tree navigation)

Done
Description

Estimate: 12m · Depends on: 2.4.1

Navigation through the work-item tree (the AI-native execution DAG + Jira-style epic→story→task→bug→subtask hierarchy from 2.1.1). A parent breadcrumb walks the ancestor chain (each ancestor = type icon + PROD-N + title, linking to its own detail page) so a Subtask shows its Task → Story → Epic lineage. A child list shows the item's direct children (type icon + identifier + title + status pill + assignee), each a link to its detail page; an item with no children shows nothing (no empty scaffold).

Reads. Children come from the getIssueDetail bundle (2.4.1). The ancestor chain is bounded (Story 1.4's depth limit is 4) so it's a short parent-walk; if a dedicated read is cleaner than threading it through the aggregate, add workItemRepository.findAncestors (a single recursive-CTE read mirroring findSubtree) with the explicit workspaceId filter. Breadcrumb + child links are plain <a>/next/link to /issues/[childKey] — clicking one navigates to that item's detail page (the recursion the tree implies).

Acceptance criteria

  • A nested item (e.g. a subtask under a task under a story under an epic) shows its full ancestor breadcrumb, each segment linking to that ancestor's detail page; a top-level epic shows no breadcrumb.
  • An item with children lists them (icon + identifier + title + status), each linking to its detail page; a leaf shows no child section.
  • Ancestor read is workspace-scoped (cross-workspace ancestors never leak) and bounded by the depth limit; no N+1 (one bundled read or one CTE).
  • Vitest (real Postgres): breadcrumb order is root→self; child list matches listChildren; cross-workspace isolation holds.
  • Breadcrumb + child links are keyboard-navigable; shell-a11y sweep stays green.

Context refs

  • lib/repositories/workItemRepository.tsfindChildren, findSubtree (the recursive-CTE pattern to mirror for ancestors), the workspaceId-filter convention
  • lib/issues/issueTypes.ts (2.1.1) — type icons for breadcrumb/child rows
  • 2.4.1's IssueDetailDto — extend with the ancestor chain if not bundled already
Status
Done
Type
Sub-task