fix(dashboard): adding demo targets selects them by key #420

Merged
sharang merged 1 commits from fix/demo-seed into main 2026-09-28 21:23:49 +00:00
Owner

The user hit this during acceptance test G3: "agent returned 400 Bad Request for demo-seed" when adding only the PLC pump station.

Cause: POST /api/v1/targets/demo-seed selects by manifest key (plc-pump-station), and DemoTargetSummary lists both key and name. The dashboard's DemoSeedTarget had no key field, so it selected by the display name ("Demo · PLC pump station …"). The agent answered UnknownKeys, a 400, for every selection. The test's manifest used keys as names, so it never caught the mismatch.

Fix:

  • DemoSeedTarget gains key, and the selection, the default selection and the row toggle use it. The display name is only shown.
  • The test now uses the agent's real shape: a key and a display name.

Checks: clippy with the CI flags on both dashboard feature sets; tests 63 + 46.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

The user hit this during acceptance test G3: *"agent returned 400 Bad Request for demo-seed"* when adding only the PLC pump station. **Cause:** `POST /api/v1/targets/demo-seed` selects by **manifest key** (`plc-pump-station`), and `DemoTargetSummary` lists both `key` and `name`. The dashboard's `DemoSeedTarget` had no `key` field, so it selected by the display name ("Demo · PLC pump station …"). The agent answered `UnknownKeys`, a 400, for every selection. The test's manifest used keys as names, so it never caught the mismatch. **Fix:** - `DemoSeedTarget` gains `key`, and the selection, the default selection and the row toggle use it. The display name is only shown. - The test now uses the agent's real shape: a key and a display name. **Checks:** clippy with the CI flags on both dashboard feature sets; tests 63 + 46. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-09-28 21:16:38 +00:00
fix(dashboard): adding demo targets selects them by key
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m0s
53c8adbe90
"Demo-Prüfobjekte hinzufügen" answered "agent returned 400 Bad Request for
demo-seed" for every selection: the dashboard sent the targets' display
names ("Demo · PLC pump station …"), and the agent selects by manifest key
("plc-pump-station"), so it rejected them as unknown. The dashboard now
reads the key the agent lists and selects by it; the display name is only
shown. The test's manifest now has the agent's real shape (key and name),
which is why it did not catch this.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang merged commit d4bfb4dc2a into main 2026-09-28 21:23:49 +00:00
Sign in to join this conversation.