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-299Done

5.4.9 Watch control + watchers popover in the detail header (eye + count, `W` shortcut, admin manage-others)

Estimate: 28m · Depends on: 5.4.4, 5.4.6

The watch surface, per the 5.4.6 design: a WatchControl in the detail header's ml-auto cluster (beside Edit — the shipped slot).

Build: the eye + count button (watching = filled + accent per the design; not = outline), toggling self-watch with an optimistic count bump (reconciled on refresh); the W keyboard shortcut (ignored while typing in inputs/editors — the standard guard); the watchers popover (paged list of Avatar · name rows, your row marked, "Show more"); the admin-only manage rows — add-watcher via the member-picker vocabulary with the inline no-view-access 422, per-row remove; non-admins see the list only. Data from the detail read (watcherCount/viewerIsWatching) + the paged list route on open; mutations via server actions → watchersService. A viewer can toggle their own watch (the verified rule).

A11y: the button carries an aria-pressed/label with the count ("Watch — 3 watching"); the popover is a labelled dialog/listbox per the design; the shortcut is documented in the tooltip; state conveyed as text + icon, never colour alone.

Acceptance criteria

  • The control matches the design (both states + count), toggles optimistically incl. for a viewer, and W toggles outside text inputs.
  • The popover lists watchers paged; project admin adds/removes others (the no-view-access rejection surfaces inline); non-admins get no manage affordances.
  • Auto-watch effects surface correctly (create/comment then revisit → watching state on).
  • Axe-clean (header + open popover); token tiers only; integration tests over toggle/manage/shortcut; coverage ≥90%.

Context refs

  • design/work-items/labels-components-watch.mock.html + notes (5.4.6)
  • issues/[key]/page.tsx header (ml-auto cluster — the placement, rung-2) + 5.4.4 service/routes
  • The shipped popover/member-picker vocabularies (Combobox, the 2.4.9 confirm grammar)
  • The verified watcher UX (eye+count, W shortcut) in the Story 5.4 description