Cuando quiero añadir un pin número 21, no puedo guardar el tablero
(Cuando lo elimino, puedo guardarlo)
Hola @Chris75 ,
¡Gracias por el feedback y las capturas, y disculpas por el retraso en la respuesta!
Tu 21ᵉ pin no tiene nada de particular: el widget « Vista de la casa » está limitado a 20 pins . El verdadero error es que el editor te permite colocar un 21ᵉ sin decir nada. Luego, al guardar, Gladys rechaza el tablero con un mensaje genérico (« ¿estás seguro de haber rellenado todos los campos? ») que no ayuda en absoluto a entender el problema.
He abierto una issue en GitHub para corregirlo: #3357
La idea es aumentar el límite y hacer que el editor te avise claramente cuando lo alcances, en lugar de bloquear el guardado sin explicación.
Mientras tanto, puedes solucionar el problema de dos maneras:
repartir tus valores en dos widgets « Vista de la casa » (por ejemplo, uno para las temperaturas y la humedad, y otro para las aperturas);
o mostrar parte de los valores en un widget « Pastillas de estado ».
¡Hola a todos!
Este tema ahora está en desarrollo .
Se ha abierto una PR para limitar los pins, chips y acciones en el editor, y aumentar el límite de pins del widget de Inicio a 50:
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)_
No dudes en seguir la PR, probar (opcional, especialmente para pequeñas solicitudes) y dar tus comentarios aquí si es necesario.
Hola,
Este error se ha corregido en Gladys Assistant 5.3.3 .
Los detalles están en el anuncio:
¡Hola a todos!
¡Gladys Assistant 5.3.3 está aquí
No te dejes engañar por el número de versión: este lanzamiento se centra casi por completo en un proyecto, Gladys en tu teléfono. Muchos de vosotros consultáis vuestro panel de control en el móvil, pero en cuanto queréis cambiar un widget o una escena, os encontráis con un formulario de escritorio comprimido en una pantalla pequeña. Por eso hemos reconstruido el panel de control y la edición de escenas partiendo del teléfono. En un ordena…