Repository navigation
Finalize Kuan plan: ownership helper, atomic supersede RPC, dialogs and consistency fixes - #36
Merged
Conversation
Contributor
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
kuan | 348ca1b | Jul 12 2026, 02:42 PM |
NomosLudens
deleted the
codex/finalizar-produto-kuan-para-homologacao
branch
September 4, 2026 00:22
NomosLudens
pushed a commit
that referenced
this pull request
Sep 4, 2026
…ara-homologacao Finalize Kuan plan: ownership helper, atomic supersede RPC, dialogs and consistency fixes
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.
Motivation
window.prompt/window.confirmem fluxos que executam ações permanentes, substituindo por dialogs do projeto para evitar UX insegura e inputs nativos que não preservam histórico.Description
public.kuanyin_can_own_plan(p_guardian_id, p_business_context_id)e reaproveita viapublic.kuanyin_plan_owned(p_plan_id)nas policies dekuanyin_business_planse tabelas filhas para centralizar validação de ownership.public.kuanyin_supersede_plan_decision(...)comoSECURITY INVOKERque fazFOR UPDATE, insere a nova decisão e marca a antiga comosupersededdentro da mesma transação, e concede execução apenas aauthenticated.supersedeKuanPlanDecisionemsrc/lib/kuan-plan.functions.tspara chamar somente a RPC (autenticar → resolver Guardião/plano →.rpc(...)→ registrar log) eliminando inserts/updates/deletes manuais no server function.src/features/kuan-plan/PlanDialogs.tsx) e integra esses dialogs em telas: plano (KuanPlanPage), pagamentos e gestão de Guardiões, preservando comportamento e sem adicionar bibliotecas.docs/qa/KUAN_REAL_HOMOLOGATION_REPORT.mdcom relatório de homologação real, incidentes, correções aplicadas, limitações ambientais e pendências para validação completa.Testing
bun run typecheck,bun run lint,bun run test,bun run buildegit diff --checkem ambiente local; todas as etapas automatizadas passaram com sucesso;lintpassou sem erros (apareceram avisosanyjá existentes) ebuildconcluiu com warnings de depreciação/chunking já conhecidos.src/lib/kuan-plan.sql-contract.test.ts) e bateria completa dovitestpassaram (23arquivos,245testes no ambiente).wrangler dev, fluxos público/privado com pagamentos e mobile) não foram executadas por ausência de instâncias/credenciais; essas pendências e instruções estão documentadas emdocs/qa/KUAN_REAL_HOMOLOGATION_REPORT.md.Codex Task