Skip to content

Conversation

SimoneBendazzoli93
Copy link
Contributor

No description provided.

Phillezi and others added 30 commits January 20, 2025 22:22
Make the docker image configurable for use in other environments (primarily local test)
Small bugfix: Impersonating deployment always showed them as custom
Labels and more info about stale resources
Phillezi and others added 25 commits January 30, 2025 17:02
small fix for docker-cli command if user is on windows, escape $ with ` instad of \
Fix small typo on disksize user usage inside admin panel
…m the dropdown menu so it doesnt refresh the entire SPA on click
fix: use react router Link component on admin page menuitem in dropdown menu
add queuePosition to gpu lease in admin panel and hopefully fix open keycloak url
Fix the url for opening a user in keycloak from the admin panel
Copy link

@Copilot 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

This PR updates the frontend with several new features and improvements including a new MAIA section, enhanced admin interface, stale resource management, and various UI/UX enhancements.

Key changes:

  • Adds MAIA introduction section with 3D brain visualization to landing page
  • Implements comprehensive admin panel v2 with improved filtering and pagination
  • Introduces stale resource detection and management capabilities

Reviewed Changes

Copilot reviewed 49 out of 52 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/pages/landing/components/maia/* New MAIA section with 3D brain model and intro content
src/pages/admin/AdminV2.tsx Complete rewrite of admin interface with better data management
src/utils/staleDates.ts Utility functions for calculating resource staleness
src/components/render/Resource.tsx Enhanced resource rendering with stale status indicators
src/pages/edit/NeverStaleMode.tsx Admin component for managing resource staleness settings
src/locales/*.json Translation updates for new features
Dockerfile Enhanced with dynamic environment variable support

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +1 to +31
import {
BaseQueryParams,
DeploymentQueryParams,
GpuLeaseQueryParams,
UserQueryParams,
VmQueryParams,
} from "../types";

export function createQueryParams(
params:
| BaseQueryParams
| UserQueryParams
| DeploymentQueryParams
| VmQueryParams
| GpuLeaseQueryParams
): string {
const searchParams = new URLSearchParams();

if (params.all !== undefined) searchParams.append("all", String(params.all));
if ("userId" in params && params.userId)
searchParams.append("userId", params.userId);
if ("shared" in params && params.shared !== undefined)
searchParams.append("shared", String(params.shared));
if ("vmId" in params && params.vmId) searchParams.append("vmId", params.vmId);
if (params.page !== undefined)
searchParams.append("page", String(params.page));
if (params.pageSize !== undefined)
searchParams.append("pageSize", String(params.pageSize));

return searchParams.toString() ? `?${searchParams.toString()}` : "";
}
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

The filename 'paguinationOpts.ts' contains a typo. It should be 'paginationOpts.ts' (missing 'i' in 'pagination').

Suggested change
import {
BaseQueryParams,
DeploymentQueryParams,
GpuLeaseQueryParams,
UserQueryParams,
VmQueryParams,
} from "../types";
export function createQueryParams(
params:
| BaseQueryParams
| UserQueryParams
| DeploymentQueryParams
| VmQueryParams
| GpuLeaseQueryParams
): string {
const searchParams = new URLSearchParams();
if (params.all !== undefined) searchParams.append("all", String(params.all));
if ("userId" in params && params.userId)
searchParams.append("userId", params.userId);
if ("shared" in params && params.shared !== undefined)
searchParams.append("shared", String(params.shared));
if ("vmId" in params && params.vmId) searchParams.append("vmId", params.vmId);
if (params.page !== undefined)
searchParams.append("page", String(params.page));
if (params.pageSize !== undefined)
searchParams.append("pageSize", String(params.pageSize));
return searchParams.toString() ? `?${searchParams.toString()}` : "";
}
(no code changes required; rename the file to src/utils/paginationOpts.ts)

Copilot uses AI. Check for mistakes.

Comment on lines +47 to +48
//@ts-ignore not added yet
neverStale: neverStaleV,
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

Using @ts-ignore comments indicates incomplete type definitions. Consider adding proper types to the VM update API or creating a temporary interface to maintain type safety.

Copilot uses AI. Check for mistakes.

@@ -0,0 +1,54 @@
// @ts-nocheck
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

Using @ts-nocheck disables all TypeScript checking for this file. Consider adding proper types for the Three.js components and props to improve type safety and maintainability.

Copilot uses AI. Check for mistakes.

`docker login ${registry} -u ${username} -p ${password}`,
`docker build -t ${tag} .`,
`docker push ${tag}`,
`docker buildx build --platform="${import.meta.env.VITE_SERVER_PLATFORM || "linux/amd64"}" -t ${tag} --push .`,
Copy link
Preview

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

The hardcoded fallback 'linux/amd64' should be extracted to a constant or configuration file to improve maintainability and consistency across the codebase.

Copilot uses AI. Check for mistakes.

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.

3 participants