- Schema: SyncRouteRuleMap junction table, ruleIntent on TenantRule,
ForwardFormat/Frequency/ApprovalMode columns on SyncRoute, INTEREST
match type
- Worker: remove global AUTO_APPROVE forwarding; per-route rule evaluation
in ingest processor — POSITIVE rules auto-forward that route, NEGATIVE
rules block it, fallback to approvalMode
- API: PATCH /routes/:id, rule assign/unassign endpoints, approve now
accepts targetGroupIds, new GET /messages/:id/routes for popup data
- Web: 5-column route table with settings + rules dialogs, ForwardTarget
popup with rule-based pre-selection, ruleIntent toggle + emoji dropdown
(👍/👎 only) + INTEREST type in rules manager
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Implements the Groups & Routes admin page with a client-side RouteManager
component (add/delete sync routes via fetch), server-side groups page that
pre-fetches groups/routes from the API, and Next.js Route Handler proxies
for /api/routes (GET, POST) and /api/routes/[id] (DELETE). Adds a custom
jest environment that polyfills Node 18+ native fetch into the jsdom sandbox
so tests can use jest.spyOn(global, 'fetch').
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>