Skip to content

Merge new changes#127

Merged
cuttle-fish-my merged 28 commits into
mainfrom
dev
Jun 3, 2026
Merged

Merge new changes#127
cuttle-fish-my merged 28 commits into
mainfrom
dev

Conversation

@caoster

@caoster caoster commented Jun 3, 2026

Copy link
Copy Markdown
Member

No description provided.

cuttle-fish-my and others added 28 commits July 13, 2025 09:46
Reorganize the codebase and rework on cache system
Bugfix and remove about-us
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 3, 2026

Copy link
Copy Markdown

Deploying opensist with  Cloudflare Pages  Cloudflare Pages

Latest commit: 670cbe3
Status: ✅  Deploy successful!
Preview URL: https://ade778f8.opensist.pages.dev
Branch Preview URL: https://dev.opensist.pages.dev

View logs

@caoster caoster requested a review from Copilot June 3, 2026 01:53
@Winlere

Winlere commented Jun 3, 2026

Copy link
Copy Markdown

random walk to the site and the user's typical usage works good.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 migrates the frontend build from Create React App to Vite, while also refactoring client data access to a unified request + caching layer and updating multiple UI routes/components to support new features (favorites starring, FAQ page, improved profile rendering) and performance (background cache prefetch).

Changes:

  • Migrate build tooling to Vite (new root index.html, vite.config.js, ESLint flat config, env var prefix changes).
  • Introduce a versioned cache layer (CacheStore) and background prefetcher (CoreCacheSync), and refactor data modules to use apiRequest/apiJson + cache APIs.
  • UI refactors across routes (SVG via ?react, markdown via ?raw, new FAQ page, favorites starring flow, profile page component split, improved DataPoints filtering).

Reviewed changes

Copilot reviewed 65 out of 70 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
vite.config.js Adds Vite config (plugins, dev server, build output, chunking rules).
src/index.jsx Improves theme persistence, memoization, and adds router fallback loading UI.
src/global.d.ts Adds Vite client typings and CSS module declaration.
src/Data/UnivList.json Updates a university color entry.
src/Data/Schemas.js Cleans up application year options formatting.
src/Data/RecordData.js Refactors record fetching to batch + cache-aware implementation.
src/Data/ProgramData.js Refactors program list/desc fetching to cache + batched desc endpoint.
src/Data/PostData.js Refactors post APIs and adds like/comment/delete helpers.
src/Data/FileData.js Refactors file APIs to apiJson/apiRequest and simplifies mutations.
src/Data/EmailData.js Removes email data module.
src/Data/CoreCacheSync.js Adds background cache prefetch loop for core app data.
src/Data/Common.js Introduces apiRequest/apiJson/apiText, improves 401 handling, adds utcToLocal.
src/Data/CommentData.js Removes legacy comment data module.
src/Data/CacheStore.js Adds versioned localforage-backed cache with in-memory layer and request coordination.
src/Data/ApplicantData.js Refactors applicant APIs to cache-aware implementation and metadata naming updates.
src/Components/WorldMap/display.js Refactors map functions, improves cleanup, and fixes click coordinate handling.
src/Components/TopBar/TopBar.jsx Switches SVG imports to Vite svgr ?react usage.
src/Components/TopBar/StatusBlock/StatusBlock.jsx Starts background cache sync on login; switches metadata calls; removes theme write side-effect.
src/Components/TopBar/NavBar/NavBar.jsx Removes “关于我们” navigation entry and minor import cleanup.
src/Components/router.jsx Switches markdown loading to ?raw and replaces FAQ route with a component.
src/Components/ProgramPage/SideBar/SideBar.jsx Adds star button in list with metadata context; replaces layout grid usage.
src/Components/ProgramPage/SideBar/SearchBar/SearchBar.jsx Converts to controlled filters with debounced URL param updates.
src/Components/ProgramPage/ProgramPage.jsx Adds star/unstar action handling and loads metadata in loader.
src/Components/ProgramPage/ProgramContent/StarButton.jsx Adds ProgramID hidden field and stops click propagation to avoid list navigation.
src/Components/ProgramPage/ProgramContent/ProgramContent.jsx Cleans loader/action, normalizes redirect usage, and avoids mutating records array.
src/Components/Profile/ProfileSideBar/ProfileSideBar.jsx Updates metadata naming, improves avatar submit behavior, and dialog text logic.
src/Components/Profile/ProfileApplicant/ProfileApplicantShared.jsx Adds shared profile layout primitives (list/item blocks).
src/Components/Profile/ProfileApplicant/ProfileApplicantSections.jsx Adds modular sections for exchange/research/intern/publication/etc display.
src/Components/Profile/ProfileApplicant/ProfileApplicantRecords.jsx Adds record card grid and delete confirmation dialog.
src/Components/Profile/ProfileApplicant/ProfileApplicantHeader.jsx Adds new profile header block with contact/material download + controls.
src/Components/Profile/Profile.jsx Updates metadata naming and redirects to request.url.
src/Components/Post/PostPage.jsx Simplifies post sidebar actions and removes refresh action wiring.
src/Components/Post/PostContent/PostContent.jsx Uses unified delete API, shows local dates, and updates layout grid usage.
src/Components/Post/CommentSection/CommentSection.jsx Present in PR payload (no diff shown).
src/Components/Post/CommentSection/CommentSection.css Present in PR payload (no diff shown).
src/Components/Modify/Program/AddModifyProgram.jsx Adds program name validation and makes submit disabled when invalid.
src/Components/Modify/Post/AddModifyPost.jsx Simplifies action error handling and standardizes actionType naming.
src/Components/Modify/Applicant/FormComponent/SoftBackgroundSections.jsx Adds reusable list-section helpers for applicant soft background form.
src/Components/Modify/Applicant/FormComponent/ApplicantFormShared.jsx Adds shared section wrappers and number input styling.
src/Components/Modify/Applicant/applicantFormData.js Extracts applicant request body creation + file sync logic.
src/Components/Modify/Applicant/AddModifyApplicant.jsx Refactors applicant submit flow to extracted helpers; cleans form state updates.
src/Components/HowToUse/HowToUse.jsx Removes HowToUse page implementation.
src/Components/HowToUse/HowToUse.css Removes HowToUse styles.
src/Components/Home/home.jsx Updates map init API, switches SVGs to ?react, and updates layout grid usage.
src/Components/Favorites/ProgramCard.jsx Refactors layout and removes embedded ThemeProvider breakpoints.
src/Components/Favorites/Favorites.jsx Wraps favorites list with custom breakpoint theme and updates metadata naming.
src/Components/FAQ/FAQ.jsx Adds new FAQ page with glossary and embedded AboutUs.
src/Components/FAQ/AboutUs.jsx Refactors AboutUs into reusable component and updates layout grid usage.
src/Components/Errors/ErrorPage.jsx Avoids mutating the route error object and improves message selection.
src/Components/DataPoints/DataPoints.jsx Refactors record loading, filtering, sorting, and improves loading fallback.
src/Components/DataPoints/DataPoints.css Fixes responsive .refresh-button selector scoping.
src/Components/common.jsx Adds forceOpen option to loading backdrop and improves DraggableFAB click behavior.
src/Components/Auth/RegisterAndReset/RegisterAndReset.jsx Refactors token cooldown/timer logic and uses apiRequest.
src/Components/Auth/Login/Login.jsx Minor cleanup and removes unnecessary await.
src/babel.config.js Removes Babel config (CRA-era).
src/babel-plugin-macros.config.js Removes babel-plugin-macros config (CRA-era).
src/APIs/APIs.js Switches env var access to import.meta.env.* and updates API endpoints for batching.
public/index.html Removes CRA public index.html.
package.json Switches scripts to Vite, adds lint/typecheck/build pipeline, updates deps.
index.html Adds Vite root HTML entrypoint.
eslint.config.js Adds ESLint flat config for the Vite codebase.
env/alpha Renames env var to VITE_BACKEND_SPECIFIC_API.
.gitignore Stops ignoring package-lock.json.
Comments suppressed due to low confidence (1)

src/Components/FAQ/AboutUs.jsx:3

  • This component uses the Grid v2 API (size={{ xs, sm, ... }}), but imports Grid2 from @mui/material/Grid (classic Grid). Use the Grid v2 export so size is actually applied.

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

Comment thread src/Data/Common.js
Comment on lines +97 to +100
export function utcToLocal(dateString, dateOnly = false) {
const utcString = dateString.replace(" ", "T") + "Z";
const date = new Date(utcString);

import {clickHandler, init_map} from "../WorldMap/display";
import Grid2 from "@mui/material/Unstable_Grid2";
import {clickHandler, initMap} from "../WorldMap/display";
import Grid2 from "@mui/material/Grid";
import {getMetaData, getAvatar} from "../../../Data/UserData";
import Grid2 from "@mui/material/Unstable_Grid2";
import {getAvatar, getMetadata} from "../../../Data/UserData";
import Grid2 from "@mui/material/Grid";
import { useNavigate } from "react-router-dom";
import { regionFlagMapping } from "../../Data/Schemas";
import { univAbbrFullNameMapping, univColorMapping } from "../../Data/Common";
import Grid from "@mui/material/Grid";
Comment on lines +1 to +3
import {Box, ListItem, ListItemIcon, ListItemText, Paper, styled, Typography} from "@mui/material";
import Grid2 from "@mui/material/Grid";
import {BoldTypography} from "../../common";
import TransgenderIcon from '@mui/icons-material/Transgender';
import {faQq, faWeixin} from "@fortawesome/free-brands-svg-icons";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import Grid2 from "@mui/material/Grid";
Tooltip
} from "@mui/material";
import {Add, Delete, Edit} from "@mui/icons-material";
import Grid2 from "@mui/material/Grid";
import React, {useEffect, useState} from "react";
import Grid2 from "@mui/material/Unstable_Grid2";
import React, {useRef, useState} from "react";
import Grid2 from "@mui/material/Grid";
@cuttle-fish-my cuttle-fish-my merged commit 6c9a0ae into main Jun 3, 2026
2 checks passed
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