Add a Loops tab to see and manage every scheduled loop

Open
#411 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
swift
Domain
desktop, devtools

Research direction

Start with Sources/SwitchboardApp/ScheduleList.swift and SidePanel.swift to see how per-session schedules are displayed and how ScheduleCaption can be reused. Then inspect sb schedule ls --json and the schedule commands, including how sessions and run history are represented. Done means a Loops tab lists schedules across sessions with the requested details, actions, filters, and attention indicators, while the per-session view stays in sync.

Written by the indexing model from the issue text.

Description

Add a "Loops" tab to the Switchboard app, next to the Inbox, Board and Issues views, where the user can see every loop that's running and manage it: create, edit, pause, resume, run now, and delete.

Today: a loop is an sb schedule: sbd sends a prompt to a session on an interval and keeps it across restarts (#294). The app shows a session's schedules only inside that session (ScheduleList in Sources/SwitchboardApp/ScheduleList.swift, used from SidePanel.swift and a popover). There's no place that lists every loop across sessions, so the user can't tell at a glance which loops exist, whether they ran, or what they did. For example, the Switchboard work loop on the operator ("keep 5 sessions working on issues, most important first") is visible only by opening the operator, or with sb schedule ls. An earlier loop that ran on chained date waits stopped without anyone noticing.

What the tab should show, one row per schedule across all sessions:

  • the session it runs in, as a link to that session, and the prompt (first line, with the full text on hover or expand);
  • the interval, the next run time, and whether it's paused;
  • the last run: when, and whether it was sent, skipped (the session was busy), or failed, with the error;
  • a short history of recent runs, and a link to each run's reply in the session's transcript, so the user can see what each tick did.

Actions:

  • New Loop…: pick a session (the operator by default, or any session or Manager conversation), an interval, and a prompt. It runs sb schedule underneath.
  • Edit the interval or prompt of an existing loop.
  • Pause, Resume, Run now, and Delete, the same as sb schedule pause|resume|rm, plus a new "run now" if sbd doesn't have one yet.
  • Sort and filter by session, and put loops whose last run failed, or that haven't run when due, at the top with the attention color.

Also:

  • A badge on the tab when a loop failed or is overdue.
  • Loops on a remote host's sessions, if hosts have schedules.
  • Keep the per-session ScheduleList in sync with the tab, and reuse its row code (ScheduleCaption) instead of a second implementation.
  • sb schedule ls --json should carry what the tab needs (last result, history), so agents and the tab read the same data.
Dominant language
Swift
Stars
0
Forks
0
Avg merge
6h 15m
Merged PRs (30d)
308

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haacked/switchboard

All issues in haacked/switchboard

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.