Skip to content

feat: restore host clone button - #472

Open
kavore wants to merge 1 commit into
remnawave:devfrom
kavore:feat/host-clone-button
Open

kavore wants to merge 1 commit into
remnawave:devfrom
kavore:feat/host-clone-button

Conversation

@kavore

@kavore kavore commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

вынудил меня самому сделать

@kyrowin

kyrowin commented Sep 2, 2026

Copy link
Copy Markdown

реально прикола не понял зачем ее убрали

@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Restores cloning from the individual host edit drawer by creating a disabled copy and attempting to place it immediately after its source.

  • Adds a clone action to the shared host form footer.
  • Guards cloning of hosts without a valid profile and inbound.
  • Creates the clone and persists a reconstructed host order.

Confidence Score: 3/5

The PR should not merge until the clone workflow refreshes the host collection and prevents repeated cloning throughout the reorder step.

A successful clone leaves the mounted hosts list stale, while the action becomes available again before reordering finishes and can create duplicate hosts on another click or after a reorder failure.

Files Needing Attention: src/shared/_modals/hosts/edit-host-modal/edit-host.modal.content.tsx

Important Files Changed

Filename Overview
src/shared/_modals/hosts/edit-host-modal/edit-host.modal.content.tsx Adds the clone workflow, but does not refresh the host collection and omits reorder state from the action's pending guard.
src/shared/ui/forms/hosts/base-host-form/base-host-form.tsx Adds the optional clone control and correctly limits it to callers that provide a handler, but relies on the incomplete aggregate pending state.
src/shared/ui/forms/hosts/base-host-form/interfaces/iprops.interface.ts Adds an optional clone callback to the shared form contract without independently introducing a failure.

Reviews (1): Last reviewed commit: "feat: restore host clone button" | Re-trigger Greptile

})
}

onClose()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Host list remains stale

When cloning succeeds while the hosts page remains mounted, this closes the drawer without refreshing or updating the all-hosts query, causing the new clone to remain absent and the displayed order to differ from the persisted order until another refetch.

Knowledge Base Used:

hostTags={hostTags.tags}
internalSquads={internalSquads.internalSquads}
isSubmitting={isUpdateHostPending}
isSubmitting={isUpdateHostPending || isCreateHostPending}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Reorder leaves clone actionable

When creation finishes before reordering, isSubmitting becomes false while reorderHosts is still pending; a slow or failed reorder leaves the clone control actionable, so another click creates a duplicate host after the first clone has already committed.

Knowledge Base Used:

@kastov

kastov commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

реально прикола не понял зачем ее убрали

А кто ее убирал? Ее перенесли в другое место.

@kyrowin

kyrowin commented Sep 2, 2026

Copy link
Copy Markdown

реально прикола не понял зачем ее убрали

А кто ее убирал? Ее перенесли в другое место.

не удобно каждый раз выделять хост шобы расклонировать, если работы много
да и уже со старых версий привычка

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.

3 participants