Skip to content

Conversation

@mhafiz03
Copy link

@mhafiz03 mhafiz03 commented Nov 8, 2025

I have no words because a picture is worth 1000 words, but a lot of pictures...

image image image image image image image image image image image image image image image image image image image image image image image image image image image image image image image image

DiyArc-350 and others added 30 commits January 20, 2025 16:10
@mhafiz03 mhafiz03 reopened this Nov 8, 2025
@mhafiz03 mhafiz03 marked this pull request as ready for review November 8, 2025 11:41
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mhafiz03
Copy link
Author

mhafiz03 commented Nov 8, 2025

@codex summarize this whole PR

@chatgpt-codex-connector
Copy link

Full Featured LMS 2.0 — Summary

🎯 High-Level Goals

  • Deliver a major UI/UX refresh and feature expansion for the learning management system.
  • Modernize the frontend stack (React 19, Inertia 2.0) and enhance real-time capabilities (Laravel Reverb).
  • Extend auditing, polling, grading, and media-management functionality to support richer praktikum operations.

🛠️ Core Features & Implementations

  1. Assistant Workflows

    • New React components for polling, plotting, violations (“Pelanggaran”), grading, modules, role management, praktikan management, and audit logs.
    • Toolbar actions (e.g., add module, reset module) and modal dialogs support end-to-end assistant tasks.
    • TanStack Query introduced to orchestrate data fetching and caching.
  2. Frontend Modernization

    • Upgrade to React 19 + Inertia.js 2.0, ensuring compatibility with latest client/server rendering patterns.
    • UI design overhaul featuring a depth-themed design system with light/dark mode support.
    • Integration with ImageKit for media uploads and optimized delivery.
  3. Backend & Infrastructure

    • New audit logging infrastructure (database tables, middleware, controllers) to capture assistant actions.
    • Real-time broadcasting via Laravel Reverb; middleware and providers adapted to support new authentication/broadcast flows.
    • Autosave and snapshot management APIs for praktikan submissions.
  4. Data Model Enhancements

    • Database migrations for audit logs, praktikum sessions tracking, ratings, TOT classes, and file uploads tied to questions.
    • Model relationship updates to align with new tables and remove deprecated entities (deadlines, violations, piket schedules, reminder systems, laporan PJ).
  5. Authentication & Middleware

    • Adjusted login requests (PraktikanLoginRequest, AsistenLoginRequest) to handle new response flows.
    • Updated middleware stack for assistant API routes (with noted need to secure profile picture endpoints).

🔍 Reviewer Feedback Highlights

  • Fix missing event handler for reset-modul.
  • Correct comment text (“Modal Reset Pelanggaran”).
  • Remove stray double semicolons in migrations.
  • Reintroduce consistent return types in authentication requests.
  • Restore/authenticate Sanctum middleware if required.
  • Add loading to toolbarConfig dependencies.
  • Secure assistant profile picture routes with auth:asisten.
  • Derive praktikan ID server-side in autosave APIs to prevent cross-account mutations.

✅ Overall Impact

A comprehensive overhaul that modernizes the LMS front-to-back, adds granular auditing, improves assistant workflows, and readies the platform for richer, real-time interactions.

View task →

- Updated ConfigurationController to handle new scheduling fields and logic for automatic TP activation based on schedule.
- Modified Configuration model to include scheduling properties and added method to refresh TP activation based on schedule.
- Added migration to introduce new scheduling fields in the configurations table.
- Updated frontend components to manage scheduling settings for Tugas Pendahuluan.
- Adjusted validation rules in JawabanTAController and JawabanTKController to allow for flexible answer submissions.
- Created tests for configuration scheduling behavior and multiple submissions for TA and TK answers.
- Removed unnecessary middleware from routes and cleaned up code formatting in various files.
@mhafiz03
Copy link
Author

mhafiz03 commented Nov 8, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mhafiz03 mhafiz03 requested a review from Copilot November 8, 2025 18:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 174 out of 569 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mhafiz03 mhafiz03 requested a review from Copilot November 9, 2025 04:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 177 out of 594 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mhafiz03
Copy link
Author

mhafiz03 commented Nov 9, 2025

@codex review /resources part

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mhafiz03
Copy link
Author

mhafiz03 commented Nov 9, 2025

@codex review /app

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mhafiz03 mhafiz03 marked this pull request as draft November 9, 2025 05:08
…e to imagekit endpoints, and fix change password modal
- Added laminas/laminas-diactoros v3.8.0 for PSR HTTP Message implementations.
- Added laravel/octane v2.13.1 to enhance Laravel application's performance.
- Added predis/predis v3.2.0 for Redis client support.
- Added symfony/psr-http-message-bridge v7.3.0 for PSR HTTP message bridging.

refactor: Improve AssistantNav and PraktikanNav components

- Wrapped navigation items in a scrollable container in AssistantNav.
- Introduced path normalization in PraktikanNav for better URL handling.

style: Adjust styles in ScoreDisplayModal for better UI

- Updated background gradients and border styles for improved visual consistency.

fix: Refactor FeedbackPhase component for better structure and performance

- Enhanced dropdown functionality for selecting assistants.
- Improved feedback input handling and validation messages.

chore: Minor adjustments in Jurnal component for file upload handling

- Moved file input to a more appropriate location in the Jurnal component.

test: Add cache validation test in ConfigurationScheduleTest

- Implemented a test to ensure schedule state is cached after API request.
@mhafiz03
Copy link
Author

Summary Changes
Major UI/UX redesign, huge honorable mention to https://youtu.be/wcZ6jSlZqDc for design tips, followed by https://x.com/nocheerleader/status/1934648816193458539 for the vibe-coding tips.

Here is the following tech stack update in this pull request:

  • Redis
    Required for Laravel Reverb when QUEUE_CONNECTION=redis because ShouldBroadcast (async) is used.
  • Laravel Octane (FrankenPHP)
    To serve in production, inspired by https://www.linkedin.com/pulse/laravel-12-performance-face-off-2025-frankenphp-roadrunner-roque-4rnrf/
  • Laravel Reverb
    For websockets, following what the progenitor of Daskom Web did in the praktikum mechanism.
  • Laravel Horizon
    Queue manager, alternative to php artisan queue:work but has automatic job retry
    Required
  • React 19 (with React Compiler)
  • Inertia JS 2.0 (to support React 19)
  • Docker Compose with supervisor.conf

New frontend packages:

  • ImageKit React
    Generous free-tier image CDN, following previous contributors steps'
  • Laravel Echo
    Websockets
  • React Markdown
    To render questions with markdown
  • React Syntax Highlighter
    To render questions with code
  • Remark breaks & gfm
    To render markdown with line breaks
  • Tanstack Query (previously named React Query)
    Automatic data fetching retry and caching.

Extra Notes:

  • Using Predis so that dunglas/frankenphp:1.9.1-php8.4.13-alpine can connect to Redis.
  • Toolbar actions (e.g., add module, reset module) besides title of each page.
    AssistantLayout.jsx:19-160
    AssistantToolbarContext.jsx:3-28
  • UI mass redesign with depth (depth-* Tailwind class utilities) and light/dark mode support with a bit of glass morphism gradients.
    app.css:9-160
    Praktikan/PollingPage.jsx:192-247
    DepthToggleButton.jsx:1-30
  • Integration with ImageKit to change profile picture of asisten/praktikan and enable support to upload images to TP/FITB/journal questions (for flowchart) with respective migrations.
    useImageKitUpload.js:5-149
    ModalEditProfile.jsx:4-152
    Jurnal.jsx:9-138
    ImageKitAuthController.php:10-105
    add_profile_picture_to_praktikans_table.php:12-27
    add_attachment_fields_to_jawaban_jurnals_table.php:14-27
  • New audit logging service (database tables, middleware, controllers) to capture assistant actions.
    create_audit_logs_table.php:14-41
    Middleware/LogAssistantAction.php:10-66
    Services/AuditLogger.php:5-39
    AuditLogController.php:10-58
    AuditLogs.jsx:1-10
    AuditLogsTable.jsx:1-150
  • Autosave for praktikan answers when in praktikum and praktikan having sticky questions, so that refreshing to get different questions is not possible anymore.
    PraktikumPage.jsx:315-1003
    AutosaveSnapshotController.php:18-210
    QuestionProgressService.php:15-115
  • Remove deprecated tables (deadlines, pelanggaran, jadwal piket, reminder, laporan pj).
  • ModalPortal.jsx for unified modal with click outside to close
    Assistant modals (e.g., ModalPasswordAssistant.jsx, ModalInputNilai.jsx, ModalKonfigurasi.jsx, ModalOpenKJ.jsx, ModalResetInputSoal.jsx, ModalAddModule.jsx, ModalEditProfile.jsx, ModalEditModule.jsx, ModalDeletePraktikan.jsx, ModalDeletePlottingan.jsx, ModalAnomalyPraktikum.jsx, ModalUpsertPraktikan.jsx, ModalBatchEditSoal.jsx, ModalAddJenisPolling.jsx, ModalResetPlottingan.jsx, ModalAddRole.jsx, ModalResetPelanggaran.jsx, ModalEditSoalEssay.jsx, ModalCompareSoal.jsx, ModalEditSoalPG.jsx, ModalJawabanTP.jsx, ModalResetModule.jsx, ModalLaporan.jsx, ModalConfirmDeleteRole.jsx, ModalActiveTP.jsx, ModalLogout.jsx) for consistent z-index/close behavior. Shared common modals: ModalPassword.jsx and ModalLogout.jsx
  • Model relationships & cleanup (SoalTa/SoalTk now pivot through SoalOpsi; legacy essay columns dropped).
    SoalTa.php:30-95
    SoalTk.php:30-95
    SoalOpsi.php:8-37
    update_soal_question_schema.php:15-112
  • Update Soal TA/TK schema to pivot via soal_opsis.
    update_soal_question_schema.php:56-112
    SoalTa.php:44-95
    SoalTk.php:44-95
  • Praktikum session presence & answered-question tracking (presence channels + progress payloads).
    ContentPraktikum.jsx:498-552
    PraktikumPage.jsx:1349-1367
    QuestionProgressService.php:48-150
    routes/channels.php:13-40
    Events/PraktikumProgressUpdated.php:11-37
  • Broadcast authentication & middleware (guards for Echo/Reverb/Horizon).
    Middleware/AuthenticateBroadcasting.php:10-43
    routes/channels.php:5-34
  • Input Soal analyze modal (Quizizz-inspired analytics drawer on Soal page).
    ContentSoal.jsx:5-52
    ModalAnalyzeSoalPG.jsx:1-118
  • Google integration (TA/TK auto form builder via Drive/Form APIs).
    ContentSoal.jsx:21-46
    ModalGoogleTools.jsx:7-453
    useGoogleApis.js:17-229
    googleForms.js:103-250
  • Start Praktikum stopwatch (count-up clock + phase timers).
    ContentPraktikum.jsx:303-380
    StartPraktikum.jsx:1-10
  • Seelabs shortcut (SeeLabs iframe automate navigation for nilai).
    ShortcutWindow.jsx:1-210
    ContentNilai.jsx:10-451
  • Multi-select bulk operations (Manage Modul + Input Nilai).
    TableModule.jsx:1-150
    ContentNilai.jsx:105-434
  • Manage Praktikan page (filters, search) + dedicated password reset block.
    ContentManagePraktikan.jsx:1-160
    ContentSetPraktikan.jsx:1-12
    FormChangePassPraktikan.jsx:1-156
  • Role-aware navigation (hide/show entries per permission + role).
    AssistantNav.jsx:31-149 & lines 222-314
  • Leaderboard ranking page (ranking grid + modal detail).
    LeaderboardRanking.jsx:1-10
    ContentRanking.jsx:6-160
  • Assistant Polling/Modul/Praktikum pages completed with layouts + content.
    PollingAssistant.jsx:1-11 & ContentPolling.jsx:82-150
    ModulePraktikum.jsx:1-11 & ContentModule.jsx:17-55
    StartPraktikum.jsx:1-10 & ContentPraktikum.jsx:700-930
  • File upload support in questions (enable flags + ImageKit-backed attachments).
    add_file_upload_bool_soal_jurnals_table.php:14-25
    add_enable_file_upload_to_soal_fitbs_table.php:11-23
    add_attachment_fields_to_jawaban_jurnals_table.php:14-27
    Jurnal.jsx:26-138

…on errors in AuditLogsTable, and change background color in light mode in PraktikanNav
@fakhrip fakhrip marked this pull request as ready for review November 12, 2025 02:37
@fakhrip fakhrip self-requested a review November 12, 2025 02:37
@fakhrip fakhrip enabled auto-merge (squash) November 12, 2025 02:39
@mhafiz03
Copy link
Author

@codex review resources/ and app/ folders

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 39 to +40
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Failed to retrieve Asisten.',
'error' => $e->getMessage(),
], 500);
return redirect()->back()->with('error', 'Failed to retrieve Asisten.');

Choose a reason for hiding this comment

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

P1 Badge Return JSON error from Asisten index instead of redirect

The index action now catches exceptions by returning redirect()->back() with a flash message. Because this controller lives under the API namespace, callers expect a JSON error response but will instead receive a 302/HTML page, which breaks existing consumers and hides the underlying failure message. Restore the previous JSON error handling so the endpoint behaves consistently for API clients.

Useful? React with 👍 / 👎.

Comment on lines +73 to +75
const abort = useCallback(() => {
if (uploadRef.current) {
uploadRef.current.abort();

Choose a reason for hiding this comment

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

P2 Badge Wire abort controller in ImageKit upload hook

The hook exposes an abort() method that calls uploadRef.current.abort(), but upload() never assigns uploadRef.current to an AbortController or Axios cancel token. As a result the ref stays null and calling abort() during an in‑flight upload does nothing, leaving the request running and the UI stuck in an uploading state. Attach the controller to the ref when starting an upload so requests can actually be canceled.

Useful? React with 👍 / 👎.

Comment on lines +66 to +75
private function getRedisKeys(string $pattern): array
{
if ($this->cacheStore !== 'redis') {
return [];
}

try {
$redis = Redis::connection('cache');
$keys = $redis->keys($pattern);

Choose a reason for hiding this comment

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

P1 Badge Avoid blocking Redis with KEYS in autosave snapshot queries

getRedisKeys() fetches snapshot entries using Redis::connection('cache')->keys($pattern). The KEYS command performs a full scan of the keyspace and blocks the Redis server while it runs; when many autosave entries exist this call will stall other requests and can degrade the whole application. Use a cursor (SCAN) or a prefixed set to enumerate keys without blocking.

Useful? React with 👍 / 👎.

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.

6 participants