feat: initialize Discord clone application with core backend services and Electron frontend.
This commit is contained in:
47
.claude/plans/sorted-beaming-comet.md
Normal file
47
.claude/plans/sorted-beaming-comet.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Fix JSX Syntax Errors Blocking Electron Dev
|
||||
|
||||
## Problem
|
||||
`npm run dev:electron` fails with two issues:
|
||||
1. **Sidebar.jsx:632** — Fatal: "Adjacent JSX elements must be wrapped in an enclosing tag"
|
||||
2. **ScreenShareModal.jsx:70** — Warning: Duplicate `width` key in object literal
|
||||
|
||||
## Root Cause Analysis
|
||||
|
||||
### Sidebar.jsx — Duplicate opening `<div>`
|
||||
Lines 402 and 403 are identical:
|
||||
```jsx
|
||||
<div style={{ display: 'flex', flex: 1, minHeight: 0 }}> // line 402 ← DUPLICATE
|
||||
<div style={{ display: 'flex', flex: 1, minHeight: 0 }}> // line 403
|
||||
```
|
||||
Line 403's div closes at line 632, but line 402's div **never closes**. This leaves the Voice Connection Panel (line 633), UserControlPanel (line 681), and modals (line 684+) as adjacent siblings without a common parent.
|
||||
|
||||
### ScreenShareModal.jsx — Duplicate style key
|
||||
Line 70 has `width` specified twice:
|
||||
```jsx
|
||||
style={{ position: 'relative', width: '100%', height: '250px', width: '450px', ... }}
|
||||
```
|
||||
The second `width: '450px'` silently overrides `width: '100%'`.
|
||||
|
||||
## Fix
|
||||
|
||||
### 1. Sidebar.jsx — Remove duplicate div (line 402)
|
||||
**File:** `FrontEnd/Electron/src/components/Sidebar.jsx`
|
||||
|
||||
Delete line 402 entirely. The remaining structure becomes:
|
||||
```
|
||||
Line 401: <div className="sidebar"> ← outermost
|
||||
Line 403: <div style={{ display: 'flex', flex: 1, minHeight: 0 }}> ← flex container
|
||||
...server-list + channel-list...
|
||||
Line 632: </div> ← closes flex container
|
||||
Voice Connection Panel, UserControlPanel, Modals
|
||||
Line 701: </div> ← closes sidebar
|
||||
```
|
||||
|
||||
### 2. ScreenShareModal.jsx — Remove duplicate width
|
||||
**File:** `FrontEnd/Electron/src/components/ScreenShareModal.jsx`
|
||||
|
||||
On line 70, remove the first `width: '100%',` — keep only `width: '450px'`.
|
||||
|
||||
## Verification
|
||||
- Run `npm run dev:electron` — Vite should compile without errors
|
||||
- The Electron window should open and render the sidebar correctly
|
||||
15
.claude/settings.local.json
Normal file
15
.claude/settings.local.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"WebSearch",
|
||||
"WebFetch(domain:labs.convex.dev)",
|
||||
"Bash(npm install:*)",
|
||||
"Bash(npm uninstall:*)",
|
||||
"Bash(npm init:*)",
|
||||
"Bash(node -e:*)",
|
||||
"Bash(npx convex dev:*)",
|
||||
"Bash(npx convex:*)",
|
||||
"Bash(npx @convex-dev/auth:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user