Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "chess-analysis-web-app"
}
}
21 changes: 21 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
on: pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CHESS_ANALYSIS_WEB_APP }}
projectId: chess-analysis-web-app
44 changes: 44 additions & 0 deletions firebase-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[debug] [2025-02-17T03:21:13.188Z] ----------------------------------------------------------------------
[debug] [2025-02-17T03:21:13.193Z] Command: /usr/local/bin/node /usr/local/bin/firebase serve
[debug] [2025-02-17T03:21:13.193Z] CLI Version: 13.30.0
[debug] [2025-02-17T03:21:13.193Z] Platform: darwin
[debug] [2025-02-17T03:21:13.193Z] Node Version: v20.12.2
[debug] [2025-02-17T03:21:13.193Z] Time: Sun Feb 16 2025 19:21:13 GMT-0800 (Pacific Standard Time)
[debug] [2025-02-17T03:21:13.193Z] ----------------------------------------------------------------------
[debug]
[debug] [2025-02-17T03:21:13.311Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[debug] [2025-02-17T03:21:13.311Z] > authorizing via signed-in user (vibsingamshetty@gmail.com)
[debug] [2025-02-17T03:21:13.311Z] [iam] checking project chess-analysis-web-app for permissions ["firebase.projects.get"]
[debug] [2025-02-17T03:21:13.312Z] Checked if tokens are valid: true, expires at: 1739765664063
[debug] [2025-02-17T03:21:13.312Z] Checked if tokens are valid: true, expires at: 1739765664063
[debug] [2025-02-17T03:21:13.312Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/chess-analysis-web-app:testIamPermissions [none]
[debug] [2025-02-17T03:21:13.312Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/chess-analysis-web-app:testIamPermissions x-goog-quota-user=projects/chess-analysis-web-app
[debug] [2025-02-17T03:21:13.312Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/chess-analysis-web-app:testIamPermissions {"permissions":["firebase.projects.get"]}
[debug] [2025-02-17T03:21:14.013Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/chess-analysis-web-app:testIamPermissions 200
[debug] [2025-02-17T03:21:14.013Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/chess-analysis-web-app:testIamPermissions {"permissions":["firebase.projects.get"]}
[debug] [2025-02-17T03:21:14.013Z] Checked if tokens are valid: true, expires at: 1739765664063
[debug] [2025-02-17T03:21:14.013Z] Checked if tokens are valid: true, expires at: 1739765664063
[debug] [2025-02-17T03:21:14.014Z] >>> [apiv2][query] GET https://cloudresourcemanager.googleapis.com/v1/projects/chess-analysis-web-app [none]
[debug] [2025-02-17T03:21:14.145Z] <<< [apiv2][status] GET https://cloudresourcemanager.googleapis.com/v1/projects/chess-analysis-web-app 200
[debug] [2025-02-17T03:21:14.145Z] <<< [apiv2][body] GET https://cloudresourcemanager.googleapis.com/v1/projects/chess-analysis-web-app {"projectNumber":"1061328721698","projectId":"chess-analysis-web-app","lifecycleState":"ACTIVE","name":"eval-bar","labels":{"firebase":"enabled"},"createTime":"2023-01-04T23:43:54.302Z"}
[info]
[info] === Serving from '/Users/vibhavsingamshetty/Documents/Documents - Vibhav’s MacBook Pro/Programming/WebStormProjects/chessanalysiswebapp'...
[info]
[debug] [2025-02-17T03:21:14.149Z] Checked if tokens are valid: true, expires at: 1739765664063
[debug] [2025-02-17T03:21:14.149Z] Checked if tokens are valid: true, expires at: 1739765664063
[debug] [2025-02-17T03:21:14.149Z] >>> [apiv2][query] GET https://firebasehosting.googleapis.com/v1beta1/projects/chess-analysis-web-app/sites
[debug] [2025-02-17T03:21:15.069Z] <<< [apiv2][status] GET https://firebasehosting.googleapis.com/v1beta1/projects/chess-analysis-web-app/sites 200
[debug] [2025-02-17T03:21:15.069Z] <<< [apiv2][body] GET https://firebasehosting.googleapis.com/v1beta1/projects/chess-analysis-web-app/sites {"sites":[{"name":"projects/chess-analysis-web-app/sites/chess-analysis-web-app","defaultUrl":"https://chess-analysis-web-app.web.app","type":"DEFAULT_SITE"}]}
[debug] [2025-02-17T03:21:15.069Z] Checked if tokens are valid: true, expires at: 1739765664063
[debug] [2025-02-17T03:21:15.069Z] Checked if tokens are valid: true, expires at: 1739765664063
[debug] [2025-02-17T03:21:15.070Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/chess-analysis-web-app/webApps/-/config [none]
[debug] [2025-02-17T03:21:15.575Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/chess-analysis-web-app/webApps/-/config 200
[debug] [2025-02-17T03:21:15.576Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/chess-analysis-web-app/webApps/-/config {"projectId":"chess-analysis-web-app","appId":"1:1061328721698:web:242f1e66aef186c639f77b","storageBucket":"chess-analysis-web-app.firebasestorage.app","apiKey":"AIzaSyC3r-SZlqsUxnGfh5ZpW0S9OTUopCBCpc4","authDomain":"chess-analysis-web-app.firebaseapp.com","messagingSenderId":"1061328721698","measurementId":"G-9V011LJQ64"}
[debug] [2025-02-17T03:21:15.584Z] Checked if tokens are valid: true, expires at: 1739765664063
[debug] [2025-02-17T03:21:15.584Z] Checked if tokens are valid: true, expires at: 1739765664063
[debug] [2025-02-17T03:21:15.585Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/chess-analysis-web-app [none]
[debug] [2025-02-17T03:21:15.739Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/chess-analysis-web-app 200
[debug] [2025-02-17T03:21:15.739Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/chess-analysis-web-app {"projectId":"chess-analysis-web-app","projectNumber":"1061328721698","displayName":"eval-bar","name":"projects/chess-analysis-web-app","resources":{"hostingSite":"chess-analysis-web-app"},"state":"ACTIVE","etag":"1_7d4507af-3dbb-405d-9a1d-901b1553cdf8"}
[info] i hosting[chess-analysis-web-app]: Serving hosting files from: build {"metadata":{"emulator":{"name":"hosting"},"message":"Serving hosting files from: \u001b[1mbuild\u001b[22m"}}
[info] ✔ hosting[chess-analysis-web-app]: Local server: http://localhost:5002 {"metadata":{"emulator":{"name":"hosting"},"message":"Local server: \u001b[4m\u001b[1mhttp://localhost:5002\u001b[22m\u001b[24m"}}
[info] i hosting: ::1 - - [17/Feb/2025:03:21:19 +0000] "GET /%PUBLIC_URL%/manifest.json HTTP/1.1" 500 - "http://localhost:5002/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15" {"metadata":{"emulator":{"name":"hosting"},"message":"::1 - - [17/Feb/2025:03:21:19 +0000] \"GET /%PUBLIC_URL%/manifest.json HTTP/1.1\" 500 - \"http://localhost:5002/\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2.1 Safari/605.1.15\""}}
2 changes: 1 addition & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
}
]
}
}
}
25 changes: 21 additions & 4 deletions src/components/analysis/AnalysisPanelHeader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {useEngineStore} from "../../stores/useEngineStore";
import React from "react";

export function AnalysisPanelHeader({ isAnalyzing, depth, currentLines }) {
const { startAnalysis, stopAnalysis, multipv, setMultiPV } = useEngineStore();
Expand Down Expand Up @@ -54,15 +55,31 @@ export function AnalysisPanelHeader({ isAnalyzing, depth, currentLines }) {

<button
onClick={handleAnalysisClick}
className={`flex flex-nowrap items-center px-2 py-1 text-sm rounded transition-colors gap-1 font-medium ${
className={`flex flex-nowrap items-center px-2 py-1 text-sm rounded transition-all gap-1 font-semibold ${
isAnalyzing
? 'bg-red-600 hover:bg-red-700 text-white'
: 'bg-green-600 hover:bg-green-500 text-white'
}`}
>
<svg className="fill-slate-50" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 -960 960 960">
<path d="M440-240q116 0 198-81.5T720-520q0-116-82-198t-198-82q-117 0-198.5 82T160-520q0 117 81.5 198.5T440-240Zm0-280Zm0 160q-72 0-133.5-38.5T210-501q-5-9-5-19t5-19q35-64 96.5-102.5T440-680q72 0 133 39t96 102q5 9 5 19t-5 19q-35 64-96 102.5T440-360Zm0-60q55 0 101-26.5t72-73.5q-26-46-72-73t-101-27q-56 0-102 27t-72 73q26 47 72 73.5T440-420Zm0-40q25 0 42.5-17t17.5-43q0-25-17.5-42.5T440-580q-26 0-43 17.5T380-520q0 26 17 43t43 17Zm0 300q-75 0-140.5-28.5t-114-77q-48.5-48.5-77-114T80-520q0-74 28.5-139.5t77-114.5q48.5-49 114-77.5T440-880q74 0 139.5 28.5T694-774q49 49 77.5 114.5T800-520q0 64-21 121t-58 104l131 131q12 12 11.5 28T851-108q-12 11-28 11t-28-11L664-238q-47 37-104 57.5T440-160Z"/>
</svg>
{
isAnalyzing ?
<svg
className="w-4 h-4 text-slate-200"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={3}
d="M6 18L18 6M6 6l12 12"
/>
</svg> :
<svg className="fill-slate-50" xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 -960 960 960">
<path d="M440-240q116 0 198-81.5T720-520q0-116-82-198t-198-82q-117 0-198.5 82T160-520q0 117 81.5 198.5T440-240Zm0-280Zm0 160q-72 0-133.5-38.5T210-501q-5-9-5-19t5-19q35-64 96.5-102.5T440-680q72 0 133 39t96 102q5 9 5 19t-5 19q-35 64-96 102.5T440-360Zm0-60q55 0 101-26.5t72-73.5q-26-46-72-73t-101-27q-56 0-102 27t-72 73q26 47 72 73.5T440-420Zm0-40q25 0 42.5-17t17.5-43q0-25-17.5-42.5T440-580q-26 0-43 17.5T380-520q0 26 17 43t43 17Zm0 300q-75 0-140.5-28.5t-114-77q-48.5-48.5-77-114T80-520q0-74 28.5-139.5t77-114.5q48.5-49 114-77.5T440-880q74 0 139.5 28.5T694-774q49 49 77.5 114.5T800-520q0 64-21 121t-58 104l131 131q12 12 11.5 28T851-108q-12 11-28 11t-28-11L664-238q-47 37-104 57.5T440-160Z"/>
</svg>
}
{isAnalyzing ? 'Stop' : 'Analyze'}
</button>
</div>
Expand Down
Loading