Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

4.3 KB
Raw Blame

Scheduled tasks in the chat dock, and the Schedule tab's AI path

  • Date: 2026-09-02
  • Type: feature
  • Scope: web, docs
  • PR: #593

中文版

Scheduled tasks became reachable from the conversation itself. The chat page's dock gained a Scheduled tasks panel listing the tasks bound to the current Session and creating new ones, a Session with an enabled task bound to it wears an alarm clock on its sidebar row, and the Agent settings Schedule tab joined the "Create with AI" pattern — with one twist: from inside a conversation, the AI path prefills that conversation's own composer rather than a new one's.

Details

  • A new dock panel kind, schedules: the current Session's tasks (an agent's schedules filtered to this Session), a search box and All / Active / Paused / Completed filters, rows with a state glyph, the task name and a plain-language schedule line (describeSchedule: "Every day at 08:00 · Next: tomorrow 08:00", "Every Monday at 09:00", "Every 30 minutes", "One-off · Sep 3, 10:00", settled states named up front), an enable switch and an edit / delete menu for owners, and a Suggestions list (daily brief, weekly review, follow-up reminder, update monitor). The list refetches when the tab comes to the front, on window focus, on a schedule_fired / schedule_queued event, at the end of every conversation turn, every 30 s while visible, and after every change; the draft page shows what the first message unlocks.
  • The panel's header is where a task bound to a conversation is created — the kit's CreateButtons pair on a row of their own under the title, since the dock's width is user-dragged and a title-adjacent pair clips when narrow. Create with AI (the magic wand, every member) composes the request with an in-Session instruction tail and writes it into this conversation's composer through the chat page's ComposerControl; nothing is posted, so pressing Send stays the user's move and the composer routes it the way it routes anything typed. The dialog also copies the full prompt. Create manually (the hand, owners) opens the form pinned to this Session.
  • A Session with at least one bound task that still has a next fire time (the server's nextFireAt) wears an alarm clock on its row in the sidebar's session list, named "Has a scheduled task still to fire" — the icon only, no count; a task switched off, past its end time, or a one-off that has already run draws nothing. The rows and the panel read one shared store (features/schedules/schedule-store.ts, the current Agent's list, pendingScheduleSessions naming the Sessions to mark), refreshed on navigation, on window focus, on the two schedule events, at the end of every conversation turn, and after every mutation the panel makes — no new server field. One refresh serves both surfaces: the store notifies its subscribers, so the panel and the mark cannot fall out of step. Rows of other agents (workspace and time grouping) carry no mark: the store holds one agent's list.
  • Saving or toggling a scheduled task no longer reports "takes effect in a new conversation, after the next compaction" — a task fires on the scheduler's clock, with no conversation context involved. The form and both enable switches now say only what happened: "Scheduled task saved" / "enabled" / "disabled".
  • The Schedule tab's header carries the kit's CreateButtons pair — its AI path prefills a new conversation with the Project's default agent, with a tail naming the agent, penguin schedule add or the TOML file, and the new-Session mode; a member who cannot write the agent's files gets the AI button alone — and the suggestions replace an empty table.
  • The create / edit form moved out of the tab into features/schedules/schedule-form-modal.tsx, shared by the tab and the panel, with a lockedSessionId mode; the alarm-clock glyph became SCHEDULE_ICON in components/ui/icons.tsx, worn by the agents page count, the panel and the session row's ScheduleMark alike; AiCreatePanel accepts a byLine override; ComposerControl.fillExample became fillPrompt, since a composed schedule prompt reaches it by the same path as a draft-screen example card.
  • The Web App docs describe the panel, its two buttons and the session row's mark in both languages.