Inbox: several Linear keys, one per workspace, picked by the link's workspace

Đang mở
#3,939 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
46/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
api, backend, frontend

Hướng nghiên cứu

Start from the current single-key path: the handler behind POST /api/inbox/linear/key, the reading of inbox/linear-key / LINEAR_API_KEY, and the hover-card lookup that resolves a linear.app/<workspace>/issue/... link. /api/inbox/linear-refs already returns each key's workspace, so trace how that response feeds the Settings, Accounts, Linear row before adding the list UI. Done means inbox/linear-keys.json (0600) is the store with the old key read as one entry, both request shapes work on the existing endpoint, and cards resolve per workspace slug while unknown workspaces stay plain links. This spans storage, API and settings UI, so read the surrounding Inbox code before editing.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

The Inbox takes one Linear API key (Settings, Accounts, Linear; saved in inbox/linear-key, or LINEAR_API_KEY). A Linear personal API key belongs to one workspace, so links to issues in any other workspace get no hover card. #3146 lists this as a known limit: "A link to another workspace's issue gets no card."

People who work in two Linear workspaces (for example a day job and a side project) see cards for one and plain links for the other. The only workaround today is to swap the saved key through POST /api/inbox/linear/key whenever they switch context, which also drops the cards for the workspace they just left.

Request

Let the Inbox hold several Linear keys and pick one per link by the workspace slug in the URL (https://linear.app/<workspace>/issue/ENG-123/...).

  • Settings, Accounts, Linear: a list of keys instead of one. When a key is saved, the server already learns its workspace (/api/inbox/linear-refs returns workspace), so each row can show the workspace name and the key's last 4 characters, with Remove per row.
  • Cards: for a link to linear.app/<workspace>/..., use the key whose workspace is <workspace>. A link to a workspace with no key stays a plain link, as now.
  • Storage: for example inbox/linear-keys.json ({ "<workspace>": "<key>" }, mode 0600), with today's inbox/linear-key read as one entry so existing setups keep working. An env form could be LINEAR_API_KEYS=<workspace>=<key>,<workspace>=<key> next to LINEAR_API_KEY.
  • API: POST /api/inbox/linear/key could take { key } to add or replace the entry for that key's workspace, and { workspace, key: null } to remove one, so scripts that set keys today keep working.
  • The issue-ref teams (/api/inbox/linear-refs) would then cover every workspace with a key.

The same lookup would help plan review and annotate, which got Linear cards in #3783.

Related

  • #3120: hover cards for Linear issue links.
  • #3146: Linear hover cards and the Linear key in Settings, Accounts.
  • #3783: Linear cards in plan review and annotate.

Setup

Plannotator 0.29.2, Linux (Ubuntu), Inbox reached over Tailscale.

Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
649
Merge trung bình
16 giờ 1 phút
Pull request đã merge (30 ngày)
756

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của backnotprop/plannotator

Tất cả issue của backnotprop/plannotator

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.