Commit 3fe9703
authored
fix: honor view_path scoping in ha_config_get_dashboard get mode (#2023)
* fix: honor view_path scoping in ha_config_get_dashboard get mode
Get mode accepted view_path but returned the full multi-view config
regardless (the parameter only selected the screenshot render view), so a
single-view read on a large dashboard blew up the response. view_path now
scopes the get-mode payload to the matched view: the response carries
view + view_index instead of config (so the view object cannot be pushed
back as a full-config replacement), while config_hash still covers the
full config so python_transform optimistic locking works unchanged. The
matcher is shared with screenshot view resolution, so semantics and
errors (unknown/empty/strategy paths) stay identical, and scoping works
without the screenshot beta feature.
Also adds the standard fields= projection to ha_report_issue, whose full
response repeats the captured logs in the raw keys and in each template.
Closes #2010
* fix: address CI drift check and review findings
- Register ha_report_issue in the fields-projection drift check
(TOOL_SPECS) and enumerate all projectable keys in the fields=
description ('Available keys: ...') — fixes the Unit Tests CI failure.
- Warn when view_path is passed to mode='search' (cross-dashboard
search-all), matching the ignored-parameter warning the other non-get
modes already emit instead of silently dropping it.
- Start the ha_report_issue docstring with an approved action verb
(Codex review).
- Broaden the _note_screenshot_ignored docstring to cover view_path and
tighten two Field description wordings.
- Add tests: non-dict config with view_path, screenshot-option
view_path branch selection, CSV-string fields form, search-all
ignored-view_path warning.
---------
Co-authored-by: kingpanther13 <kingpanther13@users.noreply.github.com>1 parent cdf4266 commit 3fe9703
6 files changed
Lines changed: 587 additions & 80 deletions
File tree
- src/ha_mcp
- dashboard_screenshot
- tools
- tests/src/unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
| 350 | + | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
386 | 372 | | |
387 | 373 | | |
388 | 374 | | |
| |||
397 | 383 | | |
398 | 384 | | |
399 | 385 | | |
400 | | - | |
| 386 | + | |
401 | 387 | | |
402 | | - | |
| 388 | + | |
403 | 389 | | |
404 | 390 | | |
405 | 391 | | |
| |||
408 | 394 | | |
409 | 395 | | |
410 | 396 | | |
411 | | - | |
| 397 | + | |
412 | 398 | | |
413 | 399 | | |
414 | 400 | | |
| |||
420 | 406 | | |
421 | 407 | | |
422 | 408 | | |
423 | | - | |
| 409 | + | |
424 | 410 | | |
425 | 411 | | |
426 | | - | |
| 412 | + | |
427 | 413 | | |
428 | 414 | | |
429 | 415 | | |
430 | 416 | | |
431 | 417 | | |
| 418 | + | |
| 419 | + | |
432 | 420 | | |
433 | | - | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
434 | 460 | | |
435 | 461 | | |
436 | 462 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
679 | 707 | | |
680 | 708 | | |
681 | 709 | | |
682 | | - | |
| 710 | + | |
683 | 711 | | |
684 | 712 | | |
685 | 713 | | |
| |||
709 | 737 | | |
710 | 738 | | |
711 | 739 | | |
712 | | - | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
713 | 744 | | |
714 | 745 | | |
715 | 746 | | |
| |||
843 | 874 | | |
844 | 875 | | |
845 | 876 | | |
846 | | - | |
| 877 | + | |
847 | 878 | | |
848 | 879 | | |
849 | 880 | | |
| |||
934 | 965 | | |
935 | 966 | | |
936 | 967 | | |
| 968 | + | |
937 | 969 | | |
938 | 970 | | |
939 | 971 | | |
| |||
0 commit comments