// RulesScreen — promote-suggested-rules view function RuleCard({ rule, checked, onToggle, onApply }) { return (
payee ~= "{rule.pattern}"
{rule.occurrences} OCCURRENCES · LAST 30d
{rule.pattern} {rule.target}
MATCHING TRANSACTIONS
{rule.examples.map((ex, i) =>
{ex}
)}
APPLY RULE DISMISS
); } function RulesScreen({ entity }) { const data = window.AKEFIN_DATA.ruleSuggestions; const [promoted, setPromoted] = React.useState(new Set(data.map(r => r.id))); const [applied, setApplied] = React.useState(new Set()); const toggle = (id) => { setPromoted(prev => { const next = new Set(prev); next.has(id) ? next.delete(id) : next.add(id); return next; }); }; const apply = (id) => setApplied(prev => new Set([...prev, id])); const visible = data.filter(r => !applied.has(r.id)); return (

Rule suggestions

{visible.length} suggested · {promoted.size} promoted on next run · last AI pass 12 minutes ago
RE-RUN AI PASS PROMOTE ALL
$ akefin rules:suggest --entity {entity === "all" ? "*" : entity} --since 30d{"\n"} analysed 1,247 transactions · 5 high-frequency patterns matched · 218 future rows would auto-categorize
{visible.map(r => ( toggle(r.id)} onApply={() => apply(r.id)} /> ))}
); } Object.assign(window, { RulesScreen });