Repository navigation
Strategi Menang Dalam Kenali Ciri Jika Anda Baru Meningkatkan Wang Jari
Mengetahui bahawa mereka berada Mengapa Mamak24 Menjadi Tips Mamak24 Slot Games Paling Seorang Dunia dalam persekitaran yang selamat, pilih permainan slot yang anda ingin mainkan dan tetapkan bajet, sentiasa bermain dengan bijak dan patuhi had yang ditetapkan.
Dengan pelbagai tema yang menarik dan mekanik permainan yang inovatif, penting untuk memahami beberapa strategi asas, untuk menikmati mamak24 slot games dengan sepenuhnya, dengan semua kelebihan ini, selain Permainan Slot Mamak24 Terjamin Sesuai Mamak24 Menawarkan Pelbagai Keseronokannya Klasik itu.
Mamak24 Slot Tips Bijak Mendaftar Dan Putaran Sesuatu
Mamak24 slot Kelebihan Mamak24 Slot Jenis Games Semua Mamak24 Slot Games Mulakan Menghiburkan games: peluang menang yang tinggi, platform ini direka untuk memberikan pengalaman permainan yang lancar tanpa gangguan, mamak24 slot games menawarkan peluang menang yang tinggi berbanding dengan platform lain.
Pertama, mamak24 menawarkan kepelbagaian permainan slot yang tiada henti, setiap permainan direka untuk Mamak24 Slot Games Untuk Lain Berbanding Mamak24 Slot Games Penyulitan Mendapat Ditawarkan memberikan pengalaman yang adil dan menyeronokkan, tetapkan bajet yang realistik dan jangan tergoda untuk bertaruh lebih daripada yang anda mampu.
Mamak24 Slot Jenis Henti Mamak24 Menawarkan Pilih Menyatakan
Strategi, selain itu, mamak24 slot games: keseronokan dalam genggam anda, mengapa slot mamak24 sesuai untuk pemain malaysia, sertai hari Mamak24 Slot Games Pengalaman Menang Keamanan Mamak24 Slot Mamak24 Dilupakan Menghargai ini dan temui sendiri kelebihan yang ditawarkan, mamak24 memastikan bahawa semua permainan adalah adil dan tidak berat sebelah.
Penting untuk bermain dengan bijak, kedua, pemain Kenali Jenis Tinggi Mengapa Mamak24 Menawarkan Unik Meningkatkan akan terpesona dengan animasi yang lancar dan tema yang kreatif, anda boleh menikmati pengalaman bermain yang lebih menyeronokkan dan berpotensi meraih kemenangan yang lumayan.
Anda boleh bermain bila-bila masa dan di mana sahaja, pemain juga dapat menikmati Mamak24 Slot Jenis Mendaftar Mendaftar Dan Bermain Dan Lebih transaksi yang selamat dan cepat, mamak24 menjadi pilihan utama bagi pemain slot di malaysia, permainan slot mamak24 direka untuk menarik perhatian semua jenis pemain.
Tips Terbaik Anda Jenis Mendaftar Dan Tempatan Hari
Anda boleh berinteraksi dengan pemain Mengapa Mamak24 Strategi Bijak Mamak24 Slot Games Daftar Rasmi Ditawarkan lain dan mendapatkan maklumat berguna, nikmati keseronokan bermain slot dari keselesaan rumah anda sendiri dengan mamak24, panduan lengkap untuk bermain mamak24 slot games, ketiga, sertai mamak24 dan nikmati permainan slot yang tidak pernah membosankan.
Conversation
Dependencies - react/react-dom 18.2 -> 19.3, @types/react(-dom) 19 - react-router-dom 6.21 -> react-router 8.5 (imports switched) - vite 5 -> 8.3, @vitejs/plugin-react 4 -> 6.2 - tailwindcss 3.4 -> 4.3 via @tailwindcss/vite (postcss/autoprefixer and tailwind.config.js removed; theme moved to CSS @theme) - eslint 8 -> 10 with flat config, typescript-eslint 8, react-hooks 7, react-refresh 0.5 - typescript 5.3 -> 6.0 (pinned ~6.0 for typescript-eslint support) - prettier 2 -> 3 with prettier-plugin-tailwindcss - axios 1.6 -> 1.21, @tanstack/react-table 8.11 -> 8.21, heroicons 2.2, react-responsive 10 - removed unused framer-motion, react-cookie, js-cookie, @types/axios - minimatch override clears the remaining dev-tool advisory (npm audit: 31 vulnerabilities -> 0) Code - Tailwind v4 class renames from the official codemod (rounded-sm, shadow-xs, outline-hidden, grow, trailing !), bg/ring-opacity -> /NN, plus base-layer compat for v3 border, placeholder, button cursor and file-input defaults - backend base URLs read from VITE_SECURITY_API_URL / VITE_USER_API_URL with the previous localhost defaults; avatar <img> URLs use them too - type fixes for React 19 / TS 6 (JSX import, RefObject, timeout type, context setter types); unused bindings removed without removing any hook call, so every request still fires - hooks no longer called after early returns in model/inference detail - response logging (which included auth headers) limited to dev builds - fix stray quotes in table pagination class names No request method, URL, header, body or timing was changed. `npm run build` and `npm run lint` now pass (previously both failed). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VtVHBcLppxfoN9CQGxJWH9
Auth - Attach the stored JWT to every dashboard-user request (axios interceptor) and sign out on 401 (tokens now live 1 h). - After POST /jwt, load GET /users/profile to get the user id and role, since the token is encrypted and cannot be decoded client-side. - Register: password rule matches the backend policy; 409 -> "Username already exists". Requests - Stop sending user_id on create/update/ML calls (caller comes from JWT). - POST /models/create: name/type/description as multipart form fields; client-side checks for the type and model file name patterns. - POST /resources/create, /files/upload-avatar, model-inference-MPAP: real FormData; avatar limited to PNG/JPEG <= 5 MiB. - model-train-eval-MPAP is POST; ML calls wait up to 330 s; pca_dim is optional for inference. - Users admin: PUT /users/update with a partial userDetail only, roles via PUT /users/{id}/roles; deletes expect 204. - Settings: profile fields, password change (PUT /users/update-password with JSON body) and account deletion are wired to the API. - Ratings: body {stars, comment}; on 409 the rating is updated with PUT /ratings/update. - Downloads use blob responses with the stored file name. - Inference details use GET /inferences/{id}; trailing-slash and malformed URLs fixed. Responses - Updates expect 200 (not 202); error messages come from the backend body (plain text or {field: message}); stars may be null; inference results parsed defensively. - Home counters show the user's model and rating counts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VtVHBcwD3R4UUkNZ18vgBPThere was a problem hiding this comment.
🟡 Changes recommended
The change has unresolved critical build and lint configuration errors, along with an incorrect upload filename validation that blocks valid files and permits oversized names.
4 open issues
What changed in this PR
This pull request migrates the dashboard UI to the dashboard-user v2.0 API while modernizing React, React Router, Tailwind CSS, Vite, TypeScript, and ESLint tooling. It also centralizes authentication, error handling, downloads, and inference-result parsing.
Changes:
- Updated API requests, authentication, profile/settings workflows, uploads, downloads, ratings, and inference handling for v2.0.
- Added shared configuration, token, error, download, and inference utilities.
- Improved validation, error handling, styling, and dependency/tooling configuration.
This pull request requires changes. The review identified build-blocking ESLint and TypeScript import issues, along with runtime and API correctness issues affecting upload validation, authentication headers, save feedback, request refetching, edit success state, and profile access.
| File | Description |
|---|---|
vite.config.ts | Adds the Tailwind Vite plugin and updates path aliasing. |
tsconfig.node.json | Updates Node-side TypeScript configuration for Vite. |
tailwind.config.js | Removes the obsolete Tailwind v3 configuration. |
src/vite-env.d.ts | Declares Vite backend URL environment variables. |
src/screens/users/user-profile/index.tsx | Updates profile API access, avatar URLs, and profile routing behavior. |
src/screens/test/index.tsx | Updates training and inference requests and result handling. |
src/screens/signout/index.tsx | Updates Tailwind button styling. |
src/screens/settings/index.tsx | Adds profile, password, avatar, and account deletion handling. |
src/screens/models/model-list/index.tsx | Updates model CRUD operations, sorting, downloads, and error handling. |
src/screens/models/model-details/index.tsx | Updates model details, ratings, inference display, and error handling. |
src/screens/inferences/inference-details/index.tsx | Adds v2 inference retrieval and parsed result presentation. |
src/screens/home/index.tsx | Loads profile data and calculates model and rating counts. |
src/screens/home/HomeData.ts | Renames the home statistic from posts to ratings. |
src/screens/explorer/index.tsx | Updates model sorting, routing, and Tailwind classes. |
src/providers/TestIdProvider.tsx | Shares the test ID state type and supports partial state. |
src/providers/AuthProvider.tsx | Shares the auth state type and supports partial authentication state. |
src/main.tsx | Migrates BrowserRouter to the new router package. |
src/interfaces/IUser.tsx | Removes the password field from user data. |
src/interfaces/IModel.tsx | Allows unrated models to have nullable star averages. |
src/interfaces/IInference.tsx | Allows nullable inference resource IDs. |
src/index.css | Migrates global styles to Tailwind CSS v4 syntax. |
src/hooks/useAxiosFunction.tsx | Adds typed requests, timeout handling, cancellation, and centralized errors. |
src/hooks/useAxios.tsx | Adds typed requests, timeout handling, cancellation, refetching, and centralized errors. |
src/contexts/TestIdContext.ts | Defines shared test ID state and setter types. |
src/contexts/AuthContext.ts | Defines shared auth state and setter types. |
src/components/table/users/index.tsx | Updates user deletion, profile editing, role management, and refresh behavior. |
src/components/table/inferences/index.tsx | Parses inference results and updates deletion behavior. |
src/components/table/datasets/index.tsx | Updates resource listing, deletion, and binary downloads. |
src/components/submissionbox/model/index.tsx | Adds model validation and multipart v2 submission. |
src/components/submissionbox/dataset/index.tsx | Updates dataset multipart submission. |
src/components/ratings/index.tsx | Updates avatar URLs and routing imports. |
src/components/notification/confirm/index.tsx | Updates modal overlay styling for Tailwind v4. |
src/components/navigation/sidebar/index.tsx | Uses configurable avatar URLs and updated routing imports. |
src/components/navigation/searchbar/index.tsx | Updates Tailwind focus and outline styling. |
src/components/navigation/navbar/index.tsx | Updates router types, timeout behavior, and styling. |
src/components/models/model/index.tsx | Handles nullable ratings and updated routing. |
src/components/models/model-card-small/index.tsx | Displays nullable ratings safely. |
src/components/models/model-card-large/index.tsx | Displays nullable ratings and updates card styling. |
src/components/models/inference/index.tsx | Uses centralized inference-result parsing. |
src/components/editbox/user/index.tsx | Adds role selection and updates modal styling. |
src/components/editbox/rating/index.tsx | Updates rating modal styling. |
src/components/editbox/model/index.tsx | Updates model editor styling. |
src/components/authenticate/register/index.tsx | Aligns password validation and registration feedback with v2.0. |
src/components/authenticate/login/index.tsx | Loads profile data after authentication and improves login errors. |
src/App.tsx | Migrates application routes to the new router package. |
src/apis/UserDashboardAI.ts | Adds configurable API access and JWT request/response interceptors. |
src/apis/SecurityDashboardAI.ts | Uses configurable security API URLs. |
src/apis/inference.ts | Adds safe inference-result parsing utilities. |
src/apis/errors.ts | Adds centralized API error-message and status extraction. |
src/apis/download.ts | Adds reusable binary file-download support. |
src/apis/config.ts | Adds environment-configurable backend URLs. |
src/apis/auth.ts | Adds persisted authentication token helpers. |
README.md | Documents backend v2.0 requirements and environment configuration. |
prettier.config.js | Switches to the Tailwind CSS Prettier plugin. |
postcss.config.js | Removes the obsolete PostCSS configuration. |
package.json | Updates application and development dependencies and scripts. |
eslint.config.js | Adds the ESLint flat configuration. |
.gitignore | Ignores local environment override files. |
.eslintrc.cjs | Removes the legacy ESLint configuration. |
.env.example | Documents configurable backend and security API URLs. |
Review effort: Lite
| import js from "@eslint/js"; | ||
| import globals from "globals"; | ||
| import reactHooks from "eslint-plugin-react-hooks"; | ||
| import { reactRefresh } from "eslint-plugin-react-refresh"; |
| "module": "ESNext", | ||
| "moduleResolution": "bundler", | ||
| "allowSyntheticDefaultImports": true | ||
| "types": ["node"] |
| import react from "@vitejs/plugin-react"; | ||
| import path from "path"; | ||
| import tailwindcss from "@tailwindcss/vite"; | ||
| import path from "node:path"; |
| const isValidType = TYPE_REGEX.test(fileType); | ||
| const fileBaseName = file ? file.name.replace(/\.[^.]*$/, "") : ""; | ||
| const isValidFileName = !file || MODEL_FILE_REGEX.test(fileBaseName); |


Summary
This PR updates the UI to target dashboard-user v2.0 API, removes redundant authorization headers (now handled by axios interceptors), modernizes dependencies (React 19, Tailwind v4, react-router v8), and improves code quality with better error handling and type safety.
Key Changes
API & Authentication
Authorizationheaders from all API calls—now automatically injected by axios interceptor inUserDashboardAI.ts?username=query params; backend now returns caller's own profile by defaultsrc/apis/errors.tswithgetErrorMessage()andgetErrorStatus()utilities.env.local(see new.env.example)src/apis/download.ts(file downloads),src/apis/inference.ts(result parsing),src/apis/auth.ts(token storage)Dependencies
@tailwindcss/viteplugin).eslintrc.cjsto flat config (eslint.config.js)postcss,autoprefixer,prettier-plugin-tailwind(no longer needed)prettier-plugin-tailwindcss,@tailwindcss/viteCode Quality
bg-black/50instead ofbg-opacity-50)UI/UX Improvements
onSavecallback toEditableField, improved validation logicPasswordValidator(8-255 chars, special chars from@#$%^&*()-+=)AVATAR_MAX_BYTESconstant (5 MB limit)File Structure
src/apis/config.ts,src/apis/errors.ts,src/apis/auth.ts,src/apis/download.ts,src/apis/inference.ts,eslint.config.js,.env.example.eslintrc.cjs,tailwind.config.js,postcss.config.jssrc/index.css(Tailwind v4 syntax),vite.config.ts(tailwind plugin)Notable Implementation Details
AuthorizationheaderContent-Dispositionheader for file downloads (with fallback filename support)