feat: Governança comunitária (votações) no app + jornada BFF#287
Merged
Conversation
Co-authored-by: Rapha <sraphaz@users.noreply.github.com>
- Registra jornada 'governance' no BffJourneyRegistry (proxy para api/v1/territories/{territoryId}/votings)
- Endpoints: listar, criar, votar, fechar e resultados de votacoes
- TTL de cache (governance: 45s) em appsettings
- Testes do registro atualizados (mapeamento + endpoints)
Co-authored-by: Rapha <sraphaz@users.noreply.github.com>
- Nova feature governance: model Voting/VotingResults, repository e provider Riverpod - Tela de votacoes com filtro de status, votar inline e folha de resultados - Tela de criacao de votacao (tipo, visibilidade, opcoes dinamicas) - Rota /governance e atalho na tela Explorar - Strings i18n (pt/en) e regeneracao das localizations - Testes: parsing do model e smoke da tela Co-authored-by: Rapha <sraphaz@users.noreply.github.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Descrição
Implementa a próxima evolução identificada para deixar o app completo: Governança Comunitária (votações territoriais) — o único vertical do produto totalmente ausente no app Flutter, apesar de o backend (Fase 14, crítica) já estar 100% pronto. Reforça os valores centrais do produto (autonomia local, cuidado coletivo, participação).
A UI segue o handoff de design Arah (PR #284):
ArahScaffold,ArahListSkeleton, tokens de espaçamento/raio (AppConstants), cores viaTheme.colorScheme(sem cores hardcoded) e snackbars do design system.BFF
governanceemBffJourneyRegistry(proxy paraapi/v1/territories/{territoryId}/votings, mesmo padrão da jornadamoderation).governance: 45s.App (
frontend/arah.app/lib/features/governance/)data: modelVoting/VotingResults,GovernanceRepositorye provider Riverpod (StateNotifierpor território, filtro de status, controle local de votos).presentation: tela de votações (filtros Todas/Abertas/Fechadas, votar inline, folha de resultados com barras) e tela de criação (tipo, visibilidade, opções dinâmicas)./governance?territoryId=e atalho (ícone de votação) na tela Explorar.🔄 Tipo de Mudança
🧪 Testes
dotnet build backend/Arah.Api.Bffedotnet build Arah.sln -c Release(0 erros)dotnet test Arah.Tests.Bff— 133 passando (3 novos para a jornadagovernance)flutter analyze --no-fatal-infos— sem erros/warnings na featureflutter test— 33 passando (7 novos: parsing do model + smoke da tela)GET governance/{tid}/votings→ 200;POST→ 403 (regra Resident aplicada pela API); catálogo/bff/journeyscom 21 jornadasWalkthrough
arah_governance_app_demo.mp4
Tela Governança (estado vazio + filtros)
Formulário Nova votação preenchido
Submissão com tratamento de erro gracioso
📝 Observações
AllMembersfunciona para membros — coberto pelos testes automatizados.me/profile/governance), criação de eventos no app, deep-links no mapa.To show artifacts inline, enable in settings.