IssueSystem

內建式 Bug / Issue 回報服務。使用者在自己的網站上圈選畫面回報,Claude Code 直接讀檔修復。

服務正常 · widget 0.1.0 · schema v2

把它裝到你的網站上

先到後台的專案頁建立專案, 並在 allowedOrigins 欄位填入你的網站網址,然後貼這兩段:

allowedOrigins 具體要填什麼?
  1. 進入 專案 頁面。
  2. 在「新增專案」列填 key(例:taione)、名稱、authMode, 並在 allowedOrigins(逗號分隔) 欄位填入網址;按「建立」。
  3. 已經建立過的專案,直接在下方表格的 allowedOrigins 那一格修改, 按 Enter 或點到別處即自動存檔

填的是 origin,也就是「協定 + 網域 + port」, 不含路徑,也不要結尾斜線

  • https://taione.com, http://localhost:3100
  • https://taione.com/(多了結尾斜線)
  • https://taione.com/app(帶了路徑)
  • taione.com(缺協定)

幾個容易漏掉的情況:開發機與正式站是不同的 origin,兩個都要填; http://localhost:3100http://127.0.0.1:3100 也算不同的 origin; 換 port 就要再加一筆。漏填時 widget 會完全連不上服務, 瀏覽器 console 會出現 CORS 相關錯誤 —— 那就是這一格沒對上。

<script type="module"
  src="https://issues.example.com/w.js"
  data-project="your-project"></script>
<script type="module">
  window.IssueSystem.identify({ id: user.id, name: user.name, role: user.role })
</script>

以上兩步就能回報。identify() 在框架的 plugin 裡呼叫即可, 比 widget 載入晚沒關係 —— API 會等它。 選配:provideState() 送出應用狀態、 @taylor/issue-system-widget/vite 的 plugin 提供原始碼位置對應。

給 Claude Code 用

npx issue-system auth --server https://issues.example.com --project your-project --token <PAT>
npx issue-system pull
npx issue-system verify <issue-id> --summary "改了什麼" --url http://localhost:3000

PAT 在後台的 CLI Token 頁面建立。

健康檢查 · 待確認清單