8000 feat(automations): an Automations page in the web app, with a When, If and Then builder and a test panel by adeelahmad · Pull Request #587 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(automations): an Automations page in the web app, with a When, If and Then builder and a test panel - #587

Merged
adeelahmad merged 4 commits into
mainfrom
claude/project-thread-li6m25
Oct 18, 2026
Merged

adeelahmad merged 4 commits into
mainfrom
claude/project-thread-li6m25

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: automations could be made, tried and run only over the API, MCP and the assistant, or drawn on the workflow canvas. The web app had no list of them, and Schedules had its own row in the nav.

After: Automate › Automations lists every automation you can see: its triggers in words, how its last run went, runs today, what waits for your pick (a link to Approvals), its cost this month and when it runs next. A switch turns each one on or off; its menu has Run now, Duplicate and Delete (undone from the toast, no confirm). New automation opens a builder in three parts:

  • When: one or more triggers, each with only-when conditions.
  • If: conditions over what happened.
  • Then: actions from the catalog, their settings drawn from each action's params.

"Describe it in words" fills the builder from a sentence and says what it left out. The test panel runs the draft on a recent activity and says what each action would do, before you save. A new automation saves switched off. An automation that branches opens in the canvas instead.

Schedules is now a tab of Automations, so both share one nav row and the nav still fits a phone screen. For admins, Routines and New routine sit at the top of both tabs, and /schedules and /routines highlight Automations in the nav.

Motivation and Context

Workflow studio M11 (Studio UI), Build steps 2 to 5 and 7 (list, builder, describe, test panel). The nav fold follows #535 (Schedules), using the plan the Schedules thread left in /mnt/project-files/automations-page/. An automation's runs, coming-up, variables and costs tabs follow in the next PR.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests:
    • automations-ui.test.tsx, 7 tests: the list and its Schedules tab, the empty state, the builder, describe, the test panel, branching to the canvas, and API errors.
    • automations-model.test.ts.
    • navigation.test.ts, nav-groups.test.tsx and schedules-page.test.tsx, for the nav fold.
    • ci/clicks routine journey: it now goes through Automations.
  • My change requires documentation updates: docs/automations.md (The studio), docs/schedules.md, docs/frontend.md, README, docs/requirements.md.
  • CHANGELOG: n/a, the title says it.

Local CI (ci/local-ci.sh HEAD --jobs frontend,pre-commit): Next.js pass, pre-commit pass. That run was on the same commits before main took #572, #582 and #586; the cherry-pick onto main was clean.

Done questions (AGENTS.md)

  • Goal: the studio's list and builder for people; merged on green.
  • Agents: everything here was already in the API, MCP and the assistant; this adds the person's view on the same endpoints.
  • Zero setup: nothing to install or set.
  • Fewest clicks:
    • A new automation starts with one trigger and one action filled in.
    • Enter adds rows.
    • Delete is undone, not confirmed.
    • The nav keeps its length: Schedules folds into Automations.
  • Configurable: n/a, no new settings.
  • Light: frontend only, no new dependency.
  • Private and secure: n/a, no new surface. What reaches outside Lens still asks first, and the builder shows which actions do.
  • Cost: the test panel is a dry run. Describe uses the existing draft endpoint, which is logged in the activity ledger.
  • User decides: new automations save switched off, and nothing changes existing defaults.
  • Upgrades: n/a, no stored data changes.
  • Honest: docs and README call the list and builder built. An automation's tabs are listed as the next step.
  • Tested and documented: tests added, docs updated, no generated files change.
  • Open: n/a.
  • Reported in the project thread.
  • Reuse: SchemaForm, SchedulePreview, Tabs, the costs hooks, and the canvas for branching automations.

Generated by Claude Code

@adeelahmad adeelahmad self-assigned this Oct 18, 2026
…panel

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjJqXgjj1cNdKGRQbX5frb
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjJqXgjj1cNdKGRQbX5frb
…Schedules as its tab

The nav fits a phone screen, so the studio's list shares one row with
Schedules: both pages have Automations and Schedules tabs, and admins
get Routines and New routine at the top of each.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjJqXgjj1cNdKGRQbX5frb
…t saves

A starter's or a described draft's limits (Router alerts' once an hour)
were dropped on save.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjJqXgjj1cNdKGRQbX5frb
@adeelahmad
adeelahmad force-pushed the claude/project-thread-li6m25 branch from 7b164fe to 6852f36 Compare October 18, 2026 12:05
@adeelahmad
adeelahmad merged commit f42d42f into main Oct 18, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-li6m25 branch October 18, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0