[aidan] feat/scheduled-tasks: calendar, rename, and edit workflows (#94)

* [aidan] bug: fix schedule button

* [aidan] fix/agent-errors: surface provider rate limits

* [aidan] ux/cards: click-to-rename for chat and workflow titles

Single-click a card's title to enter edit mode inline. Commit on Enter/blur,
cancel on Escape. Rename persists via PATCH for workflows and sessions.

* [aidan] feat/workflows: seed build prompt for zero-step workflows

When a new workflow has no steps, seed the agent with a prompt asking
the user to describe what the workflow should do, rather than starting blank.

* [aidan] feat/workflows: add-to-schedule popover for unscheduled workflows

Clicking the "+" on an unscheduled workflow row opens a popover with two options:
- Keep this schedule: enables the workflow's existing cadence and moves it to Scheduled
- Change schedule: opens the scheduling editor to pick a different time

* [aidan] ux/workflows: wire add-to-schedule popover and simplify New button

- Made the "+" icon on unscheduled workflow rows clickable, opening a popover
  to keep or change the schedule
- Removed AddIcon from toolbar "New" button (now reads "New" instead of "+ New")

* [aidan] fix/scheduled-tasks: open schedule calendar when Schedule pill clicked

Fixed the Schedule pill click being swallowed by the toolbar's dismiss handler.
Exempted the toolbar pills via data-toolbar-pills so their click handlers fire.

* [aidan] ux/workflows: open New workflow in agent build chat instead of empty card

When creating a new workflow from the hub, open it in edit_agent view (with the
agent builder chat) instead of a preview card. The workflow is created on the
backend first so the embedded session has a real ID.
This commit is contained in:
Aidan
2026-06-16 23:53:04 -07:00
committed by GitHub
parent e84eceee5b
commit 2bb5657ec0
22 changed files with 598 additions and 88 deletions
+12 -2
View File
@@ -597,11 +597,21 @@ async def edit_agent_session(workflow_id: str):
from backend.apps.agents.core.models import AgentConfig
from backend.apps.agents.agent_manager import agent_manager
steps_lines = "\n".join(f"{i+1}. {(s.label or '').strip() or (s.text or '')[:60]}\n Prompt: {s.text}" for i, s in enumerate(wf.steps))
# A brand-new workflow ("+ New" in the hub) opens here with zero steps, so
# frame the agent as a builder rather than a fix-what-exists editor.
intro = (
"Help the user iterate on it."
if wf.steps
else "This workflow is brand new and has no steps yet. Help the user "
"build it from scratch: ask what it should do, then add steps with "
"AddWorkflowStep."
)
steps_block = f"Current steps:\n{steps_lines}\n\n" if wf.steps else "It has no steps yet.\n\n"
system_prompt = (
f"You are the Edit Agent for the user's saved workflow \"{wf.title}\" "
f"(id: {wf.id}). Help the user iterate on it. The workflow's purpose: "
f"(id: {wf.id}). {intro} The workflow's purpose: "
f"{wf.description or '(unspecified)'}.\n\n"
f"Current steps:\n{steps_lines}\n\n"
f"{steps_block}"
"How to work:\n"
"1. When the user describes a change, briefly confirm what you'll do.\n"
"2. If you need to look at files / search / activate an MCP / etc. to "