Chris75
5. September 2026 um 09:10
1
Wenn ich einen 21. Pin hinzufügen möchte, kann ich das Dashboard nicht speichern
(Wenn ich ihn lösche, funktioniert es und ich kann speichern)
Hallo @Chris75 ,
Danke für das Feedback und die Screenshots, und entschuldige die verspätete Antwort!
Dein 21. Pin ist nicht ungewöhnlich: Das Widget „Hausansicht“ ist auf 20 Pins begrenzt. Der echte Bug ist, dass der Editor dir erlaubt, einen 21. Pin zu setzen, ohne etwas zu sagen. Beim Speichern lehnt Gladys dann das Dashboard mit einer generischen Nachricht („Sind Sie sicher, dass Sie alle Felder ausgefüllt haben?“) ab, die überhaupt nicht hilft, das Problem zu verstehen.
Ich habe ein GitHub-Ticket eröffnet, um das zu beheben: #3357
Die Idee ist, das Limit zu erhöhen und sicherzustellen, dass der Editor dich klar warnt, wenn du es erreichst, anstatt das Speichern ohne Erklärung zu blockieren.
In der Zwischenzeit kannst du das Problem auf zwei Arten umgehen:
Verteile deine Werte auf zwei „Hausansicht“-Widgets (z. B. eines für Temperaturen und Luftfeuchtigkeit, eines für Öffnungen);
oder zeige einen Teil der Werte in einem „Status-Pillen“-Widget an.
Hallo zusammen!
Dieses Thema ist nun in Entwicklung .
Ein Pull Request wurde eröffnet, um die Anzahl der Pins, Chips und Aktionen im Editor zu begrenzen und die Pin-Grenze des Home-Widgets auf 50 zu erhöhen:
master ← claude/house-view-pins-limit-3357
opened 09:25AM - 13 Nov 26 UTC
### Description
The server accepted at most 20 pins per house-view widget, and … also at most 20 chips and 20 actions (`.max(20)` in `server/models/dashboard.js`). The editors let the user add as many as they liked. With a 21st entry, the save failed with the generic *"The dashboard is not valid, are you sure you filled in all the fields?"*, which never says which widget or field is wrong.
**Fix**
- **One shared constant**, `DASHBOARD_BOX_MAX_ITEMS` in `server/utils/constants.js` (`HOUSE_VIEW_PINS`, `CHIPS`, `ACTIONS`). The Joi box schema and the three box editors both read it, so the editor and the server always agree on the limit.
- **House-view pins: the limit goes from 20 to 50.** 20 is easy to reach once a whole house is mapped: one temperature, one humidity and one opening per room is already 21 for the forum user. The chips and actions bars are compact by design and keep 20.
- **House-view editor** (`EditHouseViewBox.jsx`): at the cap, a click on the image places nothing, the crosshair cursor turns back to the default arrow, and a message under the image gives the maximum. Moving and removing pins still work, and removing one makes room again.
- **Chips and actions editors** (`EditChipsBox.jsx`, `EditActionsBox.jsx`): at the cap, the "Add" button is disabled and a message gives the maximum. The add handlers also check the cap themselves.
- Unfinished entries (no type, target or feature yet) count toward the cap. They are dropped on save, so the saved list can only be shorter than the editor's.
- New i18n keys (`maxPinsReached`, `maxChipsReached`, `maxActionsReached`) in all four language files.
- **Living spec updated in the same diff** (`docs/specs/dashboard-flexible-layout-and-widgets.md`):
- B: the shared constant and the editor caps.
- B2: the actions limit.
- E: the new pin limit and how the editor behaves at the cap.
Out of scope: the `photo` box has the same uncapped-editor pattern (`max(100)`), but the issue does not mention it, so it is untouched. The generic 422 message on save is also unchanged: with the editors capped, users cannot reach it through these lists any more.
**Tests**
- Server (`dashboard.update.test.js`): for house-view pins, chips and actions, a box at exactly the maximum is accepted and one entry over is refused.
- Cypress (`DashboardBoxListCaps.cy.js`): in the real editor, each box starts one entry short of its cap. The test adds the last one and checks the message and the blocked add. For the house view it also checks that a further click places nothing and that removing a pin makes room again.
**Checks run locally** (rebased on the current `master`, which includes #3345):
- server: `prettier-check` ✅, `eslint` ✅ (0 errors; same 83 existing warnings as on `master`), `npm run coverage` ✅ 9315 passing, 0 failing. Every added or changed server line is executed.
- front: `prettier-check` ✅, `eslint` ✅ (0 errors), `compare-translations` ✅, `build` ✅
- `npm run cypress:run` ✅ 29 specs, 147/147 passing
### Related request
Closes #3357
Forum: https://community.gladysassistant.com/t/bug-widget-maison/10806
### Checklist
- [x] If a forum topic or GitHub issue exists, the description links it (`Forum: https://community.gladysassistant.com/t/...` or `Closes #...`)
- [x] Tests pass: `cd server && npm run coverage` (Codecov requires 100% coverage on changed lines) and Cypress (`npm run cypress:run`) if the UI changed
- [x] Linter and prettier pass on both front and server (`npm run eslint`, `npm run prettier`)
- [x] No undocumented breaking change
---
_Generated by [Claude Code](https://claude.ai/code/session_01MNjB35D3XBRHr5Hh25AMoX)_
Zögert nicht, dem Pull Request zu folgen, zu testen (optional, besonders bei kleinen Anfragen) und euer Feedback hier zu hinterlassen, falls nötig.