Skip to content

🚀 Complete Topic-Only Flashcard Architecture Migration & 100% Working Workflow - #3

Merged
buger merged 70 commits into
mainfrom
fix-unit-deletion-and-phpunit-warnings
Sep 24, 2025
Merged

🚀 Complete Topic-Only Flashcard Architecture Migration & 100% Working Workflow#3
buger merged 70 commits into
mainfrom
fix-unit-deletion-and-phpunit-warnings

Fix N+1 query performance issues across planning and subjects

6d9cfbb
Select commit
Loading
Failed to load commit list.
probelabs / Visor: style succeeded Sep 24, 2025 in 5m 39s

✅ Check Passed (Warnings Found)

style check passed. Found 2 warnings, but fail_if condition was not met.

Details

📊 Summary

  • Total Issues: 5
  • Warning Issues: 2

🐛 Issues by Category

🎨 Style (4)

  • ⚠️ app/Http/Controllers/FlashcardController.php:1079 - The controller returns raw HTML strings for validation errors, mixing presentation logic (HTML/CSS) with controller logic. This violates the Separation of Concerns principle and makes the UI harder to maintain. This pattern is repeated on lines 1093, 1119, 1201, 1390, 1473, 1600, and 1878.
  • ℹ️ app/Http/Controllers/TopicController.php:154 - The comment // Store title as title is tautological and adds no value, as the code 'title' => $validated['title'] is self-explanatory. This also applies to similar comments on lines 225 and 376.
  • ℹ️ resources/views/planning/partials/create-session-form.blade.php:88 - The HTMX indicator logic was changed from using .htmx-indicator class to a custom implementation with .htmx-indicator and .htmx-regular spans. This is a good fix for the button visibility issue, but the new Creating... text in the indicator span is less descriptive than the original creating key, which could be localized. It also differs from other potential HTMX indicators in the application.
  • ℹ️ resources/views/subjects/partials/subjects-list.blade.php:6 - The CSS classes on the <h3> and <a> tags are effective but could be slightly better organized for readability. Adding block and truncate to the anchor tag is a good way to ensure the entire area is clickable and text overflow is handled.

📚 Documentation (1)

  • ⚠️ app/Http/Controllers/PlanningController.php:671 - The new public method destroySession lacks a PHPDoc block. For consistency and maintainability, all public methods should have clear documentation explaining their purpose, parameters, and return values.

Generated by Visor - AI-powered code review

Annotations

Check warning on line 1079 in app/Http/Controllers/FlashcardController.php

See this annotation in the file changed.

@probelabs probelabs / Visor: style

style Issue

The controller returns raw HTML strings for validation errors, mixing presentation logic (HTML/CSS) with controller logic. This violates the Separation of Concerns principle and makes the UI harder to maintain. This pattern is repeated on lines 1093, 1119, 1201, 1390, 1473, 1600, and 1878.
Raw output
Create a dedicated Blade partial for rendering errors. The controller should return a response rendering this view with the error data. For example: `return response()->view('partials.form-error', ['errors' => $cardErrors], 422);`

Check warning on line 686 in app/Http/Controllers/PlanningController.php

See this annotation in the file changed.

@probelabs probelabs / Visor: style

documentation Issue

The new public method `destroySession` lacks a PHPDoc block. For consistency and maintainability, all public methods should have clear documentation explaining their purpose, parameters, and return values.
Raw output
Add a complete PHPDoc block to the `destroySession` method.

Check notice on line 154 in app/Http/Controllers/TopicController.php

See this annotation in the file changed.

@probelabs probelabs / Visor: style

style Issue

The comment `// Store title as title` is tautological and adds no value, as the code `'title' => $validated['title']` is self-explanatory. This also applies to similar comments on lines 225 and 376.
Raw output
Remove the redundant comment. The code is clear on its own.

Check notice on line 91 in resources/views/planning/partials/create-session-form.blade.php

See this annotation in the file changed.

@probelabs probelabs / Visor: style

style Issue

The HTMX indicator logic was changed from using `.htmx-indicator` class to a custom implementation with `.htmx-indicator` and `.htmx-regular` spans. This is a good fix for the button visibility issue, but the new `Creating...` text in the indicator span is less descriptive than the original `creating` key, which could be localized. It also differs from other potential HTMX indicators in the application.
Raw output
For consistency and localization support, consider using a translation key for the indicator text, e.g., `{{ __('creating') }}`.

Check notice on line 8 in resources/views/subjects/partials/subjects-list.blade.php

See this annotation in the file changed.

@probelabs probelabs / Visor: style

style Issue

The CSS classes on the `<h3>` and `<a>` tags are effective but could be slightly better organized for readability. Adding `block` and `truncate` to the anchor tag is a good way to ensure the entire area is clickable and text overflow is handled.
Raw output
No change is strictly necessary, but for large projects, standardizing the order of CSS classes (e.g., layout, typography, color) can improve maintainability. The current implementation is functionally correct.