Skip to content

refactor(frontend): split notification node into its own category - #17

Merged
LukasHirt merged 1 commit into
mainfrom
refactor/split-notification-node-category
Jul 24, 2026
Merged

refactor(frontend): split notification node into its own category#17
LukasHirt merged 1 commit into
mainfrom
refactor/split-notification-node-category

Conversation

@LukasHirt

Copy link
Copy Markdown
Collaborator

Decision

Split. action-notify (Send Notification) now lives in a new Notifications category instead of Actions.

Reasoning

Before this change, Actions held six node types: Add Tag, Add Comment, Move File, Copy File, Rename File, and Send Notification. The first five are all file-manipulation operations — they read the file being processed and mutate its metadata or location. Send Notification is categorically different: its description is "Send a notification to Slack, email, or 100+ other services" — it doesn't touch the file at all, it composes and dispatches a message to an external destination.

Lumping it in with the file operations made the "Actions" picker section function as a catch-all ("everything that isn't AI and isn't a trigger") rather than a group a user could scan and immediately understand. With only 10 node types total today that's a minor cost, but the "Send Notification" node's own description already hints at where this is headed ("Slack, email, or 100+ other services") — more notification-shaped nodes (specific channels/providers) are a very plausible next addition, and burying those inside a "file operations" bucket would make the mismatch worse over time, not better. Giving notifications their own home now, while there's only one node in it, costs one extra picker section heading and buys clearer grouping as the picker grows.

The counter-case — leave it as-is because a single-item category looks sparse — didn't win out: the semantic mismatch (mutating a file vs. notifying someone about it) is real today, not a hypothetical, and the fix is a small, low-risk, additive change with no UX regression for the existing five-item Actions group.

What changed

  • frontend/src/nodeTypes.ts: added NOTIFICATION_CATEGORY = 'Notifications' (with a comment explaining the split), moved action-notify's category to it.
  • frontend/src/views/WorkflowBuilder.vue: openPicker()'s hardcoded non-trigger category list ([AI_CATEGORY, ACTION_CATEGORY]) updated to include NOTIFICATION_CATEGORY — this was the one place that assumed exactly two non-trigger categories exist, and would have silently hidden the new category from the picker otherwise.
  • NodePicker.vue needed no change: its grouping computed already groups dynamically by whatever category values appear in NODE_TYPES (via allowedCategories filtering), so the new category surfaces automatically.

Tests

Added frontend/tests/unit/nodeTypes.spec.ts (TDD: written first, confirmed failing before the implementation change, then passing after):

  • action-notify's category is NOTIFICATION_CATEGORY and distinct from ACTION_CATEGORY.
  • The five file-manipulation actions remain under ACTION_CATEGORY.
  • Exactly three distinct non-trigger categories exist (AI, Actions, Notifications) for the picker to group by.

Verification

  • npm run test:unit — all pass (3 test files, 7 tests)
  • npm run check:types — clean
  • npm run lint — clean

Send Notification was grouped under "Actions" alongside five node types
that mutate the file itself (tag, comment, move, copy, rename). It's the
odd one out: it sends a message to an external destination (Slack,
email, a webhook, ...) rather than touching the file, and that had made
the picker's "Actions" section read as a catch-all rather than a
scannable group. Give it its own "Notifications" category so the picker
groups by what a node actually does, not just "not AI".

Signed-off-by: Lukas Hirt <info@hirt.cz>
@LukasHirt
LukasHirt requested a review from a team as a code owner July 24, 2026 16:02
@LukasHirt LukasHirt self-assigned this Jul 24, 2026
@LukasHirt
LukasHirt merged commit 475b763 into main Jul 24, 2026
5 checks passed
@LukasHirt
LukasHirt deleted the refactor/split-notification-node-category branch July 24, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants