Skip to content

feat:FRO-6/stock search and ui change#9

Merged
sreenandpk merged 1 commit into
developfrom
feat/FRO-6-stock-search-ui
Jul 23, 2026
Merged

feat:FRO-6/stock search and ui change#9
sreenandpk merged 1 commit into
developfrom
feat/FRO-6-stock-search-ui

Conversation

@Anjaldev-vk

@Anjaldev-vk Anjaldev-vk commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added stock search with debounced results and one-click portfolio additions.
    • Added market tabs for gainers, losers, and all stocks, with streaming updates and portfolio status indicators.
    • Added streamlined sidebar navigation, workspace details, and logout access.
  • Bug Fixes

    • Corrected spacing for the portfolio capacity warning.
  • Style

    • Refreshed the dashboard, authentication screens, portfolio, sidebar, and market views with a cohesive dark theme.
    • Improved typography, layout responsiveness, glass effects, and loading states.

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d4852537-552a-4b05-9f02-b91d9a67e70d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/FRO-6-stock-search-ui

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/styles/components/sidebar.css (1)

1-222: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Prettier check is failing on this file.

CI reports a formatting mismatch for this file. Run the formatter before merging.

prettier --write "src/styles/components/sidebar.css"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/styles/components/sidebar.css` around lines 1 - 222, Run Prettier on the
sidebar.css stylesheet to apply the repository’s expected formatting, preserving
all existing selectors and styling declarations.

Source: Pipeline failures

🧹 Nitpick comments (2)
src/pages/LiveMarketDashboard.tsx (1)

50-63: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

No onerror/onclose handling or reconnect for the market WebSocket.

If the socket errors or the server drops the connection, the dashboard silently stops updating with no recovery. Consider adding onerror/onclose handlers with a backoff-based reconnect (and surfacing a "stream disconnected" state to the user).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/LiveMarketDashboard.tsx` around lines 50 - 63, Enhance the
WebSocket lifecycle in the useEffect for LiveMarketDashboard by handling onerror
and onclose, adding backoff-based reconnection after unexpected disconnects, and
exposing a stream-disconnected state to the UI. Ensure cleanup cancels pending
reconnect timers, prevents reconnects after unmount, and closes the active
socket.
src/styles/tokens.css (1)

40-41: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Don't lowercase BlinkMacSystemFont per the stylelint hint.

Unlike Roboto/Consolas (case-insensitive installed-font lookups), BlinkMacSystemFont is a literal sentinel string Chromium/Blink checks for verbatim to select the macOS system font; lowercasing it to blinkmacsystemfont risks the browser failing to recognize it and skipping straight to the next fallback. Consider disabling value-keyword-case for the font-family property instead of auto-fixing this line.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/styles/tokens.css` around lines 40 - 41, Preserve the exact
`BlinkMacSystemFont` casing in `--font-family-base`. Adjust the stylelint
configuration or targeted `font-family` lint rule to disable
`value-keyword-case` enforcement for font-family values, without changing the
fallback names or auto-lowering this sentinel.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@index.html`:
- Around line 11-14: Update the Google Fonts setup near the existing font links
to load Inter, including the required preconnect if needed, so the configured
--font-family-base resolves consistently with dashboard.css. Retain the existing
Plus Jakarta Sans font only if it is intentionally required as a fallback.

In `@src/components/PortfolioView.tsx`:
- Line 181: Update the inline style on the paragraph in PortfolioView to remove
the conflicting margin declaration and preserve the intended 8px top spacing,
using a single consistent margin property.

In `@src/components/Sidebar.tsx`:
- Line 30: Replace the personal fallback in the username assignment within the
Sidebar component with a generic user-facing fallback, while preserving the
existing user?.username value whenever it is available.

In `@src/pages/LiveMarketDashboard.tsx`:
- Line 37: The searchQuery state in LiveMarketDashboard is never updated, so
filterStocks cannot filter results. Either connect a setter to an appropriate
search input and pass the updated query through StockSearchBar, or remove
searchQuery and filterStocks and render marketData.gainers/losers directly,
preserving the intended dashboard behavior.
- Around line 76-78: Update the catch block in LiveMarketDashboard’s
portfolio-loading flow to suppress only the expected 404 response; inspect the
caught error’s status and log or otherwise handle network, 5xx, authentication,
and other failures instead of silently discarding them. Preserve the current
behavior for a portfolio that has not yet been created.

In `@src/styles/components/live-market.css`:
- Line 10: Update the font-family declaration in the live-market styles to use
the unquoted Inter family name, while preserving the existing fallback fonts and
ordering.

In `@src/styles/components/portfolio.css`:
- Around line 216-230: Restore a dedicated .alert-icon rule for the icon
rendered within .alert-banner, or remove the alert-icon class from the
PortfolioView markup; ensure the chosen approach leaves the warning icon
correctly styled and consistent with the alert banner.

In `@src/styles/components/sidebar.css`:
- Around line 3-20: Update the z-index declaration in .vercel-sidebar to use the
appropriate shared layering token from tokens.css instead of the hardcoded 1000
value, ensuring modals and toasts can render above the sidebar according to the
established stacking order.

---

Outside diff comments:
In `@src/styles/components/sidebar.css`:
- Around line 1-222: Run Prettier on the sidebar.css stylesheet to apply the
repository’s expected formatting, preserving all existing selectors and styling
declarations.

---

Nitpick comments:
In `@src/pages/LiveMarketDashboard.tsx`:
- Around line 50-63: Enhance the WebSocket lifecycle in the useEffect for
LiveMarketDashboard by handling onerror and onclose, adding backoff-based
reconnection after unexpected disconnects, and exposing a stream-disconnected
state to the UI. Ensure cleanup cancels pending reconnect timers, prevents
reconnects after unmount, and closes the active socket.

In `@src/styles/tokens.css`:
- Around line 40-41: Preserve the exact `BlinkMacSystemFont` casing in
`--font-family-base`. Adjust the stylelint configuration or targeted
`font-family` lint rule to disable `value-keyword-case` enforcement for
font-family values, without changing the fallback names or auto-lowering this
sentinel.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 29360e39-eaf4-4ded-8251-cdff6b39447c

📥 Commits

Reviewing files that changed from the base of the PR and between 64c8a0d and 5371a15.

📒 Files selected for processing (17)
  • .gitignore
  • index.html
  • src/components/PortfolioView.tsx
  • src/components/Sidebar.tsx
  • src/components/StockSearchBar.tsx
  • src/features/globe/GlobeView.tsx
  • src/features/globe/useGlobe.ts
  • src/index.css
  • src/pages/LiveMarketDashboard.tsx
  • src/services/market.service.ts
  • src/styles/components/auth-layout.css
  • src/styles/components/dashboard.css
  • src/styles/components/live-market.css
  • src/styles/components/portfolio.css
  • src/styles/components/sidebar.css
  • src/styles/components/stock-search-bar.css
  • src/styles/tokens.css
💤 Files with no reviewable changes (1)
  • src/features/globe/GlobeView.tsx

Comment thread index.html
Comment on lines +11 to +14
<!-- Performance: preconnect to CDN used for globe assets and Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | rg '(^|/)(index\.html|tokens\.css|dashboard\.css|sidebar\.css|index\.css|auth-layout\.css|.*\.css)$' || true

echo "== index preconnect/stylesheet =="
if [ -f index.html ]; then
  sed -n '1,35p' index.html
fi

echo "== font variable and hardcoded Inter usage =="
rg -n "font-family-base|--font-family-base|font-family:.*Inter|font-family:\s*['\"]*Inter|['\"]Inter['\"]|--font-family-mono|Plus Jakarta Sans|Plus+Jakarta" -S --glob '*.css' --glob 'index.html' .

echo "== relevant CSS snippets =="
for f in tokens.css dashboard.css sidebar.css index.css auth-layout.css; do
  if [ -f "$f" ]; then
    echo "--- $f ---"
    rg -n -C 2 "font-family|variable|Inter|Plus|sans-serif" "$f" || true
  fi
done

Repository: TradeDisciplineAI/frontned

Length of output: 3145


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
from pathlib import Path
import re

index = Path("index.html").read_text()
stylesheet = re.search(r'<link[^>]*href="([^"]*fonts\.googleapis\.com[^"]*)"[^>]*rel="stylesheet"', index)
loaded = []
if stylesheet:
    loaded = re.findall(r'family=([^:&#]+)', stylesheet.group(1))

css = []
for p in Path(".").rglob("*.css"):
    if ".git" in p.parts:
        continue
    txt = p.read_text(errors="ignore")
    hits = [("tokens base" if "--font-variable-base" in txt else None, txt)]
    css.append((p, txt))

base_var_pat = re.compile(r"--font-family-base\s*:\s*([^;]+)")
hardcoded_inter = re.compile(r"font-family\s*:\s*['\"]Inter['\"]|font-family\s*:\s*[^;]*['\"]Inter['\"]")
plus_fallback = re.compile(r"font-family\s*:\s*var\(--font-family-base,\s*['\"]Plus Jakarta Sans['\"]|font-family\s*:\s*['\"]Plus Jakarta Sans['\"]")

print(f"Google Fonts stylesheet loaded families: {loaded}")
print(f"inter preload present: {'Inter' in loaded}")
print()

for p, txt in css:
    base = base_var_pat.search(txt)
    if base:
        print(f"tokens base value in {p}: {base.group(1).strip()}")
    matches = list(hardcoded_inter.finditer(txt))
    if matches or plus_fallback.search(txt):
        print(f"{p}: hardcoded Inter occurrences={len(matches)}")
        for m in matches:
            line = txt[:m.start()].count("\n") + 1
            print(f"  line {line}: {txt.splitlines()[line-1].strip()}")
        if plus_fallback.search(txt):
            line = txt[:next(plus_fallback.finditer(txt)).start()].count("\n") + 1
            print(f"  line {line}: {txt.splitlines()[line-1].strip()}")

print()
print("Dashboard fallback analysis:")
dashboard = Path("src/styles/components/dashboard.css").read_text(errors="ignore")
var_decl = re.search(r":root\s*\{[^}]*--font-family-base\s*:", dashboard)
print(f"dashboard defines --font-family-base locally: {bool(var_decl)}")
PY

Repository: TradeDisciplineAI/frontned

Length of output: 1192


Load Inter for the theme’s base font.

tokens.css sets --font-family-base to start with Inter, and dashboard.css relies on that variable. If the variable is absent, it falls back to Plus Jakarta Sans, which this stylesheet already loads but is not the configured base font. Add the Inter Google Fonts stylesheet/preconnect so dashboard matches the rest of the UI; keep the existing Plus Jakarta Sans link only if this fallback behavior is intentional.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@index.html` around lines 11 - 14, Update the Google Fonts setup near the
existing font links to load Inter, including the required preconnect if needed,
so the configured --font-family-base resolves consistently with dashboard.css.
Retain the existing Plus Jakarta Sans font only if it is intentionally required
as a fallback.

</form>
{isFull && (
<p style={{ color: '#f59e0b', fontSize: '0.8rem', marginTop: '8px', marginContent: 0 }}>
<p style={{ color: '#f59e0b', fontSize: '0.8rem', marginTop: '8px', margin: 0 }}>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Conflicting marginTop and margin — the 8px top margin is silently dropped.

React applies inline style keys in order, so margin: 0 (a shorthand) overrides the earlier marginTop: '8px', resetting the top margin to 0. Keep only one. If the 8px gap is intended:

🎨 Proposed fix
-            <p style={{ color: '`#f59e0b`', fontSize: '0.8rem', marginTop: '8px', margin: 0 }}>
+            <p style={{ color: '`#f59e0b`', fontSize: '0.8rem', marginTop: '8px', marginBottom: 0 }}>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<p style={{ color: '#f59e0b', fontSize: '0.8rem', marginTop: '8px', margin: 0 }}>
<p style={{ color: '`#f59e0b`', fontSize: '0.8rem', marginTop: '8px', marginBottom: 0 }}>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/PortfolioView.tsx` at line 181, Update the inline style on the
paragraph in PortfolioView to remove the conflicting margin declaration and
preserve the intended 8px top spacing, using a single consistent margin
property.

TRADING COPILOT
</h2>
</div>
const username = user?.username || 'Anjal Dev VK';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Hardcoded developer name as username fallback.

'Anjal Dev VK' will be displayed for any user without a username, leaking a personal placeholder into production UI. Use a generic fallback.

✏️ Proposed fix
-  const username = user?.username || 'Anjal Dev VK';
+  const username = user?.username || 'Guest';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const username = user?.username || 'Anjal Dev VK';
const username = user?.username || 'Guest';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/Sidebar.tsx` at line 30, Replace the personal fallback in the
username assignment within the Sidebar component with a generic user-facing
fallback, while preserving the existing user?.username value whenever it is
available.

});
const [activeMarketTab, setActiveMarketTab] = useState<'gainers' | 'losers' | 'all'>('gainers');
const [portfolioHoldings, setPortfolioHoldings] = useState<string[]>([]);
const [searchQuery] = useState('');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

searchQuery has no setter, so filterStocks never filters.

searchQuery is initialized to '' and never updated (no setter destructured, and the header StockSearchBar only triggers portfolio adds). Consequently filterStocks (Lines 119-122) always returns the full list and its .filter(...) branch is dead code. Either wire a setter to a filter input or drop searchQuery/filterStocks and use marketData.gainers/losers directly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/LiveMarketDashboard.tsx` at line 37, The searchQuery state in
LiveMarketDashboard is never updated, so filterStocks cannot filter results.
Either connect a setter to an appropriate search input and pass the updated
query through StockSearchBar, or remove searchQuery and filterStocks and render
marketData.gainers/losers directly, preserving the intended dashboard behavior.

Comment on lines 76 to 78
} catch (err) {
// 404 is normal if they haven't configured a portfolio yet
// 404 is normal if portfolio is not yet created
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Empty catch swallows all errors, not just 404.

The comment says 404 is expected, but the bare catch silently discards every failure (network, 5xx, auth). Narrow it to the expected 404 and log/handle other statuses so genuine failures aren't hidden.

🛡️ Proposed handling
     } catch (err) {
-      // 404 is normal if portfolio is not yet created
+      // 404 is normal if portfolio is not yet created; surface anything else
+      if ((err as any)?.response?.status !== 404) {
+        console.error('Failed to fetch portfolio holdings', err);
+      }
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
} catch (err) {
// 404 is normal if they haven't configured a portfolio yet
// 404 is normal if portfolio is not yet created
}
} catch (err) {
// 404 is normal if portfolio is not yet created; surface anything else
if ((err as any)?.response?.status !== 404) {
console.error('Failed to fetch portfolio holdings', err);
}
}
🧰 Tools
🪛 GitHub Check: Type-check · Lint · Format · Test · Build

[warning] 76-76: eslint(no-unused-vars)
Catch parameter 'err' is caught but never used.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/LiveMarketDashboard.tsx` around lines 76 - 78, Update the catch
block in LiveMarketDashboard’s portfolio-loading flow to suppress only the
expected 404 response; inspect the caught error’s status and log or otherwise
handle network, 5xx, authentication, and other failures instead of silently
discarding them. Preserve the current behavior for a portfolio that has not yet
been created.

overflow-x: hidden;
background-color: #000000;
color: #ededed;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Remove quotes around the Inter font-family name (stylelint).

Stylelint's font-family-name-quotes flags the quoted 'Inter'; single-word family names shouldn't be quoted.

🎨 Proposed fix
-  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
+  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 10-10: Expected no quotes around "Inter" (font-family-name-quotes)

(font-family-name-quotes)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/styles/components/live-market.css` at line 10, Update the font-family
declaration in the live-market styles to use the unquoted Inter family name,
while preserving the existing fallback fonts and ordering.

Source: Linters/SAST tools

Comment on lines +216 to 230
/* Alert Banner */
.alert-banner {
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.25);
color: #fca5a5;
padding: 12px 16px;
border-radius: 8px;
background: rgba(244, 63, 94, 0.12);
border: 1px solid rgba(244, 63, 94, 0.3);
color: #fb7185;
padding: 14px 18px;
border-radius: var(--radius-md, 10px);
font-size: 0.9rem;
margin-bottom: 20px;
font-weight: 600;
margin-bottom: 24px;
display: flex;
align-items: center;
gap: 10px;
}

.alert-icon {
font-weight: bold;
gap: 12px;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

rg -n 'alert-icon' src/components/PortfolioView.tsx

Repository: TradeDisciplineAI/frontned

Length of output: 217


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "CSS alert-icon occurrences:"
rg -n 'alert-icon|alert-banner' src/styles || true

echo
echo "JSX alert-icon occurrences:"
rg -n 'alert-icon|alert-banner' src/components src 2>/dev/null || true

echo
echo "CSS context around lines 216-230:"
sed -n '200,240p' src/styles/components/portfolio.css

Repository: TradeDisciplineAI/frontned

Length of output: 1519


Restore the alert icon styling or remove the extra class.

PortfolioView.tsx still renders <span className="alert-icon">⚠️</span>, but there is no CSS rule for .alert-icon, leaving the alert banner icon unstyled.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/styles/components/portfolio.css` around lines 216 - 230, Restore a
dedicated .alert-icon rule for the icon rendered within .alert-banner, or remove
the alert-icon class from the PortfolioView markup; ensure the chosen approach
leaves the warning icon correctly styled and consistent with the alert banner.

Comment on lines +3 to +20
.vercel-sidebar {
width: 240px;
height: 100vh;
position: fixed;
top: 0;
left: 0;
bottom: 0;
background-color: #000000;
border-right: 1px solid #1f1f1f;
padding: 14px 12px;
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
user-select: none;
z-index: 1000;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

z-index: 1000 outranks every layer token in tokens.css.

tokens.css caps its layering scale at --z-toast: 200, but .vercel-sidebar hardcodes z-index: 1000. This means the sidebar will always render above modals and toasts (which top out at --z-modal: 100 / --z-toast: 200), which is likely not the intended stacking order for overlays meant to cover the full viewport.

🔧 Suggested fix
 .vercel-sidebar {
   ...
-  z-index: 1000;
+  z-index: var(--z-overlay, 10);
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.vercel-sidebar {
width: 240px;
height: 100vh;
position: fixed;
top: 0;
left: 0;
bottom: 0;
background-color: #000000;
border-right: 1px solid #1f1f1f;
padding: 14px 12px;
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
user-select: none;
z-index: 1000;
}
.vercel-sidebar {
width: 240px;
height: 100vh;
position: fixed;
top: 0;
left: 0;
bottom: 0;
background-color: `#000000`;
border-right: 1px solid `#1f1f1f`;
padding: 14px 12px;
display: flex;
flex-direction: column;
justify-content: space-between;
box-sizing: border-box;
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
user-select: none;
z-index: var(--z-overlay, 10);
}
🧰 Tools
🪛 Stylelint (17.14.0)

[error] 17-17: Expected no quotes around "Inter" (font-family-name-quotes)

(font-family-name-quotes)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/styles/components/sidebar.css` around lines 3 - 20, Update the z-index
declaration in .vercel-sidebar to use the appropriate shared layering token from
tokens.css instead of the hardcoded 1000 value, ensuring modals and toasts can
render above the sidebar according to the established stacking order.

@sreenandpk
sreenandpk merged commit d47b841 into develop Jul 23, 2026
1 of 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.

2 participants