Skip to content

feat(aluno): PRD-4 kebab menu + primary action on meus-treinos cards#181

Merged
EmiyaKiritsugu3 merged 3 commits into
mainfrom
fix/meus-treinos-kebab
Jul 6, 2026
Merged

feat(aluno): PRD-4 kebab menu + primary action on meus-treinos cards#181
EmiyaKiritsugu3 merged 3 commits into
mainfrom
fix/meus-treinos-kebab

Conversation

@EmiyaKiritsugu3

@EmiyaKiritsugu3 EmiyaKiritsugu3 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

PRD-4 — Meus Treinos Action Hierarchy

Mobile action hierarchy on meus-treinos cards. Kebab menu + primary action + empty state polish. Zero data change.

Changes

  • Primary action + kebab overflow: Iniciar Treino promoted to primary full-width on mobile. Editar/Excluir moved into shadcn DropdownMenu kebab (). Select dia on its own row above actions.
  • Destructive separation: Excluir gets text-destructive variant inside menu, no longer beside primary CTA (mis-tap risk fixed).
  • Empty state polish: replaces plain text with icon (Dumbbell) + heading + subtext + CTA (Criar primeiro treino). Reuses existing __new__ editor trigger.
  • Headline font: font-headline (Outfit token from --font-headline) applied on H3. PRD-7 next/font wiring stays separate.
  • E2E stability: data-testid on treino-card, iniciar-treino, treino-kebab, editar-treino, excluir-treino.
  • Banner auto-hide: split into separate effect keyed on showPlanBanner to satisfy react-hooks/set-state-in-effect (scoped eslint-disable on the prop-derive effect).

Tests

  • Parametrized useWorkoutCRUD mock to respect initialTreinos prop (was hardcoded 2 treinos, so empty-state path was never exercised — real coverage gap fixed).
  • Mocked @/components/ui/dropdown-menu (Radix portal would be brittle).
  • New asserts: kebab trigger + items present, primary CTA renders, empty state renders icon/heading/subtext/CTA.

Gates

  • typecheck: 0 errors
  • lint: 0 errors
  • test: 1132/1132 pass
  • format: clean (changed files)

Spec

docs/superpowers/specs/2026-07-07-meus-treinos-kebab-design.md

🤖 Generated with Claude Code


Summary by cubic

Implements PRD-4 on Meus Treinos cards: promotes Iniciar Treino as the primary mobile action and moves Editar/Excluir into a kebab menu. Adds a polished empty state and fixes banner auto-hide to reset on plan changes; no data changes.

  • New Features

    • Primary action: Iniciar Treino is full-width on mobile; day select on its own row.
    • Overflow actions: Editar/Excluir moved to a kebab DropdownMenu (@/components/ui/dropdown-menu), with Excluir marked destructive.
    • Empty state: icon + heading + subtext + CTA (reuses __new__ editor trigger).
    • UI/testability: font-headline on the card title; adds data-testid hooks (treino-card, iniciar-treino, treino-kebab, editar-treino, excluir-treino). Aligns with Linear PRD-4 action hierarchy.
  • Bug Fixes

    • Banner auto-hide timer now resets when the plan changes (effect split and keyed on bannerPlanName/showPlanBanner).

Written for commit 9b67a30. Summary will update on new commits.

Review in cubic

- kebab overflow (Editar/Excluir) on aluno treino card
- iniciar promoted to primary full-width on mobile
- excluir destructive moved inside menu (text-destructive)
- empty state polish: icon + heading + subtext + CTA
- font-headline applied on H3
- data-testids: treino-card, iniciar-treino, treino-kebab
- split banner auto-hide into separate effect
- parametrize useWorkoutCRUD mock to respect initialTreinos

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 12:38pm

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

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 43 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: 0a8f5e52-9628-4b52-a58c-a5b1abb841da

📥 Commits

Reviewing files that changed from the base of the PR and between 73e0746 and 9b67a30.

📒 Files selected for processing (2)
  • docs/CURRENT-STATE.md
  • src/app/aluno/meus-treinos/meus-treinos-client.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/meus-treinos-kebab

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 and verified against the latest diff

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

Re-trigger cubic

Comment thread src/app/aluno/meus-treinos/meus-treinos-client.tsx
key auto-hide effect on bannerPlanName + showPlanBanner so timer
refreshes when planName changes while banner already visible.

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

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@EmiyaKiritsugu3 EmiyaKiritsugu3 merged commit 1fc576d into main Jul 6, 2026
14 checks passed
@EmiyaKiritsugu3 EmiyaKiritsugu3 deleted the fix/meus-treinos-kebab branch July 6, 2026 12:47
EmiyaKiritsugu3 added a commit that referenced this pull request Jul 6, 2026
restore test improvements lost in squash merge of #181.

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