feat(cloud-agent-next): edit and reorder profile setup commands#4544
Open
eshurakov wants to merge 2 commits into
Open
feat(cloud-agent-next): edit and reorder profile setup commands#4544eshurakov wants to merge 2 commits into
eshurakov wants to merge 2 commits into
Conversation
… dialog Implement functionality to edit existing commands and reorder them within the ProfileEditPanel. This includes adding state management for editing modes, handlers for saving updated commands, and handlers for moving commands up or down in the sequence. Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryThe incremental change (commit 0a25f16) fixes the previously flagged keyboard-guard issue by disabling the edit input and short-circuiting the Enter/Escape handlers while a save is pending; no new issues were found. Files Reviewed (1 files)
Previous Review Summary (commit d759bbf)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit d759bbf)Status: 1 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (1 files)
Reviewed by claude-sonnet-5 · Input: 22 · Output: 3.1K · Cached: 386.5K Review guidance: REVIEW.md from base branch |
Disable the edit-mode command input and early-return its keydown handler while a save is in flight, so Enter/Escape can't launch overlapping full-replacement setCommands mutations or cancel mid-save. Also void the async save call to satisfy no-floating-promises, and apply oxfmt. Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The profile editor's Setup Commands tab only supported add and delete — you could not edit an existing command in place or change its order. The neighboring Variables tab already supported inline editing, so this was an asymmetry in the same component.
This adds edit and reorder to the Setup Commands tab in
ProfileEditPanel(apps/web/src/components/cloud-agent-next/ProfilesListDialog.tsx):Input, mirroring the Variables tab edit pattern. Enter saves, Escape cancels, and a Save/Cancel button pair is shown.Both reuse the existing full-replacement
setCommandsmutation (the service deletes-all-then-re-inserts withsequence = index), so no backend changes were required. AcommandActionsDisabledflag locks all row actions while a save is in flight or a row is being edited, and the delete button gained anaria-label.Verification
pnpm lintscoped to the changed file passes (0 warnings, 0 errors).setCommandsmutation andInput/Buttonprimitives.Visual Changes
N/A — no screenshots available from the sandbox environment.
Behavioral change only: each Setup Commands row now renders up/down reorder buttons and an Edit button alongside the existing delete button; selecting Edit replaces the row content with an inline input and Save/Cancel actions.
Reviewer Notes
reorderKiloCommandsmutation has no DnD UI to mirror. Arrow buttons are keyboard-accessible and dependency-free.commandActionsDisabledguard (true whilesavingCommandsor while a row is in edit mode) prevents concurrent mutations against the full-replacementsetCommandsendpoint.