fix(connections): say why a connection needs attention or failed, and tell its owners
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- next.js, playwright, react, typescript
- Lĩnh vực
- backend-api-design, testing
Hướng nghiên cứu
Start with src/app/w/[workspace]/connections/[connectionId]/page.tsx and src/lib/jobs/sync-connection.ts to trace the connection status and stored error details. Then read the existing delivery paths in src/lib/notifications/ and their tests to understand recipient and deduplication behavior. Done means the page explains the failure and next step, owners and admins receive one notice per failure episode, and the listed unit and end-to-end checks pass.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
Found by the Fable pre-production review on 2026-12-02 (main at cedc1914; every line reference below re-checked on main at cde5aa3b). Source: provider connect readiness report, N7.
After a revoked or expired token, or a provider that keeps failing, the connection page shows only a badge:
- The page explains only missing scopes (
src/app/w/[workspace]/connections/[connectionId]/page.tsx:256-280). last_error_codeandlast_error_referenceare written (src/lib/jobs/sync-connection.ts:409-410,:450-451) but no connection page or component reads them (they are read only for alert channels,src/components/alerts/alert-delivery.tsx:53-56).- Every non-credential failure reads "did not answer after several attempts" (
sync-connection.ts:357), schema drift included. - The reason sits in one
stackdash.sync_failedtimeline event (sync-connection.ts:362-374); no notification code references that event, so nobody is emailed. - "Sync now" shows unless the connection is revoked (
page.tsx:443-445), while a sync skipsneeds_attentionconnections (sync-connection.ts:103-107).
Impact: an owner whose connection broke learns about it only by opening the page or the timeline; meanwhile alerts go quiet on stale data. #60 (closed) built the status and the event; this is the explanation and the notice.
Plan
- On the connection page, for
needs_attentionandfailed, show the cause in plain words fromlast_error_code, the reference id, and the next step (reconnect, wait for the hourly retry, or contact support). - Hide "Sync now" while a reconnect is pending, or explain why it will not run.
- Send one message per failure episode (the event's dedupe key already marks the episode) to the workspace's owners and admins, through the existing alert email and channel delivery, with an unsubscribe that matches the other alert mail.
- Copy follows the house voice: what happened, what it affected, what to do; no provider error codes.
Acceptance criteria
- The connection page states cause, reference id, and next step for
needs_attentionandfailed. - "Sync now" is hidden or explained while a reconnect is pending.
- One message per failure episode reaches owners and admins; a second failure in the same episode sends nothing.
- Unit tests for the cause mapping and the one-per-episode rule.
- Playwright e2e on the connection page with an axe scan and a keyboard pass.
Files and areas
src/app/w/[workspace]/connections/[connectionId]/page.tsx, a small cause mapping module under src/lib/connections/, src/lib/notifications/, their tests.
Non-goals: per-account errors (#{n5}), the sync deadline (#{n4}), new alert channel kinds.
Verification
npm run typecheck, npm run lint, npx vitest run src/lib/connections src/lib/notifications, the connections e2e spec.
Branch: <issue-number>-connection-failure-reason
Model: anthropic/claude-opus-5-5 | Reasoning effort: unknown
- Ngôn ngữ chính
- TypeScript
- Star
- 13
- Fork
- 2
- Merge trung bình
- 5 giờ 20 phút
- Pull request đã merge (30 ngày)
- 287
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- 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 eddiejaoude/StackDash
-
area: integrations documentation priority: P2 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
eddiejaoude/StackDash#798 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ops documentation priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
eddiejaoude/StackDash#796 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: docs documentation impact: low priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eddiejaoude/StackDash#790 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: ops bug impact: low priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
eddiejaoude/StackDash#785 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: connections enhancement impact: low priority: P3 size: XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
eddiejaoude/StackDash#768 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eddiejaoude/StackDash
Issue tương tự
-
bot:ai-assisted component:midnight-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
midnightntwrk/midnight-js#1790 ·
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
Maintainer thường phản hồi trong vòng 1 ngày
-
area:vscode bug has repro platform:macos platform:vscode regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
anthropics/claude-code#113502 ·
-
Add: Rajdhani TV HDĐang mởcheck:passed streams:add
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
effort/l priority/p1 risk/high triage/core
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
iflytek/skillhub#1188 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày