fix: lint errors in widget-renderer.tsx and layout.tsx
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #13 của @Jah-yee — đã đóng, không merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 50/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- next.js, react, typescript
Hướng nghiên cứu
Start by running pnpm lint and inspect apps/app/src/components/generative-ui/widget-renderer.tsx at the two reported effects and the unused description prop, then review layout.tsx at the Google Fonts link. Done means the Plus Jakarta Sans load uses next/font, the effect lint errors and unused prop warning are resolved, and pnpm lint passes without errors or warnings.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
The pnpm lint CI check is failing with 2 errors and 2 warnings.
Errors
1. react-hooks/set-state-in-effect in widget-renderer.tsx:414
// apps/app/src/components/generative-ui/widget-renderer.tsx
useEffect(() => {
if (!active) return;
setIndex(0); // ← setState called synchronously in effect
const interval = setInterval(() => {
setIndex((i) => (i + 1) % LOADING_PHRASES.length);
}, 1800);
return () => clearInterval(interval);
}, [active]);
Fix: Reset the index outside the effect (e.g. derive from active changing, or use a ref).
2. react-hooks/set-state-in-effect in widget-renderer.tsx:457
useEffect(() => {
if (!html || !iframeRef.current) return;
if (html === committedHtmlRef.current) return;
committedHtmlRef.current = html;
iframeRef.current.srcdoc = assembleDocument(html);
setLoaded(false); // ← setState called synchronously in effect
setHeight(0);
}, [html]);
Fix: Restructure so loaded/height are derived from html changes without synchronous setState in the effect body.
Warnings
3. Unused description prop — widget-renderer.tsx:424
export function WidgetRenderer({ title, description, html }: WidgetRendererProps) {
// ^^^^^^^^^^^ defined but never used
Fix: Either use the prop or prefix with underscore (_description).
4. Custom font loaded in layout.tsx instead of next/font — layout.tsx:15
<link
href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
Fix: Use next/font/google to load Plus Jakarta Sans for automatic optimization and self-hosting.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.9k
- Fork
- 414
- Merge trung bình
- 4 giờ
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CopilotKit/OpenIntelligentUI
-
Script dedup key truncation may cause collisionsCó thể đã có người làm @saschabuehrle đã nhận 215 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
CopilotKit/OpenIntelligentUI#37 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
CopilotKit/OpenIntelligentUI#29 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Self-host with Docker Compose and optional server-held keysCó thể đã có người làm @kannan983 đã nhận 15 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 18/100
CopilotKit/OpenIntelligentUI#98 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Support OpenAI-compatible gateways (OpenRouter) via vendor/model namesCó thể đã có người làm @kannan983 đã nhận 15 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
CopilotKit/OpenIntelligentUI#97 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
UIĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 8/100
CopilotKit/OpenIntelligentUI#96 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của CopilotKit/OpenIntelligentUI
Issue tương tự
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
0️⃣ phase/new
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
microsoft/playwright#43640 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100