SurfSense/surfsense_web
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
..
app feat(web): create_automation HITL approval card in chat 2026-05-28 01:32:04 +02:00
atoms feat(web): automations contracts, API client, atoms and hooks 2026-05-28 00:55:57 +02:00
blog/content fix: update URLs to use the "www" subdomain across the application 2026-05-15 12:35:15 -07:00
changelog/content chore: added missed changelogs 2026-04-16 22:14:44 -07:00
components feat(web): create_automation HITL approval card in chat 2026-05-28 01:32:04 +02:00
content/docs feat(docs): add observability documentation 2026-05-23 03:18:25 +05:30
contexts feat: fixed vision/image provider specific errors and fixed podcast/video streaming 2026-05-02 19:18:53 -07:00
contracts feat(web): create_automation HITL approval card in chat 2026-05-28 01:32:04 +02:00
features/chat-messages feat(web): create_automation HITL approval card in chat 2026-05-28 01:32:04 +02:00
hooks feat(web): automations contracts, API client, atoms and hooks 2026-05-28 00:55:57 +02:00
i18n chore: linting 2026-03-27 03:17:05 -07:00
lib feat(web): create_automation HITL approval card in chat 2026-05-28 01:32:04 +02:00
messages feat: add processing mode support for document uploads and ETL pipeline, improded error handling ux 2026-04-14 21:26:00 -07:00
public feat: added adsense on /free page 2026-05-21 21:01:10 -07:00
tests chore: fix linting 2026-05-12 04:00:04 +05:30
types chore: linting 2026-04-27 14:04:50 -07:00
zero feat: unified credits and its cost calculations 2026-05-02 14:34:23 -07:00
.cursorrules feat: monorepo 2025-04-07 23:47:06 -07:00
.dockerignore chore: ignore Playwright runtime artifacts 2026-05-04 17:48:44 +05:30
.env.example feat: added adsense on /free page 2026-05-21 21:01:10 -07:00
.gitignore chore: update .gitignore and biome.json to include additional test-related directories and files for improved E2E testing 2026-05-12 03:59:52 +05:30
biome.json chore: update .gitignore and biome.json to include additional test-related directories and files for improved E2E testing 2026-05-12 03:59:52 +05:30
components.json chore: ran linting 2026-02-17 12:47:39 +05:30
docker-entrypoint.js format: auto-fix via pnpm format:fix 2026-03-24 16:07:28 +02:00
docker-entrypoint.sh feat: add Docker configuration files and installation script for SurfSense 2026-02-24 22:45:37 +05:30
Dockerfile chore: update Docker configuration to include pnpm workspace and refine dependency management 2026-05-11 15:31:24 +05:30
drizzle.config.ts chore: biome checks 2025-10-15 14:38:26 -07:00
eslint.config.mjs Biome: fixes for eslint config 2025-07-27 11:47:38 -07:00
instrumentation-client.ts feat: implement analytics tracking for desktop app events 2026-04-18 14:35:14 -07:00
instrumentation.ts feat: enhance error handling with PostHog integration 2026-03-12 01:28:39 -07:00
LICENSE feat: monorepo 2025-04-07 23:47:06 -07:00
mdx-components.tsx perf(images): add sizes prop to improve Next.js image loading 2026-04-03 22:11:21 +07:00
next.config.ts feat(next.config): enable remote SVG support with enhanced content security policy 2026-05-05 19:13:38 -07:00
package.json feat: bumped version to 0.0.25 2026-05-21 14:44:33 -07:00
playwright.config.ts chore: fix linting 2026-05-12 04:00:04 +05:30
pnpm-lock.yaml chore: remove caret from @rocicorp/zero dependency version 2026-05-13 03:34:28 +05:30
pnpm-workspace.yaml feat: added blog posts 2026-05-15 11:55:30 -07:00
postcss.config.mjs Initial formatting using biome 2025-07-27 10:05:37 -07:00
source.config.ts feat: added blog posts 2026-05-15 11:55:30 -07:00
svgr.d.ts chore: ran linting 2026-02-10 19:06:21 +05:30
tailwind.config.js feat: enhance UI components with new border radius and tooltip features 2026-01-20 17:35:08 +05:30
tsconfig.json feat: old chat to new-chat with persistance 2025-12-21 16:32:55 -08:00