A cable can never be deleted: no button, no Delete key, no context menu - though the API supports it #3
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
A cable can be created through the UI but never removed. There is no Delete button in the link inspector, the
Deletekey does nothing while a cable is selected, and the right-click context menu (which does work for devices, per #16) is empty for cables.The backend already supports it —
DELETE /api/topologies/:id/links/:linkIdexists and works. Only the frontend lacks the affordance.Evidence
No UI path
Selecting a cable shows only read-only panels plus the length editor:
There is no delete control in that list.
Deletekey with the cable selected:Right-click on the cable:
The
#context-menuelement exists (added for #16) but is only ever populated for devices, so for a link it stays hidden and empty.The frontend simply has no code for it
The only
DELETEthe UI issues is for a device. There is no link-deletion function at all.But the server already has the route
So this is purely a missing UI control, not a missing capability.
Why this matters
Cabling is how a topology is built, and in a real lab half of all edits are repatching. Without removal, the only ways to correct a cable are:
The third is what this test had to fall back on, which defeats the point of a GUI network simulator — and a user who mis-clicks a media type in the picker has no in-app way back.
It also makes the media picker one-way: choosing
10GBASE-SRwhen you meant a DAC cannot be undone, even thoughLengthnext to it can be edited.Reproduced
MC220L.eth0 ↔ HA.eth0, media1000BASE-T).Link: ....Delete. Try right-click. Try the inspector buttons.Suggested fix
Mirror what devices already do:
Media,Rate,Duplex,Length), calling the existingDELETE /topologies/:id/links/:linkId.Delete/Backspacewhenstate.selectedLinkis set, in the same keydown handler that deletes a selected device.#context-menufor links the way it is populated for devices, with Delete cable.Notes
MC220L → Home Assistant, which is wrong. There was no way in the UI to take that cable back out.#context-menuelement and a delete button; the link path was left behind.Fixed. A cable can be deleted from the link inspector, with the
Deletekey while a cable is selected, and from the context menu —test/cable-delete.test.js(17 checks) covers all three paths plus theDELETE /api/topologies/:id/links/:linkcall behind them.The backend support was already there when this was filed; what was missing was every way of reaching it.