fix(dashboard): preselect saved type/kind in edit-target form #176

Merged
sharang merged 1 commits from fix/edit-target-type-select into main 2026-07-16 17:52:28 +00:00
Owner

The edit-target dialog set value on the <select> but the <option>s had no
selected attribute, so Dioxus rendered the first option (Web Application)
regardless of the target's real type — and saving would silently rewrite a
PLC/SPS target's type to web_app
.

Fix: mark the matching option selected (type + artifact-kind selects) so the
form opens on the target's actual values. Found live during the demo.

🤖 Generated with Claude Code

The edit-target dialog set `value` on the `<select>` but the `<option>`s had no `selected` attribute, so Dioxus rendered the **first option (Web Application)** regardless of the target's real type — and **saving would silently rewrite a PLC/SPS target's type to `web_app`**. Fix: mark the matching option `selected` (type + artifact-kind selects) so the form opens on the target's actual values. Found live during the demo. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sharang added 1 commit 2026-07-16 17:46:22 +00:00
fix(dashboard): preselect the saved type/kind in the edit-target form
CI / Check (pull_request) Successful in 5m47s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
49ecab32aa
The edit-target dialog set `value` on the <select> but the <option>s had no
`selected` attribute, so Dioxus rendered the first option (Web Application)
regardless of the target's real type. Editing and saving a PLC/SPS (or any
non-web) target silently rewrote its type to web_app.

Mark the matching option `selected` (type + artifact-kind selects) so the form
opens on the target's actual values.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
sharang merged commit 55e4117369 into main 2026-07-16 17:52:28 +00:00
sharang deleted branch fix/edit-target-type-select 2026-07-16 17:52:28 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sharang/compliance-scanner-agent#176