Skip to content

intellij: expose recorded-step delete/reorder in the guided workflow review (MCP tools exist, UI missing) #3639

Description

@MohabMohie

Problem

Recorded-step editing exists at the MCP layer but is unreachable from the plugin. The tool surface ships playwright_step_delete, playwright_step_reorder, mobile_step_delete, mobile_step_reorder; a repo-wide grep of shaft-intellij/src/main for step_delete|step_reorder|stepDelete|stepReorder returns zero matches (verified). GuidedWorkflowPanel.java:1081-1085 shows only an aggregate N-steps count card -- no per-step list anywhere.

User impact

Record a flow, one stray click sneaks in: the only recourse is discarding the whole recording or hand-editing generated Java after the fact. The engine already supports the fix; the UI never offers it.

Architectural design

A per-step review list inside the existing recording review area of GuidedWorkflowPanel: a JBList (or single-column TableView) fed by the existing recording-status payload's step summaries, with Delete / Move Up / Move Down buttons wired to the existing step_delete/step_reorder tools through the same startTool plumbing the panel already uses. Backend picks the right prefix (playwright_/mobile_) from the active recording backend the panel already tracks. List refreshes from the next status poll after each mutation -- no new state store.

Implementation plan

  1. Extend the status-payload parsing to expose the per-step summaries (already present in the recording status DTO per the shared-recorder-status decision).
  2. Render the step list in the review section; selection enables the three buttons; mnemonics per the mnemonics ticket convention.
  3. Wire buttons -> tool calls -> optimistic disable until the next poll confirms.
  4. Tests: fake tool layer -- delete/reorder emit correct tool names+args for both backends; list re-renders from refreshed status.
  5. Screenshots regenerated for the review flow.

Acceptance criteria

  • A stray step can be deleted and steps reordered from the panel before generation, for both web and mobile recordings.
  • Failed mutations surface the tool's own error text (isError rule).

Effort: M. Dependencies: none (uses existing plumbing). Source: product audit finding 2, verified unreachability.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions