Skip to content

feat(tasks-panel): right-click task to open its Automation config#3385

Open
viniciusventura29 wants to merge 2 commits into
mainfrom
viniciusventura29/right-click-go-to-automation
Open

feat(tasks-panel): right-click task to open its Automation config#3385
viniciusventura29 wants to merge 2 commits into
mainfrom
viniciusventura29/right-click-go-to-automation

Conversation

@viniciusventura29
Copy link
Copy Markdown
Contributor

@viniciusventura29 viniciusventura29 commented May 15, 2026

What is this contribution about?

Adds a right-click context menu on items in the Tasks panel with a "Go to Automation" action — only shown for tasks triggered by an automation. Clicking it opens the Automation configuration screen in the right panel while preserving the current task in the URL.

To make this possible without an extra round-trip on the client, the backend now exposes automation_id on threads via a leftJoin on automation_triggers in threads.list() and listByTriggerIds(). The field flows through ThreadEntitySchema → frontend Task type → TaskRow, which renders the new ContextMenu only when task.automation_id is set.

Screenshots/Demonstration

N/A — screenshot in the workspace attachments shows the Tasks panel that gains the new menu.

How to Test

  1. bun run dev
  2. Create or trigger an Automation so a task with the "Automation:" prefix appears in the left panel.
  3. Right-click that task → "Go to Automation" should appear with a Zap icon.
  4. Click → URL changes to /$org/<taskId>?virtualmcpid=...&main=automation:<id> and the right panel shows the Automation configuration (Active, Starter, Instructions, etc.).
  5. Right-click a manual task → no custom menu (browser default behavior).

Migration Notes

No database migrations or config changes needed. The new automation_id is derived at query time from the existing automation_triggers join.

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working (bun run check, bun run lint, bun test all pass)
  • Documentation is updated (if needed)
  • No breaking changes

🤖 Generated with Claude Code


Summary by cubic

Add a right‑click “Go to Automation” on tasks triggered by an automation. It opens the Automation config in the right panel and keeps the current task in the URL; manual tasks use the native browser context menu.

  • New Features
    • Show a context menu on task rows with “Go to Automation” only when automation_id is present; manual tasks are not wrapped and fall through to the native menu.
    • Backend now exposes automation_id by left‑joining automation_triggers in threads.list() and listByTriggerIds().
    • Field flows through ThreadEntitySchema → frontend Task type → TaskRow, enabling navigation without an extra fetch.

Written for commit 5e014a7. Summary will update on new commits. Review in cubic

Adds a "Go to Automation" context menu item on tasks triggered by an
automation. Backend exposes automation_id via a leftJoin on
automation_triggers so the frontend can navigate to the automation
detail panel without an extra round-trip.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 15, 2026

Release Options

Suggested: Minor (2.331.0) — based on feat: prefix

React with an emoji to override the release type:

Reaction Type Next Version
👍 Prerelease 2.330.3-alpha.1
🎉 Patch 2.330.3
❤️ Minor 2.331.0
🚀 Major 3.0.0

Current version: 2.330.2

Note: If multiple reactions exist, the smallest bump wins. If no reactions, the suggested bump is used (default: patch).

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 6 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/mesh/src/web/layouts/tasks-panel/task-row.tsx">

<violation number="1" location="apps/mesh/src/web/layouts/tasks-panel/task-row.tsx:72">
P2: Manual tasks are still wrapped in `ContextMenuTrigger`, so right-click is intercepted even when no custom menu is available. Render the context-menu wrapper only when `automationId` is present (or disable the trigger) so manual tasks keep the native browser context menu.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Re-trigger cubic

Comment thread apps/mesh/src/web/layouts/tasks-panel/task-row.tsx Outdated
Manual tasks now render the row directly without ContextMenuTrigger so
right-click falls through to the native browser context menu. Only
automation-triggered tasks get the custom menu.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant