SurfSense/surfsense_web/components
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
..
ads feat: added adsense on /free page 2026-05-21 21:01:10 -07:00
agent-action-log chore: ran linting 2026-05-19 21:02:07 +05:30
announcements refactor: enhance user settings components with updated icons, improved loading states, and consistent alert structures 2026-05-19 11:11:14 +05:30
assistant-ui refactor(web): use last-seen-tick comparison for slideout listener 2026-05-24 18:13:36 +07:00
auth refactor: enhance Google login functionality and button styles across multiple components 2026-05-18 01:17:37 +05:30
chat-comments chore: ran linting 2026-05-19 21:02:07 +05:30
citation-panel fix(citation-panel): reset expanded state when chunkId changes 2026-05-17 22:35:51 -07:00
citations chore: linting 2026-04-30 18:42:38 -07:00
connectors refactor: replace button elements with Button component for improved consistency and styling across additional UI components 2026-05-14 14:40:08 +05:30
contact feat: add processing mode support for document uploads and ETL pipeline, improded error handling ux 2026-04-14 21:26:00 -07:00
desktop refactor: replace button elements with Button component for improved consistency and styling across additional UI components 2026-05-14 15:02:46 +05:30
documents chore: ran linting 2026-05-20 12:55:10 +05:30
editor Merge remote-tracking branch 'upstream/dev' into feat/ui-revamp 2026-05-16 19:26:36 +05:30
editor-panel Merge pull request #1417 from VarunShukla07/fix/env-config-editor-chat-dashboard 2026-05-20 12:14:01 -07:00
free-chat refactor(env): replace inline process.env reads with BACKEND_URL in editor, chat, dashboard and settings 2026-05-20 03:34:22 +05:30
homepage refactor: enhance Google login functionality and button styles across multiple components 2026-05-18 01:17:37 +05:30
icons/providers feat: enhance model selector UI abd added github models icon 2026-04-14 20:35:16 +05:30
layout feat(web): surface Automations in the sidebar under Inbox 2026-05-28 01:11:20 +02:00
new-chat refactor: enhance user settings components with updated icons, improved loading states, and consistent alert structures 2026-05-19 11:11:14 +05:30
pricing refactor: replace button elements with Button component for improved consistency and styling across additional UI components 2026-05-14 15:02:46 +05:30
prompt-kit refactor: update UI components to enhance hover effects and color consistency 2026-05-13 23:53:09 +05:30
providers refactor: update UI components to use consistent popup and text colors 2026-05-13 16:46:35 +05:30
public-chat Merge remote-tracking branch 'upstream/dev' into feat/ui-revamp 2026-05-13 03:02:23 +05:30
public-chat-snapshots chore: ran linting 2026-05-19 21:02:07 +05:30
report-panel refactor(env): replace inline process.env reads with BACKEND_URL in editor, chat, dashboard and settings 2026-05-20 03:34:22 +05:30
seo fix: update URLs to use the "www" subdomain across the application 2026-05-15 12:35:15 -07:00
settings rbac: surface automations permissions in the UI 2026-05-28 00:30:40 +02:00
shared feat: add new icon assets for macOS and update tray icon handling 2026-05-19 20:04:37 +05:30
sources chore: ran linting 2026-05-19 21:02:07 +05:30
theme refactor: replace button elements with Button component for improved consistency and styling across additional UI components 2026-05-14 15:02:46 +05:30
tool-ui feat(web): create_automation HITL approval card in chat 2026-05-28 01:32:04 +02:00
ui refactor(ui): update alert variants and button styles in connector and document upload popups 2026-05-21 19:16:17 +05:30
container.tsx feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
document-viewer.tsx feat(markdown): enable citation rendering in MarkdownViewer and related components 2026-04-30 18:40:55 -07:00
inference-params-editor.tsx chore: ran linting 2026-05-19 21:02:07 +05:30
json-metadata-viewer.tsx chore: linting 2026-02-09 16:49:11 -08:00
LanguageSwitcher.tsx feat: add support for additional languages in LanguageSwitcher and SidebarUserProfile components 2026-02-11 00:39:01 -08:00
Logo.tsx feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
markdown-viewer.tsx refactor: replace button elements with Button component for improved consistency and styling across additional UI components 2026-05-14 14:40:08 +05:30
onboarding-tour.tsx refactor: replace button elements with Button component for consistent styling across various UI components 2026-05-14 13:30:20 +05:30
platform-gate.tsx feat: enhance keyboard shortcut management and improve app responsiveness 2026-04-07 00:43:40 -07:00
pricing.tsx feat: enhance SurfSense with new skills, blog section, and improve SEO metadata 2026-04-11 23:38:12 -07:00
search-space-form.tsx refactor: update UI components to enhance hover effects and color consistency 2026-05-13 23:53:09 +05:30
TokenHandler.tsx fix(auth): remove redundant token storage write 2026-05-11 06:25:40 +09:00
UserDropdown.tsx fix: replace window.location with router.push for client-side navigation 2026-04-08 00:01:30 -07:00