teqo/.cursor/rules
Francisco Ignácio Fontoura Solla da4ca2c713 Deliver B37: editable município chips on the dobradinhas list.
The "Municípios" column of /campanha/dobradinhas reuses
MunicipalityPortfolioCell unchanged, writing the inverted side of the
relation (municipality.stateDeputies) through a single transactional
batch action (setStateDeputyMunicipalitiesBatch): per-município advisory
lock, all-or-nothing on a partial-scope batch instead of a silent partial
apply, no floor (a dobradinha can hold zero municípios). stateDeputiesArraySchema's
cap moved 20 → 435 to fit a whole território batch from the município side.

The post-implementation critique found two P1s, and both were fixed instead
of deferred. First: MunicipalityPortfolioCell and LeadershipStateDeputyRelationCell
had grown the same chip-editing machine twice — optimistic delta, undo, ARIA
1.2 combobox, floor/ceiling, pointer-fine/coarse split — with incompatible
contracts. This was the 3rd call site B34+ was waiting for, so RelationChipCell
is now the single engine and both cells shrank to thin domain wrappers (chip/
search building, FormData, copy — nothing interaction-specific left in either).
LeadershipStateDeputyRelationCell also gained an ownerName prop and its first
dedicated test suite, which it shipped without before this.

Second: an advisor could see, and attempt to remove, a município chip outside
the portfolio they administer, failing silently at the document level.
MunicipalityPortfolioCell now filters the visible chips by addableIds instead
of only gating what can be added, so an advisor sees and can only touch
municípios they administer.

No migration, collection, or Consent. Docs updated: plan as-built, roadmap,
AGENTS.md, project notebook.
2026-07-28 09:34:39 -03:00
..
projects Deliver B37: editable município chips on the dobradinhas list. 2026-07-28 09:34:39 -03:00
access-control-advanced.md feat: initial commit 2026-02-14 16:11:51 -03:00
access-control.md feat: initial commit 2026-02-14 16:11:51 -03:00
adapters.md feat: initial commit 2026-02-14 16:11:51 -03:00
campanha-action-feedback.mdc Sync all project docs with the deployed remodel and hardening; compile roadmap 2026-07-24 02:04:45 -03:00
campanha-edit-where-you-see.mdc B34: editable município chips on the leaderships list. 2026-07-27 22:35:19 -03:00
codebase-map.mdc B17: column picker on the seven CampaignTable list surfaces. 2026-07-28 08:25:16 -03:00
collections.md feat: initial commit 2026-02-14 16:11:51 -03:00
components.md Add Post and Tag collections for news and publications 2026-07-15 19:12:11 -03:00
endpoints.md feat: initial commit 2026-02-14 16:11:51 -03:00
engineering-standards.mdc Tooling: pnpm db:doctor + preflight no guard-dev-db (remedios nomeados, deteccao de volume compartilhado pos-corrupcao WAL), madge check:cycles e prettier no CI/pre-push, guard rails de data migration no skill, notas de processo (knip --fix, pipes) e gate atualizado nos docs/rules 2026-07-25 18:02:02 -03:00
field-type-guards.md feat: initial commit 2026-02-14 16:11:51 -03:00
fields.md feat: initial commit 2026-02-14 16:11:51 -03:00
hooks.md feat: initial commit 2026-02-14 16:11:51 -03:00
payload-overview.md feat: initial commit 2026-02-14 16:11:51 -03:00
plugin-development.md feat: initial commit 2026-02-14 16:11:51 -03:00
queries.md feat: initial commit 2026-02-14 16:11:51 -03:00
security-critical.mdc feat: initial commit 2026-02-14 16:11:51 -03:00