Skip to content

Mofidy README - #15

Merged
Saigyouji-Yuyuko1000 merged 1 commit into
ljzhou/dev_2026_06_18_react_site_docsfrom
hjh/readme
Jun 19, 2026
Merged

Mofidy README#15
Saigyouji-Yuyuko1000 merged 1 commit into
ljzhou/dev_2026_06_18_react_site_docsfrom
hjh/readme

Conversation

@DerekHJH

@DerekHJH DerekHJH commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 19, 2026 02:38
@DerekHJH
DerekHJH changed the base branch from main to ljzhou/dev_2026_06_18_react_site_docs June 19, 2026 02:40

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the static site to a React/Vite application, removes old Slidev slides, and updates the benchmark metric terminology from avg@3 to acc@3 across all reports, configurations, and documentation. The review feedback is highly constructive and points out several critical issues: a ReferenceError in vite.config.js due to using __dirname in an ES module, missing localization for the count fields in the homepage task details, a compatibility issue with MediaQueryList.addEventListener in older browsers, and a redundant scroll event listener in BlogPage.jsx that should be removed to optimize performance.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

I am having trouble creating individual review comments. Click here to see my feedback.

site/vite.config.js (1-18)

critical

In Node.js ES modules (enabled by "type": "module" in package.json), the global variable __dirname is not defined. Using it in vite.config.js will cause a ReferenceError and break the build. We should define __dirname using import.meta.url and fileURLToPath.

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";

const __dirname = dirname(fileURLToPath(import.meta.url));

export default defineConfig({
  base: "/GDPevo/",
  plugins: [react()],
  build: {
    outDir: "dist",
    emptyOutDir: true,
    rollupOptions: {
      input: {
        index: resolve(__dirname, "index.html"),
        blog: resolve(__dirname, "blog.html")
      }
    }
  }
});

site/src/content/home.js (216-227)

high

The count fields in the sets array are currently hardcoded as plain strings ("5 examples"), which causes the Chinese translations ("5 个样例" and "5 个测试") from the original HTML to be lost. We should localize these fields using an object with en and zh keys.

      sets: [
        {
          kind: "Train",
          label: "train",
          count: {
            en: "5 examples",
            zh: "5 个样例"
          }
        },
        {
          kind: "Test",
          label: "test",
          count: {
            en: "5 held-out",
            zh: "5 个 held-out"
          }
        }
      ]

site/src/pages/HomePage.jsx (217-222)

high

Since count is now a localized object, we should render it using the <Lang> component to ensure the correct language is displayed.

        {sections.map(([label, count, items]) => (
          <section className={`task-set task-set-${label}`} key={label}>
            <div className="task-set-head">
              <strong>{label}</strong>
              <span>
                <Lang {...count} />
              </span>
            </div>

site/src/App.jsx (52-55)

medium

In older browsers (such as Safari < 14), MediaQueryList does not support addEventListener and will throw a TypeError. To ensure backward compatibility, we should check for addEventListener support and fall back to addListener / removeListener if necessary.

    const mq = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)");
    if (!mq || themeChoice !== "system") return undefined;

    if (mq.addEventListener) {
      mq.addEventListener("change", apply);
    } else {
      mq.addListener(apply);
    }

    return () => {
      if (mq.removeEventListener) {
        mq.removeEventListener("change", apply);
      } else {
        mq.removeListener(apply);
      }
    };

site/src/pages/BlogPage.jsx (248-260)

medium

Listening to the scroll event on both window and document (with capture) is redundant for a standard page scroll. Since scroll events on the main page bubble to window, the window listener alone is sufficient. Removing the redundant document listener avoids duplicate event triggers and improves scroll performance.

    updateActiveHref();
    window.addEventListener("scroll", scheduleUpdate, { passive: true });
    window.addEventListener("resize", scheduleUpdate);
    window.addEventListener("hashchange", scheduleUpdate);

    return () => {
      window.cancelAnimationFrame(frame);
      window.removeEventListener("scroll", scheduleUpdate);
      window.removeEventListener("resize", scheduleUpdate);
      window.removeEventListener("hashchange", scheduleUpdate);
    };

Copilot AI left a comment

Copy link
Copy Markdown

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 modernizes the project’s GitHub Pages site by migrating site/ to a React + Vite build and updates benchmark documentation/artifacts to use acc@3 terminology (instead of avg@3) across experiment boards, configs, and reports.

Changes:

  • Replace the previous “publish site/ as-is” approach with a Vite build that outputs to site/dist, plus a postbuild step to copy static assets.
  • Update repository/docs to emphasize released benchmark results and add local site preview instructions.
  • Rename evaluation metric fields from avg@3/*_avg_at_3 to acc@3/*_acc_at_3 across experiment configs, boards, workspace guides, and multiple report YAMLs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Show a summary per file
File Description
teaser/slides.md Removes Slidev teaser slides.
teaser/package.json Removes Slidev teaser package config.
teaser2/slides.md Removes Slidev teaser v2 slides.
teaser2/package.json Removes Slidev teaser v2 package config.
teaser3/slides.md Removes Slidev teaser v3 slides.
teaser3/package.json Removes Slidev teaser v3 package config.
site/vite.config.js Adds Vite configuration for multi-page build (index + blog).
site/package.json Introduces Vite/React toolchain and build scripts.
site/scripts/postbuild.mjs Copies .nojekyll and assets/ into dist/ post-build.
site/src/main.jsx Adds React entrypoint mounting the app.
site/src/App.jsx Adds app shell with language/theme handling and page switching.
site/src/components/Layout.jsx Adds header/footer with language + theme controls and repo link.
site/src/components/icons.jsx Adds SVG icon rendering utilities.
site/src/components/BenchmarkFigure.jsx Adds benchmark figure component with metric toggles.
site/src/lib/i18n.jsx Adds localization helpers and markdown rendering.
site/src/lib/theme.js Adds theme selection and resolution utilities.
site/src/content/links.js Adds shared outbound links used by the site.
site/src/content/icons.js Adds icon definitions used by components.
site/README.md Updates site documentation to match the new build/deploy flow.
README.md Refreshes top-level README with results + usage instructions and site link.
README.zh.md Chinese README refresh aligned with English version.
experiments/README.md Updates experiments overview wording + “artifacts” terminology.
experiments/README.zh.md Same as above (Chinese).
experiments/EXPERIMENT_BOARD.md Renames displayed metric wording to acc@3 and updates narrative.
experiments/EXPERIMENT_BOARD.zh.md Same as above (Chinese).
experiments/*/config.yaml Switches metric field to acc@3 for released runs.
experiments//reports/.yaml Renames report keys from *_avg_at_3/avg_at_3 to *_acc_at_3/acc_at_3.
experiments/eval_workspace/** Updates evaluation workspace docs/guides from avg@3 to acc@3.
data/README.md Clarifies dataset description; emphasizes held-out test tasks and deterministic evaluators.
data/README.zh.md Same as above (Chinese).
data/DATA_BOARD.md Updates wording around held-out tests + self-evolution.
data/DATA_BOARD.zh.md Same as above (Chinese).
assets/.gitkeep Removes placeholder file.
.gitignore Adds site/dist to ignored outputs.
.github/workflows/pages.yml Updates Pages workflow to build the Vite site and deploy site/dist.

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

@Saigyouji-Yuyuko1000
Saigyouji-Yuyuko1000 merged commit 60e1e5a into ljzhou/dev_2026_06_18_react_site_docs Jun 19, 2026
1 check passed
@Saigyouji-Yuyuko1000
Saigyouji-Yuyuko1000 deleted the hjh/readme branch June 19, 2026 02:51
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