feat(it4): instrutor workflow E2E coverage (18/18 passing)#73
Conversation
- specs/006-it4-instrutor-e2e/: spec, plan, research, data-model, quickstart - .specify/feature.json: updated to 006-it4-instrutor-e2e - CLAUDE.md: agent context updated with It4 tech stack Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ersonal badge (18/18) - add tests/e2e/specs/instrutor-workflow.spec.ts: cross-session flow where INSTRUTOR creates a manual treino and ALUNO asserts the badge in meus-treinos - fix workout-session.spec.ts: narrow row selector to div.rounded-lg.border.p-4 to avoid strict-mode violation when multiple do personal treinos are present - update CRITICAL-PATHS.md: 17 → 18 covered scenarios; add lessons learned table documenting cmdk, sidebar, and section-card selector patterns - update CURRENT-STATE.md and CHANGELOG.md for it4 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning
|
| Cohort / File(s) | Summary |
|---|---|
Feature Configuration .specify/feature.json |
New Specify feature configuration pointing to specs/006-it4-instrutor-e2e directory. |
Specification & Planning Documentation specs/006-it4-instrutor-e2e/spec.md, specs/006-it4-instrutor-e2e/plan.md, specs/006-it4-instrutor-e2e/tasks.md, specs/006-it4-instrutor-e2e/quickstart.md, specs/006-it4-instrutor-e2e/research.md, specs/006-it4-instrutor-e2e/data-model.md |
Six new documentation files defining the INSTRUTOR E2E test scope, implementation strategy, task breakdown, execution steps, technical decisions, and data model references. Covers cross-session workflow (INSTRUTOR creates treino → ALUNO verifies), Shadcn UI selector strategies, and risk mitigation for portal rendering. |
E2E Test Implementation tests/e2e/specs/instrutor-workflow.spec.ts, tests/e2e/CRITICAL-PATHS.md |
New Playwright test validating INSTRUTOR creating a manual workout and ALUNO seeing "Do Personal" badge; critical-paths documentation updated to track 18 scenarios and include lessons learned. |
Test Locator Fix tests/e2e/specs/workout-session.spec.ts |
Narrowed CSS selector from div.rounded-lg to div.rounded-lg.border.p-4 to avoid matching outer container in strict mode. |
Project Documentation Updates CHANGELOG.md, docs/CURRENT-STATE.md, CLAUDE.md |
Updated changelog with new E2E scenario and test fix note; reflected 17→18 scenario count and local test results in current state; updated tech stack and feature branch metadata in CLAUDE tracking. |
Sequence Diagram(s)
sequenceDiagram
participant Browser as Browser (INSTRUTOR)
participant App as Next.js App
participant DB as Database
participant Browser2 as Browser (ALUNO)
Browser->>App: Login as INSTRUTOR
App->>DB: Authenticate INSTRUTOR
DB-->>App: Auth token
App-->>Browser: Dashboard loaded
Browser->>App: Navigate /dashboard/treinos
App-->>Browser: Treino creation form displayed
Browser->>App: Select ALUNO from combobox
App-->>Browser: ALUNO selected
Browser->>App: Fill objetivo + add exercise
Browser->>App: Submit form (save treino)
App->>DB: Create treino (instrutorId set)
DB-->>App: Treino saved
App-->>Browser: Form reset (objetivo cleared)
Browser->>App: Logout
App-->>Browser: Session cleared
Browser2->>App: Login as ALUNO
App->>DB: Authenticate ALUNO
DB-->>App: Auth token
App-->>Browser2: Dashboard loaded
Browser2->>App: Navigate /aluno/meus-treinos
App->>DB: Query treinos for ALUNO
DB-->>App: Treino data (with instrutorId)
App-->>Browser2: Meus-treinos displayed
Browser2->>Browser2: Assert treino visible
Browser2->>Browser2: Assert "Do Personal" badge present
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
- PR
#71— Changes the sametests/e2e/specs/workout-session.spec.tsselector fortreinoRow, affecting the "Iniciar" button targeting in the workout session flow. - PR
#70— Modifies the E2E authentication helper andloginAs()flow that the new INSTRUTOR test depends on for cross-session login/logout operations. - PR
#68— Updates.gitignoreto ignore the.specify/directory, which could conflict with the new.specify/feature.jsonfile added in this PR.
Poem
🐰 A new scenario hops into view,
INSTRUTOR assigns, and ALUNOs check too!
With selectors precise and badges so bright,
E2E coverage grows—from seventeen to eighteen delight! ✨
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | ❓ Inconclusive | The description covers the key changes, provides a clear test plan with passing results, but does not follow the required template structure with explicit Type of Change checkbox, Related Documents section, or full checklist. | Follow the repository's PR description template: add Type of Change checkbox (feat/test), Related Documents section with spec links, and complete the provided checklist format for consistency. |
✅ Passed checks (2 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title accurately and specifically describes the main change: adding INSTRUTOR workflow E2E coverage with all 18 scenarios passing, which is the primary objective of the PR. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
feat/006-it4-instrutor-e2e
Comment @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 7
🧹 Nitpick comments (1)
CLAUDE.md (1)
6-7: Consider a deduplication strategy for Active Technologies.The document accumulates technology entries per branch, creating duplication (e.g., TypeScript 5 strict mode, Next.js 15, Playwright, and PostgreSQL/Prisma appear multiple times across lines 6-16). This reduces clarity and increases maintenance overhead.
Since this file is auto-generated, consider updating the generation logic to either:
- Consolidate duplicate technologies into a single "Current Stack" section
- Archive or remove entries for merged feature branches
- Add a pruning mechanism to remove stale branch references
Additionally, note the version inconsistency: line 6 specifies "Playwright 1.59" while line 12 just says "Playwright".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@CLAUDE.md` around lines 6 - 7, The CLAUDE.md generation is producing duplicated technology entries under the "Active Technologies" section (e.g., "TypeScript 5 (strict mode)", "Playwright 1.59"/"Playwright", "Next.js 15", "PostgreSQL via Prisma"); update the generator logic that writes CLAUDE.md to deduplicate and canonicalize entries: implement a normalization step that collapses duplicates into a single "Current Stack" list (merge versions where present, e.g., prefer exact versions like "Playwright 1.59"), or add pruning to drop entries from merged/closed branches, or move per-branch lines into an "Archived Features" area—ensure the generator deduplicates by normalized tech name (e.g., normalized keys "typescript", "playwright", "nextjs", "postgresql/prisma") before emitting CLAUDE.md and include version resolution rules so inconsistent entries (Playwright vs Playwright 1.59) are resolved consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/CURRENT-STATE.md`:
- Around line 28-30: The table rows for "Playwright E2E suite" and "CI E2E job"
report 18 scenarios but later sections ("Quality Gates" and "Tech Stack") still
reference 17; update those later references to 18 so the document is consistent.
Search for the strings "Quality Gates", "Tech Stack", and any occurrences of "17
scenarios" or "17/17" in docs/CURRENT-STATE.md and change them to reflect "18
scenarios" (and "18/18" where applicable), keeping the existing phrasing and
formatting.
In `@specs/005-it3-ai-workouts/plan.md`:
- Around line 1-105: The Implementation Plan file was overwritten with template
placeholders (e.g., the "Implementation Plan: [FEATURE]" header and tokens like
[DATE], [FEATURE], /speckit.plan template trees); restore the finalized IT3 plan
by reverting this file to the last approved version (or re-populating it with
the concrete IT3 plan content), removing placeholder scaffolding and moving the
reusable template into the templates directory (keep tokens like
[FEATURE]/[DATE] only in the real template), ensuring the document contains the
original summary, technical context, project structure, and constitution check
for the IT3-ai-workouts feature.
In `@specs/006-it4-instrutor-e2e/plan.md`:
- Line 79: The risk register entry claiming the ALUNO display name is "TBD from
DB" is stale; update the table row that mentions `aluno@test.com` so it reflects
that the seed sets `nomeCompleto` to "Aluno E2E" (remove "name TBD from DB") and
adjust the guidance to note that you can use the `nomeCompleto` seed value or
fall back to an email-based filter (`aluno@test.com`) only if the seeded name
differs; ensure the cell text now references the `nomeCompleto` field and the
concrete value "Aluno E2E".
In `@specs/006-it4-instrutor-e2e/quickstart.md`:
- Line 18: Update the quickstart step 6 to match the E2E assertion by replacing
the expectation of a success toast with the implemented verification: after
clicking "Salvar Treino", validate that the objetivo field is reset (empty) to
confirm save completion; reference the 'objetivo' field reset check used in the
E2E flow so manual testers follow the same criterion.
In `@specs/006-it4-instrutor-e2e/research.md`:
- Around line 5-10: The claim that the assign-workout flow is "fully
implemented" overstates authorization guarantees because upsertTreinoAction
currently accepts a client-provided instrutorId without enforcing it matches the
authenticated INSTRUTOR; update the research.md text to remove "fully
implemented" and explicitly note that server-side validation hardening is
required (add a TODO referencing upsertTreinoAction), and then implement
server-side checks in upsertTreinoAction to derive/verify instrutorId from the
authenticated user (or enforce permission checks) rather than trusting the
client; also mention that createTreinoAction already sets instrutorId and that
meus-treinos-client and prisma/seed-e2e.ts contain related E2E paths/data to
validate after hardening.
In `@specs/006-it4-instrutor-e2e/spec.md`:
- Around line 40-43: The spec table lists seed credential emails for roles
"INSTRUTOR" and "ALUNO" that don't match the actual values in
prisma/seed-e2e.ts; update the emails in the table rows for the INSTRUTOR and
ALUNO entries so they exactly match the credentials defined in
prisma/seed-e2e.ts (use the same email strings), ensuring the UUIDs and role
names remain unchanged.
In `@specs/006-it4-instrutor-e2e/tasks.md`:
- Around line 19-60: The checklist mixes multiple concerns per item and violates
the "one-file/one-concern" task format; split and rewrite each checklist entry
so every task line follows the exact pattern "T## — <verb> in `path/to/file` —
<exact change> | verify: <command>" and map each existing item (T001..T008) to
one distinct task targeting the single file it changes (e.g., update
specs/006-it4-instrutor-e2e/tasks.md,
tests/e2e/specs/instrutor-workflow.spec.ts, tests/e2e/CRITICAL-PATHS.md,
docs/CURRENT-STATE.md, CHANGELOG.md, prisma/seed-e2e.ts) — for example: convert
the multi-step US01 checklist into one task that edits
tests/e2e/specs/instrutor-workflow.spec.ts to implement the cross-session flow
exactly as enumerated and add a verify clause "verify: npm run e2e -- --grep
\"INSTRUTOR\"", convert the CRITICAL-PATHS and docs/CHANGELOG updates into
separate tasks each referencing their single file and exact text changes with
corresponding verify commands, and convert the seed/read/quality-gates items
into their own tasks referencing prisma/seed-e2e.ts and the root scripts with
verify commands ("verify: npm run lint && npm run typecheck && npm test" or
"verify: npm run supabase:start && npm run seed:e2e && npm run e2e"). Ensure no
task bundles multiple files or concerns and that task IDs remain unique.
---
Nitpick comments:
In `@CLAUDE.md`:
- Around line 6-7: The CLAUDE.md generation is producing duplicated technology
entries under the "Active Technologies" section (e.g., "TypeScript 5 (strict
mode)", "Playwright 1.59"/"Playwright", "Next.js 15", "PostgreSQL via Prisma");
update the generator logic that writes CLAUDE.md to deduplicate and canonicalize
entries: implement a normalization step that collapses duplicates into a single
"Current Stack" list (merge versions where present, e.g., prefer exact versions
like "Playwright 1.59"), or add pruning to drop entries from merged/closed
branches, or move per-branch lines into an "Archived Features" area—ensure the
generator deduplicates by normalized tech name (e.g., normalized keys
"typescript", "playwright", "nextjs", "postgresql/prisma") before emitting
CLAUDE.md and include version resolution rules so inconsistent entries
(Playwright vs Playwright 1.59) are resolved consistently.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 3d6b0273-305a-4c1e-a914-cbe6955b2cf0
📒 Files selected for processing (14)
.specify/feature.jsonCHANGELOG.mdCLAUDE.mddocs/CURRENT-STATE.mdspecs/005-it3-ai-workouts/plan.mdspecs/006-it4-instrutor-e2e/data-model.mdspecs/006-it4-instrutor-e2e/plan.mdspecs/006-it4-instrutor-e2e/quickstart.mdspecs/006-it4-instrutor-e2e/research.mdspecs/006-it4-instrutor-e2e/spec.mdspecs/006-it4-instrutor-e2e/tasks.mdtests/e2e/CRITICAL-PATHS.mdtests/e2e/specs/instrutor-workflow.spec.tstests/e2e/specs/workout-session.spec.ts
| - [x] T001 Verify baseline quality gates pass — run `npm run lint && npm run typecheck && npm test` and confirm 0 errors / 22/22 tests | ||
|
|
||
| --- | ||
|
|
||
| ## Phase 2: Foundational (Blocking — verify seed ALUNO name) | ||
|
|
||
| **Purpose**: Confirm the seeded ALUNO's `nomeCompleto` so selectors in the E2E spec use the correct name. | ||
|
|
||
| - [x] T002 Confirm ALUNO seed name — read `prisma/seed-e2e.ts` and extract the `nomeCompleto` of the ALUNO user (`id: 00000000-0000-0000-0000-000000000004`) to use in Playwright `getByRole('option', { name: ... })` | ||
|
|
||
| --- | ||
|
|
||
| ## Phase 3: US01 — INSTRUTOR assigns workout → ALUNO sees "Do Personal" | ||
|
|
||
| **Story goal**: INSTRUTOR logs in, creates a manual treino for the seeded ALUNO, then ALUNO session asserts the treino appears in `meus-treinos` with "Do Personal" badge. | ||
|
|
||
| **Independent test criteria**: `npm run e2e -- --grep "INSTRUTOR"` passes with 1 new test (18/18 total). | ||
|
|
||
| - [x] T003 [US1] Write E2E spec in `tests/e2e/specs/instrutor-workflow.spec.ts` — implement the full cross-session flow per `quickstart.md`: | ||
| 1. `loginAs(page, 'INSTRUTOR')` → navigate to `/dashboard/treinos` | ||
| 2. Click Shadcn Select trigger (`getByRole('combobox')`) → wait for option → click ALUNO by name | ||
| 3. Fill `objetivo` input with unique value (e.g. `Hipertrofia E2E It4`) | ||
| 4. Click "Adicionar Exercício" → interact with exercise Combobox → select first option | ||
| 5. Click "Salvar Treino" → assert success (toast or dialog closes) | ||
| 6. `await logout(page)` → `loginAs(page, 'ALUNO')` | ||
| 7. Navigate to `/aluno/meus-treinos` | ||
| 8. Assert card containing "Hipertrofia E2E It4" is visible | ||
| 9. Assert `page.getByText('Do Personal')` is visible within that card | ||
|
|
||
| - [x] T004 [P] [US1] Update `tests/e2e/CRITICAL-PATHS.md` — add row 18 for "INSTRUTOR assigns workout → ALUNO sees Do Personal badge"; move from Pending table to Coverage Table; update total from 17 → 18 | ||
|
|
||
| --- | ||
|
|
||
| ## Phase 4: Polish & Validation | ||
|
|
||
| **Purpose**: Confirm all gates pass with the new test included. | ||
|
|
||
| - [x] T005 Run full E2E suite locally — `npm run supabase:start && npm run seed:e2e && npm run e2e` — confirm 18/18 pass; fix any selector failures using patterns from `tests/e2e/CRITICAL-PATHS.md` (Lessons Learned) | ||
| - [x] T006 Run quality gates — `npm run lint && npm run typecheck && npm test` — confirm 0 errors / 22/22 unit tests still pass | ||
| - [x] T007 [P] Update `docs/CURRENT-STATE.md` — bump E2E count from 17 → 18, add It4 progress table, update version header | ||
| - [x] T008 [P] Update `CHANGELOG.md` — add `[Unreleased]` section for It4 with Added entry for `instrutor-workflow.spec.ts` | ||
|
|
There was a problem hiding this comment.
Normalize task entries to the required one-file/one-concern execution format.
Current checklist items are useful, but they don’t follow the required executable task format and several items bundle multiple concerns/files. Please rewrite tasks into the enforced structure to keep planning/audit consistency.
Based on learnings: Each task in execution must have exactly one file, one concern with format: T## — in path/to/file.ts — | verify: .
🧰 Tools
🪛 LanguageTool
[grammar] ~33-~33: Ensure spelling is correct
Context: ...UNO sees "Do Personal" Story goal: INSTRUTOR logs in, creates a manual treino for th...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~35-~35: Ensure spelling is correct
Context: ... badge. Independent test criteria: npm run e2e -- --grep "INSTRUTOR" passes with 1 new test (18/18 total). ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~37-~37: Ensure spelling is correct
Context: ...l). - [x] T003 [US1] Write E2E spec in tests/e2e/specs/instrutor-workflow.spec.ts — implement the full ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~48-~48: Ensure spelling is correct
Context: ...e2e/CRITICAL-PATHS.md` — add row 18 for "INSTRUTOR assigns workout → ALUNO sees Do Persona...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@specs/006-it4-instrutor-e2e/tasks.md` around lines 19 - 60, The checklist
mixes multiple concerns per item and violates the "one-file/one-concern" task
format; split and rewrite each checklist entry so every task line follows the
exact pattern "T## — <verb> in `path/to/file` — <exact change> | verify:
<command>" and map each existing item (T001..T008) to one distinct task
targeting the single file it changes (e.g., update
specs/006-it4-instrutor-e2e/tasks.md,
tests/e2e/specs/instrutor-workflow.spec.ts, tests/e2e/CRITICAL-PATHS.md,
docs/CURRENT-STATE.md, CHANGELOG.md, prisma/seed-e2e.ts) — for example: convert
the multi-step US01 checklist into one task that edits
tests/e2e/specs/instrutor-workflow.spec.ts to implement the cross-session flow
exactly as enumerated and add a verify clause "verify: npm run e2e -- --grep
\"INSTRUTOR\"", convert the CRITICAL-PATHS and docs/CHANGELOG updates into
separate tasks each referencing their single file and exact text changes with
corresponding verify commands, and convert the seed/read/quality-gates items
into their own tasks referencing prisma/seed-e2e.ts and the root scripts with
verify commands ("verify: npm run lint && npm run typecheck && npm test" or
"verify: npm run supabase:start && npm run seed:e2e && npm run e2e"). Ensure no
task bundles multiple files or concerns and that task IDs remain unique.
There was a problem hiding this comment.
Not changing. All 8 tasks are already ✅ complete. The phased format (phases, purpose headings, parallel execution diagram) carries more context than the bare T## — verb in file | verify: format. Reformatting completed historical tasks would lose that structure without any practical benefit. CLAUDE.md's task format applies to active planning tasks — not post-completion audit trails.
There was a problem hiding this comment.
@EmiyaKiritsugu3, understood — that's a fair distinction. Since all 8 tasks are already complete, reformatting them as active planning entries would serve no practical purpose and would remove the phased context. I'll note the clarification for future reviews.
✏️ Learnings added
Learnt from: EmiyaKiritsugu3
Repo: EmiyaKiritsugu3/PWeb_Project PR: 73
File: specs/006-it4-instrutor-e2e/tasks.md:19-60
Timestamp: 2026-04-20T05:00:20.682Z
Learning: In EmiyaKiritsugu3/PWeb_Project, the CLAUDE.md one-file/one-concern task format ("T## — <verb> in `path/to/file` — <exact change> | verify: <command>") applies only to *active* planning tasks, not to post-completion audit trails in specs/*/tasks.md files. Completed task files (all items ✅) may retain richer phased formats (phase headings, purpose lines, parallel markers) for historical context.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
🧠 Learnings used
Learnt from: CR
Repo: EmiyaKiritsugu3/PWeb_Project PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-11T19:01:48.591Z
Learning: Each task in execution must have exactly one file, one concern with format: T## — <verb> in `path/to/file.ts` — <exact change> | verify: <command>
Learnt from: CR
Repo: EmiyaKiritsugu3/PWeb_Project PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-11T19:01:48.591Z
Learning: Use Conventional Commit messages referencing task IDs (e.g., feat(e2e): T038 install Playwright)
Learnt from: CR
Repo: EmiyaKiritsugu3/PWeb_Project PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-11T19:01:48.591Z
Learning: Applies to tests/**/*.{spec,test}.{ts,tsx} : Use Playwright for E2E testing
…ails (#73) - docs/CURRENT-STATE.md: bump e2e count 17→18 in Quality Gates and Tech Stack - specs/005-it3-ai-workouts/plan.md: restore concrete IT3 plan (db1b27b accidentally overwrote it with the speckit template scaffold) - specs/006-it4-instrutor-e2e/plan.md: update risk register — ALUNO seed name is confirmed as "Aluno E2E", not TBD - specs/006-it4-instrutor-e2e/quickstart.md: step 6 — form reset assertion (not toast) matches actual E2E implementation (toHaveValue('')) - specs/006-it4-instrutor-e2e/research.md: narrow "fully implemented" claim; add Known gap noting instrutorId auth enforcement is missing in upsertTreinoAction (It5 hardening) - specs/006-it4-instrutor-e2e/spec.md: fix seed credential emails to match seed-e2e.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (2)
specs/006-it4-instrutor-e2e/research.md (1)
10-14: Good gap disclosure—add a concrete tracking reference for It5 hardening.Please include an issue/ticket ID (or ADR link) next to this known gap so the authorization hardening isn’t lost in backlog drift.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@specs/006-it4-instrutor-e2e/research.md` around lines 10 - 14, Update the Known gap entry for upsertTreinoAction to include a concrete tracking reference for the It5 authorization hardening: edit the text that mentions upsertTreinoAction and instrutorId to append a ticket/issue ID or ADR link (for example "TODO: track It5 hardening — ISSUE-1234" or an ADR URL) so the task won't be lost; ensure the reference is colocated with the sentence describing the gap and clearly labeled as the It5 follow-up.specs/006-it4-instrutor-e2e/quickstart.md (1)
17-18: Make exercise selection deterministic in the runbook.“Click first option” is fragile for manual reruns and future data changes. Prefer documenting a concrete seeded exercise label (or explicit match criterion) instead of relying on list order.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@specs/006-it4-instrutor-e2e/quickstart.md` around lines 17 - 18, Replace the fragile "click first option" step with a deterministic selection: when describing the Shadcn Combobox search, specify the exact seeded exercise label (e.g., "Agachamento") or an explicit match criterion (e.g., click the option whose text equals "Agachamento — 3x10") instead of relying on list order; reference the "Adicionar Exercício" button to open the combobox and verify selection by asserting the exercise label appears in the exercise list before proceeding to "Salvar Treino" and the "objetivo" input reset.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@specs/006-it4-instrutor-e2e/quickstart.md`:
- Around line 17-18: Replace the fragile "click first option" step with a
deterministic selection: when describing the Shadcn Combobox search, specify the
exact seeded exercise label (e.g., "Agachamento") or an explicit match criterion
(e.g., click the option whose text equals "Agachamento — 3x10") instead of
relying on list order; reference the "Adicionar Exercício" button to open the
combobox and verify selection by asserting the exercise label appears in the
exercise list before proceeding to "Salvar Treino" and the "objetivo" input
reset.
In `@specs/006-it4-instrutor-e2e/research.md`:
- Around line 10-14: Update the Known gap entry for upsertTreinoAction to
include a concrete tracking reference for the It5 authorization hardening: edit
the text that mentions upsertTreinoAction and instrutorId to append a
ticket/issue ID or ADR link (for example "TODO: track It5 hardening —
ISSUE-1234" or an ADR URL) so the task won't be lost; ensure the reference is
colocated with the sentence describing the gap and clearly labeled as the It5
follow-up.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4bbb9a2b-4054-4587-b97a-863780edfa1e
📒 Files selected for processing (5)
docs/CURRENT-STATE.mdspecs/006-it4-instrutor-e2e/plan.mdspecs/006-it4-instrutor-e2e/quickstart.mdspecs/006-it4-instrutor-e2e/research.mdspecs/006-it4-instrutor-e2e/spec.md
🚧 Files skipped from review as they are similar to previous changes (1)
- docs/CURRENT-STATE.md
Summary
tests/e2e/specs/instrutor-workflow.spec.ts: cross-session E2E where INSTRUTOR creates a manual treino and ALUNO asserts the workout appears in/aluno/meus-treinoswith the "Do Personal" badgeworkout-session.spec.tsrow selector: narrows fromdiv.rounded-lgtodiv.rounded-lg.border.p-4to avoid strict-mode violation when multiple Do Personal treinos are presentCRITICAL-PATHS.md: 17 → 18 covered scenarios + new Lessons Learned section (cmdk selectors, sidebar JS click, section-card vs row ambiguity, test data hygiene)Test plan
npm run lint→ 0 errorsnpm run typecheck→ 0 errorsnpm test→ 22/22 unit testsnpx playwright test→ 18/18 E2E scenarios🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Tests
Documentation
Chores