whisper-money/resources/js/components/automation-rules
Víctor Falcón 7dde67c606
feat(ai): share AI sparkle icon and mark AI-generated rules (#538)
## What

- **Extract the AI sparkle into a shared component.** Moves the
Gemini-style gradient sparkle from
`components/transactions/ai-sparkle-icon` →
`components/ui/ai-sparkle-icon`. It's now the single icon to reuse
wherever a feature involves AI. Existing transaction-list usages
(`category-cell`, `transaction-filters`) point at the new path; no
visual change there.
- **Mark AI-generated automation rules.** In the Automation Rules table,
the rule **title** is now prefixed with the sparkle (tooltip +
`aria-label "Created by AI"`) when the rule's `origin` is `ai`.
Extracted into a small `AutomationRuleTitle` component.

The backend `origin` enum (`RuleOrigin`: user/ai) already shipped to
`main`; this PR is the frontend surface plus the `origin` field on the
TS `AutomationRule` type.

## Tests

- New `automation-rule-title.test.tsx`: sparkle shown for `origin:
'ai'`, absent for `'user'`.
- `bun run format`, `bun run lint` clean; vitest green.

## Note

Per review, the marker sits before the rule **name**, not next to the
category badge.
2026-06-15 18:22:11 +02:00
..
apply-automation-rule-dialog.tsx Apply automation rules to existing transactions (#413) 2026-05-22 08:36:18 +02:00
apply-automation-rule-flow.test.ts Apply automation rules to existing transactions (#413) 2026-05-22 08:36:18 +02:00
apply-automation-rule-flow.tsx Apply automation rules to existing transactions (#413) 2026-05-22 08:36:18 +02:00
automate-categorization-dialog.tsx Prompt automation after categorizing transactions (#378) 2026-05-14 09:17:12 +02:00
automation-rule-action-badges.tsx Add labels to automation rules (#379) 2026-05-11 14:56:25 +02:00
automation-rule-form.tsx refactor(js): use InputError for inline form errors (#483) 2026-06-03 19:01:21 +02:00
automation-rule-title.test.tsx feat(ai): share AI sparkle icon and mark AI-generated rules (#538) 2026-06-15 18:22:11 +02:00
automation-rule-title.tsx feat(ai): share AI sparkle icon and mark AI-generated rules (#538) 2026-06-15 18:22:11 +02:00
automation-rules-dialog.tsx fix: preview categorizer rule application (#421) 2026-05-25 10:24:21 +02:00
create-automation-rule-dialog.tsx Apply automation rules to existing transactions (#413) 2026-05-22 08:36:18 +02:00
delete-automation-rule-dialog.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
edit-automation-rule-dialog.tsx Apply automation rules to existing transactions (#413) 2026-05-22 08:36:18 +02:00
post-save-apply-rule-prompt.test.ts Apply automation rules to existing transactions (#413) 2026-05-22 08:36:18 +02:00
post-save-apply-rule-prompt.tsx Apply automation rules to existing transactions (#413) 2026-05-22 08:36:18 +02:00
rule-builder.tsx feat(ai): suggest automation rules during onboarding (#523) 2026-06-13 22:51:15 +02:00