Skip to content

[codex] Finish sandbox demo UX and flows#60

Merged
renanmpimentel merged 1 commit intomainfrom
codex/sandbox-shell-node24
Apr 22, 2026
Merged

[codex] Finish sandbox demo UX and flows#60
renanmpimentel merged 1 commit intomainfrom
codex/sandbox-shell-node24

Conversation

@renanmpimentel
Copy link
Copy Markdown
Contributor

@renanmpimentel renanmpimentel commented Apr 22, 2026

What changed

  • fixed the sandbox shell scroll gap and kept the desktop sidebar/header behavior aligned with the normal document flow
  • rewrote the sandbox entry, banner, and guided tour copy in PT-BR with clearer CTAs and more didactic step-by-step guidance
  • expanded sandbox demo data for patient, supporter, and institution personas so the flows feel populated instead of empty
  • paginated the patient and supporter dream listings and surfaced richer institution dream/case context in the UI
  • turned patient and supporter profile cards into real sandbox session flows using sessionStorage for privacy, security, and history state
  • added client and server financial-language moderation in sandbox chat, including seeded moderated messages and explicit send blocking
  • upgraded the covered test suites for the new sandbox UX and data behaviors
  • kept the GitHub Actions Node 24-compatible upgrades from the first commit in this branch

Why

The sandbox still felt partially mocked: the copy was too technical, several profile actions were dead ends, dream lists grew without pagination, chats did not demonstrate moderation clearly, and persona fixtures were too sparse to support a convincing demo.

This branch closes that gap while also preserving the earlier shell scroll fix and the Node 24 workflow update already published in this PR.

Impact

  • sandbox entry and tour now explain each persona journey more clearly
  • patient gets 10+ dreams, real /dreams/mine?page=... pagination, functional profile sections, and moderated chat behavior
  • supporter gets richer seeded activity, client-side catalog pagination, stronger chat context, and functional profile history/security flows
  • institution gets 10+ managed patients, richer case detail timelines, more visible beneficiary context in dream cards, and fuller seeded cases/chats
  • sandbox chat now blocks PIX/dinheiro/doações on both frontend and backend and still demonstrates moderated history in seeded conversations
  • workflows already in this PR continue using Node 24-compatible GitHub Action majors

Validation

  • npm run lint
  • npm run typecheck
  • npm run test

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

Walkthrough

O pull request atualiza versões de ações do GitHub em quatro workflows (CI, deploy-prod, deploy-sandbox, pr-review) e refatora componentes de layout para converter sidebars de posicionamento fixed para sticky, ajustando espaçamento responsivo e offsets de conteúdo.

Changes

Cohort / File(s) Resumo
Atualizações de Ações do GitHub
.github/workflows/ci.yml, .github/workflows/deploy-prod.yml, .github/workflows/deploy-sandbox.yml, .github/workflows/pr-review.yml
Atualização de versões principais: actions/checkout de v4 para v5, actions/setup-node de v4 para v5, docker/setup-buildx-action de v3 para v4, e docker/login-action de v3 para v4. Nenhuma alteração em lógica, entradas ou variáveis de ambiente.
Refatoração de Componentes de Layout
src/app/components/layout/InstitutionLayout.tsx, src/app/components/layout/PatientLayout.tsx, src/app/components/layout/SupporterLayout.tsx
Conversão de sidebars de posicionamento fixed para sticky com top-0. Ajustes responsivos: remoção de pb-12 em breakpoints médios+, substituição de offset md:ml-64 por min-w-0, e sizing explícito md:h-screen md:w-64.
Testes de Layout
src/app/components/layout/SandboxShellLayouts.test.tsx
Novo arquivo de teste Vitest validando três componentes de layout (PatientLayout, SupporterLayout, InstitutionLayout). Verifica presença de sidebar com comportamento sticky, ausência de classe md:ml-64, e renderização de conteúdo roteado.

Estimated code review effort

🎯 2 (Simples) | ⏱️ ~12 minutos

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed O título reflete com precisão as duas mudanças principais: correção do scroll do sandbox shell e atualização das ações GitHub para Node 24.
Description check ✅ Passed A descrição é bem estruturada, cobrindo mudanças, motivação e impacto, mas não segue a estrutura de checklist definida no template.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/sandbox-shell-node24

Comment @coderabbitai help to get the list of available commands and usage tips.

@renanmpimentel renanmpimentel marked this pull request as ready for review April 22, 2026 01:11
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/ci.yml:
- Line 17: You updated uses: actions/setup-node@v5 which has breaking changes;
update the workflow to explicitly disable the new automatic cache (add
package-manager-cache: false under the setup-node step if you don't want
automatic caching based on package.json's packageManager field), and explicitly
set node-version (e.g., node-version: '20' or bump your runners to v2.327.1+ and
accept Node 24) to control the runtime; also audit downstream action upgrades
(e.g., actions/checkout v5) mentioned in the note and adjust the workflow
accordingly.

In @.github/workflows/deploy-prod.yml:
- Line 93: The workflow change to uses: actions/checkout@v5 upgrades the action
runtime to Node.js 24 and requires GitHub Actions runner version v2.327.1 or
newer; before switching to actions/checkout@v5, verify your runners meet or
exceed v2.327.1 (especially any self-hosted runners) and either update those
runners to v2.327.1+ or keep using actions/checkout@v4 (or pin a compatible
checkout action) until the runners are upgraded; also review any custom steps or
toolchains that assume Node.js 20 and update them to be compatible with Node.js
24 if you proceed with v5.
- Around line 96-99: Update the workflow to ensure the runners meet the Node.js
24 requirement for docker/setup-buildx-action@v4 and docker/login-action@v4:
verify or pin the GitHub Actions runner version to v2.327.1+ (or ensure
self-hosted runners have Node.js 24), and if runners cannot be guaranteed,
either revert to a v3 tag of these actions or add an explicit check/step that
validates runner Node.js version before using setup-buildx-action@v4 and
login-action@v4; reference the action identifiers docker/setup-buildx-action@v4
and docker/login-action@v4 when making the change.

In @.github/workflows/deploy-sandbox.yml:
- Line 55: Replace or gate the new checkout action usage: either revert to the
previous stable 'uses: actions/checkout@v4' or, if you intend to use 'uses:
actions/checkout@v5', add an explicit compatibility check and documentation that
all runners are upgraded to GitHub Actions runner >= v2.327.1; update the
workflow (where 'uses: actions/checkout@v5' appears) and the deployment
docs/README/CI runbook to assert runner versions and/or add a conditional step
that verifies runner version before proceeding with deploy.
- Around line 58-61: Confirmar compatibilidade do runner garantindo que o
ambiente CI use GitHub Actions Runner v2.327.1+ antes de manter `uses:
docker/setup-buildx-action@v4` e `uses: docker/login-action@v4`;
alternativamente, pinear para uma major anterior (ex.: `@v3`) ou adicionar uma
verificação de versão no workflow antes desses passos; localizar as entradas
`docker/setup-buildx-action@v4` e `docker/login-action@v4` no workflow e
atualizar para uma das opções: (1) documentar/exigir runner >= v2.327.1 no
README/CI, (2) change to stable v3 pins, or (3) insert a runtime check step that
fails with a clear message if runner < v2.327.1.

In @.github/workflows/pr-review.yml:
- Line 24: The workflow currently uses actions/setup-node@v5 which introduces
breaking changes (auto cache when packageManager exists, defaults to Node.js 24,
and requires runner v2.327.1+); update the workflow by either pinning setup-node
to a v4 release (e.g., actions/setup-node@v4) or explicitly configuring
v5-compatible settings: set package-manager-cache: false if you need to disable
automatic caching, explicitly set node-version to the desired Node.js (e.g., 20)
instead of relying on defaults, and ensure your runners meet the minimum version
(v2.327.1+) before merging; check for any cache or dependency behavior changes
caused by packageManager presence in package.json and validate CI runners and
jobs referencing actions/setup-node@v5 accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1028b71c-5aec-4766-b578-983f3b996125

📥 Commits

Reviewing files that changed from the base of the PR and between 0761612 and 9a165b4.

📒 Files selected for processing (8)
  • .github/workflows/ci.yml
  • .github/workflows/deploy-prod.yml
  • .github/workflows/deploy-sandbox.yml
  • .github/workflows/pr-review.yml
  • src/app/components/layout/InstitutionLayout.tsx
  • src/app/components/layout/PatientLayout.tsx
  • src/app/components/layout/SandboxShellLayouts.test.tsx
  • src/app/components/layout/SupporterLayout.tsx

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/deploy-prod.yml
Comment thread .github/workflows/deploy-prod.yml
Comment thread .github/workflows/deploy-sandbox.yml
Comment thread .github/workflows/deploy-sandbox.yml
Comment thread .github/workflows/pr-review.yml
@renanmpimentel renanmpimentel merged commit 858c8e5 into main Apr 22, 2026
4 checks passed
@renanmpimentel renanmpimentel changed the title [codex] Fix sandbox shell scroll and update Node 24 actions [codex] Finish sandbox demo UX and flows Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant