Repository: frzyc/genshin-optimizer
Pull request #2833: SRO/ZO: Add footer to SR and ZZZ
Author: login: nguyentvan7
Labels: name: SRO
description: For Star Rail Optimizer
name: ZO
description: Zenless Optimizer
Created: 2025-03-09T18:48:59Z | Merged: 2025-03-09T20:11:30Z

## Describe your changes

<!--- Provide a general summary of your changes -->

## Issue or discord link

- <!--- link relevant issues to this PR, or provide a link to a discord message/thread -->

## Testing/validation

<!--- Add screenshots if possible -->

## Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

- [ ] I have commented my code in hard-to understand areas.
- [ ] I have made corresponding changes to README or wiki.
- [ ] For front-end changes, I have updated the corresponding English translations.
- [ ] I have run `yarn run mini-ci` locally to validate format and lint.
- [ ] If I have added a new library or app, I have updated the deployment scripts to ignore changes as needed


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a new footer component displaying version details and a link to release information.
  - Updated the content layout to ensure the footer remains anchored at the bottom of the page, enhancing the overall user experience.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->


Diff:
diff --git a/apps/sr-frontend/src/app/App.tsx b/apps/sr-frontend/src/app/App.tsx
index 7e495f7c2d..0aa32ce430 100644
--- a/apps/sr-frontend/src/app/App.tsx
+++ b/apps/sr-frontend/src/app/App.tsx
@@ -14,6 +14,7 @@ import {
 } from '@mui/material'
 import { Suspense, lazy } from 'react'
 import { HashRouter, Route, Routes } from 'react-router-dom'
+import Footer from './Footer'
 import Header from './Header'
 import PageHome from './PageHome'
 
@@ -83,6 +84,9 @@ function Content() {
           </Routes>
         </Suspense>
       </Container>
+      {/* make sure footer is always at bottom */}
+      <Box flexGrow={1} />
+      <Footer />
     </Box>
   )
 }
diff --git a/apps/sr-frontend/src/app/Footer.tsx b/apps/sr-frontend/src/app/Footer.tsx
new file mode 100644
index 0000000000..70b83cbbbd
--- /dev/null
+++ b/apps/sr-frontend/src/app/Footer.tsx
@@ -0,0 +1,45 @@
+import { AppBar, Box, Skeleton, Typography } from '@mui/material'
+import { Suspense } from 'react'
+
+export default function Footer() {
+  return (
+    <Suspense fallback={<Skeleton variant="rectangular" height={64} />}>
+      <FooterContent />
+    </Suspense>
+  )
+}
+function FooterContent() {
+  return (
+    <AppBar
+      component="footer"
+      position="static"
+      sx={{ bgcolor: 'neutral800.main' }}
+      elevation={0}
+    >
+      <Box
+        display="flex"
+        justifyContent="space-between"
+        sx={{ px: 2, py: 1 }}
+        gap={2}
+      >
+        <Typography variant="caption" sx={{ color: 'neutral400.main' }}>
+          Build:
+          <a
+            href={
+              process.env.NX_URL_GITHUB_GO_CURRENT_VERSION ||
+              `${process.env.NX_URL_GITHUB_GO}/releases`
+            }
+            target="_blank"
+            rel="noreferrer"
+            style={{ color: 'inherit' }}
+          >
+            {process.env.NX_URL_GITHUB_GO_CURRENT_VERSION?.replace(
+              /.*commit\//,
+              ''
+            ).substring(0, 7)}
+          </a>
+        </Typography>
+      </Box>
+    </AppBar>
+  )
+}
diff --git a/apps/zzz-frontend/src/app/App.tsx b/apps/zzz-frontend/src/app/App.tsx
index d93165b1a6..227dfd20d2 100644
--- a/apps/zzz-frontend/src/app/App.tsx
+++ b/apps/zzz-frontend/src/app/App.tsx
@@ -16,6 +16,7 @@ import {
 import { Suspense, lazy } from 'react'
 import { HashRouter, Route, Routes } from 'react-router-dom'
 import '../styles.scss'
+import Footer from './Footer'
 import Header from './Header'
 const PageDiscs = lazy(() => import('@genshin-optimizer/zzz/page-discs'))
 const PageOptimize = lazy(() => import('@genshin-optimizer/zzz/page-optimize'))
@@ -78,6 +79,9 @@ function Content() {
           </Routes>
         </Suspense>
       </Container>
+      {/* make sure footer is always at bottom */}
+      <Box flexGrow={1} />
+      <Footer />
     </Box>
   )
 }
diff --git a/apps/zzz-frontend/src/app/Footer.tsx b/apps/zzz-frontend/src/app/Footer.tsx
new file mode 100644
index 0000000000..70b83cbbbd
--- /dev/null
+++ b/apps/zzz-frontend/src/app/Footer.tsx
@@ -0,0 +1,45 @@
+import { AppBar, Box, Skeleton, Typography } from '@mui/material'
+import { Suspense } from 'react'
+
+export default function Footer() {
+  return (
+    <Suspense fallback={<Skeleton variant="rectangular" height={64} />}>
+      <FooterContent />
+    </Suspense>
+  )
+}
+function FooterContent() {
+  return (
+    <AppBar
+      component="footer"
+      position="static"
+      sx={{ bgcolor: 'neutral800.main' }}
+      elevation={0}
+    >
+      <Box
+        display="flex"
+        justifyContent="space-between"
+        sx={{ px: 2, py: 1 }}
+        gap={2}
+      >
+        <Typography variant="caption" sx={{ color: 'neutral400.main' }}>
+          Build:
+          <a
+            href={
+              process.env.NX_URL_GITHUB_GO_CURRENT_VERSION ||
+              `${process.env.NX_URL_GITHUB_GO}/releases`
+            }
+            target="_blank"
+            rel="noreferrer"
+            style={{ color: 'inherit' }}
+          >
+            {process.env.NX_URL_GITHUB_GO_CURRENT_VERSION?.replace(
+              /.*commit\//,
+              ''
+            ).substring(0, 7)}
+          </a>
+        </Typography>
+      </Box>
+    </AppBar>
+  )
+}


Reviews:
user: login: coderabbitai[bot]
body: **Actionable comments posted: 0**

<details>
<summary>🧹 Nitpick comments (6)</summary><blockquote>

<details>
<summary>apps/sr-frontend/src/app/Header.tsx (2)</summary><blockquote>

`192-197`: **Dynamic commit hash implementation looks good but could be improved.**

*Yawns* The code correctly extracts the commit hash from the environment variable, but this same logic is repeated across all files. Also, no null checking before the chain of operations.


Consider extracting this to a shared utility function to avoid repeating yourself. Something like:

```diff
+ // In a shared utility file
+ export function getCommitHash(): string {
+   return process.env['NX_URL_GITHUB_GO_CURRENT_VERSION']
+     ?.replace(/.*commit\//, '')
+     ?.slice(0, 7) || 'unknown';
+ }

// Then in this file
- (Dev Mode -{' '}
- {process.env['NX_URL_GITHUB_GO_CURRENT_VERSION']
-   ?.replace(/.*commit\//, '')
-   .slice(0, 7)}
- )
+ (Dev Mode - {getCommitHash()})
```

I mean, I could refactor this myself, but *gestures vaguely* too many PRs to review already...

---

`340-346`: **Duplicated logic in mobile view.**

Same commit hash extraction code as in desktop view. *Sighs deeply* Duplicated code is making my eye twitch.


Extract this logic to a shared utility function to avoid duplication between desktop and mobile views.

</blockquote></details>
<details>
<summary>apps/frontend/src/app/Header.tsx (2)</summary><blockquote>

`217-223`: **Same commit hash extraction pattern repeated.**

*Rubs tired eyes* I'm seeing triple now. This exact same code pattern appears in three different files. 


This screams for a shared utility function that all three frontends could import. DRY principle applies here - especially for error handling and consistency.

```diff
+ // In a common utility file
+ export function getDisplayCommitHash(): string {
+   const fullHash = process.env['NX_URL_GITHUB_GO_CURRENT_VERSION'];
+   if (!fullHash) return 'unknown';
+   return fullHash.replace(/.*commit\//, '').slice(0, 7);
+ }

// Then in all header files:
- (Dev Mode -{' '}
- {process.env['NX_URL_GITHUB_GO_CURRENT_VERSION']
-   ?.replace(/.*commit\//, '')
-   .slice(0, 7)}
- )
+ (Dev Mode - {getDisplayCommitHash()})
```

---

`396-402`: **Yet more duplicated hash extraction code.**

Another copy of the same pattern... *yawns audibly* My coffee isn't strong enough for this.


Same recommendation as before - extract to a shared utility to reduce duplication and centralize any future changes.

</blockquote></details>
<details>
<summary>apps/zzz-frontend/src/app/Header.tsx (2)</summary><blockquote>

`183-189`: **Triple déjà vu with commit hash extraction.**

*Blinks slowly* Same code pattern for the third time. This is almost hypnotic at this point.


This strengthens the case for a utility function across all frontends. Also consider adding error handling for when the environment variable is undefined:

```typescript
function getCommitHash(): string {
  const envVar = process.env['NX_URL_GITHUB_GO_CURRENT_VERSION'];
  if (!envVar) return 'unknown';
  
  try {
    return envVar.replace(/.*commit\//, '').slice(0, 7);
  } catch (e) {
    console.error('Failed to parse commit hash:', e);
    return 'error';
  }
}
```

Not that anyone reads console logs anymore... *sighs*

---

`335-341`: **The final instance of duplicated hash extraction.**

Last one, thank goodness. *stretches* Been staring at the same code for what feels like hours now.


Same recommendation - extract to a utility. All instances should be consistent in how they handle edge cases.


The implementation works as intended though, so this is just a refactoring suggestion to improve maintainability.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 8d2daaf06c5216aa4cbfeae7e5b75b7daf41073f and 2083ab7eaa0a8ad8afef6825fbe7b43252df922d.

</details>

<details>
<summary>📒 Files selected for processing (3)</summary>

* `apps/frontend/src/app/Header.tsx` (2 hunks)
* `apps/sr-frontend/src/app/Header.tsx` (2 hunks)
* `apps/zzz-frontend/src/app/Header.tsx` (2 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: lint

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-09T18:54:53Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 3**

<details>
<summary>🧹 Nitpick comments (1)</summary><blockquote>

<details>
<summary>apps/zzz-frontend/src/app/Footer.tsx (1)</summary><blockquote>

`1-46`: **Duplicate Footer implementation across applications.**

This code is identical to the SR frontend Footer... *stares blankly at screen* I've been reviewing code for so long I'm seeing double. Definitely a candidate for shared component extraction.


Since this Footer component is identical in both applications, consider moving it to a shared location:

```diff
-// In both sr-frontend and zzz-frontend Footer.tsx files
-import { AppBar, Box, Skeleton, Typography } from '@mui/material'
-import { Suspense } from 'react'
-
-declare const __VERSION__: string
-export default function Footer() {
-  return (
-    <Suspense fallback={<Skeleton variant="rectangular" height={64} />}>
-      <FooterContent />
-    </Suspense>
-  )
-}
-function FooterContent() {
-  return (
-    <AppBar
-      component="footer"
-      position="static"
-      sx={{ bgcolor: 'neutral800.main' }}
-      elevation={0}
-    >
-      <Box
-        display="flex"
-        justifyContent="space-between"
-        sx={{ px: 2, py: 1 }}
-        gap={2}
-      >
-        <Typography
-          variant="caption"
-          sx={{ color: 'neutral400.main', textAlign: 'right' }}
-        >
-          Version:
-          <a
-            href={
-              process.env.NX_URL_GITHUB_GO_CURRENT_VERSION ||
-              `${process.env.NX_URL_GITHUB_GO}/releases`
-            }
-            target="_blank"
-            rel="noreferrer"
-            style={{ color: 'inherit' }}
-          >
-            {__VERSION__}
-          </a>
-        </Typography>
-      </Box>
-    </AppBar>
-  )
-}
```

And create a shared component in something like:
```typescript
// In a shared package, e.g. @genshin-optimizer/common/ui
import { AppBar, Box, Skeleton, Typography } from '@mui/material'
import { Suspense } from 'react'

declare const __VERSION__: string
export default function Footer() {
  return (
    <Suspense fallback={<Skeleton variant="rectangular" height={64} />}>
      <FooterContent />
    </Suspense>
  )
}
function FooterContent() {
  return (
    <AppBar
      component="footer"
      position="static"
      sx={{ bgcolor: 'neutral800.main' }}
      elevation={0}
    >
      <Box
        display="flex"
        justifyContent="space-between"
        sx={{ px: 2, py: 1 }}
        gap={2}
      >
        <Typography
          variant="caption"
          sx={{ color: 'neutral400.main', textAlign: 'right' }}
        >
          Version:
          <a
            href={
              process.env.NX_URL_GITHUB_GO_CURRENT_VERSION ||
              `${process.env.NX_URL_GITHUB_GO}/releases`
            }
            target="_blank"
            rel="noreferrer"
            style={{ color: 'inherit' }}
          >
            {__VERSION__}
          </a>
        </Typography>
      </Box>
    </AppBar>
  )
}
```

Then import it in both apps.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 2083ab7eaa0a8ad8afef6825fbe7b43252df922d and e264b5573c16ef41a616c0a1052af2fd0722fb9e.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `apps/sr-frontend/src/app/App.tsx` (2 hunks)
* `apps/sr-frontend/src/app/Footer.tsx` (1 hunks)
* `apps/zzz-frontend/src/app/App.tsx` (2 hunks)
* `apps/zzz-frontend/src/app/Footer.tsx` (1 hunks)

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: lint

</details>

<details>
<summary>🔇 Additional comments (6)</summary><blockquote>

<details>
<summary>apps/sr-frontend/src/app/App.tsx (2)</summary>

`17-17`: **New import for Footer component looks good.**

Importing the Footer component... *yawn*... just another component to maintain. But at least it's clean and clear where it's coming from.

---

`87-89`: **Footer implementation with proper bottom positioning.**

The Box with flexGrow={1} is a solid approach to push the footer to the bottom. Been using this trick since... *checks watch*... too many sleepless nights ago. The comment is helpful for any poor soul who has to maintain this code at 3 AM.

</details>
<details>
<summary>apps/zzz-frontend/src/app/App.tsx (2)</summary>

`19-19`: **Footer import looks good.**

Another import, another day... At least it's consistent with the sr-frontend implementation. *sips coffee*

---

`82-84`: **Footer positioning implementation is correct.**

Same implementation as in sr-frontend. The flexGrow trick works well here too. *rubs eyes* It's nice to see consistency across codebases, makes my late-night debugging sessions slightly less painful.

</details>
<details>
<summary>apps/sr-frontend/src/app/Footer.tsx (2)</summary>

`1-3`: **Appropriate imports for Footer component.**

All the necessary imports for Material UI components and React's Suspense. Nothing fancy, just the basics... like my diet of coffee and energy drinks.

---

`5-11`: **Footer component with Suspense is well structured.**

The component with Suspense fallback pattern is good... I've coded this pattern so many times I could do it in my sleep (which I probably have). The Skeleton as fallback is a nice touch for UX.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-09T19:09:06Z
user: login: coderabbitai[bot]
body: **Actionable comments posted: 0**

<details>
<summary>♻️ Duplicate comments (2)</summary><blockquote>

<details>
<summary>apps/zzz-frontend/src/app/Footer.tsx (2)</summary><blockquote>

`36-40`: _⚠️ Potential issue_

**Commit hash extraction needs safer implementation.**

*Eyes half-closed* This commit hash extraction is pretty brittle. If `NX_URL_GITHUB_GO_CURRENT_VERSION` is undefined or doesn't contain "commit/", this will break in weird ways. We should add some defensive coding here.


```diff
- {process.env.NX_URL_GITHUB_GO_CURRENT_VERSION?.replace(
-   /.*commit\//,
-   ''
- ).substring(0, 7)}
+ {process.env.NX_URL_GITHUB_GO_CURRENT_VERSION 
+   ? process.env.NX_URL_GITHUB_GO_CURRENT_VERSION.includes('commit/')
+     ? process.env.NX_URL_GITHUB_GO_CURRENT_VERSION.replace(/.*commit\//, '').substring(0, 7)
+     : 'latest'
+   : 'latest'}
```

---

`25-41`: _⚠️ Potential issue_

**Missing implementation for dev mode commit hash display.**

*Massages temples* The PR mentioned showing commit hash in dev mode, but I'm not seeing any conditional logic based on the environment. We should add something to specifically handle dev mode vs production.


```diff
<Typography variant="caption" sx={{ color: 'neutral400.main' }}>
  Build:
  <a
    href={
      process.env.NX_URL_GITHUB_GO_CURRENT_VERSION ||
      `${process.env.NX_URL_GITHUB_GO}/releases`
    }
    target="_blank"
    rel="noreferrer"
    style={{ color: 'inherit' }}
  >
+   {process.env.NODE_ENV === 'development' 
+     ? 'dev-' + (process.env.NX_URL_GITHUB_GO_CURRENT_VERSION?.replace(/.*commit\//, '').substring(0, 7) || 'local')
+     : process.env.NX_URL_GITHUB_GO_CURRENT_VERSION?.replace(/.*commit\//, '').substring(0, 7) || 'latest'}
-   {process.env.NX_URL_GITHUB_GO_CURRENT_VERSION?.replace(
-     /.*commit\//,
-     ''
-   ).substring(0, 7)}
  </a>
</Typography>
```

</blockquote></details>

</blockquote></details>

<details>
<summary>🧹 Nitpick comments (3)</summary><blockquote>

<details>
<summary>apps/zzz-frontend/src/app/Footer.tsx (3)</summary><blockquote>

`1-2`: **Imports look good, but check if Suspense is really needed.**

*Staring at the screen with bloodshot eyes* These imports look fine, but I'm not seeing any lazy-loaded components or async operations that would justify using Suspense here. It's adding complexity for potentially no reason, unless there's something I'm missing in my sleep-deprived state.

```diff
-import { AppBar, Box, Skeleton, Typography } from '@mui/material'
-import { Suspense } from 'react'
+import { AppBar, Box, Typography } from '@mui/material'
```

---

`4-10`: **Simplify component if Suspense isn't needed.**

*Chugs coffee* If we're not lazy loading anything, we can remove the Suspense wrapper and just render the FooterContent directly. One less thing to debug at 3am.

```diff
-export default function Footer() {
-  return (
-    <Suspense fallback={<Skeleton variant="rectangular" height={64} />}>
-      <FooterContent />
-    </Suspense>
-  )
-}
+export default function Footer() {
+  return <FooterContent />
+}
```

---

`19-24`: **Using space-between with only one child element.**

*Rubs eyes tiredly* You're using `justifyContent="space-between"` but there's only one child element in the Box. Space-between won't do anything unless you have at least two elements to create space between. Either add another element or change the justification.

```diff
<Box
  display="flex"
- justifyContent="space-between"
+ justifyContent="flex-start" 
  sx={{ px: 2, py: 1 }}
  gap={2}
>
```

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between e264b5573c16ef41a616c0a1052af2fd0722fb9e and 1c4a75a83c5e61628422d6373c2093c1ac63cb2a.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `apps/sr-frontend/src/app/Footer.tsx` (1 hunks)
* `apps/zzz-frontend/src/app/Footer.tsx` (1 hunks)

</details>

<details>
<summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary>

* apps/sr-frontend/src/app/Footer.tsx

</details>

<details>
<summary>⏰ Context from checks skipped due to timeout of 90000ms (1)</summary>

* GitHub Check: lint

</details>

<details>
<summary>🔇 Additional comments (1)</summary><blockquote>

<details>
<summary>apps/zzz-frontend/src/app/Footer.tsx (1)</summary>

`28-31`: <details>
<summary>❓ Verification inconclusive</summary>

**URL handling looks fragile.**

*Sighs deeply* The URL handling here depends on environment variables being set correctly. Make sure these are properly configured in your build pipeline or you'll get mysterious bugs appearing at midnight that'll keep you up debugging.

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if the environment variables are defined in any config files
echo "Checking for NX_URL_GITHUB_GO_CURRENT_VERSION and NX_URL_GITHUB_GO in environment configs..."
rg -A 2 "NX_URL_GITHUB_GO_CURRENT_VERSION|NX_URL_GITHUB_GO" --type=js --type=json --type=txt --type=yaml --type=env
```

Length of output: 340

---



</details>

**Heads-Up on URL Environment Variables – Please Verify Pipeline Settings**

- The `href` in `apps/zzz-frontend/src/app/Footer.tsx` (Lines 28-31) uses `process.env.NX_URL_GITHUB_GO_CURRENT_VERSION` and falls back to a releases URL based on `process.env.NX_URL_GITHUB_GO`.  
- Our initial search didn’t confirm these variables in local config files (likely because they’re expected to be injected via your CI/CD pipeline).  
- Ensure your build pipeline properly supplies these environment variables to avoid mysterious runtime issues.

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-09T19:21:29Z
user: login: frzyc
state: APPROVED
author_association: OWNER
submitted_at: 2025-03-09T19:26:57Z

Review comments:
diff_hunk: @@ -0,0 +1,46 @@
+import { AppBar, Box, Skeleton, Typography } from '@mui/material'
+import { Suspense } from 'react'
+
+declare const __VERSION__: string
path: apps/sr-frontend/src/app/Footer.tsx
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Missing commit hash implementation.**

Wait a minute... *squints at screen* The PR is supposed to show commit hash in dev mode, but I don't see anything related to that here. Only seeing version info with __VERSION__, but no commit hash or any conditional for dev mode.


The PR description mentions showing commit hash in header for dev mode, but this implementation only shows version number in the footer. Either the PR title needs updating or we need to implement the actual commit hash display.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-09T19:09:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,46 @@
+import { AppBar, Box, Skeleton, Typography } from '@mui/material'
+import { Suspense } from 'react'
+
+declare const __VERSION__: string
+export default function Footer() {
+  return (
+    <Suspense fallback={<Skeleton variant="rectangular" height={64} />}>
+      <FooterContent />
+    </Suspense>
+  )
+}
+function FooterContent() {
+  return (
+    <AppBar
+      component="footer"
+      position="static"
+      sx={{ bgcolor: 'neutral800.main' }}
+      elevation={0}
+    >
+      <Box
+        display="flex"
+        justifyContent="space-between"
+        sx={{ px: 2, py: 1 }}
+        gap={2}
+      >
+        <Typography
+          variant="caption"
+          sx={{ color: 'neutral400.main', textAlign: 'right' }}
+        >
+          Version:
+          <a
+            href={
+              process.env.NX_URL_GITHUB_GO_CURRENT_VERSION ||
+              `${process.env.NX_URL_GITHUB_GO}/releases`
+            }
+            target="_blank"
+            rel="noreferrer"
+            style={{ color: 'inherit' }}
+          >
+            {__VERSION__}
+          </a>
+        </Typography>
+      </Box>
+    </AppBar>
+  )
+}
path: apps/sr-frontend/src/app/Footer.tsx
user: login: coderabbitai[bot]
body: _💡 Verification agent_

<details>
<summary>🧩 Analysis chain</summary>

**FooterContent implementation is clean, but missing commit hash.**

The footer is well structured and the version link to GitHub is useful, but... *heavy sigh*... where's the commit hash for dev mode as mentioned in the PR title? There's no conditional rendering based on environment or any reference to a commit hash value.


Let's check if there's any commit hash-related code in the Header component since the PR mentions "header":

---

🏁 Script executed:

```shell
#!/bin/bash
# Check if Header.tsx has any implementation of commit hash display in dev mode
echo "Checking Header files for commit hash implementation..."
cat apps/sr-frontend/src/app/Header.tsx 2>/dev/null | grep -E "commit|hash|isDev" || echo "No commit hash implementation found in SR Header"
cat apps/zzz-frontend/src/app/Header.tsx 2>/dev/null | grep -E "commit|hash|isDev" || echo "No commit hash implementation found in ZZZ Header"
```

Length of output: 481

---



</details>

**Missing Commit Hash for Dev Mode – Action Required**

Hey, I'm running on little sleep, so I'll keep this quick: the `FooterContent` component in `apps/sr-frontend/src/app/Footer.tsx` looks clean, but there's no logic to display a commit hash in dev mode as promised by the PR title. I also checked the header files (both in SR and ZZZ) and found no implementation for commit hash display.  
   
- **File:** `apps/sr-frontend/src/app/Footer.tsx` – No conditional rendering or commit hash reference.  
- **Files:** `apps/sr-frontend/src/app/Header.tsx` and `apps/zzz-frontend/src/app/Header.tsx` – Verified; commit hash functionality is missing.  

Please add the conditional logic to display the commit hash in dev mode.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-09T19:09:04Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,46 @@
+import { AppBar, Box, Skeleton, Typography } from '@mui/material'
+import { Suspense } from 'react'
+
+declare const __VERSION__: string
path: apps/zzz-frontend/src/app/Footer.tsx
user: login: coderabbitai[bot]
body: _⚠️ Potential issue_

**Same issue with missing commit hash implementation.**

*Rubs temples* Same issue here as in the SR Footer component. The PR claims to show commit hash in dev mode, but there's no implementation of that feature that I can see.


The PR title mentions showing commit hash in header for dev mode, but this implementation only shows version number in the footer. Either update the PR title or implement the commit hash display feature.

<!-- This is an auto-generated comment by CodeRabbit -->
created_at: 2025-03-09T19:09:04Z
author_association: CONTRIBUTOR

PR comments:
user: login: coderabbitai[bot]
created_at: 2025-03-09T18:49:07Z
body: <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
<!-- walkthrough_start -->

## Walkthrough
The pull request integrates a new `Footer` component into two frontend applications. Both `App.tsx` files now import the `Footer` and include a `Box` with `flexGrow` to ensure the footer is anchored at the bottom of the viewport. The new `Footer` component, implemented in separate files, utilizes Material-UI components and is wrapped in a `Suspense` fallback using a `Skeleton`. It displays version information with a link to the GitHub releases page.

## Changes

| File(s) | Summary |
| --- | --- |
| `apps/sr-frontend/.../App.tsx`, `apps/zzz-frontend/.../App.tsx` | Added new `Footer` import and a `Box` with `flexGrow` to maintain the footer's bottom position. |
| `apps/sr-frontend/.../Footer.tsx`, `apps/zzz-frontend/.../Footer.tsx` | Introduced a new `Footer` component using MUI's `AppBar`, `Box`, `Typography`, and `Suspense` with a `Skeleton` fallback while loading `FooterContent`. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant U as User
    participant A as App Component
    participant F as Footer Component
    participant S as Suspense Wrapper
    participant C as FooterContent

    U->>A: Load App
    A->>F: Render Footer
    F->>S: Initiate Suspense loading
    S->>C: Request FooterContent
    alt Content loading
        S-->>A: Display Skeleton fallback
    else Content ready
        S-->>F: Render FooterContent with version info
    end
    F-->>A: Footer rendered at bottom
```

## Possibly related PRs

- **frzyc/genshin-optimizer#2748**: Implements similar footer component and layout updates, indicating a shared focus on improving footer structure.

## Suggested reviewers

- **frzyc**

## Poem

> In the midnight haze, a footer was born,  
> Anchoring pages from dusk until morn.  
> With boxes and code that never tire,  
> Our version shines with a GitHub fire.  
> Sleep may escape, but our code's a work of art!

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpADK2VmgqyjcEj2wAbb5AokAI7Y0riQ4rjedJAARACySAxcAIK09ABm+Pg0fAQOdpj0AFolMZAA7mjIiNgCzOo09HLhsJ7YiJSQGETYsuwSmADs6Bj0qPBKGOLp8NFVXU4CnQBMABwAzOsaMK1eFNz4HfzpLai2KMh5aGnokJnZnXm4u/YFo5AlRQrMB+RTyPgTs9PGhuNxvPAGNR4PgMBp3LslIgGBR4NxxLCeBR8BIJtFaPhpF1sigMAxvNglJBENxRPAZgxIEpcNpvMgVPg8C1PPAflE2FNoZj8LldlQMRg0FFIEsEO9gYxYJhSIhtqlaOoYZLfLIADTcgLoQ0YfCQCEYADWl1NASiAymFxqRJFkAAIokRfQNcj2ogtch4GSKUoxlgFUiUWiJfCDB4cM8XUqAXhzXNFaILRDEGE8mQaobntR0L4uqJpIgXPJsyRuOzDUw+SRGjKSJlDQFgqFA0RbgFcSRyts4KgGK0GJmkGFA+TKUT1CRmNVsKP0MgGwLxN1+FgG+CSAAPBRUjpif367DcWjQrcKmwAUWSrrid/4fHK8AtOnm5DodH1eewVEt3SbEpjAMh6FHZUiRcTwAnSKIxGiQNIDvbos1gcIqAwRBvCFHD9QobAMAwbtbm8fAoT8AYISvCVvmYQpIAACgAA1kFwsCIrB6lIsAGHgViAEp9SYi86LIpRwXwWQN2pSN0QDE5yHKM14AEKhUWdPhQXBSF8LrEE0joGM424Hw/A7EJswuRhAICKZvHkFDaCodIwmzah2n1QMNShTce0LHNdjQPBYBdRiq3EEslgqEVPy3TFEBYTxAW5dNxyzKcaEXFs2x5KdkACa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NSLH5ZRSry+zSf5tOs506KPTkB9JyPAQZEL/Py31BqgSDIgX12mbM+Ztr5lwvWYi0S7wdl7PwC9o5Jy+vnJFXb2yNzdLIUJo8jVLyrPfq5ZCTCvy8TsjuECkF45wUjLSg80tLJug+BcNSVZPusDIulBZy+R3KW2UHVuAlIYw+kvr1SnOWBaWBj/SFFlUovaXwa0Gio3LSQzn+bOi1VrRXirmJnmVgX5Xu0hDwMr9EE2O8AYyHPFpdXEUgvgQ12wTV+ipOHIV7vbi+btRW2bjqKDOoKm66NDlZVVwi/gw8IXXb0dEgfEfD2GVDSI1J4EsLgOUCQJUg9gNmqPnLsvsocscknh0iGlAgyuAVGh6qSJhvhCniuKgEWg6tWnWg2raNkh0MgK2qQH1t2lNn2swEsMgsgLQMOkrqOk5OOqFlOsTmQAurCEuiNioDQn7rNrsEWkyPAEXlWnisCDpNSLSE7mvvQZiLuq+LcLElQJZPCs2tQfViCh0Mjq5nOgIRgHJIwjMD0HDnCGDnhjYVWgIrDqRicORpOsjlRqjmvujvRoxpACoqpJHmxgTqUhYuHrxnJvxpzDjHOsjicETCDMLq9v1pTP4GgDTGLvTM0CjMzGoKzFjBzAYDEeuOoFuhMIgFun2LMFAbQFup5Ljr9EUf9JAMsAAAwbAqCDDZJoCtFoCrDXD9HpCtgABsqwywAArOkEsIMAIAACzrATHLC0DpAACcywSx7MhgMRJAywwxsxAg4x4xgw6wDAXcwxrYsxXcaAwxZxDAvRXcrR4xywaA6Qyw6QtArRgw6xUxKxng2MzRXcDAsxaAgw4xfRJx4xJANxwxawsx6xtAwx6wxxDAbRKxJxVxDAiJDAAgzxmxXMUAJRuAZRtAFRVRA4dAW6gM+gQAA=== -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details>
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---



<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=frzyc/genshin-optimizer&utm_content=2833):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->
author_association: CONTRIBUTOR
user: login: github-actions[bot]
created_at: 2025-03-09T18:51:56Z
body: [zzz-frontend] [Sun Mar  9 18:51:56 UTC 2025] - Deployed f54dfba2a41771a080ef263dfa407b3fcc279fe2 to https://genshin-optimizer-prs.github.io/pr/2833/zzz-frontend (Takes 3-5 minutes after this completes to be available)
<!-- Created by actions-cool/maintain-one-comment -->
[frontend] [Sun Mar  9 18:52:28 UTC 2025] - Deployed f54dfba2a41771a080ef263dfa407b3fcc279fe2 to https://genshin-optimizer-prs.github.io/pr/2833/frontend (Takes 3-5 minutes after this completes to be available)
<!-- Created by actions-cool/maintain-one-comment -->
[sr-frontend] [Sun Mar  9 18:53:09 UTC 2025] - Deployed f54dfba2a41771a080ef263dfa407b3fcc279fe2 to https://genshin-optimizer-prs.github.io/pr/2833/sr-frontend (Takes 3-5 minutes after this completes to be available)
<!-- Created by actions-cool/maintain-one-comment -->
[sr-frontend] [Sun Mar  9 19:04:59 UTC 2025] - Deployed fc78d3e50f2b5eed861c3e1f681ca47d8c37a3d1 to https://genshin-optimizer-prs.github.io/pr/2833/sr-frontend (Takes 3-5 minutes after this completes to be available)
<!-- Created by actions-cool/maintain-one-comment -->
[zzz-frontend] [Sun Mar  9 19:05:55 UTC 2025] - Deployed fc78d3e50f2b5eed861c3e1f681ca47d8c37a3d1 to https://genshin-optimizer-prs.github.io/pr/2833/zzz-frontend (Takes 3-5 minutes after this completes to be available)
<!-- Created by actions-cool/maintain-one-comment -->
[zzz-frontend] [Sun Mar  9 19:18:29 UTC 2025] - Deployed 7edf596924dbb786e2266570488bf9fc1de313f9 to https://genshin-optimizer-prs.github.io/pr/2833/zzz-frontend (Takes 3-5 minutes after this completes to be available)
<!-- Created by actions-cool/maintain-one-comment -->
[sr-frontend] [Sun Mar  9 19:18:40 UTC 2025] - Deployed 7edf596924dbb786e2266570488bf9fc1de313f9 to https://genshin-optimizer-prs.github.io/pr/2833/sr-frontend (Takes 3-5 minutes after this completes to be available)
<!-- Created by actions-cool/maintain-one-comment -->
[zzz-frontend] [Sun Mar  9 19:23:30 UTC 2025] - Deployed 7edf596924dbb786e2266570488bf9fc1de313f9 to https://genshin-optimizer-prs.github.io/pr/2833/zzz-frontend (Takes 3-5 minutes after this completes to be available)
<!-- Created by actions-cool/maintain-one-comment -->
[sr-frontend] [Sun Mar  9 19:23:50 UTC 2025] - Deployed 7edf596924dbb786e2266570488bf9fc1de313f9 to https://genshin-optimizer-prs.github.io/pr/2833/sr-frontend (Takes 3-5 minutes after this completes to be available)
<!-- Created by actions-cool/maintain-one-comment -->
[Sun Mar  9 20:12:05 UTC 2025] - Deleted deployment
<!-- Created by actions-cool/maintain-one-comment -->
author_association: CONTRIBUTOR