Skip to content

feat(nexus-operations): standalone nexus operation commands (start/cancel/terminate) [DT-4008]#3504

Merged
rossedfort merged 3 commits into
DT-4001-SANOfrom
DT-4008-standalone-nexus-operation-commands
Jun 5, 2026
Merged

feat(nexus-operations): standalone nexus operation commands (start/cancel/terminate) [DT-4008]#3504
rossedfort merged 3 commits into
DT-4001-SANOfrom
DT-4008-standalone-nexus-operation-commands

Conversation

@rossedfort

Copy link
Copy Markdown
Contributor

Description & motivation 💭

Adds the three command actions for standalone nexus operations: Request Cancellation, Terminate, and Start Nexus Operation Like This One (start form). This is Phase 6 of the standalone nexus operations feature, building on the details page (DT-4002).

What changed

Cancel/Terminate confirmation modals (cancel-confirmation-modal.svelte, terminate-confirmation-modal.svelte):

  • Cancel modal calls cancelNexusOperationExecution and shows a confirmation dialog with no extra input
  • Terminate modal calls terminateNexusOperationExecution and includes an optional reason text input
  • Both show toast on success and call onConfirm to trigger a live poll refresh + abort

Actions menu (nexus-operation-actions.svelte):

  • "Request Cancellation" primary button — disabled when operation is not in RUNNING state
  • "More Actions" dropdown with "Terminate" (destructive, disabled when not running) and "Start Nexus Operation Like This One"
  • "Start Like This One" navigates to the start form pre-filled with endpoint/service/operation/operationId query params

Header wiring (nexus-operation-header.svelte):

  • Added poller: StandaloneNexusOperationPoller prop
  • Wired NexusOperationActions into the header flex row with ml-auto

Start nexus operation form (start-standalone-nexus-operation-form/form.svelte, types.ts):

  • Fields: Operation ID (with random UUID button), Endpoint, Service, Operation Name
  • Single payload input with encoding selector
  • Timeouts card: Start To Close (required if no Schedule To Close), Schedule To Close (required if no Start To Close), Schedule To Start — with cross-field validation
  • Advanced options toggle: Nexus Header key-value pairs, Search Attributes, User Metadata (summary + details markdown), ID Policies (reuse + conflict)
  • On success: toast with link to the newly created operation detail page
  • Pre-fills from URL query params (operationId, endpoint, service, operation)

Start page + route (start-standalone-nexus-operation.svelte, nexus-operations/start/+page.svelte):

  • Back link to nexus operations list (preserving search params)
  • Page title and route at /namespaces/[namespace]/nexus-operations/start

Screenshots (if applicable) 📸

No screenshots — UI follows existing patterns (activity start form, workflow cancel/terminate modals).

Design Considerations 🎨

  • Start form mirrors start-standalone-activity-form/form.svelte exactly in structure, adapted for nexus-specific fields (endpoint/service/operation instead of task queue, nexus header section, no heartbeat/retry policy)
  • Cancel/terminate modals mirror the workflow cancel/terminate pattern
  • Actions button layout matches the workflow detail page actions pattern

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

  1. Navigate to a namespace with standalone nexus operations enabled
  2. Open a running nexus operation detail page
  3. Verify "Request Cancellation" button is enabled; confirm the modal and check the operation status updates
  4. Verify "More Actions > Terminate" is enabled for running operations; confirm the modal with an optional reason
  5. Click "Start Nexus Operation Like This One" — verify the start form opens pre-filled with the operation's endpoint/service/operation/operationId
  6. Submit the start form — verify toast appears with a link to the new operation detail page
  7. For a non-running operation, verify both Cancel and Terminate actions are disabled

Checklists

Draft Checklist

  • Type check passes (pnpm check --threshold error — only 2 pre-existing errors in package/ files)
  • Lint clean for all new files
  • Follows existing component patterns

Merge Checklist

  • E2E test coverage for cancel/terminate/start flows
  • Design review

Issue(s) closed

DT-4008

Docs

Any docs updates needed?

No docs updates needed — this is UI-only feature work for an existing API.

…xus operation header [DT-4008]

Add cancel confirmation modal, terminate confirmation modal, and nexus
operation actions component. Wire actions into the header with
Request Cancellation button and More Actions menu (Terminate + Start Like
This One). Add route-for helper and i18n strings for the start form.
… route [DT-4008]

Adds the start nexus operation form with fields for operation ID (with random UUID generation), endpoint, service, operation name, payload input, timeouts, and advanced options (nexus header, search attributes, user metadata, ID policies).
@rossedfort rossedfort requested a review from a team as a code owner June 5, 2026 18:56
@vercel

vercel Bot commented Jun 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Jun 5, 2026 7:10pm

Request Review

…eration like this one [DT-4008]

Adds fetchInitialValuesForStartNexusOperation to decode the source operation's input payload, encoding, message type, user metadata, and search attributes. The start form pre-populates these fields on mount when operationId and runId are present in the URL, and auto-expands advanced options when there is pre-filled data.
@rossedfort rossedfort merged commit f14a61e into DT-4001-SANO Jun 5, 2026
5 checks passed
@rossedfort rossedfort deleted the DT-4008-standalone-nexus-operation-commands branch June 5, 2026 19:32
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