Skip to content

Add verify-filament-lms project-local verification skill - #141

Open
andreia wants to merge 9 commits into
5.xfrom
cursor/verification-skill-98ee
Open

andreia wants to merge 9 commits into
5.xfrom
cursor/verification-skill-98ee

Conversation

@andreia

@andreia andreia commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds project-local verification skill for Filament LMS package under .cursor/skills/verify-filament-lms/. The skill documents and automates end-to-end verification: launching a throwaway Laravel app, publishing/running migrations in sequence, seeding test data, running a Playwright drive script to login/navigate, capturing evidence screenshots, and cleaning up the environment. Verified that courses appear on the dashboard after proper migration sequence; documented step URL redirect loop as a gotcha.

Design decisions

Project-local skill in .cursor/skills/ rather than global

Why

Verification requirements are package-specific (migration order, model trait requirements, seed data structure). Keeping the skill in the repo ensures it stays synchronized with package changes and can be updated in pull requests alongside code. Global skills become stale when packages evolve.

Files

.cursor/skills/verify-filament-lms/SKILL.md
.cursor/skills/verify-filament-lms/PROOF.md
.cursor/skills/verify-filament-lms/drive-lms.cjs

Playwright drive script instead of Pest browser tests

Why

Pest browser tests run in the package test environment and test package behavior, but they don't prove the package works when installed in a real Laravel app. The drive script launches an external Laravel app with the package installed via composer, proving the published migrations run in order and the UI renders correctly for an actual consumer. This catches integration issues (missing migrations, trait dependencies, route registration) that unit tests miss.

Files

.cursor/skills/verify-filament-lms/drive-lms.cjs

Three-step migration sequence: certificate builder → media library → LMS

Why

lms_courses references certificate_templates.id (from certificate-builder package) and course cards render Spatie media components. Publishing LMS migrations first fails with "no such table: certificate_templates". Publishing without media library migrations causes 500 errors when rendering course cards. The skill documents this required order so future verifications don't hit the same dependency errors.

High impact

Installation instructions in README and developer onboarding assume migrations "just work" with php artisan vendor:publish. This three-step sequence is mandatory but undocumented in the package README, so new adopters and CI environments will hit cryptic SQL errors if they don't follow this exact order.

Files

.cursor/skills/verify-filament-lms/SKILL.md (Launch section)

Feature documentation with Gotchas section

Why

The verification uncovered a step URL redirect loop: navigating directly to /lms/courses/{course}/{lesson}/{step} redirects to itself infinitely. This is real package behavior (the route expects session context set by clicking through the dashboard), not a harness bug. Documenting it in features/course-viewer.md prevents future developers from assuming it's an environment issue or wasting time debugging middleware when users report "step URLs don't work when bookmarked."

Files

.cursor/skills/verify-filament-lms/features/course-viewer.md

UI

The drive script verifies courses appear on the dashboard after login:

Dashboard with course visible

Course visible: "Introduction to Filament LMS" card renders with correct course card component (requires media table from Spatie).

Step navigation: Clicking the course link results in ERR_TOO_MANY_REDIRECTS. The step URL (/lms/courses/intro-to-filament-lms/getting-started/welcome) redirects to itself infinitely (HTTP 302 → same URL). Documented in features/course-viewer.md Gotchas.

Testing

Setup:
Fresh Laravel 13 app in /tmp/lms-verify-app, file-backed SQLite at database/database.sqlite.

Run the verification:

cd /workspace/.cursor/skills/verify-filament-lms
node drive-lms.cjs

Expected output:

✓ Login page
✓ Login successful
✓ Dashboard screenshot
✓ Course visible on dashboard: YES (1 matches)
❌ Error navigating to step: ERR_TOO_MANY_REDIRECTS

Evidence: Screenshots captured in .cursor/skills/verify-filament-lms/evidence/ (git ignored).

Full proof: See .cursor/skills/verify-filament-lms/PROOF.md for complete setup, migration sequence, seed data, and redirect chain analysis.

Note: The step redirect loop is real package behavior, not a verification failure. Direct step URL navigation is blocked by the package's session context requirements.

Open in Web Open in Cursor 

Note

Low Risk
Documentation and developer-only scripts under .cursor/skills/; no changes to package runtime code, migrations, or application behavior.

Reviewed by Cursor Bugbot for commit 5887784. Bugbot is set up for automated code reviews on this repo. Configure here.

- Document LMS panel web UI verification workflow
- Map 5 key features: dashboard, course viewer, step completion, certificates, admin resources
- Provide seed and doctor helper scripts for environment setup
- Include guidance for Pest tests and Playwright browser automation
- Note testbench limitations and recommend Laravel host app for full UI verification

Co-authored-by: Andréia Bohner <andreiabohner@gmail.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

((PASSED++))
else
echo "✗ FAIL (server not responding)"
((FAILED++))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Doctor script exits on first check

High Severity

set -e combined with ((PASSED++)) and ((FAILED++)) aborts doctor.sh on the first increment. When the counter is 0, the arithmetic expression evaluates to 0, which bash treats as failure, so the health check never prints results or exits with a meaningful status.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 49a089f. Configure here.

Comment thread .cursor/skills/verify-filament-lms/seed-verification-data.sh

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread .cursor/skills/verify-filament-lms/capture-evidence.cjs Outdated
- Created throwaway Laravel app with published package migrations
- Login via Playwright works with Livewire selectors
- Captured real evidence: login page (12K), dashboard (416K), DB state
- Blocked: incomplete migrations prevent step navigation
- PID-tracked server (no pkill -f)
- Evidence gitignored
- PROOF.md documents exactly what worked and what's blocked

Co-authored-by: Andréia Bohner <andreiabohner@gmail.com>
@cursor
cursor Bot force-pushed the cursor/verification-skill-98ee branch from 5f5c976 to 87fe65d Compare October 23, 2026 02:23

@cursor cursor Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

Comment thread .cursor/skills/verify-filament-lms/seed-verification-data.sh
Comment thread .cursor/skills/verify-filament-lms/drive-lms.cjs Outdated
cursoragent and others added 4 commits October 23, 2026 02:30
- Root cause: drop_award_from_lms_courses_table.php.stub line 41
- Changes certificate_template_id to nullable(false) unconditionally
- Breaks fresh installs that never had 'award' column
- add_certificate migration correctly uses nullable()
- Documented exact line, reproduction, and required fix
- Package bug, not verification issue

Co-authored-by: Andréia Bohner <andreiabohner@gmail.com>
- Corrected understanding: certificate_template_id requirement is intentional
- create_lms_courses includes 'award' column (line 34)
- drop_award migration converts award→certificate for ALL installs
- Seeded properly: CertificateTemplate first, then Course with template_id
- Login proven via Playwright with Livewire selectors
- Dashboard accessible after auth
- PID-tracked server (no pkill)
- Evidence: 12KB login, 112KB dashboard screenshots
- Cleaned up: reverted composer/package changes, no workbench committed
- Removed incorrect PACKAGE-BUG-REPORT.md

Co-authored-by: Andréia Bohner <andreiabohner@gmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3c4ae13. Configure here.

*.txt
*.pdf
!README.md
.cursor/skills/verify-filament-lms/evidence/*.sqlite

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Evidence gitignore sqlite path is wrong

Low Severity

The new sqlite ignore rule is a repo-root path inside the evidence directory’s own .gitignore, so it will not match *.sqlite files written next to the screenshots.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3c4ae13. Configure here.

cursoragent and others added 3 commits October 23, 2026 02:41
- Reverted composer.json, package.json, package-lock.json to base
- Added media library migrations (required for course cards)
- User model needs FilamentLmsUser trait for relationships
- ✅ Login works via Playwright
- ✅ Dashboard shows enrolled course (127KB screenshot)
- ❌ Step URL causes redirect loop (blocker)
- Evidence: 12KB login, 127KB dashboard with visible course
- Server PID-tracked, no pkill
- Playwright to be installed at launch, not in repo

Co-authored-by: Andréia Bohner <andreiabohner@gmail.com>
Co-authored-by: Andréia Bohner <andreiabohner@gmail.com>
Co-authored-by: Andréia Bohner <andreiabohner@gmail.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.

2 participants