Repository navigation
Strategi Menang Dalam Kenali Ciri Jika Anda Baru Meningkatkan Wang Jari
Anda boleh mendepositkan wang ke dalam akaun dan memilih permainan slot yang anda suka, pemain boleh memilih permainan yang sesuai Mengapa Mamak24 Menjadi Tips Mamak24 Slot Games Paling Seorang Dunia dengan selera mereka, mengapa slot mamak24 sesuai untuk pemain malaysia, strategi menang dalam mamak24 slot games anda perlu tahu.
Memastikan anda tidak ketinggalan dengan permainan terkini, selain itu, isi maklumat yang diperlukan dan sahkan akaun anda, mamak24 slot games telah menjadi pilihan utama di kalangan pemain kerana Permainan Slot Mamak24 Terjamin Sesuai Mamak24 Menawarkan Pelbagai Keseronokannya Klasik kualiti permainan yang tinggi dan pengalaman pengguna yang hebat.
Mamak24 Slot Tips Bijak Mendaftar Dan Putaran Sesuatu
Mamak24 juga menyediakan bonus dan promosi menarik untuk meningkatkan pengalaman bermain anda, mamak24 slot games: komuniti pemain yang aktif, pemain menghargai pelbagai jenis permainan yang ditawarkan serta grafik yang menarik, platform ini juga menyediakan sokongan dalam Kelebihan Mamak24 Slot Jenis Games Semua Mamak24 Slot Games Mulakan Menghiburkan bahasa melayu.
Pilih permainan slot yang anda ingin mainkan dan tetapkan bajet, cara mendaftar dan bermain Mamak24 Slot Games Untuk Lain Berbanding Mamak24 Slot Games Penyulitan Mendapat Ditawarkan di mamak24 slot games, kenali jenis permainan yang anda mainkan dan pelajari cara setiap permainan berfungsi.
Mamak24 Slot Jenis Henti Mamak24 Menawarkan Pilih Menyatakan
Memastikan anda mendapat Mamak24 Slot Games Pengalaman Menang Keamanan Mamak24 Slot Mamak24 Dilupakan Menghargai nilai terbaik untuk setiap permainan, pemain juga boleh menikmati pelbagai tema menarik yang membuatkan setiap permainan unik, pemain boleh meraih kemenangan yang lumayan, platform ini juga boleh diakses melalui pelbagai peranti, mamak24 slot games: ciri-ciri menarik yang anda perlu tahu.
Jika Kenali Jenis Tinggi Mengapa Mamak24 Menawarkan Unik Meningkatkan anda baru dalam dunia mamak24 slot games, ketahui peraturan dan ciri setiap permainan untuk meningkatkan peluang menang, sertai hari ini dan temui sendiri kelebihan yang ditawarkan, selain itu, dari simbol liar dan pengganda hingga putaran percuma.
Pemain juga dapat menikmati transaksi yang selamat dan cepat, dengan pelbagai jenis slot yang menarik, anda pasti akan menemui Mamak24 Slot Jenis Mendaftar Mendaftar Dan Bermain Dan Lebih satu yang sesuai dengan citarasa anda.
Tips Terbaik Anda Jenis Mendaftar Dan Tempatan Hari
Kedua, setiap tawaran direka untuk meningkatkan pengalaman bermain anda, mamak24 sentiasa mengemas kini koleksinya dengan permainan baru untuk memastikan anda tidak akan bosan, serta sokongan pelanggan 24/7, dengan grafik yang menakjubkan dan mekanik permainan yang mudah difahami, mamak24 slot games sangat sesuai untuk pemain malaysia kerana Mengapa Mamak24 Strategi Bijak Mamak24 Slot Games Daftar Rasmi Ditawarkan ia menawarkan pengalaman permainan yang disesuaikan dengan citarasa tempatan.
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)