SurfSense/surfsense_web/app
CREDO23 2e572d7818 feat(web): create_automation HITL approval card in chat
Closes the create loop in chat: the agent describes user intent → the
drafter sub-LLM produces an AutomationCreate JSON → this card surfaces
a structured preview → approve persists; reject cancels. Edits flow
through chat refinement (re-call with a refined intent), not in-card,
so the card stays simple and the multi-turn checkpointer carries the
context.

Tool UI (components/tool-ui/automation/):
- create-automation.tsx — entry dispatcher + ApprovalCard chrome
  (pending/processing/complete/rejected via useHitlPhase) + SavedCard
  (links to the detail page) + InvalidCard (lists drafter validation
  issues) + ErrorCard (verbatim message). Rejection result is hidden
  because the approval card itself shows the rejected phase inline.
- automation-draft-preview.tsx — structured preview body: name +
  description + goal, triggers (humanised cron + tz + static-input
  keys), plan steps (step_id → action), and a collapsible raw JSON
  for power users.

Wiring:
- components/tool-ui/index.ts — re-export.
- features/chat-messages/timeline/tool-registry/registry.ts —
  register create_automation → CreateAutomationToolUI (dynamic import,
  same pattern as other connector tools).
- contracts/enums/toolIcons.tsx — Workflow icon + "Create automation"
  display name so fallback chrome (and timeline headers) are honest.

Shared util:
- lib/automations/describe-cron.ts — lifted from the route slice's
  lib/ folder since both the dashboard slice and the new approval card
  now render schedule descriptions. Slice imports updated; the now-
  empty slice lib/ folder is gone.

Backend prompt fragments:
- main_agent/system_prompt/.../create_automation/description.md and
  the tool's docstring no longer promise in-card edits. They make the
  refinement path explicit: if the user wants changes after seeing the
  draft, they reply in chat and the agent calls the tool again with a
  refined intent.

v1 deliberately excludes:
- In-card edit form / right-side edit panel — defer until we see real
  demand. The chat refinement loop covers the common case.
- approve_always / persistent allow rules — automations are a single
  artifact, not a repeated mutation, so the "trust this kind of call"
  affordance doesn't apply.
2026-05-28 01:32:04 +02:00
..
(home) Merge remote-tracking branch 'upstream/dev' into feat/opentelemetry 2026-05-23 03:21:08 +05:30
api refactor(env): replace inline process.env reads with BACKEND_URL in editor, chat, dashboard and settings 2026-05-20 03:34:22 +05:30
auth/callback fix(auth): remove redundant token storage write 2026-05-11 06:25:40 +09:00
dashboard feat(web): create_automation HITL approval card in chat 2026-05-28 01:32:04 +02:00
db try vercel fix 2025-09-30 22:45:04 -07:00
desktop refactor: enhance Google login functionality and button styles across multiple components 2026-05-18 01:17:37 +05:30
docs fix: update URLs to use the "www" subdomain across the application 2026-05-15 12:35:15 -07:00
invite/[invite_code] fix(auth): centralize redirect path storage 2026-05-11 06:30:26 +09:00
public/[token] chore: linting 2026-03-27 03:17:05 -07:00
verify-token chore: ran biome checks 2026-03-07 12:57:27 +05:30
apple-icon.png feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
error.tsx chore: ran linting 2026-05-19 21:02:07 +05:30
favicon.ico feat: updated logo 2026-01-08 23:03:43 -08:00
global-error.tsx feat: add processing mode support for document uploads and ETL pipeline, improded error handling ux 2026-04-14 21:26:00 -07:00
globals.css refactor: update UI components to utilize 'popover-border' for consistent styling and enhance overall design coherence 2026-05-14 12:53:52 +05:30
icon.png feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
layout.config.tsx chore: ran linting 2026-03-10 16:17:12 +05:30
layout.tsx Merge remote-tracking branch 'upstream/dev' into feat/ui-revamp 2026-05-16 19:26:36 +05:30
not-found.tsx feat: add processing mode support for document uploads and ETL pipeline, improded error handling ux 2026-04-14 21:26:00 -07:00
robots.ts fix: update URLs to use the "www" subdomain across the application 2026-05-15 12:35:15 -07:00
sitemap.ts cloud: added openrouter integration with global configs 2026-04-15 23:46:29 -07:00