From 0770fac690a536245e020e2dcb5faa20d4d11a89 Mon Sep 17 00:00:00 2001 From: wu21-web Date: Sat, 8 Aug 2026 15:03:02 +0900 Subject: [PATCH 1/7] add my eslinter --- .github/workflows/eslint.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/eslint.yml diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml new file mode 100644 index 000000000..fb016842d --- /dev/null +++ b/.github/workflows/eslint.yml @@ -0,0 +1,28 @@ +name: ESLint + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + eslint: + name: Run ESLint + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v7 + + - name: Set up Node.js + uses: actions/setup-node@v7 + with: + node-version: "20" + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Run ESLint + run: npm run lint \ No newline at end of file From 582d1cd1ac18167b81a3781ed4018bf24ec8c898 Mon Sep 17 00:00:00 2001 From: wu21-web Date: Sat, 8 Aug 2026 15:09:06 +0900 Subject: [PATCH 2/7] audit --- pages/src/App.tsx | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/pages/src/App.tsx b/pages/src/App.tsx index d0261e728..fb6118545 100644 --- a/pages/src/App.tsx +++ b/pages/src/App.tsx @@ -1,7 +1,7 @@ // SPDX-License-Identifier: Apache-2.0 // Copyright 2026 alibaba/open-code-review Contributors -import React, { Suspense, useEffect } from 'react'; +import React, { Suspense, useEffect, useState, useTransition } from 'react'; import { Routes, Route, useLocation } from 'react-router-dom'; import LandingPage from './components/LandingPage'; import ErrorBoundary from './components/ErrorBoundary'; @@ -70,13 +70,55 @@ const RouteErrorFallback: React.FC<{ reset: () => void }> = ({ reset }) => { ); }; +const TopProgressBar: React.FC = () => ( +
+
+ +
+); + const App: React.FC = () => { + const [isPending, startTransition] = useTransition(); + const location = useLocation(); + const [displayLocation, setDisplayLocation] = useState(location); + + useEffect(() => { + startTransition(() => { + setDisplayLocation(location); + }); + }, [location]); + return ( <> + {isPending && } }> }> - + } /> } /> } /> From fe801162f22d122b95627a04d0808d8e48ae07e7 Mon Sep 17 00:00:00 2001 From: wu21-web Date: Sat, 8 Aug 2026 15:20:46 +0900 Subject: [PATCH 3/7] fix my eslinter --- .github/workflows/eslint.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index fb016842d..30a79b6af 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -20,9 +20,12 @@ jobs: with: node-version: "20" cache: "npm" + cache-dependency-path: pages/package-lock.json - name: Install dependencies + working-directory: pages run: npm ci - name: Run ESLint + working-directory: pages run: npm run lint \ No newline at end of file From 577ea70b68019c87c970515e99f3adb526303213 Mon Sep 17 00:00:00 2001 From: Tao Xin Date: Sat, 8 Aug 2026 15:16:45 +0900 Subject: [PATCH 4/7] Update .github/workflows/eslint.yml Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/eslint.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 30a79b6af..d25e45c19 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -6,6 +6,10 @@ on: pull_request: branches: ["main"] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: eslint: name: Run ESLint @@ -19,8 +23,6 @@ jobs: uses: actions/setup-node@v7 with: node-version: "20" - cache: "npm" - cache-dependency-path: pages/package-lock.json - name: Install dependencies working-directory: pages From 84bcaa77c545177012e744a5aa6fab7ff17d986c Mon Sep 17 00:00:00 2001 From: wu21-web Date: Sat, 8 Aug 2026 15:28:01 +0900 Subject: [PATCH 5/7] ff --- .github/workflows/eslint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index d25e45c19..a734bbff9 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies working-directory: pages - run: npm ci + run: npm install - name: Run ESLint working-directory: pages From 4638fc6d7508428ee0891b536dcab48e9cb4380e Mon Sep 17 00:00:00 2001 From: Tao Xin Date: Sat, 8 Aug 2026 15:29:29 +0900 Subject: [PATCH 6/7] Update .github/workflows/eslint.yml Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/eslint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index a734bbff9..ad136b25c 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -14,6 +14,7 @@ jobs: eslint: name: Run ESLint runs-on: ubuntu-latest + timeout-minutes: 10 permissions: contents: read steps: From e110d64c26e69643e503fa20a78929f007c6e677 Mon Sep 17 00:00:00 2001 From: wu21-web Date: Sat, 8 Aug 2026 15:41:41 +0900 Subject: [PATCH 7/7] fix --- pages/src/App.tsx | 17 +---------------- pages/src/styles/index.css | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/pages/src/App.tsx b/pages/src/App.tsx index fb6118545..63e411df3 100644 --- a/pages/src/App.tsx +++ b/pages/src/App.tsx @@ -82,22 +82,7 @@ const TopProgressBar: React.FC = () => ( pointerEvents: 'none', }} > -
- +
); diff --git a/pages/src/styles/index.css b/pages/src/styles/index.css index 1b2a5aa3a..a16f4794b 100644 --- a/pages/src/styles/index.css +++ b/pages/src/styles/index.css @@ -57,6 +57,29 @@ a { animation: cursor-blink 1s step-end infinite; } +/* Top-of-page transition progress bar */ +@keyframes ocr-transition-bar { + 0% { width: 0%; margin-left: 0%; } + 30% { width: 40%; margin-left: 0%; } + 60% { width: 30%; margin-left: 40%; } + 85% { width: 10%; margin-left: 70%; } + 100% { width: 0%; margin-left: 100%; } +} + +.ocr-transition-bar { + height: 100%; + background: #756BFF; + animation: ocr-transition-bar 1.2s ease-in-out infinite; +} + +@media (prefers-reduced-motion: reduce) { + .ocr-transition-bar { + animation: none; + width: 100%; + margin-left: 0; + } +} + /* UseCases card hover effect */ @property --sweep-angle { syntax: '';