Skip to content

fix(aluno): prd-8 mobile card variant for detail tables#187

Merged
EmiyaKiritsugu3 merged 2 commits into
mainfrom
fix/aluno-detail-tables-mobile
Jul 6, 2026
Merged

fix(aluno): prd-8 mobile card variant for detail tables#187
EmiyaKiritsugu3 merged 2 commits into
mainfrom
fix/aluno-detail-tables-mobile

Conversation

@EmiyaKiritsugu3

@EmiyaKiritsugu3 EmiyaKiritsugu3 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

PRD-8 — last mobile-first PRD.

Changes

  • src/app/dashboard/alunos/[id]/page.tsx: MatriculasTable + PagamentosTable gain <md stacked key-value card variant (dl/dt/dd grid-cols-2). Desktop Table wrapped in hidden md:block, untouched. Pure CSS show/hide — no JS, no new helpers. TreinosList already grid, no change.
  • src/app/dashboard/alunos/[id]/page.test.tsx: 4 getByText status/metodo/plano asserts → getAllByText (mobile card + desktop table both in DOM). Added dl count test for mobile variant structure.

Scope decisions (user-confirmed)

  • Row actions (spec §3): skipped — tables static, no card footer / touch-target added.
  • E2E: existing suite green only. No new spec, no playwright.config mobile project.
  • Test asserts: structure-only (dl counts), not exact R$ text (jsdom Intl BRL flaky).

Verification

  • typecheck pass, full unit suite 1137/1137 pass, own-src lint clean.
  • E2E gate running.

Spec: docs/superpowers/specs/2026-07-07-aluno-detail-tables-mobile-design.md

🤖 Generated with Claude Code


Summary by cubic

Implements PRD-8 mobile-first design on the Aluno details page: Matriculas and Pagamentos render stacked key-value card views below md while desktop tables remain unchanged.
Uses CSS-only show/hide (md:hidden + hidden md:block); updates tests (getAllByText, dl count) and adds an inline note on the deliberate toggle duplication, with a plan to extract a helper when a third responsive table appears.

Written for commit 0717bd5. Summary will update on new commits.

Review in cubic

MatriculasTable and PagamentosTable gain a stacked key-value card
variant under the md breakpoint using dl dt dd grid-cols-2. Desktop
Table wrapped in a hidden md block container, untouched. Pure CSS
show hide via md hidden plus hidden md block, no JS, no new helpers.
TreinosList already grid-based, no change.

page.test.tsx: switch four getByText status metodo plano asserts to
getAllByText since mobile card and desktop table both render in DOM.
Add a dl count test for the mobile variant structure.

Refs: docs/superpowers/specs/2026-07-07-aluno-detail-tables-mobile-design.md

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
smartmanagementsystem Ready Ready Preview, Comment Jul 6, 2026 7:00pm

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@EmiyaKiritsugu3, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 13 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 45b95606-1c1f-456f-8140-5eb3180b6a42

📥 Commits

Reviewing files that changed from the base of the PR and between de744c4 and 0717bd5.

📒 Files selected for processing (2)
  • src/app/dashboard/alunos/[id]/page.test.tsx
  • src/app/dashboard/alunos/[id]/page.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/aluno-detail-tables-mobile

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.

❤️ Share

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

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 2 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/app/dashboard/alunos/[id]/page.tsx">

<violation number="1" location="src/app/dashboard/alunos/[id]/page.tsx:183">
P3: The responsive card/table wrapper pattern (`<div className="md:hidden..."><div className="hidden md:block...">`) is duplicated identically in both `MatriculasTable` and `PagamentosTable`. If the breakpoint (`md`), the grid gap (`gap-3`), or the visibility strategy ever needs to change, both components must be updated in sync, increasing maintenance surface area. Consider extracting the responsively-switching container into a small shared wrapper component (e.g. `ResponsiveStack` or `CardStack`) that receives the mobile card renderer and desktop table renderer as children or render props. This keeps the responsiveness logic in one place while each component still provides its own content.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

</TableHeader>
<TableBody>
<>
<div className="md:hidden grid gap-3">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3: The responsive card/table wrapper pattern (<div className="md:hidden..."><div className="hidden md:block...">) is duplicated identically in both MatriculasTable and PagamentosTable. If the breakpoint (md), the grid gap (gap-3), or the visibility strategy ever needs to change, both components must be updated in sync, increasing maintenance surface area. Consider extracting the responsively-switching container into a small shared wrapper component (e.g. ResponsiveStack or CardStack) that receives the mobile card renderer and desktop table renderer as children or render props. This keeps the responsiveness logic in one place while each component still provides its own content.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/app/dashboard/alunos/[id]/page.tsx, line 183:

<comment>The responsive card/table wrapper pattern (`<div className="md:hidden..."><div className="hidden md:block...">`) is duplicated identically in both `MatriculasTable` and `PagamentosTable`. If the breakpoint (`md`), the grid gap (`gap-3`), or the visibility strategy ever needs to change, both components must be updated in sync, increasing maintenance surface area. Consider extracting the responsively-switching container into a small shared wrapper component (e.g. `ResponsiveStack` or `CardStack`) that receives the mobile card renderer and desktop table renderer as children or render props. This keeps the responsiveness logic in one place while each component still provides its own content.</comment>

<file context>
@@ -179,30 +179,57 @@ function MatriculasTable({
-            </TableHeader>
-            <TableBody>
+          <>
+            <div className="md:hidden grid gap-3">
               {matriculas.map((m) => (
-                <TableRow key={m.id}>
</file context>

Mark the md:hidden / hidden md:block container duplication between
MatriculasTable and PagamentosTable as a deliberate skip. Per rule-of-three,
extract a ResponsiveStack wrapper only when a third responsive table appears
on this page. Closes cubic P3 finding on PR #187.
@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@EmiyaKiritsugu3 EmiyaKiritsugu3 merged commit 3ddf0fb into main Jul 6, 2026
14 checks passed
@EmiyaKiritsugu3 EmiyaKiritsugu3 deleted the fix/aluno-detail-tables-mobile branch July 6, 2026 19:09
EmiyaKiritsugu3 added a commit that referenced this pull request Jul 6, 2026
Tabela 1 Execucao: Testes 01-03 mapeiam fluxos A1 mobile, A2 desktop,
A3 paridade da US13 PRD-8 PR #187.

Tabela 2 Providencias: Testes 04-06 P5 infra (cobertura #188, docker
#189, docs #190) tipados.

A3.2 discrimina colunas por tabela (Matriculas vs Pagamentos sem
status). E2E enrollment.spec.ts cobre /alunos/[id].

Honra formato 2-tabelas da disciplina EngSoftware II.

Co-Authored-By: Claude <noreply@anthropic.com>
EmiyaKiritsugu3 added a commit that referenced this pull request Jul 6, 2026
* feat(p5): ci/cd + docker + sonarqube + relatorio iteracao 4

Tarefa P5 (Eng Software II, iteracao 4):
- coverage: excluir src/components/ui/** (shadcn/Radix wrappers) do
  coverage unitario + SonarQube exclusions. Branch coverage 79.65% -> 84.53%.
  Closes #188
- docker: docker-compose.yml (postgres:16 + node:22 dev com migrate/seed)
  Closes #189
- docs: docs/doc-deploy.md (deploy Vercel + compose + CI + SemVer + Conventional Commits)
  docs/sonarqube/config.md + docs/sonarqube/scans.md (setup + cadencia 2x/semana)
  Closes #190
- ci: cron schedule 2x/semana (3 9 * * 1,4) + workflow_dispatch no ci.yml
- relatorio: docs/relatorio-testes.md iteracao 3 -> 4 (P5), US13 PRD-8 (#187)
  como US do membro (tela ao banco), metricas 84.53% branch, bugs #188-190
- issues: criadas e fechadas #188 #189 #190

Gates: typecheck 0 errors, lint 0 errors, 1137/1137 tests, branch 84.53% (>=80% P5).

Refs: tarefa P5 https://github.com/tacianosilva/eng-software-2/blob/main/tarefas/projetos/P5-tarefa5.md

Co-Authored-By: Claude <noreply@anthropic.com>

* docs(p5): atualizar current-state com entregas iteracao 4

Refs: P5-tarefa5

Co-Authored-By: Claude <noreply@anthropic.com>

* docs(p5): relatorio-testes no modelo taciano (US13 fluxos A1/A2/A3)

Tabela 1 Execucao: Testes 01-03 mapeiam fluxos A1 mobile, A2 desktop,
A3 paridade da US13 PRD-8 PR #187.

Tabela 2 Providencias: Testes 04-06 P5 infra (cobertura #188, docker
#189, docs #190) tipados.

A3.2 discrimina colunas por tabela (Matriculas vs Pagamentos sem
status). E2E enrollment.spec.ts cobre /alunos/[id].

Honra formato 2-tabelas da disciplina EngSoftware II.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(p5): remedia auditoria docs/configs + rc-v1.0

T01: sonar-project.properties +src/lib/actions/** em sonar.exclusions
(alinha vitest + doc-deploy).

T02: doc-deploy §3 lista 10 exclusões de cobertura (não 2), sincroniza
com vitest.config.ts.

T03: sonarqube/config.md §6 cron 3 9 * * 1,4 alinhado com ci.yml.

T04: doc-deploy §6 + §8 documentam release RC-v1.0 iteração 4, tag
v1.0.0, GitHub Release, ADF coverage table.

T06: sonarqube/scans.md placeholder 2ª exec 2026-07-10 PENDING via cron.

T07: CURRENT-STATE.md seção Remediação P5 lista T01-T09.

Auditoria adversarial (3 Explore + 1 code-reviewer) pré-merge PR #191.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Emiya Kiritsugu <emiyakiritsugu3@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
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