91 Commits
Author SHA1 Message Date
MythEclipseandClaude 528a1622d0 fix(auth): prevent AuthInitializer from overwriting Zustand with null user
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 19:04:29 +07:00
MythEclipseandClaude 51a4cb9ed2 fix(auth): detect HTTPS via X-Forwarded-Proto for SameSite=None cookies, fix AuthGuard null overwrite
- Cookie SameSite now dynamic: None;Secure when behind HTTPS proxy, Lax otherwise
- AuthGuard useEffect no longer overwrites Zustand store with null from background refetch
- AuthInitializer: add staleTime 30s

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 18:17:26 +07:00
MythEclipseandClaude 41e0501e6b fix(tauri): add absolute API base URL default and CORS origins for Android WebView
- Set VITE_API_BASE_URL default to production API URL in api-client.ts
  so fetch() uses absolute URLs instead of relative paths that fail on Tauri
- Add tauri://localhost and https://tauri.localhost to API CORS allowed origins
- Also fix .env WEB_APP_URL from stale .tech to .my.id

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 14:32:54 +07:00
MythEclipseandClaude 8954535e08 fix(ci): add tauri package.json to Dockerfiles and fix Android NDK/build issues
Build and Deploy: workspace has 4 members (api/web/shared/tauri) but
Dockerfiles only copied 3 package.json files. Missing tauri workspace
member caused bun install --production to fail with frozen lockfile
error.

Build Android APK:
- Remove explicit NDK 28 install (runner has NDK 29 pre-installed, dual
  NDK presence broke ANDROID_NDK_HOME resolution)
- Auto-pin NDK version from runner's SDK
- rm -rf gen/android before tauri android init (stale cache recovery)
- Remove gen/android/.gradle from Gradle cache (causes stale state)
- Use --apk flag for faster APK-only build

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 13:54:55 +07:00
MythEclipseandClaude b93be6c6cb fix(docker): copy bun.lock and workspace node_modules to API runner stage
Bun workspace symlinks (apps/api/node_modules/*) pointed to root
.bun cache but were never copied from deps→runner. Added bun.lock,
apps/api/node_modules, and packages/shared/node_modules to the
runner COPY chain so  and  resolve at runtime.

Also added bun.lock to web Dockerfile for deterministic installs.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 03:30:18 +07:00
seriouselly 3b37a92d1e Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-15 01:27:40 +07:00
seriouselly 6c1006d4a0 Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-15 01:27:13 +07:00
MythEclipseandClaude 03c1e4edb8 fix(ci): add tailwindcss as direct dependency
PostCSS plugin needs tailwindcss package available in node_modules
at build time. Adding it as a direct dependency ensures consistent
resolution.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 01:23:51 +07:00
seriouselly 56b683392c feat(diagnosis): add back to history button and update UI icons
- Add "Kembali ke Riwayat" button to `diagnosis-detail-page.tsx` for better navigation flow.
- Update camera icon in `diagnose-result-view.tsx` to align with the new UI design.
- Resolve merge conflicts with main to sync latest workflow changes.
2026-06-15 01:20:41 +07:00
MythEclipseandClaude 05055ed9cf fix(ci): remove bun.lock from Docker COPY to avoid version mismatch
Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 01:17:25 +07:00
seriouselly 4b5530ef73 Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-15 01:09:04 +07:00
MythEclipseandClaude 02ae022174 fix(ci): regenerate bun.lock and disable frozen-lockfile in Dockerfiles
bun auto-enables --frozen-lockfile in CI by default. Use env var
BUN_INSTALL_FROZEN_LOCKFILE=0 to override this behavior. Also
regenerate lockfile fresh to ensure it is compatible with bun 1.3.14.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 01:06:17 +07:00
seriouselly 61a4043967 Revert "fix(ci): add --no-frozen-lockfile to bun install in Dockerfiles"
This reverts commit 9ee3af8a1f.
2026-06-15 01:05:04 +07:00
MythEclipseandClaude 9ee3af8a1f fix(ci): add --no-frozen-lockfile to bun install in Dockerfiles
bun defaults to --frozen-lockfile in CI environments, causing failures
when the lockfile format differs from the version used at build time.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 01:02:35 +07:00
MythEclipseandClaude 3d3ca72230 fix(ci): remove --frozen-lockfile to prevent bun version mismatch failures
CI uses bun 1.3.14 (stable) but local dev uses canary. Lockfile
format can differ between versions causing spurious failures.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-15 00:57:31 +07:00
seriouselly 21ca1befcd refactor(diagnosis/catalog): improve UI consistency and fix data rendering
- Fix reference error in `DiagnosisResultView` by correctly mapping `riskLevel` prop.
- Integrate dynamic `RiskBadge` with automated severity-to-color mapping for both diagnosis and catalog views.
- Update icons in the medicine recommendation section of `catalog-page` and `DiagnosisResultView` for better visual consistency and intuition.
2026-06-14 23:59:59 +07:00
seriouselly 3ce565509f style(catalog): update medicine recommendation icons for better visual clarity
- Replace previous icons in the medicine recommendation section with more intuitive visual elements.
- Enhance the user interface consistency within the catalog page.
2026-06-14 23:27:06 +07:00
seriouselly d07d47b974 refactor(diagnosis): enhance detail page usability and data robustness
- Implement `useEffect` to ensure smooth scroll-to-top on navigation.
- Add fallback logic to populate medicine recommendations from local seed data if backend payload is incomplete.
- Integrate dynamic `RiskBadge` component with automated severity-to-color mapping for better visual clarity.
2026-06-14 23:19:42 +07:00
seriouselly e9d175a2b5 fix(diagnosis): add fallback seed data for medicine recommendations
- Import diseaseCatalogSeed into diagnosis detail and scan pages.
- Implement fallback logic to populate medicine recommendations when backend payload lacks treatment data.
- Ensure consistent educational content display across catalog and diagnosis views.
2026-06-14 22:43:21 +07:00
seriouselly fe2734310a fix(layout): correct sidebar toggle behavior and navigation logic
- Remove `onClick` toggle handler from `Sidebar` links to prevent unwanted state changes during navigation.
- Remove aggressive `onClick` auto-collapse from `MainLayout` content wrapper so the sidebar remains stable.
- Ensure sidebar state is exclusively managed by the dedicated toggle button, aligning with standard desktop UX.
2026-06-14 22:25:46 +07:00
seriouselly 5272968c6f refactor(scan): reset upload form state after successful diagnosis
- Restore setFileName(null) and setPreviewUrl(null) in the mutation onSuccess callback.
- Ensure the file upload area resets to its default state immediately after a successful scan, preparing the UI for the next input.
2026-06-14 21:01:21 +07:00
seriouselly daf679b31f chore(components): refine inline comments in diagnosis result view
- Update and clarify inline code comments in the diagnosis result view component.
- Improve code readability and maintainability without altering any underlying logic or UI behavior.
2026-06-14 20:57:48 +07:00
seriouselly 63ccc1255a fix(scan): resolve double scrollbar and modal size type errors
- Remove nested overflow and fixed height classes (`max-h-[75vh]`, `overflow-y-auto`) from the inner modal container to fix the double scrollbar UI glitch.
- Adjust the Modal `size` property to a supported type to resolve TypeScript compilation errors.
- Ensure a cleaner, more seamless scrolling experience for the diagnosis result pop-up.
2026-06-14 20:40:43 +07:00
seriouselly 2733a36ea8 feat(catalog): make entire disease card clickable to toggle accordion
- Move the `onClick` event handler from the accordion header to the outermost card container in `catalog-page.tsx`.
- Allow users to click anywhere on the expanded card (including the description and treatment sections) to collapse it.
- Improve overall user experience by providing a significantly larger tap target, especially beneficial for mobile or touch-screen users.
2026-06-14 19:46:38 +07:00
seriouselly 8d342e1269 fix(catalog): add fallback to local seed data for images and medicines
- Import `diseaseCatalogSeed` to use as a fallback data source in `catalog-page.tsx`.
- Implement logic to merge backend API responses with local seed data, ensuring `imageUrl` and `medicineRecommendations` are populated.
- Fix an issue where disease images and specific treatments were not rendering due to missing fields in the database payload.
- Enhance UI resilience by displaying accurate visual and medical data without requiring immediate backend updates.
- Convert static PNG image assets to WebP format and remove old PNG files to significantly reduce image payload size and improve page load performance.
- Enhance overall UI resilience and frontend speed.
2026-06-14 19:28:19 +07:00
seriouselly bc58b16ddd feat(layout): auto-collapse sidebar when clicking main content area
- Import `useUiStore` into `main-layout.tsx` to access the global sidebar state.
- Add an `onClick` event listener to the main content wrapper.
- Automatically close the sidebar if it is expanded and the user clicks outside of it.
- Enhance overall UX by providing a more intuitive, frictionless way to dismiss the navigation menu.
2026-06-12 12:57:30 +07:00
seriouselly 3b8cb49f2a fix(sidebar): toggle sidebar state when clicking navigation links
- Update the `onClick` handler for navigation links in `sidebar.tsx` to use `!isSidebarOpen` instead of a hardcoded boolean.
- Enable navigation items to act as smart toggles: expanding the sidebar when clicked in collapsed mode, and collapsing it when clicked in expanded mode.
- Improve overall user experience by reducing the need to manually click the main toggle button.
2026-06-12 12:35:46 +07:00
seriouselly a77a6c84ff fix(sidebar): persist sidebar state across page navigation
- Move `isSidebarOpen` state from local component (`useState`) to global Zustand store (`ui-store.ts`).
- Fix an issue where the sidebar would incorrectly reset to its default closed state when navigating between routes (e.g., to the Telemetry page) due to component remounting.
- Ensure consistent sidebar toggle behavior across the entire dashboard application.
2026-06-12 12:26:11 +07:00
seriouselly 8ede458a71 refactor(sidebar): set initial state to collapsed by default
- Update `isSidebarOpen` initial state from true to false in `sidebar.tsx`.
- Ensure the sidebar starts in a mini/collapsed mode when the dashboard is first loaded to provide more space for the main content.
2026-06-12 11:27:23 +07:00
seriouselly cb90d23293 feat(footer): automate copyright year
- Import `Date` object to dynamically fetch the current year for the copyright notice.
- Ensure the footer always displays the correct year without manual updates.
2026-06-08 21:38:50 +07:00
seriouselly d7a145f18f refactor(layout): unify mobile and desktop navigation and fix layout spacing
- Sync `MobileNav` items and icons with desktop `Sidebar` for consistency.
- Standardize menu icons using `lucide-react` across all navigation components.
- Add a spacer div in `main-layout.tsx` to ensure proper bottom spacing between content and the fixed footer.
- Remove redundant 'aria-hidden' attribute in `MobileNav` to fix accessibility warnings.
- Fix 'Logout' button layout in mobile menu for better responsiveness.
2026-06-08 21:32:52 +07:00
seriouselly 4a44d21e66 feat(auth): add password visibility toggle in auth form
- Introduce `showPassword` state in the `AuthForm` component to allow users to show or hide their password.
- Implement `Eye` and `EyeOff` icons from `lucide-react` for the toggle button UI.
- Change password input type dynamically between 'password' and 'text'.
- Clean up unused `eye` icon import from `login-page.tsx`.
2026-06-08 21:19:57 +07:00
seriouselly 70c216ac54 Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-08 21:06:11 +07:00
seriouselly af69dc4df7 refactor(layout): implement responsive sidebar and synchronize mobile menu
- Create a new `Sidebar` component for desktop with collapse/mini-sidebar feature.
- Rename `navbar.tsx` to `mobile-header.tsx` to better reflect its mobile-specific purpose.
- Synchronize icons (from lucide-react) and menu labels between desktop `Sidebar` and touch-based `MobileNav`.
- Fix 'Logout' button sizing in the mobile menu by removing forced margins for better responsiveness on narrow screens.
- Remove conflicting 'aria-hidden' attribute in MobileNav to resolve browser accessibility (a11y) warnings.
- Add a spacer in `main-layout.tsx` to prevent the bottom content from being overlapped by the fixed Footer.
2026-06-08 21:00:55 +07:00
seriouselly 22ddd2d24e Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-08 17:21:27 +07:00
MythEclipse 09602b3fe0 refactor(web): add value formatter to ChartCard component
Introduce a `valueFormatter` prop to the `ChartCard` component to allow
customized data presentation in tooltips. This enables more readable
units for specific metrics, such as converting bytes to MiB or
seconds to milliseconds.
2026-06-08 02:03:23 +07:00
MythEclipse 64dcfa70d8 feat(web): add client-side telemetry for API calls, errors, and scan operations 2026-06-08 01:23:51 +07:00
MythEclipse 89dcbe8fa2 feat(ml-service): add detailed ML observability metrics for inference, predictions, and errors 2026-06-08 01:21:47 +07:00
MythEclipse c45f771f24 feat(telemetry): add comprehensive Prometheus metrics and expand dashboard with system, API, ML, and Node.js runtime sections 2026-06-08 01:20:42 +07:00
MythEclipse b7a3c530a7 refactor(web): replace custom telemetry API with direct Prometheus queries
Rewrite the telemetry page logic to bypass the custom proxy API in
favor of direct Prometheus queries.

- Implement `queryRange` and `queryInstant` helpers for Prometheus API
- Replace `TelemetryAPI` client with direct fetch calls to Prometheus
- Update data fetching logic to use standard Prometheus query parameters
- Simplify state management and data transformation for charts
2026-06-08 01:07:13 +07:00
MythEclipse 26f99fa4d4 feat(web): compute memory usage client-side and add app-specific metrics to telemetry dashboard 2026-06-08 00:54:59 +07:00
MythEclipse f5ac0a8795 feat(web): implement telemetry dashboard with data visualization
Add a comprehensive telemetry dashboard page featuring real-time
system statistics and metric visualization using recharts.

- Integrate recharts for area and bar chart rendering
- Implement TelemetryAPI client for stats, discovery, and chart data
- Add dashboard UI with stat cards and responsive charts
- Remove legacy nginx sub_filter proxy configuration in favor of
  direct API communication to telemetry.imrnes.team
2026-06-08 00:31:30 +07:00
seriouselly 56139388d3 feat(auth): implement full logout system and protect application routes
- Add LogoutProses function in app.tsx to destroy session via apiClient.logout() and clear user state
- Apply <AuthGuard> to private routes (/dashboard, /scan, /expert/reviews, etc.) to prevent unauthorized access
- Update the "Logout" button design in Navbar and MobileNav with a red accent and LogOut icon
- Fix vulnerability allowing direct URL access to the dashboard by bypassing login
2026-06-08 00:20:00 +07:00
MythEclipse 65d0040c0d fix(web): escape quotes in sub_filter for fetch calls
Update the sub_filter pattern for fetch requests to include escaped
double quotes. This ensures that path rewriting correctly handles
JavaScript fetch calls that use double-quoted strings, preventing
broken resource paths in the telemetry dashboard.
2026-06-08 00:11:02 +07:00
MythEclipse 4589766f27 build(web): switch to alpine-based nginx runner for sub_filter support
Migrate the web runner stage from the official nginx alpine image to a
standard alpine image with the nginx package installed. This ensures
the presence of the `http_sub_module` required for path rewriting in
the telemetry proxy configuration.

- Replace `nginx:1.27-alpine` with `alpine:3.20` and `apk add nginx`
- Update Nginx configuration file path to `/etc/nginx/http.d/default.conf`
- Update web asset root directory to `/var/lib/nginx/html`
- Add `X-Forwarded-For` and `X-Forwarded-Proto` headers to proxy locations
2026-06-08 00:00:33 +07:00
MythEclipse 4dde9d8408 refactor(web): implement nginx reverse proxy for telemetry dashboard
Transition telemetry dashboard integration from an external URL approach to a local reverse proxy via Nginx. This simplifies client-side connectivity by routing all telemetry requests through the existing web server's domain.

- Configure Nginx to proxy `/telemetry/` sub-paths to the internal telemetry service
- Implement `sub_filter` in Nginx to rewrite root-relative paths for the SPA
- Remove `VITE_TELEMETRY_URL` build arguments and environment variable dependencies
- Simplify `TelemetryPage` to use a relative `/telemetry` base path
- Clean up deployment workflows and Dockerfile by removing unused telemetry build args
2026-06-07 23:44:57 +07:00
MythEclipse 9602a64e18 feat(web): externalize telemetry URL via environment variables
Replace the hardcoded Nginx proxy configuration with a dynamic environment variable approach. This allows the telemetry dashboard to be loaded via a public URL instead of relying on a local Tailscale proxy.

- Add `VITE_TELEMETRY_URL` build argument to Dockerfile
- Pass `VITE_TELEMETRY_URL` through GitHub Actions deployment workflow
- Remove `/telemetry/` location block from nginx.conf
- Update `TelemetryPage` to use the new environment variable and improve iframe loading state management
2026-06-07 23:31:15 +07:00
MythEclipse cd93d1a06d feat(web): add telemetry dashboard page with nginx proxy and nav integration 2026-06-07 23:21:40 +07:00
Asep Haryana SaputraandGitHub 1106cbf62f Merge branch 'ATLAS-PJK-GM007:main' into main 2026-06-07 21:43:28 +07:00
MythEclipse 2c41b80f97 feat: expose /metrics endpoint and add telemetry ClickHouse credentials 2026-06-07 20:57:45 +07:00