Throwaway prototype · not production

Does today’s Inbox (admit + pipeline) feel right?

Logic: @tyrant/domain · Inbox Views + PipelineAlgorithm + Triage via adapter

Named Views: Peek (default here — full day list), Next (first pipeline member), Week (owned · not deleted · Cadence still open; encounter order). Next and Peek share Daily admit; Defer goes through Triage (may untime). Scrub date and time, switch Views, press outcomes on each row.

View
Context filter

Add activity
Contexts

View · Peek

    Not admitted (Daily)

    Same candidates, rejected by Daily admit — with the reason. Next and Peek share this membership; only the projection differs.

      Current recipe

      Daily admit (Next / Peek — all must hold): owned · not deleted · not postponed today · not done today · not dismissed today · cadence relevant · context filter (if any).

      Week admit: Daily membership on at least one local day in the next seven (today through today+6), including context filter when set. Algorithm: encounter order.

      Pipeline (Next / Peek — top → bottom, successive stable sorts; later override earlier — last wins):

      1. Postponed-returned (prior day postpone; routines never count)
      2. Among postponed-returned: older postpone first (recent last)
      3. Not deferred today before deferred today
      4. Among deferred today: older defer first (recent last)
      5. Timeframe band: in → after (overdue) → untimed → before
      6. Among in: shorter length first (open/start-only last)
      7. Among in: earlier window start first
      8. Among in: not deferred before deferred
      9. Among in deferred: older defer first (recent last)

      Triage.defer: run defer; if the target View has more than one member and position is unchanged after defer, also untime (Algorithm then skips Timeframe for that Activity today).

      Walkthroughs

      Each tab resets to a known scene. Press the steps in order.

      Prototype workaround: defer recency on a frozen clock

      The demo clock does not tick. Domain defer stamps deferredAt = clock.now, so several defers at 07:05 would share one instant. Recency would tie and fall back to timeframe order — deferring the top in item would look like a no-op once peers were already deferred.

      Prototype only: each defer in this session adds +1 ms to that stamp (counter resets with the scene). Domain is unchanged. In a live app the wall clock moves, so this offset is unnecessary.