@overlordai/server 1.0.177 → 1.0.178
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/connectors/connector.controller.d.ts.map +1 -1
- package/dist/connectors/connector.controller.js +2 -0
- package/dist/connectors/connector.controller.js.map +1 -1
- package/dist/database/repositories/connector.repository.d.ts +2 -0
- package/dist/database/repositories/connector.repository.d.ts.map +1 -1
- package/dist/database/repositories/connector.repository.js +8 -0
- package/dist/database/repositories/connector.repository.js.map +1 -1
- package/dist/dispatcher/scheduler.service.d.ts.map +1 -1
- package/dist/dispatcher/scheduler.service.js +6 -1
- package/dist/dispatcher/scheduler.service.js.map +1 -1
- package/dist/web/admin/admin-connector.controller.d.ts +6 -0
- package/dist/web/admin/admin-connector.controller.d.ts.map +1 -1
- package/dist/web/admin/admin-connector.controller.js +88 -12
- package/dist/web/admin/admin-connector.controller.js.map +1 -1
- package/dist/web/project.controller.d.ts +1 -3
- package/dist/web/project.controller.d.ts.map +1 -1
- package/dist/web/project.controller.js +3 -2
- package/dist/web/project.controller.js.map +1 -1
- package/package.json +4 -4
- package/public/assets/{AccessTokensPage-BhRmma33.js → AccessTokensPage-1EKC1hiZ.js} +1 -1
- package/public/assets/AdminPage-51tboyFu.js +1 -0
- package/public/assets/{AgentCliPage-DyJnRmFm.js → AgentCliPage-HVXHK2Or.js} +1 -1
- package/public/assets/{ApiReferencePage-Wcyoo5XT.js → ApiReferencePage-TgiwRipe.js} +1 -1
- package/public/assets/{ArchitecturePage-DgwFpJ3c.js → ArchitecturePage-BzeZql6h.js} +1 -1
- package/public/assets/{AuditLogPage-ByFVvlFb.js → AuditLogPage-y6n7Px8g.js} +1 -1
- package/public/assets/{AutomationCreatePage-Cx-FCZEr.js → AutomationCreatePage-CajNO4bS.js} +1 -1
- package/public/assets/{AutomationDetailPage-BDh7SFeh.js → AutomationDetailPage-Dgf3Tb9C.js} +3 -8
- package/public/assets/{AutomationEditPage-D76Ybtpz.js → AutomationEditPage-DYaZj31T.js} +1 -1
- package/public/assets/{AutomationListPage-bNDDFN0Y.js → AutomationListPage-DxPUmPbs.js} +3 -3
- package/public/assets/{AutomationRunDetailPage-BEWaGMai.js → AutomationRunDetailPage-DmNxMDk5.js} +1 -1
- package/public/assets/{BindPlatformPage-CgfAbUal.js → BindPlatformPage-MYeCpBFT.js} +1 -1
- package/public/assets/{BotIntegrationPage-D1A10L4d.js → BotIntegrationPage-Dnk8iYbr.js} +1 -1
- package/public/assets/BotManage-96DyyPVc.js +1 -0
- package/public/assets/{BotSetupPage-DIUSFgGv.js → BotSetupPage-esAmTt5X.js} +1 -1
- package/public/assets/ChangelogPage-BZmrhbzu.js +1 -0
- package/public/assets/{Checkbox-Drx9oKpj.js → Checkbox-CQt3GUhI.js} +1 -1
- package/public/assets/{CliReferencePage-BQ6Eyq2_.js → CliReferencePage-D-PUOTbI.js} +1 -1
- package/public/assets/{ConfirmStageDialog-BjjJNcLJ.js → ConfirmStageDialog-DIsZM7QS.js} +1 -1
- package/public/assets/ConnectorsManage-v8CzbHwB.js +6 -0
- package/public/assets/{ConnectorsPage-BgBXQlwq.js → ConnectorsPage-Czxmo0rf.js} +1 -1
- package/public/assets/{DeploymentPage-Cbmb8KKs.js → DeploymentPage-BmfGIQ--.js} +1 -1
- package/public/assets/{DevWorkflowPage-Dur0zn7L.js → DevWorkflowPage-BwP87xBb.js} +1 -1
- package/public/assets/{DeveloperManage-BmFhmcbZ.js → DeveloperManage-Bu-dU6qo.js} +2 -2
- package/public/assets/{DeveloperSetupPage-G9amle-q.js → DeveloperSetupPage-PXns-tkJ.js} +1 -1
- package/public/assets/{DocsIndexPage-CAPCKH_C.js → DocsIndexPage-DHYB2eq5.js} +6 -11
- package/public/assets/{DocsLayout-gVsQBlHm.js → DocsLayout-DLxSnG0D.js} +1 -1
- package/public/assets/{DocsPrimitives-VBA7lZhS.js → DocsPrimitives-D7h19aXG.js} +1 -1
- package/public/assets/{EditProjectPage-Dn-MgU4f.js → EditProjectPage-BC0UDNOv.js} +2 -2
- package/public/assets/{EmptyState-B0pdsOsA.js → EmptyState-CMDagsi4.js} +1 -1
- package/public/assets/{EnvVariablesPage-DXaJ3Ejc.js → EnvVariablesPage-BB7ahnB1.js} +1 -1
- package/public/assets/HomePage-CssNquOH.js +1 -0
- package/public/assets/{InfoRow-DTHohr5Y.js → InfoRow-BxIE0xaA.js} +1 -1
- package/public/assets/{InstallationPage-BVY5fIOG.js → InstallationPage-CcJ0J1Zn.js} +1 -1
- package/public/assets/{LandingPage-DAP65IzR.js → LandingPage-BiMt64NW.js} +1 -1
- package/public/assets/{LocalDevelopmentPage-C9pD5y0c.js → LocalDevelopmentPage-D4FSxH3d.js} +1 -1
- package/public/assets/{LoginPage-BToTW-qz.js → LoginPage-dLNo1JNx.js} +1 -1
- package/public/assets/{MetricBar-DA42IEeN.js → MetricBar-kakUenDO.js} +1 -1
- package/public/assets/{MultiSelect-5hKAHK2N.js → MultiSelect-CmPlPDVq.js} +1 -1
- package/public/assets/{NotFoundPage-BQbQRjCC.js → NotFoundPage-ohSBiBT-.js} +1 -1
- package/public/assets/{OnboardingGuide-or_CwmfY.js → OnboardingGuide-cHKCR0M5.js} +1 -1
- package/public/assets/{PermissionsPage-D867c8K5.js → PermissionsPage-7-IPdVXg.js} +1 -1
- package/public/assets/{PipelineConfigPage-DYL-Eg8a.js → PipelineConfigPage-BX6JMHM4.js} +1 -1
- package/public/assets/{PipelineEditorPage-D6EpDvPI.js → PipelineEditorPage-BeNxSKH5.js} +1 -1
- package/public/assets/{PlanPage-Bfgn9hdf.js → PlanPage-B7z3l_2F.js} +1 -1
- package/public/assets/{ProfilePage-DydZ_JO_.js → ProfilePage-DwsnCrys.js} +1 -1
- package/public/assets/{ProjectDetailPage-BLSkZmV0.js → ProjectDetailPage-CzLqL69C.js} +3 -3
- package/public/assets/{ProjectListPage-KWBq3v71.js → ProjectListPage-Do-9PkUN.js} +1 -1
- package/public/assets/{PtyTerminal-DZ-tRh7i.js → PtyTerminal-Z14rUlQy.js} +1 -1
- package/public/assets/{QuickAuth-D_2JnzxW.js → QuickAuth-CX1phe7h.js} +1 -1
- package/public/assets/RemoveMemberConfirmDialog-DI3-C2N9.js +6 -0
- package/public/assets/{ReviewAggregatePage-D-sgcTHd.js → ReviewAggregatePage-tiy7PRsr.js} +2 -2
- package/public/assets/ReviewPage-CmbUljfI.js +1 -0
- package/public/assets/Select-LGk_EawR.js +1 -0
- package/public/assets/{SettingsPage-DgNCPUzP.js → SettingsPage-BpS56Ttu.js} +1 -1
- package/public/assets/{Skeleton-C9OmZNVj.js → Skeleton-DaeQHyTP.js} +1 -1
- package/public/assets/{SkillPage-jXi2VAvG.js → SkillPage-BexkozUK.js} +1 -1
- package/public/assets/TaskDetailPage-CElleGRa.js +21 -0
- package/public/assets/{TaskGuidePage-C2VJEOGp.js → TaskGuidePage-C5Ed0gO0.js} +1 -1
- package/public/assets/TaskListPage-CdajIIwz.js +1 -0
- package/public/assets/{TaskStatusBadge-Ieecwysj.js → TaskStatusBadge-CuTVIvqD.js} +1 -1
- package/public/assets/{TerminalHomePage-wxZHwphZ.js → TerminalHomePage-Cs3JoG8j.js} +1 -1
- package/public/assets/{TokenManage-D_fRhfSC.js → TokenManage-BeDY8n-U.js} +1 -1
- package/public/assets/Tooltip-DjIk-pqB.js +1 -0
- package/public/assets/{TotpSetupPage-DPv5zEkr.js → TotpSetupPage-C_NjLBdt.js} +1 -1
- package/public/assets/{WorkerDetailPage-BNHh3G4i.js → WorkerDetailPage-CuuvI6Fx.js} +1 -1
- package/public/assets/{WorkerListPage-CnUaksv5.js → WorkerListPage-70g7vy3m.js} +1 -1
- package/public/assets/{WorkerOperationsPage-BF-j3TGV.js → WorkerOperationsPage-BL4BZ45w.js} +1 -1
- package/public/assets/{WorkerSetupGuidePage-CgoXTtvB.js → WorkerSetupGuidePage-jnyL_uM0.js} +1 -1
- package/public/assets/{WorkerSetupPage-C9FJdEtx.js → WorkerSetupPage-ChyjqvnS.js} +1 -1
- package/public/assets/{agent-type-options-DPcGCrTV.js → agent-type-options-BpMI3Naw.js} +1 -1
- package/public/assets/{arrow-left-CMC8xPNU.js → arrow-left-BL1QzlAp.js} +1 -1
- package/public/assets/{arrow-right-CzgMaKkq.js → arrow-right-BrrN-7YA.js} +1 -1
- package/public/assets/{bot-DZNbJaal.js → bot-D-zp4qz4.js} +1 -1
- package/public/assets/{chevron-down-Byw_H7qa.js → chevron-down-BOgq_PNA.js} +1 -1
- package/public/assets/{chevron-left-B9OwsObK.js → chevron-left-BPO7Bb6l.js} +1 -1
- package/public/assets/{chevron-right-BDxmkY05.js → chevron-right-DHCIokyJ.js} +1 -1
- package/public/assets/{chevron-up-qpQChOEd.js → chevron-up-wO9VgMYB.js} +1 -1
- package/public/assets/{circle-alert-qjGQBuvk.js → circle-alert-DkW4_zyQ.js} +1 -1
- package/public/assets/{clock-RH0F7m7Y.js → clock-BbJkwoCd.js} +1 -1
- package/public/assets/{copy-sq8YNzps.js → copy-BBOWX6ou.js} +1 -1
- package/public/assets/developer-options-PMfL5Zv7.js +1 -0
- package/public/assets/{download-BILbhyFl.js → download-CbWraeN_.js} +1 -1
- package/public/assets/{external-link-6-aTSDMz.js → external-link-CEkNn2LX.js} +1 -1
- package/public/assets/{git-fork-Tz0-ma48.js → git-fork-B775P9bq.js} +1 -1
- package/public/assets/{index-CqgRY3L6.js → index-Dh1GMLID.js} +15 -15
- package/public/assets/index-DwFw8jxe.css +1 -0
- package/public/assets/{key-D8a2ymYq.js → key-Dl9aLBg3.js} +1 -1
- package/public/assets/link-2-BBq5JW-o.js +6 -0
- package/public/assets/{loader-circle-CRxnDWNg.js → loader-circle-wSNLBiy-.js} +1 -1
- package/public/assets/{pencil-BB-LZCT2.js → pencil-ZFPPMxtk.js} +1 -1
- package/public/assets/{play-DP6MNxNf.js → play-DX-9yzZV.js} +1 -1
- package/public/assets/plug-BxGp3gAo.js +6 -0
- package/public/assets/{plus-DSLmbw91.js → plus-Cn46sPb9.js} +1 -1
- package/public/assets/power-PnMndXJz.js +6 -0
- package/public/assets/{rotate-ccw-DkPBqmSU.js → rotate-ccw-zdevuzi_.js} +1 -1
- package/public/assets/{scroll-text-Cn9LA-xo.js → scroll-text-BGkAQAvr.js} +1 -1
- package/public/assets/{settings-DQCRnFRi.js → settings-CfrsrJUV.js} +1 -1
- package/public/assets/{skip-forward-ZkknEL37.js → skip-forward-ckOfJ8QF.js} +1 -1
- package/public/assets/status-colors-DC-m2CdG.js +1 -0
- package/public/assets/{task-agent-knUib-IL.js → task-agent-ZWBurVoa.js} +1 -1
- package/public/assets/{task-constants-DiU1z_dP.js → task-constants-DfpO4NY9.js} +1 -1
- package/public/assets/{task.store-BfdxbFUg.js → task.store-B461yHYH.js} +1 -1
- package/public/assets/{timer-BJw0BmGT.js → timer-BFPhC5N0.js} +1 -1
- package/public/assets/{trash-2-DLdIg5hq.js → trash-2-CaIOqYj_.js} +1 -1
- package/public/assets/{useFetch-cT1ib8kh.js → useFetch-CJMNf1mK.js} +1 -1
- package/public/assets/{users-D2JV7gxB.js → users-BCrPK5sS.js} +1 -1
- package/public/assets/{wifi-Jy12B8KN.js → wifi-Cm-x6iNY.js} +1 -1
- package/public/assets/{workflow-BmBIBEn9.js → workflow-Burj_14o.js} +1 -1
- package/public/assets/{zap-oNjSxQ6J.js → zap-BAYG3kyF.js} +1 -1
- package/public/index.html +2 -2
- package/public/sw.js +1 -1
- package/public/assets/AdminPage-ByfD-Bj7.js +0 -1
- package/public/assets/BotManage-IJm4jT-7.js +0 -6
- package/public/assets/ChangelogPage-D3R17QQT.js +0 -1
- package/public/assets/HomePage-B4ION8nK.js +0 -1
- package/public/assets/RemoveMemberConfirmDialog-B1T8FRls.js +0 -6
- package/public/assets/ReviewPage-DLXr5nmf.js +0 -1
- package/public/assets/Select-PNbJCK1d.js +0 -1
- package/public/assets/TaskDetailPage-Dy0CSg-i.js +0 -21
- package/public/assets/TaskListPage-63cj9-Gf.js +0 -1
- package/public/assets/Tooltip-hO7lE45q.js +0 -1
- package/public/assets/index-B40ZH6vh.css +0 -1
- package/public/assets/status-colors-CpKIU449.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./index-CqgRY3L6.js";const s=[{version:"1.0.169",date:"2026-03-29",sections:[{title:"fixes",items:["Auto-clean stale npm dirs on ENOTEMPTY during upgrade"]}]},{version:"1.0.168",date:"2026-03-28",sections:[{title:"improvements",items:["Consolidated automation findings parsing (single source in protocol)","JSON repair for malformed agent output"]},{title:"fixes",items:["Auto-rebuild node-pty during overlord upgrade","Lark card callback identity resolution"]}]},{version:"1.0.167",date:"2026-03-28",sections:[{title:"fixes",items:["Automation tasks show correct pipeline stage (analyze) instead of develop stages"]}]},{version:"1.0.166",date:"2026-03-28",sections:[{title:"fixes",items:["Filter Claude thinking status lines from automation output","Improved RESULT marker prompt for better automation findings extraction"]}]},{version:"1.0.165",date:"2026-03-28",sections:[{title:"features",items:["Interactive confirm/reject buttons on stage confirmation cards (Lark/Slack)","Review button on completed develop task cards","Single-reviewer auto-fix (no manual confirmation needed)","Review task completion cards show findings summary","Review agent auto-inferred from source task"]},{title:"fixes",items:["Unified permissions across web and platform (owner + executor + admin)","Skip stage button only visible when task is SUSPENDED","Checkbox check icon visibility fixed","Automation terminal noise filtered from findings","Dismissed reviews skip auto-fix"]}]},{version:"1.0.164",date:"2026-03-26",sections:[{title:"features",items:["Bot notifications show task mode (develop/plan/review/automation)","ChatBinding notify_default setting for notification routing","Structured automation findings with summary/highlights/watchlist","Automations inbox shows project, task status, worker"]},{title:"fixes",items:["Bot silent on mention-only group chat messages","Plan spec push cleans up remote temp branch and logs result","CI digest uses valid critical severity instead of error","Automation highlights prioritized by severity before truncation","Token refresh retry before session expired popup"]}]},{version:"1.0.163",date:"2026-03-26",sections:[{title:"features",items:["Automations inbox shows project, task status, and worker name","Per-project notify-default chat for automation summaries in bot bindings"]},{title:"fixes",items:["Long natural-language task descriptions no longer truncated by NLU","SQL ambiguous column error on automation run status filter","Token refresh retries once before showing session expired","Standup and automation findings now parse structured output instead of showing raw JSON blobs"]}]},{version:"1.0.162",date:"2026-03-25",sections:[{title:"fixes",items:["ChatBindingModal height constrained with scrollable body"]}]},{version:"1.0.161",date:"2026-03-25",sections:[{title:"improvements",items:["Deduplicated notification helpers and group chat DM logic","Unified findings count across all automation pages","Automation tasks excluded from dashboard statistics"]}]},{version:"1.0.160",date:"2026-03-25",sections:[{title:"features",items:["Group chat tasks now send personal DM to creator","Reply hint on stage confirmation cards (chat platforms)","Automation notifications as structured cards with color coding","PlanPage confirm dialog for suspended plan tasks","Pipeline MR defaults to draft mode with auto-delete source branch"]},{title:"fixes",items:["Slack fallback text uses full notification content","Slack slash command group chat detection fixed","PlanPage confirm button gated on actual pending confirmation","Card field truncation for oversized findings/errors","Auto-expand nested JSON findings in notifications and web UI","Reply hint kept in card only, not in web/CLI text"]}]},{version:"1.0.159",date:"2026-03-25",sections:[{title:"fixes",items:["Card message quoting now works correctly (retry/cancel/show via quoted card)"]}]},{version:"1.0.158",date:"2026-03-25",sections:[{title:"features",items:["Infer taskId from quoted card messages for retry/cancel/show/confirm commands","Mode filter on tasks page","Multi-word unquoted descriptions now work with develop command"]},{title:"fixes",items:["NLU LLM timeout increased from 10s to 60s","Full-width colon support in taskType prefix (feat:xxx)","Avoid duplicate failed notifications in direct chats"]}]},{version:"1.0.157",date:"2026-03-25",sections:[{title:"features",items:["Mobile review page: two-line pending task layout with worker name display","Mobile nav: removed Plan tab, added +plan button to review page"]},{title:"fixes",items:["Quoted-only replies now prompt for task description instead of silent ignore","Truncate long worker names in review pending task row"]},{title:"improvements",items:["Removed dead nluResolvedFromQuote field from NLU fallback interface","Help text clarifies that quoted replies still need a command or description"]}]},{version:"1.0.156",date:"2026-03-24",sections:[{title:"improvements",items:["Review report parsing: support RESULT marker, cleanOutput fallback, fenced JSON, bare JSON extraction; malformed reports surface as warning issue","Review pipeline prompt uses RESULT progress marker instead of deprecated review_report frame","Confirm timeout end-to-end: stage config timeout flows through onConfirmRequest and Redis TTL"]}]},{version:"1.0.155",date:"2026-03-24",sections:[{title:"features",items:["Automation findings extraction: readonly and writable automations extract findings from agent output; readonly falls back to raw output when no RESULT marker","Automation text-only notifications: completion and failure notifications send plain text with findings; automation tasks no longer emit task lifecycle notifications"]},{title:"improvements",items:["Writable automations merge MR link finding with worker-reported findings","Notification text truncated to 3000 chars; readonly raw-output fallback detail capped at 4000 chars","All notification delivery paths handle card:null by sending text","Removed dead hasFindings/findingsCount fields from event payload"]},{title:"fixes",items:["Fix Lark quote fetch blocking message on permission error — now gracefully degrades without quoted content","Fix writable automation findings pollution: raw terminal output no longer overwrites structured findings","Remove description tooltip overlay on automation detail page"]}]},{version:"1.0.154",date:"2026-03-24",sections:[{title:"features",items:["Multi-project automations: Automations can now target multiple projects via projectKeys[] with new MultiSelect component",'Worker tasks pagination: Renamed "current tasks" to "tasks" with pagination on worker detail page']},{title:"improvements",items:["Docs nav: add changelog tab to horizontal tab bar","Automation detail: shorten notify labels, nowrap trigger button","Daily bug scan template: simplify phase scoped to files with actual fixes only"]},{title:"fixes",items:["Replace /simplify skill reference in bug scan template with inline instructions",'Fix "in 0m" edge case in formatFutureTime (now shows "in <1m")',"Unify AutomationEditPage dropdowns with custom Select component","Automation detail page UI polish: description truncation, button styles, timezone display","Fix automation toggle switch style, next run time display"]}]},{version:"1.0.153",date:"2026-03-24",sections:[{title:"fixes",items:["Fix workspace:* references in package.json preventing npm install"]}]},{version:"1.0.152",date:"2026-03-24",sections:[{title:"fixes",items:["Fix workspace:* references in package.json preventing npm install"]}]},{version:"1.0.151",date:"2026-03-24",sections:[{title:"features",items:["Automation template overhaul: 30 builtin templates across 6 categories, template browser UI with one-click create dialog, agent defaults follow project config","Remove mobile companion mode: Unified PtyTerminal everywhere, removed ~1400 lines of companion code","Bot notifications restricted to creator + source chat: Removed project chat fan-out to reduce noise","Enriched task_created notification: Full-detail card with description, project name, queue info via notification pipeline","Web changelog page: Complete version history with navigation"]},{title:"improvements",items:["Cursor/Codex prompt detection tightened to prevent false idle completion","PtyTerminal: token fetch retry with exponential backoff, keystroke buffering during takeover","Automation template dialog: agent type follows project default, long content scrolling","Migration 015: safely preserves custom template→automation links during category taxonomy change"]},{title:"fixes",items:["Fix suspended notification docs method column","Fix task_failed test missing assertion","Preserve source-chat ack for delegated task creation","Keep Slack slash command response_url path"]}]},{version:"1.0.150",date:"2026-03-24",sections:[{title:"fixes",items:["Fix Claude prompt detection: remove bypass permissions from negative filter, detect › (U+203A) prompt character, use multiline matching for status bar below prompt","Auto-dismiss Claude theme selection prompt on first launch in new worktree HOME"]}]},{version:"1.0.149",date:"2026-03-24",sections:[{title:"fixes",items:["Detect Claude prompt character › (U+203A) used in Claude Code 2.1.x, multiline regex for > prompt with status bar below"]}]},{version:"1.0.148",date:"2026-03-24",sections:[{title:"fixes",items:["Auto-dismiss Claude theme selection prompt on first launch"]}]},{version:"1.0.147",date:"2026-03-24",sections:[{title:"fixes",items:["Detect Claude > prompt with multiline flag when status bar follows, match bypass permissions as prompt-ready signal"]}]},{version:"1.0.146",date:"2026-03-23",sections:[{title:"fixes",items:["Initialize database in constructor instead of onModuleInit to prevent startup crashes when NestJS module init ordering changes"]}]},{version:"1.0.145",date:"2026-03-23",sections:[{title:"features",items:["Automations system: Cron and task_event triggers, execution lock with UUID ownership, Inbox with badge, template library, findings reporting, seed data","Bot/CLI `--target-branch`: Specify MR target branch for develop and plan commands","Bot notification Agent field: Task notification cards now show which agent type was used","Plan mode spec push: Automatically push spec document to defaultBranch after document stage, with docs/specs/ path safety check"]},{title:"improvements",items:['Auth error detection: Split patterns into startup-only ("Authentication failed") and runtime-safe ("Invalid API key", etc.) — prevents false kills from git/tool auth errors during pipeline execution',"Modal close behavior: Prevent accidental close via ESC/backdrop on form modals; confirm dialogs keep ESC as cancel; SessionExpiredDialog allows refresh; auto-focus for keyboard accessibility","Terminal Enter key: Fix takeover Enter not working (termReady state); IME composition compatibility","Automation correctness: Atomic cron updates (schedule before DB), Redis lock with Lua CAS, timezone-aware template variables, dedup bypass, base64 cursor parsing, IANA timezone validation, cron schedule restoration on failure","Automation real-time: Inbox live refresh via WebSocket, abort/dedup on fetchRuns, reconnect reload, SKIPPED run events, badge count for all unread runs, inbox status broadcast on read/archive","Plan confirm flow: SPEC_PUSH_FAILED prompt surfaces in Web UI dialog, inline banner, and bot notifications; rebase --abort cleanup on failure","Test coverage: 163 automation tests (scheduler, validation, templates, controller, executor, trigger) + 17 source file coverage improvements","Documentation: Bot commands (reject, plan, review, NLU, latest-task), environment variables (NLU), stage confirmation via text commands"]},{title:"fixes",items:["Fix false `binary_missing` detection — only during agent startup, not pipeline execution","Fix cron-to-cron update leaving old repeatable active — removeJob before registerJob","Fix removeJob errors silently swallowed — now propagate, DB unchanged on failure","Fix plan confirm gate timing — always route through push-aware path regardless of push completion order","Fix automation run detail page not refreshing (subscribe to eventSeq for non-terminal runs)","Fix automation detail page stale after reconnect (subscribe to eventWs.onStatus)","Fix ListAutomationRunsQuery.cursor type from number to string (matches wire format)"]}]},{version:"1.0.144",date:"2026-03-23",sections:[{title:"fixes",items:["Fix `workspace:*` reference in server package.json that broke npm install","Remove invalid `stage_change` SSE event check from TaskDetailPage"]}]},{version:"1.0.143",date:"2026-03-23",note:"broken — use 1.0.144",sections:[{title:"features",items:['"Last task" shortcut — reference latest task via `last`/`latest`/`上一个` in bot commands, stored in Redis with 7-day TTL',"Review page project and developer filters across all tabs (pending/in-progress/history)","Cursor-based pagination for Review page with server-side source task grouping","Notify task creator when review round completes (when creator differs from executor)","Review list hover tooltips showing source task description","Bot command flags are now case-insensitive (`--Project`, `--AGENT`, etc.)","Bot confirm/reject commands for stage confirmations via reply","NLU intent detection on quoted message replies","Project key normalization — forced lowercase across all read/write paths"]},{title:"fixes",items:["Pipeline stage display: plan shows analyze→discuss→document→confirm, review shows review→report→fix","Added missing `rebase` stage to pipeline docs page","Stage monitor auto-pauses `requireConfirm` stages when agent skips `WAIT_CONFIRM` marker","Fixed re-confirm loop: approved stages no longer re-enter `waiting_confirm` on subsequent `DONE`",'Review notification "no issues found" — re-read round data before aggregating issue counts',"Review tab developer filter now matches source task assignee, not review launcher","Terminal page input no longer loses focus on task list refresh","Pagination StrictMode compatibility — pure state updaters using refs","Review command cache write is now best-effort (Redis errors don't fail successful commands)","Latest-task description preservation — position-based token skip prevents stripping words from descriptions"]},{title:"improvements",items:["Extracted shared NLU fallback logic into `nlu-fallback.utils.ts` (Lark/Slack dedup)","Unified dispatcher develop/plan into `handleCreateTaskCommand` + `handleTaskError`","Extracted `ENRICHED_SELECT` constant for task repository SQL queries","Extracted `useCursorPagination` hook for Review page","Mobile review button shows icon only, text on desktop","Updated test coverage spec with fresh baseline data"]}]},{version:"1.0.142",date:"2026-03-22",sections:[{title:"fixes",items:["Fix false `binary_missing` detection during pipeline execution — `command not found` from agent-run commands (e.g. missing tools like `make`, `yarn`) no longer kills the task. Detection now only applies during agent startup before the prompt is detected."]}]},{version:"1.0.141",date:"2026-03-22",sections:[{title:"features",items:["Plan Mode: Interactive planning sessions that produce spec documents, with decompose-or-save decision point","Review Mode: Cross-model parallel code review with structured reports, round tracking, and optional fix stage","Review-only mode: Skip fix stage with `skipFix` option for report-only reviews","Default reviewers: Project-level `defaultReviewers` config, `--agent` flag optional in CLI/bot","sourceCommitSha pinning: Reviews pin to the exact commit the develop task completed at","Aggregated fix feedback: Fix agent receives all review reports from the round, not just its own","Bot notifications: Review round completion notifications pushed to source chat platform","CLI commands: `ov task plan` and `ov task review` with full flag support","NLU support: Natural language parsing for plan and review bot commands","Web UI: Plan page, Review page, Review aggregate page with progress/report views, embedded PTY terminals","Navigation: Plan and Review in sidebar under `// loop` section, mobile nav updated","Task detail: TaskMode badge, full relation chain visualization (plan→develop→review), Launch Review button"]},{title:"improvements",items:["Durable review history: `review_report` and `review_round` persisted to DB with Redis→DB fallback","Round-scoped approveFix/skipFix: concurrent review rounds no longer interfere","Platform-aware branch validation: GitLab/GitHub/Gitea API support for source branch existence check",'`plan_decompose` confirm type with proper pipeline termination on "save only"',"`code_review` rejection terminates worker immediately (emits `pipeline_completed`)","SUSPENDED→RUNNING transition on stage confirm approval","Composite database indexes: `(project_key, task_mode, status)` and `(task_mode, status)`","Schema constraints: UNIQUE on `projects.repo_url`, partial UNIQUE on `projects.is_default`","Migration 012 fails fast on dirty data with actionable diagnostic queries","Maintainer project updates restricted from admin-only fields (repoUrl, isDefault)","PTY stage responses switched from Chinese to English","Review report JSON.parse wrapped in try/catch to prevent 500 on malformed data","React hooks ordering fix in ReviewAggregatePage (useMemo before early returns)","Round `expectedCount` prevents early completion when workers report before all tasks are created"]},{title:"fixes",items:["NLU: preserve project key casing, restore Slack help for unlinked users","Review: block review of non-develop tasks, validate agent types, reject temporary branches","Review: fix commitSha captured on all completion paths, updated on source task after fix","Dispatcher: PLAN/REVIEW command handlers with proper bot response rendering","Worker: `ReviewReportFrame.taskId` changed from string to number for protocol consistency"]}]},{version:"1.0.140",date:"2026-03-21",sections:[{title:"features",items:['Mobile dashboard UI: rename "Worker Status" to "Workers", add back buttons to Workers/Projects/ProjectDetail pages',"ProjectDetailPage: responsive card layout for members and tasks tables on mobile","Support `--worker` and `--machine` as aliases for `--on` in bot develop command"]},{title:"fixes",items:["Consolidate takeover controls, remove duplicate denial message","Prevent mobile keyboard from collapsing companion terminal layout"]}]},{version:"1.0.139",date:"2026-03-21",sections:[{title:"features",items:["Add Claude auth preflight check to fail fast on expired credentials instead of 180s timeout"]},{title:"fixes",items:["Consolidate takeover controls: remove duplicate hand button from terminal header, keep only TakeoverStatusBar","TakeoverStatusBar: icon-only buttons (Hand for take over, RotateCcw for restore) — no text",'Remove duplicate "takeover denied" message in companion terminal',"Prevent mobile keyboard from collapsing companion terminal layout","Sync fork `--replace/-r` and `--agent` flags across help text and bot-usage docs"]}]},{version:"1.0.138",date:"2026-03-21",sections:[{title:"fixes",items:["Deduplicate mobile terminal status info: hide stage/agent/worker from toolbar on mobile, show in dedicated row below","Merge mobile status row and stage progress into one compact section","Sync fork `--replace/-r` short form and `--agent` flag across help text and bot-usage docs"]}]},{version:"1.0.137",date:"2026-03-21",sections:[{title:"features",items:["Multi-project chat bindings: a single chat room can now associate with multiple Overlord projects with default selection","Fork command enhancements: `--replace` flag for description replacement, `--agent` flag for agent type override","Mobile companion terminal with lightweight text streaming, takeover controls, and full-terminal fallback","Companion terminal stream reducer for ANSI-stripped text rendering","Auto-skip Codex update prompts during agent startup"]},{title:"improvements",items:["Upgrade xterm to v6","Switch internal package references to workspace:* for better monorepo DX","Deduplicate ForkDescriptionMode type across server files into protocol package","Remove redundant type aliases (TaskWithTargetBranch, ForkCommandArgs, etc.)","Rename detectTrustPrompt to detectStartupPrompt with tighter update prompt regex","Use matchMedia API for mobile viewport detection (only fires on breakpoint crossing)","Add agentType runtime validation to fork endpoint and chat bot handler","Stabilize sidebar collapse user card layout"]},{title:"fixes",items:["Fix migration 009 is_default uniqueness: only mark first binding per (bot, chat) as default to prevent UNIQUE constraint failure on upgrade","Fix cross-platform chat routing by adding platform filter to findBindingByChatId","Fix CompanionTerminal infinite retry: exponential backoff with max 5 attempts","Scope worker binary_missing detection to recent stage output to prevent stale error misclassification","Eliminate TOCTOU race in createBinding by relying on DB constraints","Cancel stale xterm open frames and skip mobile PTY sessions for finished tasks","Surface ChatBindingModal removeBinding errors instead of silent catch","Harden mobile terminal takeover flows and session race conditions"]}]},{version:"1.0.136",date:"2026-03-20",sections:[{title:"features",items:["Support task-level target branches for version branch workflows","Add auto/default agent selection in the terminal task form","Show pipeline stage labels in task status displays"]},{title:"improvements",items:["Improve worker diagnostics and retry branch detection","Extract branch slug helpers into the protocol package for shared reuse"]},{title:"fixes",items:["Preserve Rust toolchain state in worktree environments so agent-executed `cargo` commands keep working","Separate source and target branch handling in the scheduler and task submit flow","Fall back to a fresh branch when an expected remote branch no longer exists","Send a newline when confirming Claude bypass-permissions prompts","Redirect legacy token settings routes and prompts to `/access-tokens`","Remove the extra `//` prefix from mobile status text"]}]},{version:"1.0.135",date:"2026-03-20",sections:[{title:"features",items:["Refresh worker capabilities at runtime and push immediate heartbeat updates when agent availability changes"]},{title:"improvements",items:["Smooth the desktop sidebar collapse animation and reorder bot help agent output"]},{title:"fixes",items:["Detect stripped Claude bypass prompts so permission confirmation is still auto-accepted","Keep runtime capability changes visible without restarting workers after installing new agents"]}]},{version:"1.0.134",date:"2026-03-20",sections:[{title:"features",items:["Add worker capability degradation tracking with UI badges, worker detail visibility, and manual restore controls","Add a task detail overview tab and mobile dashboard project section"]},{title:"improvements",items:["Reorder and relabel agent type options, shorten UI labels, and remove unused translation keys","Refactor MR URL parsing helpers, worker detail components, and task detail subcomponents for cleaner shared behavior"]},{title:"fixes",items:["Preserve generic stage `RESULT` payloads while sanitizing MR URLs, including TUI line-wrap and rendering artifact cases","Persist capability degradation state across server restarts and prevent stale task completions from clearing newer degradations","Recompute capability auto-recovery timing after repeated degraded failures and persist fallback agent selection into task config snapshots","Accurately label task descriptions, remove the worker port from detail pages, and continue symlink setup after recoverable filesystem errors"]}]},{version:"1.0.133",date:"2026-03-19",sections:[{title:"fixes",items:["Prevent Claude trust dialogs from being mistaken for ready prompts, and harden Cursor/Codex ready detection against trust or login transcripts"]},{title:"improvements",items:["Add regression tests using real stripped PTY transcripts for Claude, Cursor, and Codex trust/login flows"]}]},{version:"1.0.132",date:"2026-03-19",sections:[{title:"features",items:["Show agent type and running worker name in task details","Reorganize the desktop sidebar into tasks and management sections"]},{title:"improvements",items:["Reduce platform notifications to key lifecycle events","Lock the PWA to portrait orientation and remove the redundant mobile dashboard title"]},{title:"fixes",items:["Restore `--on` as a worker alias and resolve worker names to IDs","Let Codex shells inherit env vars for GitLab auth and align Codex flags with the current CLI","Auto-accept Claude bypass-permissions prompts and restore trust-prompt guarding","Raise the worker disk auto-drain threshold from 90% to 95%","Reply with explicit error messages when Lark and Slack bot commands fail"]}]},{version:"1.0.131",date:"2026-03-19",sections:[{title:"features",items:["Add a `rebase` stage before `submit` in the default pipeline"]},{title:"fixes",items:["Restore execute permissions on macOS `node-pty` spawn-helper binaries to avoid `posix_spawnp failed`","Isolate Claude and Codex config handling inside worktree homes while preserving real user auth state","Detect Cursor CLI login bootstrap flows as `auth_failure`","Use a model-agnostic ready-state pattern for Codex prompt detection","Remove the extra slash from the mobile dashboard title"]}]},{version:"1.0.130",date:"2026-03-19",sections:[{title:"fixes",items:["Use bracketed paste only for Cursor/Codex prompt injection while keeping Claude on plain PTY writes"]},{title:"improvements",items:["Add agent-specific PTY prompt writer test coverage for Claude, Cursor, and Codex"]}]},{version:"1.0.129",date:"2026-03-19",sections:[{title:"fixes",items:["Soften worker project affinity so new workers can receive a first task without losing reuse preference for familiar projects","Make `overlord doctor` aware of worker-only installs and validate worker connectivity via local health checks","Defer adapter registration to `onModuleInit` to avoid startup ordering races","Preserve terminal content while typing on the terminal home page","Skip unpushed source branches when dispatching forked tasks","Handle blank task display names safely","Wrap Claude PTY stdin writes in bracketed paste mode","Fix throttled source-branch fetch authentication","Fix branch ancestry and diagnostics regressions found in review"]}]},{version:"1.0.128",date:"2026-03-19",sections:[{title:"fixes",items:["URL-encode branch name segments in `buildBranchUrl` (fixes broken links for branches with `#`)","Reorder bot help commands to match documentation layout"]}]},{version:"1.0.127",date:"2026-03-19",sections:[{title:"fixes",items:["Enrich failed task notifications with project info (name, repo URL)","Notify DM and project chats on task failure (previously only completed tasks triggered these)","Preserve launchd PATH for worker CLI detection on macOS"]}]},{version:"1.0.126",date:"2026-03-19",sections:[{title:"fixes",items:["Revert Cursor/Codex `detectPrompt` to tail-search — last-line-only broke TUI detection because status bar text appears after the prompt character"]}]},{version:"1.0.125",date:"2026-03-18",sections:[{title:"features",items:["Server-side cursor pagination for task list (replace client-side fake pagination)","Display task execution time cost on completion","Show agent type in task cards","Show original task descriptions on hover","Show total task count in success rate chart tooltips","Deliver DM notifications for web-created tasks","Support retry and fork for cancelled tasks"]},{title:"fixes",items:["PTY relay WebSocket ping keepalive (prevent CDN idle disconnect)","PTY relay reconnect: fix listener leak (N+1x data) and missing stdin/resize handlers","Unify trust-prompt detection into single `detectTrustPrompt()` with agent-aware keystrokes","Tighten Codex `detectPrompt` to last-line only (prevent false positives)","Use active Node bin in PATH instead of scanning all nvm/fnm versions","Random worker selection when all candidates are lightly loaded","Accurate disk usage via `df` on Linux","sourceAppId passthrough for Lark/Slack message updates","Workspace root cleanup path validation"]},{title:"security",items:["Project access control for task mutations and project API","PTY and worker-channel gateway worker assignment validation","Workspace path traversal prevention in workspace-manager","Task store race condition fix with request-ID tracking","Stale WebSocket connection guard in worker-connection manager"]}]},{version:"1.0.124",date:"2026-03-18",sections:[{title:"fixes",items:["Update bot help text to show `--type`, `--agent`, `--branch` flags","Add 15 unit tests for `parseDevelop` and `buildHelpText`","Update bot-integration docs with new flags"]}]},{version:"1.0.123",date:"2026-03-18",sections:[{title:"fixes",items:["Fix Cursor Agent prompt detection — match `→` arrow prompt, not just `?`","Fix Codex prompt detection — search tail 500 chars for `>` instead of requiring end-of-string"]}]},{version:"1.0.122",date:"2026-03-18",sections:[{title:"features",items:["`overlord backup` / `overlord backup worker` — backup server/worker config and database","`overlord upgrade` now prompts to backup before upgrading (default: yes)","Auto-accept workspace trust prompts for Claude, Cursor, and Codex agents","Fork tasks base new branch on parent's branch (preserves parent commits)"]},{title:"fixes",items:["Fork tasks generate own branch name (`fix/#150-slug`) instead of inheriting parent's, avoiding git worktree conflicts",'Web UI loading text changed to "thinking..."',"CLI reference and deploy guide updated with backup commands"]}]},{version:"1.0.121",date:"2026-03-18",sections:[{title:"fixes",items:["Fix Cursor Agent `--trust` flag error — only valid in headless mode, removed from interactive PTY args"]}]},{version:"1.0.120",date:"2026-03-18",sections:[{title:"fixes",items:["Fix Cursor Agent auth failure — symlink `~/.config/cursor` and `~/.cursor` into worktree so agent finds login credentials when HOME is overridden","Log last 500 chars of PTY output when agent exits before prompt is detected, for easier startup failure diagnosis"]}]},{version:"1.0.119",date:"2026-03-18",sections:[{title:"fixes",items:["Fix `setup worker` deleting JWT unnecessarily — only remove when server URL or token actually changes, preventing re-registration failure when modifying non-auth settings like slots","Fix LLM base URL placeholder in install wizard — remove `/v1` suffix for Anthropic"]}]},{version:"1.0.118",date:"2026-03-18",sections:[{title:"features",items:["Fork command in developer CLI","`--agent`, `--branch`, `--type` flags for bot and CLI task creation","Agent CLI integration guide and web docs page"]},{title:"fixes",items:["Delta-based CPU sampling instead of boot-average for accurate hardware metrics","Align Cursor/Codex executor flags with CLI and Claude executor"]}]},{version:"1.0.117",date:"2026-03-18",sections:[{title:"features",items:["Fork task — create new task from completed/failed task, preserving branch and config (bot, web, API)","Queue position display — QUEUED tasks show position in bot cards, notifications, and web detail page","Dashboard improvements — merged active/queued stats, completed-by-you-today counter","Task page filters — project and developer dropdown filters","Chart tooltips — hover tooltips on Task Success Rate chart bars","Create task from existing — support specifying branch from another task"]},{title:"improvements",items:["Lazy-cached ky import in TaskNameService — avoids dynamic import on every LLM call","Extracted TaskNotificationExtra interface and getQueueInfoForTask helper","Optimized queue position queries","Unified developer field labels, added git name/email to edit modal"]},{title:"fixes",items:["Fix TS type narrowing for dashboard stat cards","Fix TS import type for ESM ky module in CJS context","Fix protocol CommandType member count test (15 with FORK)","Remove dead agentType field, catch ForbiddenException in fork","Fix banner color, mobile dashboard width alignment","Reset page on filter change, skip redundant fetch"]}]},{version:"1.0.116",date:"2026-03-17",sections:[{title:"features",items:['Native Anthropic Claude API support in TaskNameService — auto-detects based on LLM_BASE_URL containing "anthropic"',"Bot permission docs clarified for DM delivery"]}]},{version:"1.0.115",date:"2026-03-17",sections:[{title:"features",items:["Dynamic card header colors — Lark card headers now match task status (green=completed, red=failed, orange=suspended/interactive, grey=queued/cancelled)","AI-generated task names and branch slugs — TaskNameService generates concise display names","Notification routing with creator/executor split — executor gets DM, creator gets important events","Interactive stage cards — CHOOSE/INPUT stage modes with bot card actions","Stage confirm timeout — auto-fail tasks after Redis TTL expires","Lark/Slack sendDM — direct message delivery for private notifications","Simplify stage in default pipeline","Minimum task description length (20 chars) enforcement"]},{title:"improvements",items:["Extract shared status-display.ts — single source of truth for status colors/emojis with CardColor type safety","Consolidate progress/logs/workspace into unified show command","Refetch all data on WebSocket reconnect to prevent stale UI","Standardized WebSocket communication in submitChoice/submitInput methods","Enhanced input validation in TaskController endpoints"]},{title:"fixes",items:["Code hardening and docs consistency (3 rounds of deep review)","Fix failed event project chats column in web docs","Fix Lark updateMessage failure — rethrow so consumer falls back to new message","Handle NotFoundException/BadRequestException in retry and cancel commands","Send error feedback on Lark card action failure","Remove unused server_url setting"]}]},{version:"1.0.114",date:"2026-03-17",sections:[{title:"features",items:["Quote/reply message + @mention developer — Lark/Slack adapters support quoting messages as task descriptions and @mentioning developers for task assignment","Task completion bot notifications — send bot message to project-bound chats when tasks complete","Timezone-aware dashboard — statistics adjust to browser timezone","reuseWorkspace retry — retry tasks with option to skip worktree recreation","Custom Tooltip component — 100ms fast tooltips replace native title attributes","Helpful project hint — show available projects when develop command is missing project"]},{title:"improvements",items:["Extract shared parser utilities to `command-parser.utils.ts`","Extract shared help text to `help-text.ts`","Unify mention resolution pattern across Lark and Slack adapters","Remove custom agent type entirely (code, enums, docs, executor)","Cache timezone-aware stats with 60s TTL to reduce DB load","Reduce DB reads in progress handler (updateStage returns previous value)"]},{title:"fixes",items:["Fix branch URL double-slash when repoUrl ends with `/`","Fix mobile pipeline process section text clipping","Fix real-time status updates for workers and task stages (WebSocket currentStage push)","Fix ChatBindingModal bindings list not refreshing after add","Fix timezone offset range validation (max ±840 minutes)","Remove dead CHOOSE/INPUT parser code","Defer quote fetch to after command parsing (avoid wasted API calls)","Fix claude-executor test for simplified permission strategy"]}]},{version:"1.0.113",date:"2026-03-17",sections:[{title:"features",items:["Add reuseWorkspace option for retry to skip worktree recreation"]},{title:"fixes",items:["Address MR review issues for reuseWorkspace feature"]}]},{version:"1.0.112",date:"2026-03-17",sections:[{title:"features",items:["Add 7 new bot commands (projects, status, show, workers, search, choose, input) and remove drain/undrain","Fix ChatBindingModal refresh after successful add","Prevent mobile PTY terminal from jumping to top of page"]},{title:"fixes",items:["Add Lark and Slack controller unit tests","Fix async Lark message processing and Slack webhookToken decryption","Verify webhookToken is encrypted on create and update"]}]},{version:"1.0.111",date:"2026-03-17",sections:[{title:"fixes",items:["Encrypt webhookToken before storing in database"]}]},{version:"1.0.110",date:"2026-03-17",sections:[{title:"fixes",items:["Improve truncation consistency and responsive layout"]}]},{version:"1.0.109",date:"2026-03-17",sections:[{title:"fixes",items:["Handle Feishu encrypted webhook body with AES-256-CBC decryption","Use Encrypt Key for Lark webhook signature verification"]}]},{version:"1.0.108",date:"2026-03-16",sections:[{title:"features",items:["Task detail page improvements and responsive layout"]}]},{version:"1.0.107",date:"2026-03-16",sections:[{title:"features",items:["Pipeline editor and stage management"]}]},{version:"1.0.106",date:"2026-03-16",sections:[{title:"features",items:["Slack adapter integration"]}]},{version:"1.0.105",date:"2026-03-16",sections:[{title:"features",items:["Mobile adaptation and PWA install banner"]}]},{version:"1.0.104",date:"2026-03-16",sections:[{title:"features",items:["Bot configuration and docs center"]}]},{version:"1.0.103",date:"2026-03-16",sections:[{title:"fixes",items:["Viewport utility updates"]}]},{version:"1.0.102",date:"2026-03-16",sections:[{title:"fixes",items:["Viewport and layout adjustments"]}]},{version:"1.0.101",date:"2026-03-16",sections:[{title:"fixes",items:["Hardcode body background card values instead of reading CSS variables","PwaUpdateBanner polls every 30s, fix light mode background"]}]},{version:"1.0.100",date:"2026-03-16",sections:[{title:"fixes",items:["Align theme-color and manifest background_color with bg-card"]}]},{version:"1.0.99",date:"2026-03-16",sections:[{title:"fixes",items:["Revert to fixed inset-0 layout — h-dvh caused mobile layout issues"]}]},{version:"1.0.98",date:"2026-03-16",sections:[{title:"improvements",items:["Axiom-style layout — replace fixed inset-0 with h-dvh, add safe area nav wrapper"]},{title:"fixes",items:["Apply PWA body background after React render to get correct theme color","Revert bottom nav to 48px with items-center"]}]},{version:"1.0.97",date:"2026-03-16",sections:[{title:"fixes",items:["Make bottom nav more compact, reduce height from 48px to 40px","Remove debug banner, adapt PwaInstallBanner for light mode"]}]},{version:"1.0.96",date:"2026-03-16",sections:[{title:"fixes",items:["Apply body background via inline style for iOS PWA home indicator","Update main.tsx initialization"]}]},{version:"1.0.94",date:"2026-03-16",sections:[{title:"fixes",items:["Set no-cache headers for service worker files so browsers check for updates"]}]},{version:"1.0.93",date:"2026-03-16",sections:[{title:"fixes",items:["Use JS detection for PWA standalone mode instead of CSS media query","Fix storage event listener leak in useOnboardingData"]}]},{version:"1.0.92",date:"2026-03-16",sections:[{title:"fixes",items:["AppLayout safe-area adjustments"]}]},{version:"1.0.91",date:"2026-03-16",sections:[{title:"fixes",items:["AppLayout safe-area tweaks"]}]},{version:"1.0.90",date:"2026-03-16",sections:[{title:"fixes",items:["Safe-area layout adjustments"]}]},{version:"1.0.89",date:"2026-03-16",sections:[{title:"fixes",items:["Safe-area and global style adjustments"]}]},{version:"1.0.88",date:"2026-03-16",sections:[{title:"fixes",items:["Adjust bottom nav safe-area and global styles"]}]},{version:"1.0.87",date:"2026-03-16",sections:[{title:"fixes",items:["Add safe-area diagnostic overlay for iOS debugging"]}]},{version:"1.0.86",date:"2026-03-16",sections:[{title:"fixes",items:["Add SafeAreaDebug overlay for iOS safe-area diagnosis"]}]},{version:"1.0.85",date:"2026-03-16",sections:[{title:"fixes",items:["Let bottom nav extend into safe area via padding instead of fixed height","Set body background to bg-card in PWA standalone mode for home indicator area"]}]},{version:"1.0.84",date:"2026-03-16",sections:[{title:"fixes",items:["Move bottom nav safe-area handling from inline style to CSS class for iOS PWA"]}]},{version:"1.0.83",date:"2026-03-16",sections:[{title:"improvements",items:["Simplify stage-monitor mutation and PullToRefresh event handling"]},{title:"fixes",items:["Use env() directly for bottom safe area and add background fallback for tab bar gap"]}]},{version:"1.0.82",date:"2026-03-16",sections:[{title:"fixes",items:["Don't store completion message as errorMessage for COMPLETED tasks"]}]},{version:"1.0.81",date:"2026-03-16",sections:[{title:"fixes",items:["Update default pipeline stages to match actual DEFAULT_PIPELINE"]}]},{version:"1.0.80",date:"2026-03-16",sections:[{title:"fixes",items:["Normalize marker action to uppercase for case-insensitive regex match","Use fixed positioning instead of 100dvh to prevent iOS WebView bottom gap"]}]},{version:"1.0.79",date:"2026-03-16",sections:[{title:"features",items:["Add Skill tab to docs navigation bar","Support specifying agent type when creating tasks"]},{title:"fixes",items:["Case-insensitive marker regex, Chinese label resolution, CAS exception handling","Hoist module-level constants, fix test mock and TDZ in waitForActiveTasks","Move hooks before early return in LandingPage, fix TDZ risk in timer declarations","Handle task completion in progress handler for tasks stuck in RUNNING"]}]},{version:"1.0.78",date:"2026-03-16",sections:[{title:"features",items:["Improve sidebar nav and fix mobile UI issues"]},{title:"fixes",items:["Detect task completion when agent doesn't output OVERLORD markers","Force TUI redraw after page refresh via resize trick","Add Google Fonts to CSP connect-src, update deprecated meta tag","Use Hand icon instead of Zap for take over button","Replace snake_case labels with i18n keys in pipeline sidebar","Propagate MR URL from stage monitor through progress frame to task table"]},{title:"documentation",items:["Add IDE tunnel team setup guide with GitHub auth and shared account"]}]},{version:"1.0.77",date:"2026-03-16",sections:[{title:"features",items:["Add placeholder message behind blank terminal canvas"]},{title:"fixes",items:["Only match vscode.dev URLs for tunnel, skip license/docs URLs","Correct VS Code CLI download URL in deploy guide"]},{title:"documentation",items:["Add links for AI agent CLIs and VS Code CLI in prerequisites"]}]},{version:"1.0.76",date:"2026-03-16",sections:[{title:"features",items:["Make branch name a clickable link to the git platform branch page"]},{title:"improvements",items:['Rename "cursor tunnel" to "IDE tunnel" across codebase']},{title:"fixes",items:["Show toast with error message when tunnel start fails","Add worktree .local/bin to PTY PATH and document VS Code CLI setup"]}]},{version:"1.0.75",date:"2026-03-16",sections:[{title:"improvements",items:["Remove unnecessary `as any` i18n casts and add missing keys","Replace docs sidebar with 4-tab navigation (cli/api/bot/all)"]},{title:"fixes",items:["Update task.branch when worker reports branch via progress frame","Replace snake_case placeholder values with proper English text","Re-apply Zap icon after merge from main","Update TaskDetailPage test mock for icon change","Filter project list by membership for non-admin users","Mobile UI improvements across all pages","Add logout button to profile page for mobile users"]}]},{version:"1.0.74",date:"2026-03-16",sections:[{title:"fixes",items:["Git token UI labels — use readable text instead of snake_case keys","Remove screen clear reset from replay buffer, increase to 256KB for TUI replay"]}]},{version:"1.0.73",date:"2026-03-16",sections:[{title:"features",items:["PTY relay auto-reconnection via channel token renewal"]},{title:"fixes",items:["Onboarding guide shows stale developer_count after creating a developer","Reset PTY replay buffer on screen clear to prevent blank terminal after refresh"]}]},{version:"1.0.72",date:"2026-03-16",sections:[{title:"fixes",items:["Use 'code tunnel' instead of 'cursor --remote-tunnel' for headless servers","Unify take_over/release button styles with TaskDetailPage","Add 500ms delay before Enter to let TUI process pasted text","Use \\r instead of \\n to submit prompt in PTY"]},{title:"documentation",items:["Update deployment docs to reflect web URL in install wizard"]}]},{version:"1.0.71",date:"2026-03-16",sections:[{title:"fixes",items:["Clean up debug log in pipeline prompt writer","Reset cleanOutput after trust confirm to prevent false prompt detection"]}]},{version:"1.0.70",date:"2026-03-16",sections:[{title:"fixes",items:["Use Hand icon for take_over and RotateCcw for release across both pages"]}]},{version:"1.0.69",date:"2026-03-15",sections:[{title:"improvements",items:["Simplify docs pages with shared DocsPrimitives component"]},{title:"fixes",items:["Use useT from @/i18n instead of react-i18next, fix useRef initial value","Unify take-over/release icons between terminal and task detail pages","Replay PTY output buffer on web client reconnect","Show PWA install banner for logged-in mobile users","Use i18n for CopyButton title instead of hardcoded string","Restore DocsLayout lazy loading and move DocsPrimitives to shared location"]}]},{version:"1.0.68",date:"2026-03-15",sections:[{title:"features",items:["Add documentation center with categorized sidebar navigation and 12 doc pages","Redesign bot form with platform-specific fields and webhook URLs"]},{title:"fixes",items:["Trust auto-confirm with \\r and \\s* patterns, detect prompt in tail of output","Escape >= symbols in JSX text content","Strip webhookToken from bot API responses","Remove incorrect webhookToken null-check from Lark webhook verification"]}]},{version:"1.0.67",date:"2026-03-15",sections:[{title:"fixes",items:["Move trust auto-confirm to PTY data handler for earliest detection"]}]},{version:"1.0.66",date:"2026-03-15",sections:[{title:"fixes",items:["Check initial accumulated output for trust prompt before registering checkReady listener"]}]},{version:"1.0.65",date:"2026-03-15",sections:[{title:"features",items:["Add PWA install banner for mobile Landing Page"]},{title:"improvements",items:["Simplify mobile adaptation code after review"]},{title:"fixes",items:["Symlink settings.json from real home for Claude trust — use lstatSync to detect project settings","Audit log mobile cards truncate long UUIDs","Task detail mobile title wrapping, metadata wrap, stage progress scroll","Ensure all tab bars and admin tab bar are scrollable on mobile","Terminal Home mobile layout — stack tabs and getting started vertically","Fix xterm terminal rendering on mobile Safari with retry fit","Prevent long URL/text overflow in InfoRow on mobile"]}]},{version:"1.0.64",date:"2026-03-15",sections:[{title:"fixes",items:["Check accumulated output for trust patterns instead of per-chunk"]}]},{version:"1.0.63",date:"2026-03-15",sections:[{title:"fixes",items:["Trust prompt — write trustedDirectories to worktree settings.json, fix auto-confirm patterns"]}]},{version:"1.0.61",date:"2026-03-15",sections:[{title:"features",items:["Add task type selector and branch slug input to task creation UI","Parse task type prefix (feat:/fix:/etc) in bot commands","Add --type flag to developer CLI task create","Generate meaningful branch names from task type and description","Add task_type and branch_slug to DB schema and task creation flow","Add TaskType enum and branchSlug to protocol types","Report worktree path from worker to server for workspace tracking","Inject project context into pipeline prompt"]},{title:"improvements",items:["Replace require() with ESM imports where possible","Extract shared PATH helper, deduplicate task type options"]},{title:"fixes",items:["Update database service, worker, and setup-worker tests for renames and new behavior","Use shared TASK_TYPE_OPTIONS and ESM imports in safe-env","Revert protocol dependency to exact version for npm publishing","Treat task as completed if last pipeline stage is done regardless of exit code","Add ~/.local/bin to tunnel spawn PATH for cursor binary","Auto-confirm trust prompts, use accumulated output, increase timeout to 180s","Pre-trust workspace root in Claude settings to prevent trust prompt blocking"]}]},{version:"1.0.60",date:"2026-03-15",sections:[{title:"documentation",items:["Remove manual OVERLORD_WEB_URL setup from deploy guide"]}]},{version:"1.0.54",date:"2026-03-15",sections:[{title:"features",items:["Terminal-centric homepage with live task switching and inline confirmations","Slack adapter support (webhook controller, message parser, Block Kit cards, signature verification)","Collapsible desktop sidebar with toggle button and UI store","Mobile search — replace Profile tab with Search in bottom nav","Tunnel crash recovery, event emission, and machine cleanup","PWA infrastructure, responsive hooks, and mobile viewport support","Mobile adaptation across all pages","Platform bind self-service flow (web page, API endpoint, bot commands, CLI whoami)","Bot setup and all-role onboarding steps","Platform account editing to developer management UI","Info command to show chat and user IDs in bot adapters","Pipeline V2: compiler with variable substitution, stage monitor with passive marker parsing, takeover support","PTY relay client for worker-to-server output streaming","Agent executor environment preparation (Claude, Codex, Cursor, Custom)","Git token support for HTTPS-based repo cloning","Rewrite PipelineEditor for new pipeline config","Wire git token and defaultReviewers through dispatcher with token API","Unified CommandParser with --reviewer support"]},{title:"improvements",items:["Deep simplify — shared types, event-driven dismiss, ref safety","Full codebase simplify — deduplicate, optimize, and clean up","Extract WorkerAuthService from DispatcherService","Extract TunnelService from WorkspaceController","Centralize repositories in global RepositoryModule","Remove DispatcherService facade — callers inject sub-services directly","Extract CommandParser into packages/command-parser","Create packages/validation with shared password rules","Replace TypeScript enums with as-const objects in protocol","Architecture improvements — BaseRepository, useFetch, types, cache, async git","Rename machine to worker across entire codebase","Rename PipelineConfigV2/StageConfigV2 to canonical names","Remove legacy pipeline-runner and pipeline-parser","Consolidate status colors, add useIsAdmin hook","Extract OnboardingGuide strings to i18n locale","Deduplicate maskToken, token blacklisting, and cache helpers"]},{title:"fixes",items:["Mobile responsiveness for EditDeveloperModal and BindPlatformPage","Complete TOTP bind redirect in LoginPage, fix slash command parser call","Secure group bind, merge admin platformUids, allow bind during TOTP setup","Rate limit, token validation, and platformUids string check","Force-offline transaction, BotActions reconciliation, and PtyTerminal reconnect","Replace health check write probe with read-only SELECT 1","Replace regex with startsWith in config-writer to avoid regex injection","Race conditions, unhandled errors, and resource leaks across server and web","Escape backslash in sanitizeForLike and add ESCAPE clause","Align installer password validation with validation package rules","Timer leak, dead code, stringly-typed token status, and i18n gaps","Three PTY relay race conditions causing blank terminals","Cap relay send buffer, fix TOCTOU symlink races in executors","Paginate efficiency, tunnel memory leak, and type-safe roles","Unify password validation rules across server and web","Filter active tasks client-side — API only supports single status"]},{title:"tests",items:["Comprehensive tests for terminal homepage and UI polish","Complete protocol test coverage (100%)","Developer-CLI, Worker, CLI test coverage to 95-100%","Server test coverage to 93%, Web test coverage to 93%","E2E tests for developer CLI commands","Platform bind flow integration test","Integration tests verifying passwordHash/totpSecret never leak","PTY relay E2E tests","Agent environment integration tests","Slack adapter and Lark adapter integration tests"]},{title:"documentation",items:["Comparison analysis between Overlord and Happy Coder","Update API and CLI reference pages","Sync README and architecture.md with actual implementation","Bot integration guide and deployment docs updates"]},{title:"security",items:["Enable Content-Security-Policy via helmet","Comprehensive security hardening across codebase"]}]},{version:"1.0.28",date:"2026-03-13",sections:[{title:"features",items:["full task orchestration platform with multi-agent support (claude code, cursor, codex)","real-time pty terminal streaming via xterm.js in web dashboard","skill pipeline system with confirmation, choice, and input stages","multi-machine worker fleet with intelligent task routing","lark bot integration with interactive message cards","developer cli (ov) for task management and terminal attachment","operations cli (overlord) for server/worker lifecycle management","role-based access control (developer, lead, admin)","totp two-factor authentication","personal access tokens for api/cli authentication","cursor remote tunnel support for workspace access","project-level configuration with pipeline definitions","audit logging for all administrative actions","cloudflare zero trust deployment support","sqlite database with wal mode","redis-backed task queue via bullmq","comprehensive web dashboard with dark/light theme"]}]}];function n(){return e.jsxs("div",{className:"mx-auto max-w-4xl px-4 md:px-6 py-8 font-mono lowercase",children:[e.jsxs("div",{className:"mb-8",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:"// changelog"}),e.jsx("p",{className:"mt-2 text-xs text-[var(--text-muted)]",children:"release history and notable changes."})]}),e.jsx("div",{className:"space-y-6",children:s.map(t=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 space-y-3",children:[e.jsxs("div",{className:"flex items-baseline gap-3",children:[e.jsxs("h2",{className:"text-sm text-[var(--accent)]",children:["> v",t.version]}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t.date}),t.note&&e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["(",t.note,")"]})]}),t.sections.map(i=>e.jsxs("div",{className:"space-y-1",children:[e.jsx("h3",{className:"text-xs text-[var(--text-primary)]",children:i.title}),e.jsx("div",{className:"space-y-1 text-xs text-[var(--text-secondary)]",children:i.items.map((o,a)=>e.jsxs("p",{children:["- ",o]},a))})]},i.title))]},t.version))})]})}export{n as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as z,a as K,i as H,k as D,r as $,j as e,L as p,l as I,m as B,W as w,h}from"./index-CqgRY3L6.js";import{T as R}from"./TaskStatusBadge-Ieecwysj.js";import{T as g}from"./Skeleton-C9OmZNVj.js";import{O as G}from"./OnboardingGuide-or_CwmfY.js";import{f as _}from"./date-CmcdoD87.js";import{g as V}from"./status-colors-CpKIU449.js";import{u as b}from"./useFetch-cT1ib8kh.js";import{T as q}from"./Tooltip-hO7lE45q.js";import{A as v}from"./arrow-right-CzgMaKkq.js";import"./chevron-right-BDxmkY05.js";const Y=3e5,J=[{type:"fraction",numerator:"active_tasks",denominator:"queued_tasks",labelKey:"dashboard.tasks_active_queued"},{type:"simple",key:"online_workers",labelKey:"dashboard.online_workers"},{type:"simple",key:"completed_today",labelKey:"dashboard.completed_all_today"},{type:"simple",key:"completed_by_user_today",labelKey:"dashboard.completed_by_you_today"}],Q=["sun","mon","tue","wed","thu","fri","sat"];function U(){const n=new Date;return Array.from({length:14},(a,i)=>{const r=new Date(n);r.setDate(r.getDate()-(13-i));const c=String(r.getMonth()+1).padStart(2,"0"),l=String(r.getDate()).padStart(2,"0");return{label:Q[r.getDay()],date:`${c}/${l}`}})}function X({dailyRates:n,dailyCounts:a,overallRate:i}){const{t:r}=K(),c=U(),l=a.reduce((t,o)=>t+o,0),u=Math.max(...a,1);return e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:l}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("dashboard.last_7_days")}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:"·"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[r("dashboard.success_rate"),": ",i,"%"]})]}),e.jsx("div",{className:"flex gap-2",style:{height:80},children:c.map(({label:t,date:o},j)=>{const x=a[j]??0,m=n[j]??0,f=r(x===1?"dashboard.task_total":"dashboard.tasks_total"),N=u>0?Math.max(x/u*100,4):4;return e.jsxs(q,{content:`${t} ${o} — ${x} ${f} (${m}%)`,className:"flex flex-1 flex-col items-center gap-1",children:[e.jsx("div",{className:"relative w-full h-full rounded-[4px] cursor-default",style:{backgroundColor:"rgba(34,197,94,0.1)"},children:e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-[4px]",style:{height:`${N}%`,backgroundColor:m>=80?"var(--accent)":m>=50?"var(--warning)":"var(--destructive)"}})}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t})]},t)})})]})}function oe(){const n=z(),{t:a}=K(),i=H(),r=D(s=>s.taskSeq),c=D(s=>s.workerSeq),[l,u]=$.useState(0),{data:t,loading:o}=b(()=>h.get("web/dashboard/stats",{searchParams:{tz:String(new Date().getTimezoneOffset())}}).json(),[l,r,c]),{data:j,loading:x}=b(()=>h.get("web/dashboard/recent-tasks",{searchParams:{limit:"5"}}).json(),[l,r]),{data:m,loading:f}=b(()=>h.get("web/workers").json(),[l,c]),{data:N,loading:E}=b(()=>h.get("web/projects").json(),[l]),{data:O,loading:M}=b(()=>h.get("web/dashboard/recent-activity").json(),[]);$.useEffect(()=>{const s=setInterval(()=>{u(d=>d+1)},Y);return()=>clearInterval(s)},[]);const S=(t==null?void 0:t.success_rate_daily)??null,T=(t==null?void 0:t.task_count_daily)??[],W=(t==null?void 0:t.task_success_rate_14d)??0,L=j??[],y=m??[],C=N??[],A=O??[];function F(s){switch(s){case w.ONLINE:return a("dashboard.online");case w.DRAINING:return a("dashboard.idle");case w.OFFLINE:default:return a("dashboard.offline")}}function P(s){return a(s===1?"dashboard.task_total":"dashboard.tasks_total")}return e.jsxs("div",{className:"mx-auto max-w-6xl overflow-hidden px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("div",{className:"mb-6 md:mb-8 grid grid-cols-2 gap-3 md:gap-4 lg:grid-cols-4",children:J.map(s=>e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 md:p-4",children:[e.jsxs("span",{className:"text-[11px] md:text-xs text-[var(--text-muted)]",children:[a(s.labelKey),":"]}),o?e.jsx("div",{className:"mt-1 h-6 md:h-8 w-12 md:w-16 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):e.jsx("div",{className:"mt-1 flex items-baseline gap-2",children:s.type==="fraction"?e.jsxs("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:[(t==null?void 0:t[s.numerator])??0,e.jsx("span",{className:"text-base md:text-lg font-normal text-[var(--text-muted)]",children:"/"}),(t==null?void 0:t[s.denominator])??0]}):e.jsx("span",{className:"text-2xl md:text-3xl font-bold text-[var(--text-primary)]",children:(t==null?void 0:t[s.key])??0})})]},s.labelKey))}),e.jsx(G,{data:{activeTasks:((t==null?void 0:t.active_tasks)??0)+((t==null?void 0:t.queued_tasks)??0),totalWorkers:y.length,totalProjects:(t==null?void 0:t.project_count)??0,totalDevelopers:(t==null?void 0:t.developer_count)??0}}),e.jsxs("div",{className:"mb-6 grid gap-6 lg:grid-cols-3 items-stretch",children:[e.jsx("div",{className:"flex flex-col gap-6 lg:col-span-2",children:e.jsxs("div",{className:"flex flex-1 flex-col rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsx("div",{className:"border-b border-[var(--border)] px-5 py-3",children:e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.task_count")})}),e.jsx("div",{className:"flex flex-1 flex-col justify-center p-5",children:o?e.jsx("div",{className:"h-24 animate-pulse rounded-[4px] bg-[var(--bg-input)]"}):S?e.jsx(X,{dailyRates:S,dailyCounts:T,overallRate:W}):e.jsxs("div",{className:"flex flex-col items-center gap-2 py-6",children:[e.jsx("span",{className:"text-2xl font-bold text-[var(--text-primary)]",children:T.reduce((s,d)=>s+d,0)}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.daily_breakdown_not_available")})]})})]})}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:border",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_tasks")}),e.jsxs(p,{to:"/tasks",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"flex md:hidden items-center justify-between px-3 py-3",children:e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.recent_tasks")})}),e.jsx("div",{className:"px-3 pb-3 md:px-5 md:pb-4 md:pt-0",children:x?e.jsx(g,{rows:4}):L.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_tasks_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2 md:gap-0",children:L.map(s=>e.jsxs("div",{onClick:()=>n(`/tasks/${s.id}`),className:"flex cursor-pointer items-center gap-3 rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)] md:rounded-none md:border-0 md:border-b md:border-[var(--border-row)] md:p-0 md:py-2.5 last:md:border-b-0",children:[e.jsxs("div",{className:"flex-1 min-w-0 md:hidden",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight line-clamp-2 preserve-case",title:B(s),children:["#",s.id," ",I(s)]}),e.jsx("span",{className:"shrink-0",children:e.jsx(R,{status:s.status})})]}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)] mt-1 block",children:_(s.createdAt)})]}),e.jsxs("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:["#",s.id]}),e.jsx("span",{className:"hidden md:inline flex-1 text-xs text-[var(--text-primary)] truncate preserve-case",children:e.jsx(q,{content:s.description,children:I(s,40)})}),e.jsx("span",{className:"hidden md:inline",children:e.jsx(R,{status:s.status})}),e.jsx("span",{className:"hidden md:inline shrink-0 text-xs text-[var(--text-muted)]",children:_(s.createdAt)})]},s.id))})})]})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"hidden md:flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsxs("div",{className:"flex md:hidden items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.workers")}),e.jsxs(p,{to:"/workers",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-4",children:f?e.jsx(g,{rows:3}):y.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_workers_registered")})]}):e.jsx("div",{className:"flex flex-col",children:y.map(s=>e.jsxs("div",{onClick:()=>n(`/workers/${s.id}`),className:"flex cursor-pointer items-center justify-between border-b border-[var(--border-row)] py-2.5 transition-colors hover:bg-[var(--bg-input)] last:border-b-0",children:[e.jsxs("div",{className:"min-w-0 flex-1 flex flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-xs text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"truncate text-xs text-[var(--text-muted)]",children:s.host??"--"})]}),e.jsxs("div",{className:"shrink-0 flex items-center gap-3",children:[e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:[s.activeSlots,"/",s.maxSlots," ",a("dashboard.slots")]}),e.jsxs("span",{className:"inline-flex items-center gap-1 text-xs",style:{color:V(s.status)},children:[e.jsx("span",{style:{fontSize:"0.5rem"},children:"●"}),F(s.status)]})]})]},s.id))})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] md:hidden",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 py-3",children:[e.jsx("h2",{className:"text-xs font-bold text-[var(--accent)]",children:a("dashboard.projects")}),e.jsxs(p,{to:"/projects",className:"flex items-center gap-1 text-[11px] text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3",children:E?e.jsx(g,{rows:3}):C.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("projects.no_projects_yet")})]}):e.jsx("div",{className:"flex flex-col gap-2",children:C.map(s=>{const d=s.taskCount??0;return e.jsxs("div",{onClick:()=>n(`/projects/${s.key}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] p-3 transition-colors hover:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"min-w-0 truncate text-xs font-medium text-[var(--accent)]",children:s.key}),e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:[d," ",P(d)]})]}),e.jsx("span",{className:"mt-1 block text-[11px] text-[var(--text-primary)]",children:s.name}),e.jsx("span",{className:"mt-0.5 block text-[11px] text-[var(--text-muted)]",children:s.agentType})]},s.key)})})})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-3",children:[e.jsx("h2",{className:"text-sm text-[var(--text-primary)]",children:a("dashboard.recent_activity")}),i&&e.jsxs(p,{to:"/admin/audit-logs",className:"flex items-center gap-1 text-xs text-[var(--accent)] hover:underline",children:[a("common.view_all")," ",e.jsx(v,{className:"h-3 w-3"})]})]}),e.jsx("div",{className:"p-3 md:p-4",children:M?e.jsx(g,{rows:4}):A.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[e.jsx("span",{className:"text-xl font-bold text-[var(--border)]",children:"[ ]"}),e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("dashboard.no_recent_activity")})]}):e.jsx("div",{className:"flex flex-col",children:A.map(s=>{const d=s.message.match(/task\s*#?(\d+)/i),k=d?d[1]:null;return e.jsxs("div",{className:`flex min-w-0 flex-col gap-1 rounded-[4px] border-b border-[var(--border-row)] px-2 py-2 transition-colors last:border-b-0 md:flex-row md:items-start md:gap-3 md:rounded-none md:px-0 ${k?"cursor-pointer hover:bg-[var(--bg-input)]":""}`,onClick:()=>k&&n(`/tasks/${k}`),children:[e.jsx("span",{className:"shrink-0 whitespace-nowrap text-[11px] text-[var(--text-muted)] md:text-xs",children:_(s.timestamp)}),e.jsx("span",{className:"min-w-0 break-words text-[11px] leading-relaxed text-[var(--text-secondary)] md:truncate md:text-xs md:leading-normal",children:s.message})]},s.id)})})})]})]})]})}export{oe as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{c as R,a as _,v as w,r as a,Z as c,j as e,X as C,h as g,s as D}from"./index-CqgRY3L6.js";import{S as N}from"./Select-PNbJCK1d.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const L=R("UserMinus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);function $({isOpen:s,onClose:l,projectKey:i,existingMemberIds:d=[],onAdded:m}){const{t}=_();w(s);const[E,M]=a.useState([]),[o,u]=a.useState(""),[v,j]=a.useState(c.MEMBER),[x,f]=a.useState(!1),[y,p]=a.useState("");a.useEffect(()=>{if(!s)return;async function r(){try{const n=await g.get("web/projects/-/developers").json();M(n)}catch{}}r()},[s]);function b(){u(""),j(c.MEMBER),p(""),l()}async function k(r){if(r.preventDefault(),!!o){p(""),f(!0);try{await g.post(`web/projects/${i}/members`,{json:{developerId:parseInt(o,10),role:v}}),m(),b()}catch(n){const h=n instanceof Error?n.message:"",S=h.includes("409")?t("projects.member_already_exists"):h||t("projects.failed_to_add_member");p(S)}finally{f(!1)}}}return s?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backdropFilter:"blur(2px)"},children:[e.jsx("div",{className:"fixed inset-0 bg-[var(--modal-backdrop)]"}),e.jsx("div",{className:"relative z-10 w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] font-mono",children:e.jsxs("form",{onSubmit:k,children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 py-4",children:[e.jsx("h3",{className:"text-sm text-[var(--text-primary)]",children:t("projects.add_member_title")}),e.jsx("button",{type:"button",className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",onClick:b,children:e.jsx(C,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"space-y-4 px-5 py-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("projects.developer")}),e.jsx(N,{value:o,onChange:u,options:E.filter(r=>!d.includes(r.id)).map(r=>({value:String(r.id),label:`${r.name} (${r.gitEmail})`})),placeholder:t("projects.select_developer")})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1.5 block text-xs text-[var(--text-muted)]",children:t("projects.role")}),e.jsx(N,{value:v,onChange:r=>j(r),options:[{value:c.MEMBER,label:t("projects.member_role")},{value:c.MAINTAINER,label:t("projects.maintainer_role")}]})]}),y&&e.jsx("div",{className:"rounded-[4px] border border-red-500/30 bg-red-500/10 px-3 py-2 text-xs text-red-400",children:y})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-[var(--border)] px-5 py-4",children:[e.jsx("button",{type:"button",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors disabled:opacity-50",disabled:x,onClick:b,children:t("common.cancel")}),e.jsx("button",{type:"submit",className:"rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs text-black hover:opacity-90 transition-opacity disabled:opacity-50",disabled:x||!o,children:t(x?"projects.adding":"projects.add_member")})]})]})})]}):null}function B({isOpen:s,onClose:l,onConfirm:i,memberName:d,loading:m}){const{t}=_();return e.jsx(D,{isOpen:s,onClose:l,onConfirm:i,title:`> ${t("projects.remove_member")}`,message:t("projects.remove_member_confirm",{name:d}),confirmLabel:t("common.remove"),confirmVariant:"danger",isLoading:m})}export{$ as A,B as R,L as U};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as w,f as k,k as F,r,x as K,j as e,h as N,o as m,E,l as B,X as T,H,t as y,Q}from"./index-CqgRY3L6.js";import{E as D}from"./EmptyState-B0pdsOsA.js";import{T as L}from"./Skeleton-C9OmZNVj.js";import{C as q}from"./Checkbox-Drx9oKpj.js";import{S as C}from"./Select-PNbJCK1d.js";import{f as P}from"./date-CmcdoD87.js";import{T as A}from"./Tooltip-hO7lE45q.js";import{a as z}from"./agent-type-options-DPcGCrTV.js";import{g as J}from"./task-constants-DiU1z_dP.js";import{P as X}from"./plus-DSLmbw91.js";import{P as R}from"./play-DP6MNxNf.js";import{C as Z}from"./chevron-left-B9OwsObK.js";import{C as V}from"./chevron-right-BDxmkY05.js";import"./chevron-down-Byw_H7qa.js";function $(){const[s,i]=r.useState(void 0),[t,a]=r.useState(void 0),[p,n]=r.useState([]),b=r.useRef(void 0),u=r.useRef(void 0);b.current=s,u.current=t;const f=r.useCallback(c=>{i(c)},[]),x=r.useCallback(()=>{const c=b.current;c&&(n(j=>[...j,u.current??""]),a(c))},[]),g=r.useRef([]);g.current=p;const d=r.useCallback(()=>{const c=g.current;c.length!==0&&(a(c.at(-1)||void 0),n(c.slice(0,-1)))},[]),v=p.length+1,l=p.length>0;return{cursor:t,setNextCursor:f,goNext:x,goPrev:d,pageNumber:v,hasPrev:l,hasNext:!!s}}const I=20;function W(s){switch(s){case m.RUNNING:return"bg-[var(--accent)]";case m.QUEUED:return"bg-[var(--warning)]";case m.ASSIGNED:return"bg-[var(--info)]";case m.SUSPENDED:return"bg-[var(--warning)]";case m.COMPLETED:return"bg-[var(--accent)]";case m.FAILED:return"bg-[var(--destructive)]";case m.CANCELLED:return"bg-[#525252]";default:return"bg-[#525252]"}}const Y=z(J);function ee({taskId:s,onClose:i,onLaunched:t}){const{t:a}=w(),[p,n]=r.useState([Q.CLAUDE]),[b,u]=r.useState(""),[f,x]=r.useState(""),[g,d]=r.useState(!1);function v(o){n(c=>c.includes(o)?c.filter(j=>j!==o):[...c,o])}async function l(){if(p.length===0){y.error("select at least one review agent.");return}d(!0);try{await N.post(`web/tasks/${s}/review`,{json:{agentTypes:p,description:b.trim()||void 0,issueRef:f.trim()||void 0}}),y.success("review launched"),t(),i()}catch(o){const c=o instanceof Error?o.message:String(o);y.error(c)}finally{d(!1)}}return e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:"w-full max-w-sm rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 font-mono",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-bold text-[var(--text-primary)]",children:a("review.launch")}),e.jsx("button",{onClick:i,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:e.jsx(T,{className:"h-4 w-4"})})]}),e.jsxs("p",{className:"mb-3 text-[11px] text-[var(--text-muted)]",children:["task #",s," — ",a("review.select_agents")]}),e.jsx("div",{className:"mb-4 flex flex-col gap-2",children:Y.map(o=>e.jsx(q,{checked:p.includes(o.value),onCheckedChange:()=>v(o.value),label:o.label,containerClassName:"w-full gap-2.5 rounded-[4px] border border-[var(--border)] px-3 py-2 hover:bg-[var(--bg-input)] transition-colors"},o.value))}),e.jsx("textarea",{value:b,onChange:o=>u(o.target.value),placeholder:a("review.description_placeholder"),rows:3,className:"mb-3 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsx("input",{value:f,onChange:o=>x(o.target.value),placeholder:"--ref: Figma/Jira/Sentry URL",className:"mb-4 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:l,disabled:g||p.length===0,className:"flex flex-1 items-center justify-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-bold text-black disabled:opacity-40 disabled:cursor-not-allowed",children:[e.jsx(R,{className:"h-3 w-3"}),a(g?"common.processing":"review.launch")]}),e.jsx("button",{onClick:i,className:"rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("common.cancel")})]})]})})}function _({pag:s}){const{t:i}=w();return!s.hasPrev&&!s.hasNext?null:e.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// page ",s.pageNumber]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:s.goPrev,disabled:!s.hasPrev,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[e.jsx(Z,{className:"h-3.5 w-3.5"}),i("tasks.prev")]}),e.jsxs("button",{onClick:s.goNext,disabled:!s.hasNext,className:"flex items-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[i("common.next"),e.jsx(V,{className:"h-3.5 w-3.5"})]})]})]})}function se({onRefresh:s,projectFilter:i,developerFilter:t}){const{t:a}=w(),p=k(),[n,b]=r.useState([]),[u,f]=r.useState(!0),[x,g]=r.useState(null),d=$(),v=r.useCallback(async l=>{f(!0);try{const o=new Date(Date.now()-6048e5).toISOString(),c=new URLSearchParams({status:m.COMPLETED,taskMode:"develop",reviewStatus:"null",completedAfter:o,limit:String(I)});i&&c.set("projectKey",i),t&&c.set("developerId",t),l&&c.set("cursor",l);const j=await N.get(`web/tasks?${c}`).json();b(j.data??[]),d.setNextCursor(j.nextCursor)}catch{b([]),d.setNextCursor(void 0)}finally{f(!1)}},[i,t]);return r.useEffect(()=>{v(d.cursor)},[v,d.cursor]),u&&n.length===0?e.jsx("div",{className:"p-4",children:e.jsx(L,{rows:4})}):!u&&n.length===0&&!d.hasPrev?e.jsx(D,{icon:E,title:a("review.no_reviews"),description:a("review.pending")}):e.jsxs(e.Fragment,{children:[n.length>0&&e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:n.map(l=>e.jsxs("div",{className:"flex flex-col gap-1 border-b border-[var(--border)] px-4 py-3 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full bg-[var(--accent)]"}),e.jsx(A,{content:l.description,className:"flex-1 min-w-0",children:e.jsxs("span",{className:"cursor-pointer truncate text-xs text-[var(--text-primary)] hover:text-[var(--accent)] transition-colors block preserve-case",onClick:()=>p(`/tasks/${l.id}`),children:["#",l.id," ",B(l)]})}),e.jsx("button",{onClick:async()=>{try{await N.post(`web/tasks/${l.id}/review-status`,{json:{reviewStatus:"dismissed"}}),v(d.cursor)}catch(o){let c="Failed to dismiss";try{if(o instanceof H){const j=await o.response.json();c=(j==null?void 0:j.message)??c}else o instanceof Error&&(c=o.message)}catch{}y.error(c)}},className:"shrink-0 flex items-center rounded-[4px] p-1.5 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors","aria-label":"dismiss",children:e.jsx(T,{className:"h-3.5 w-3.5"})}),e.jsxs("button",{onClick:()=>g(l.id),className:"shrink-0 flex items-center gap-1.5 rounded-[4px] px-3 py-1.5 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(R,{className:"h-3 w-3"}),e.jsx("span",{className:"hidden md:inline",children:a("review.launch_short")})]})]}),e.jsxs("div",{className:"flex items-center gap-2 pl-5 text-[11px] text-[var(--text-muted)] min-w-0",children:[e.jsx("span",{className:"shrink-0",children:P(l.completedAt??l.createdAt)}),e.jsx("span",{className:"shrink-0",children:"·"}),e.jsx("span",{className:"shrink-0",children:l.projectKey}),l.workerName&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"shrink-0",children:"·"}),e.jsx("span",{className:"truncate",children:l.workerName})]})]})]},l.id))}),e.jsx(_,{pag:d}),x!==null&&e.jsx(ee,{taskId:x,onClose:()=>g(null),onLaunched:()=>{s(),v(d.cursor)}})]})}function te(s){const i=new Map;for(const t of s){const a=t.sourceTaskId??t.id;i.has(a)||i.set(a,[]),i.get(a).push(t)}return Array.from(i.entries()).map(([t,a])=>({sourceTaskId:t,tasks:a}))}function re({group:s,onClick:i}){const t=s.tasks[0],a=s.tasks.every(n=>n.status===m.COMPLETED||n.status===m.FAILED||n.status===m.CANCELLED),p=t==null?void 0:t.sourceCommitSha;return e.jsxs("div",{onClick:i,className:"flex cursor-pointer items-center gap-3 border-b border-[var(--border)] px-4 py-3 last:border-b-0 hover:bg-[var(--bg-input)] transition-colors",children:[e.jsx("span",{className:`h-2 w-2 shrink-0 rounded-full ${a?"bg-[var(--accent)]":"bg-[var(--warning)]"}`}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx(A,{content:(t==null?void 0:t.sourceTaskDescription)??(t==null?void 0:t.description),className:"truncate",children:e.jsxs("span",{className:"truncate text-xs text-[var(--text-primary)]",children:["source #",s.sourceTaskId]})}),p&&e.jsxs("span",{className:"shrink-0 font-mono text-[11px] text-[var(--accent)]",children:["@",p.slice(0,7)]})]}),e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:[s.tasks.length," ",s.tasks.length===1?"agent":"agents"," · ",s.tasks.map(n=>(n.agentType??"claude").toLowerCase()).join(", ")]})]}),t&&e.jsx("span",{className:"shrink-0 rounded-[4px] border border-[var(--border)] px-2 py-0.5 text-[11px] text-[var(--text-muted)]",children:t.projectKey}),t&&e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:P(t.createdAt)}),e.jsx("div",{className:"flex shrink-0 items-center gap-1",children:s.tasks.map(n=>e.jsx("span",{className:`h-2 w-2 rounded-full ${W(n.status)}`,title:n.status.toLowerCase()},n.id))})]})}function S({mode:s,projectFilter:i,developerFilter:t}){const{t:a}=w(),p=k(),[n,b]=r.useState([]),[u,f]=r.useState(!0),x=$(),g=r.useCallback(async d=>{f(!0);try{const v=new URLSearchParams({taskMode:"review",limit:String(I),groupBySource:"true"});s==="in_progress"?v.set("status",[m.QUEUED,m.ASSIGNED,m.RUNNING,m.SUSPENDED].join(",")):v.set("status",[m.COMPLETED,m.FAILED,m.CANCELLED].join(",")),i&&v.set("projectKey",i),t&&v.set("sourceDeveloperId",t),d&&v.set("cursor",d);const l=await N.get(`web/tasks?${v}`).json();b(te(l.data??[])),x.setNextCursor(l.nextCursor??void 0)}catch{b([]),x.setNextCursor(void 0)}finally{f(!1)}},[s,i,t]);return r.useEffect(()=>{g(x.cursor)},[g,x.cursor]),u&&n.length===0?e.jsx("div",{className:"p-4",children:e.jsx(L,{rows:4})}):!u&&n.length===0&&!x.hasPrev?e.jsx(D,{icon:E,title:a("review.no_reviews")}):e.jsxs(e.Fragment,{children:[n.length>0&&e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:n.map(d=>e.jsx(re,{group:d,onClick:()=>p(`/review/${d.sourceTaskId}`)},d.sourceTaskId))}),e.jsx(_,{pag:x})]})}function fe(){const{t:s}=w(),i=k(),t=F(h=>h.taskSeq),[a,p]=r.useState("pending"),[n,b]=r.useState(0),[u,f]=r.useState(""),[x,g]=r.useState(""),[d,v]=r.useState([]),[l,o]=r.useState([]);K(null);const c=r.useCallback(()=>b(h=>h+1),[]);r.useEffect(()=>{let h=!1;return(async()=>{try{const[M,G]=await Promise.all([N.get("web/projects").json(),N.get("web/projects/-/developers").json()]);if(h)return;v(M),o(G)}catch{}})(),()=>{h=!0}},[]);const j=r.useMemo(()=>[{value:"",label:s("tasks.filter_project")},...d.map(h=>({value:h.key,label:h.name}))],[d,s]),O=r.useMemo(()=>[{value:"",label:s("tasks.filter_developer")},...l.map(h=>({value:String(h.id),label:h.name}))],[l,s]),U=[{key:"pending",label:s("review.pending")},{key:"in_progress",label:s("review.in_progress")},{key:"history",label:s("review.history")}];return e.jsxs("div",{className:"mx-auto max-w-6xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsx("h1",{className:"sr-only",children:s("review.title")}),e.jsxs("div",{className:"mb-4 flex flex-col gap-3 md:gap-4 md:flex-row md:items-center",children:[e.jsxs("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 md:pb-0 no-scrollbar",children:[U.map(h=>e.jsx("button",{onClick:()=>p(h.key),className:`shrink-0 rounded-[4px] px-3 py-2 h-8 text-xs transition-colors ${a===h.key?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)] bg-[var(--bg-card)] hover:text-[var(--text-secondary)]"}`,children:h.label},h.key)),e.jsxs("button",{onClick:()=>i("/plan"),className:"shrink-0 flex items-center gap-1 rounded-[4px] px-3 py-2 h-8 text-xs text-[var(--text-muted)] hover:text-[var(--accent)] transition-colors",children:[e.jsx(X,{className:"h-3 w-3"}),s("plan.title")]})]}),e.jsxs("div",{className:"flex flex-col gap-2 md:ml-auto md:flex-row md:items-center",children:[e.jsx(C,{value:u,onChange:f,options:j,className:"md:w-40"}),e.jsx(C,{value:x,onChange:g,options:O,className:"md:w-40"})]})]}),a==="pending"&&e.jsx(se,{onRefresh:c,projectFilter:u,developerFilter:x},`pending-${n}-${t}-${u}-${x}`),a==="in_progress"&&e.jsx(S,{mode:"in_progress",projectFilter:u,developerFilter:x},`inprogress-${n}-${t}-${u}-${x}`),a==="history"&&e.jsx(S,{mode:"history",projectFilter:u,developerFilter:x},`history-${n}-${t}-${u}-${x}`)]})}export{fe as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as t}from"./index-CqgRY3L6.js";import{C as f}from"./chevron-down-Byw_H7qa.js";function h({value:r,onChange:x,options:c,placeholder:u,disabled:n=!1,className:m=""}){var i;const[a,o]=l.useState(!1),s=l.useRef(null),d=((i=c.find(e=>e.value===r))==null?void 0:i.label)??u??"";return l.useEffect(()=>{function e(v){s.current&&!s.current.contains(v.target)&&o(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),t.jsxs("div",{ref:s,className:`relative ${m}`,children:[t.jsxs("button",{type:"button",disabled:n,onClick:()=>!n&&o(!a),"aria-expanded":a,"aria-haspopup":"listbox",className:`flex w-full items-center justify-between rounded-[4px] border bg-[var(--bg-input)] px-3 py-2 font-mono text-xs outline-none transition-colors ${a?"border-[var(--accent)] text-[var(--text-primary)]":"border-[var(--border)] text-[var(--text-primary)] hover:border-[var(--text-muted)]"} ${n?"cursor-not-allowed opacity-50":"cursor-pointer"}`,children:[t.jsx("span",{className:r?"":"text-[var(--text-muted)]",children:d}),t.jsx(f,{size:12,className:`ml-2 shrink-0 text-[var(--text-muted)] transition-transform ${a?"rotate-180":""}`})]}),a&&t.jsx("div",{role:"listbox",className:"absolute right-0 z-50 mt-1 max-h-48 min-w-full w-max max-w-[calc(100vw-2rem)] overflow-auto rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] py-1 shadow-lg",children:c.map(e=>t.jsxs("button",{type:"button",role:"option","aria-selected":e.value===r,onClick:()=>{x(e.value),o(!1)},className:`flex w-full items-center px-3 py-1.5 text-left font-mono text-xs transition-colors ${e.value===r?"bg-[var(--accent)]/10 text-[var(--accent)]":"text-[var(--text-secondary)] hover:bg-[var(--bg-input)] hover:text-[var(--text-primary)]"}`,children:[e.value===r&&t.jsx("span",{className:"mr-2 text-[var(--accent)]",children:">"}),e.label]},e.value))})]})}export{h as S};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import{c as xe,a as de,r as n,A as P,h as f,j as e,H as Ht,t as $,s as Ee,B as Jt,f as Xt,F as Vt,p as Qt,q as Yt,k as ut,o as k,R as Zt,L as ie,l as ht,m as es,X as Ce,y as ts,U as ss,G as ft,b as as,I as Et,J as rs}from"./index-CqgRY3L6.js";import{u as ns}from"./task.store-BfdxbFUg.js";import{P as vt}from"./PtyTerminal-DZ-tRh7i.js";import{C as gt}from"./ConfirmStageDialog-BjjJNcLJ.js";import{C as oe}from"./Checkbox-Drx9oKpj.js";import{S as bt}from"./Select-PNbJCK1d.js";import{b as ls,f as Y,c as cs}from"./date-CmcdoD87.js";import{a as Tt}from"./status-colors-CpKIU449.js";import{g as is,H as os}from"./task-agent-knUib-IL.js";import{a as jt}from"./agent-type-options-DPcGCrTV.js";import{T as xs,g as Z}from"./task-constants-DiU1z_dP.js";import{T as ds}from"./Tooltip-hO7lE45q.js";import{A as ms}from"./arrow-left-CMC8xPNU.js";import{R as Lt}from"./rotate-ccw-DkPBqmSU.js";import{G as ps}from"./git-fork-Tz0-ma48.js";import{P as Nt}from"./play-DP6MNxNf.js";import{E as yt}from"./external-link-6-aTSDMz.js";import{L as It}from"./loader-circle-CRxnDWNg.js";import{S as us}from"./skip-forward-ZkknEL37.js";import"./clock-RH0F7m7Y.js";import"./chevron-down-Byw_H7qa.js";/**
|
|
2
|
-
* @license lucide-react v0.469.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const hs=xe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
7
|
-
* @license lucide-react v0.469.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const fs=xe("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
|
|
12
|
-
* @license lucide-react v0.469.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const vs=xe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
17
|
-
* @license lucide-react v0.469.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const gs=xe("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);function bs(l,c){const a=new Date(l).getTime()-Date.now();if(a<=0)return c("tasks.tunnel_expired");const r=Math.floor(a/36e5),t=Math.floor(a%36e5/6e4);return r>0?c("tasks.tunnel_expires_hm",{h:r,m:t}):c("tasks.tunnel_expires_m",{m:t})}function kt(l){switch(l){case"CONNECTED":return"var(--accent)";case"STARTING":return"var(--warning)";case"EXPIRED":return"var(--text-muted)";default:return"var(--text-muted)"}}function wt(l,c){switch(l){case"IDLE":case"CLOSED":return c("tasks.tunnel_idle");case"STARTING":return c("tasks.tunnel_starting");case"CONNECTED":return c("tasks.tunnel_connected");case"EXPIRED":return c("tasks.tunnel_expired");case"CLOSING":return c("tasks.tunnel_closing");default:return String(l).toLowerCase()}}function js({taskId:l,taskFinished:c,compact:a}){const{t:r}=de(),[t,d]=n.useState(P.IDLE),[p,C]=n.useState(null),[h,M]=n.useState(null),[W,ee]=n.useState(""),[o,S]=n.useState(!1),[me,O]=n.useState(!1),F=n.useRef(null),R=n.useCallback(async()=>{try{const v=await f.get(`web/workspace-tunnel/${l}/status`).json();d(v.status),C(v.tunnelUrl??null),M(v.expiresAt??null),(v.status==="EXPIRED"||v.status==="IDLE"||v.status==="CLOSED")&&E()}catch{}},[l]);function pe(){E(),F.current=setInterval(R,5e3)}function E(){F.current&&(clearInterval(F.current),F.current=null)}n.useEffect(()=>{c&&(t===P.STARTING||t===P.CONNECTED)&&(d(P.IDLE),C(null),E())},[c,t]),n.useEffect(()=>{if(t!=="CONNECTED"||!h)return;const v=()=>{const T=bs(h,r);ee(T),T===r("tasks.tunnel_expired")&&(d(P.EXPIRED),C(null),E())};v();const D=setInterval(v,3e4);return()=>clearInterval(D)},[t,h]),n.useEffect(()=>()=>E(),[]),n.useEffect(()=>{c||R()},[R,c]);async function H(){S(!0);try{await f.post(`web/workspace-tunnel/${l}/start`),d(P.STARTING),pe()}catch(v){let D=r("tasks.tunnel_start_failed");try{if(v instanceof Ht){const T=await v.response.json();T!=null&&T.error&&(D=T.error,/code.*not found|ENOENT.*code|spawn code/i.test(D)&&(D+=". "+r("tasks.tunnel_install_code_hint")))}}catch{}$.error(D)}finally{S(!1)}}async function A(){S(!0);try{await f.post(`web/workspace-tunnel/${l}/stop`),d(P.IDLE),C(null),E()}catch{}finally{S(!1)}}async function U(){p&&(await navigator.clipboard.writeText(p),O(!0),setTimeout(()=>O(!1),2e3))}return a?e.jsxs("div",{className:"flex items-center gap-2 font-mono lowercase text-xs",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"ide_tunnel:"}),e.jsx("span",{style:{color:kt(t)},children:wt(t,r)}),(t==="IDLE"||t==="CLOSED"||t==="EXPIRED")&&e.jsx("button",{onClick:H,disabled:o,className:"rounded-[4px] px-2 py-1 text-[var(--info)] disabled:opacity-50",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:r(o?"tasks.tunnel_starting":"tasks.tunnel_start")}),t==="CONNECTED"&&p&&e.jsx("a",{href:p.replace(/^https?:/,"cursor:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] px-2 py-1 text-[var(--info)]",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:r("tasks.tunnel_open_in_cursor")})]}):e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 font-mono lowercase",children:[e.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:r("tasks.tunnel_header")}),e.jsxs("span",{className:"text-xs",style:{color:kt(t)},children:["● ",wt(t,r)]})]}),t==="CONNECTED"&&h&&e.jsxs("p",{className:"mb-2 text-xs text-[var(--text-muted)]",children:["// ",W]}),t==="CONNECTED"&&p&&e.jsxs("div",{className:"mb-3 flex items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2",children:[e.jsx("code",{className:"flex-1 truncate text-xs text-[var(--text-primary)]",children:p}),e.jsxs("button",{onClick:U,className:"shrink-0 text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors","aria-label":r("tasks.tunnel_copy_url"),children:["[",r("common.copy"),"]"]})]}),me&&e.jsx("p",{className:"mb-2 text-xs text-[var(--accent)]",children:r("tasks.tunnel_copied")}),t==="STARTING"&&e.jsx("p",{className:"mb-3 text-xs text-[var(--text-muted)]",children:r("tasks.tunnel_waiting")}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[(t==="IDLE"||t==="CLOSED")&&e.jsx("button",{onClick:H,disabled:o,className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors disabled:opacity-50",children:r(o?"tasks.tunnel_starting_button":"tasks.tunnel_start_button")}),t==="STARTING"&&e.jsx("button",{onClick:A,disabled:o,className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors disabled:opacity-50",children:r(o?"tasks.tunnel_stopping":"tasks.tunnel_cancel")}),t==="CONNECTED"&&p&&e.jsxs(e.Fragment,{children:[e.jsx("a",{href:p.replace(/^https?:/,"cursor:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors",children:r("tasks.tunnel_open_cursor")}),e.jsx("a",{href:p.replace(/^https?:/,"vscode:"),target:"_blank",rel:"noopener noreferrer",className:"rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:r("tasks.tunnel_open_vscode")}),e.jsx("button",{onClick:A,disabled:o,className:"rounded-[4px] border border-[var(--destructive)]/40 px-3 py-1.5 text-[var(--destructive)] hover:bg-[var(--destructive)]/10 transition-colors disabled:opacity-50",children:r(o?"tasks.tunnel_stopping":"tasks.tunnel_stop")})]}),t==="EXPIRED"&&e.jsx("button",{onClick:H,disabled:o,className:"rounded-[4px] border border-[var(--accent)]/40 px-3 py-1.5 text-[var(--accent)] hover:bg-[var(--accent)]/10 transition-colors disabled:opacity-50",children:r(o?"tasks.tunnel_starting_button":"tasks.tunnel_restart")})]})]})}function Ns({isOpen:l,onClose:c,onConfirm:a,taskId:r,isLoading:t}){const{t:d}=de();return e.jsx(Ee,{isOpen:l,onClose:c,onConfirm:a,title:d("tasks.cancel_task_title"),message:d("tasks.cancel_task_message",{id:String(r)}),confirmLabel:d("tasks.cancel_task_confirm_label"),confirmVariant:"danger",isLoading:t})}function ys({isOpen:l,onClose:c,onConfirm:a,taskId:r,mrUrl:t,isLoading:d,reuseWorkspace:p,onReuseWorkspaceChange:C}){const{t:h}=de(),M=t?h("tasks.retry_message_with_mr",{id:String(r),url:t}):h("tasks.retry_message_without_mr",{id:String(r)});return e.jsx(Ee,{isOpen:l,onClose:c,onConfirm:a,title:h("tasks.retry_title"),message:M,confirmLabel:h("tasks.retry_confirm_label"),confirmVariant:"accent",isLoading:d,children:e.jsx(oe,{checked:p,onCheckedChange:C,label:h("tasks.reuse_workspace_label"),containerClassName:"mt-3",labelClassName:"text-[var(--text-muted)]"})})}const we=["implement","test","verify","review","simplify","rebase","submit"],ks=["analyze","discuss","document","confirm"],ws=["review","report","fix"],_s=["review","report"],Cs=["analyze"];function Se(l){if(typeof l=="string")try{return Se(JSON.parse(l))}catch{return null}if(!l||typeof l!="object")return null;const c=l.stages;if(!Array.isArray(c)||c.length===0)return null;const a=c.map(r=>r&&typeof r=="object"?r.name:null).filter(r=>typeof r=="string"&&r.length>0);return a.length===c.length?a:null}function Ss(l){if(l.taskMode==="plan")return ks;if(l.taskMode==="automation")return Cs;if(l.taskMode==="review"){let c=!1;if(l.configSnapshot)try{c=!!JSON.parse(l.configSnapshot).skipFix}catch{}return c?_s:ws}if(!l.configSnapshot)return we;try{const c=JSON.parse(l.configSnapshot);return Se(c.pipeline)??Se(c)??we}catch{return we}}function Es(l){switch(l){case"stage_change":return"text-[var(--accent)]";case"info":return"text-[var(--text-secondary)]";case"warning":return"text-[var(--warning)]";case"error":return"text-[var(--destructive)]";case"system":return"text-[var(--info)]";default:return"text-[var(--text-muted)]"}}function _e({status:l,agentType:c}){const a=Tt(l),r=Z(c);return e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-[4px] px-2 py-0.5 text-xs",style:{color:a},children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-[3px]",style:{backgroundColor:a}}),l.toLowerCase()," / ",r]})}function _t({stages:l,runningBg:c="bg-[#1a1a1a]",py:a="py-1.5"}){return e.jsx(e.Fragment,{children:l.map(r=>{const t=r.status==="completed",d=r.status==="running",p=r.status==="failed";return e.jsxs("div",{className:`flex items-center gap-2 rounded-[4px] px-2 ${a} ${d?c:""}`,children:[t&&e.jsx(rs,{className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"}),d&&e.jsx(It,{className:"h-3.5 w-3.5 shrink-0 text-[var(--accent)]"}),p&&e.jsx(Ce,{className:"h-3.5 w-3.5 shrink-0 text-[var(--destructive)]"}),r.status==="pending"&&e.jsx(hs,{className:"h-3.5 w-3.5 shrink-0 text-[#525252]"}),e.jsx("span",{className:"text-xs",style:{color:t?"var(--accent)":d?"#e5e5e5":p?"var(--destructive)":"#525252",fontWeight:d?500:400},children:d?`> ${r.name}`:r.name})]},r.name)})})}function Ct({task:l,ptyStatus:c,displayAgentType:a,t:r,gap:t="gap-2 md:gap-3"}){return e.jsxs("div",{className:`flex items-center ${t}`,children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:r("tasks.pty_terminal")}),e.jsxs("span",{className:`inline-flex items-center gap-1 text-[11px] ${c==="connected"?"text-[var(--accent)]":c==="connecting"?"text-[var(--warning)]":"text-[var(--text-muted)]"}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${c==="connected"?"bg-[var(--accent)]":c==="connecting"?"bg-[var(--warning)]":"bg-[#525252]"}`}),r(`tasks.${c}`)]}),e.jsx("span",{className:"text-[11px]",style:{color:Tt(l.status)},children:l.status.toLowerCase()}),l.currentStage&&e.jsxs("span",{className:"hidden md:inline text-[11px] text-[var(--accent)]",children:[r("tasks.stage"),": ",l.currentStage]}),e.jsxs("span",{className:"hidden md:inline text-[11px] text-[var(--text-muted)]",children:["agent: ",a]}),l.workerName&&e.jsxs("span",{className:"hidden md:inline text-[11px] text-[var(--text-muted)]",children:["worker: ",l.workerName]})]})}function St({isFinished:l,takeoverState:c,ptyRef:a,t:r}){return e.jsxs(e.Fragment,{children:[!l&&c==="auto"&&e.jsxs("button",{onClick:()=>{var t;return(t=a.current)==null?void 0:t.requestTakeover()},className:"flex items-center gap-1.5 rounded-[4px] px-2.5 h-10 md:h-8 text-[11px] font-medium text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:[e.jsx(os,{className:"h-3 w-3"}),r("tasks.take_over")]}),!l&&c==="manual"&&e.jsxs("button",{onClick:()=>{var t;return(t=a.current)==null?void 0:t.releaseTakeover()},className:"flex items-center gap-1.5 rounded-[4px] px-2.5 h-10 md:h-8 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(Lt,{className:"h-3 w-3"}),r("tasks.restore_auto")]})]})}function Ts(l){const c=Ss(l),a=l.currentStage?c.indexOf(l.currentStage):-1;return c.map((r,t)=>{let d="pending";return l.status===k.COMPLETED?d="completed":l.status===k.FAILED&&t<=a?d=t===a?"failed":"completed":a>=0&&(t<a?d="completed":t===a&&(d="running")),{name:r,status:d}})}function K(l,c){if(!l||!c)return null;const a=l.repoUrl.replace(/\.git$/,"").replace(/\/+$/,""),r=c.split("/").map(encodeURIComponent).join("/");return l.gitPlatform===Et.GITLAB?`${a}/-/tree/${r}`:`${a}/tree/${r}`}function Ls(l,c){if(!l)return null;const a=l.repoUrl.replace(/\.git$/,"").replace(/\/+$/,""),r=c.split("/").map(encodeURIComponent).join("/");return l.gitPlatform===Et.GITLAB?`${a}/-/tree/${r}/docs/specs`:`${a}/tree/${r}/docs/specs`}function Ys(){var dt,mt,pt;const{id:l}=Jt(),c=Xt(),{t:a}=de(),r=ns(s=>s.cancelTask),[t,d]=n.useState(null),[p,C]=n.useState(null),[h,M]=n.useState([]),[W,ee]=n.useState(!0),[o,S]=n.useState(null),[me,O]=n.useState(!1),[F,R]=n.useState(!1),[pe,E]=n.useState(!1),[H,A]=n.useState(!1),[U,v]=n.useState(["claude"]),[D,T]=n.useState(""),[Te,Le]=n.useState(!1),[Ie,De]=n.useState(""),[Re,Ae]=n.useState(!1),[Dt,Pe]=n.useState(!1),[Rt,$e]=n.useState(!1),[At,Me]=n.useState(!1),[Oe,Fe]=n.useState(""),[Ue,qe]=n.useState(""),[Be,Ge]=n.useState("append"),[ze,ue]=n.useState(!1),[Ke,Pt]=Vt(),[N,he]=n.useState("terminal"),[We,He]=n.useState([]),[te,Je]=n.useState(0),[J,q]=n.useState(0),[X,Xe]=n.useState(""),[se,$t]=n.useState(""),[Mt,fe]=n.useState(!1),[Ot,Ve]=n.useState(!1),[B,ve]=n.useState(null),[Qe,Ye]=n.useState("disconnected"),[ge,Ze]=n.useState("auto"),ae=n.useRef(null),et=n.useRef(null),[tt,st]=n.useState([]),x=Number(l),b=t?xs.includes(t.status):!1;Qt(t?Yt(t,100):null);const L=n.useCallback(async()=>{try{const s=await f.get(`web/tasks/${x}`).json();d(s)}catch{}},[x]),re=n.useCallback(async()=>{try{const s=await f.get(`web/tasks/${x}/logs`).json();M(s.lines)}catch{}},[x]),G=n.useCallback(async()=>{try{const s=await f.get(`web/tasks/${x}/pending-confirm`).json();S(s.confirm)}catch{S(null)}},[x]),at=n.useCallback(async()=>{fe(!0);try{const s=new URLSearchParams;s.set("limit","50"),s.set("offset",String(J*50)),X&&s.set("type",X),se&&s.set("search",se);const i=await f.get(`web/tasks/${x}/events?${s}`).json();He(i.events),Je(i.total)}catch{}finally{fe(!1)}},[x,J,X,se]);n.useEffect(()=>{N==="logs"&&at()},[N,at]),n.useEffect(()=>{N==="pipeline"&&!b&&f.get(`web/workspaces/${x}`).json().then(ve).catch(()=>ve(null))},[N,x,b]);const z=ut(s=>s.lastEvent),rt=ut(s=>s.eventSeq);n.useEffect(()=>{ee(!0),d(null),C(null),M([]),S(null),ve(null),He([]),Je(0),q(0),fe(!1),Promise.all([L(),re(),G()]).finally(()=>ee(!1))},[L,re,G]),n.useEffect(()=>{t!=null&&t.projectKey&&f.get(`web/projects/${t.projectKey}`).json().then(C).catch(()=>C(null))},[t==null?void 0:t.projectKey]),n.useEffect(()=>{if(!t)return;let s=!1;return(async()=>{try{const i=[],m=[];let u=t.sourceTaskId??null,y=0;for(;u!=null&&y<2;){const _=await f.get(`web/tasks/${u}`).json();m.unshift({id:_.id,taskMode:_.taskMode??"develop"}),u=_.sourceTaskId??null,y++}i.push(...m),i.push({id:t.id,taskMode:t.taskMode??"develop"});const I=await f.get(`web/tasks?${new URLSearchParams({sourceTaskId:String(t.id),limit:"20"})}`).json();for(const _ of I.data??[])i.push({id:_.id,taskMode:_.taskMode??"develop"});s||st(i)}catch{s||st([])}})(),()=>{s=!0}},[t==null?void 0:t.id,t==null?void 0:t.sourceTaskId,t==null?void 0:t.taskMode]),n.useEffect(()=>{!z||rt===0||(z.event==="task_status_changed"&&z.taskId===x||z.event==="task_created"&&z.taskId===x)&&(L(),G())},[rt,z,x,L,G]),n.useEffect(()=>{if(b)return;const i=setInterval(()=>{document.visibilityState!=="hidden"&&Promise.all([L(),re(),G()])},15e3);return()=>clearInterval(i)},[b,L,re,G]);const nt=n.useCallback(()=>S(null),[]),V=n.useCallback(()=>{S(null),L()},[L]),Ft=(t==null?void 0:t.status)===k.FAILED||(t==null?void 0:t.status)===k.CANCELLED,be=(t==null?void 0:t.status)===k.COMPLETED||(t==null?void 0:t.status)===k.FAILED||(t==null?void 0:t.status)===k.CANCELLED,Ut=(t==null?void 0:t.status)===k.COMPLETED&&(!(t!=null&&t.taskMode)||(t==null?void 0:t.taskMode)==="develop");n.useEffect(()=>{Ke.get("action")==="fork"&&t&&!W&&(be&<(),Pt(s=>(s.delete("action"),s),{replace:!0}))},[t,W,Ke,be]);async function qt(){Pe(!0);try{await r(x),O(!1),await L()}finally{Pe(!1)}}async function Bt(){$e(!0);try{await f.post(`web/tasks/${x}/retry`,{json:{reuseWorkspace:ze}}),R(!1),ue(!1),await L()}finally{$e(!1)}}function lt(){Fe(""),qe(""),Ge("append"),E(!0)}async function Gt(){Me(!0);try{const s=Oe.trim()||void 0,i=await f.post(`web/tasks/${x}/fork`,{json:{description:s,descriptionMode:s?Be:void 0,agentType:Ue||void 0}}).json();E(!1),$.success(a("tasks.fork_success")),c(`/tasks/${i.task.id}`)}catch{$.error(a("tasks.fork_error"))}finally{Me(!1)}}async function zt(){if(t){Ae(!0);try{await f.post(`web/tasks/${x}/review`,{json:{agentTypes:U.length>0?U:["claude"],description:D.trim()||void 0,skipFix:Te||void 0,issueRef:Ie.trim()||void 0}}).json(),A(!1),T(""),Le(!1),De(""),c(`/review/${x}`)}catch(s){const i=s instanceof Error?s.message:String(s);$.error(i)}finally{Ae(!1)}}}const j=n.useMemo(()=>t?Ts(t):[],[t==null?void 0:t.configSnapshot,t==null?void 0:t.currentStage,t==null?void 0:t.status]),je=j.findIndex(s=>s.status==="running"),ne=n.useMemo(()=>{if(!(t!=null&&t.configSnapshot))return[];try{const s=JSON.parse(t.configSnapshot);return Array.isArray(s.defaultReviewers)?s.defaultReviewers:[]}catch{return[]}},[t==null?void 0:t.configSnapshot]);if(n.useEffect(()=>{ne.length>0&&v(ne)},[ne.join(",")]),W)return e.jsx("div",{className:"flex h-full items-center justify-center font-mono",children:e.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:a("tasks.loading_task")})});if(!t)return e.jsxs("div",{className:"mx-auto max-w-5xl px-6 py-8 font-mono lowercase text-center",children:[e.jsx("p",{className:"text-sm text-[var(--text-secondary)]",children:a("tasks.task_not_found")}),e.jsxs("button",{onClick:()=>c("/tasks"),className:"mt-4 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:["< ",a("tasks.back_to_tasks")]})]});const w=t.status===k.QUEUED&&t.queuePosition!=null&&t.queueTotal!=null?{position:t.queuePosition,total:t.queueTotal}:null,g=ls(t.startedAt,t.completedAt),Q=is(t),Ne=Z(t.agentType),Kt=[{value:"",label:a("tasks.fork_agent_type_placeholder",{agent:Z(Q)})},...jt(Z,Q)],le=`${a("tasks.status_suspended")} / ${Ne}`,ct=w?e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"queue"}),e.jsxs("span",{className:"text-[var(--info)]",children:["#",w.position," / ",w.total]})]}):null,it=t.taskMode&&t.taskMode!=="develop"?e.jsx("span",{className:"rounded-[4px] px-2 py-0.5 text-[10px] font-bold uppercase",style:t.taskMode==="plan"?{color:"#3b82f6",backgroundColor:"rgba(59,130,246,0.12)"}:{color:"#a855f7",backgroundColor:"rgba(168,85,247,0.12)"},children:t.taskMode}):null,ce=tt.length>1?e.jsx("div",{className:"flex items-center gap-1 text-xs text-[var(--text-secondary)]",children:tt.map((s,i)=>e.jsxs(Zt.Fragment,{children:[i>0&&e.jsx("span",{className:"text-[var(--text-muted)]",children:"→"}),e.jsxs(ie,{to:`/tasks/${s.id}`,className:s.id===t.id?"text-[var(--accent)]":"text-[var(--info)] hover:underline",children:[s.taskMode," #",s.id]})]},s.id))}):t.sourceTaskId?e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["source:"," ",e.jsxs(ie,{to:`/tasks/${t.sourceTaskId}`,className:"text-[var(--info)] hover:underline",children:["#",t.sourceTaskId]})]}):null,ot=e.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-3 shrink-0 md:hidden",children:[e.jsx("button",{onClick:()=>c("/tasks"),className:"shrink-0 text-[var(--text-muted)]",children:e.jsx(ms,{className:"h-4 w-4"})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"truncate text-sm font-medium text-[var(--text-primary)] preserve-case",title:es(t),children:["#",t.id," ",ht(t,80)]}),it]}),ce&&e.jsx("div",{className:"text-[11px]",children:ce})]})]}),ye=e.jsxs("div",{className:"hidden md:flex items-center gap-4 border-b border-[var(--border)] bg-[var(--bg-primary)] px-5 shrink-0",style:{height:44},children:[e.jsx(_e,{status:t.status,agentType:t.agentType}),it,g&&e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// time cost: ",g]}),w&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsx("span",{className:"text-xs text-[var(--info)]",children:a("tasks.queue_position",{position:String(w.position),total:String(w.total)})})]}),e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs(ie,{to:`/projects/${t.projectKey}`,className:"text-xs text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:["project: ",e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),t.branch&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["branch: ",K(p,t.branch)?e.jsx("a",{href:K(p,t.branch),target:"_blank",rel:"noopener noreferrer",className:"text-[var(--text-primary)] hover:text-[var(--info)] hover:underline transition-colors",children:t.branch}):e.jsx("span",{className:"text-[var(--text-primary)]",children:t.branch})]})]}),t.mrUrl&&/^https?:\/\//.test(t.mrUrl)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),e.jsxs("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--info)] hover:underline",children:["MR: ",((dt=t.mrUrl.match(/!?\d+$/))==null?void 0:dt[0])??"view"]})]}),ce&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-xs text-[var(--border)]",children:"|"}),ce]})]}),xt=e.jsxs("div",{className:"flex items-center gap-3 border-t border-[var(--border)] bg-[var(--bg-primary)] px-4 md:px-5 shrink-0",style:{height:48},children:[!b&&e.jsxs("button",{onClick:()=>O(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--destructive)]/10 px-3 h-8 text-[11px] font-medium text-[var(--destructive)]",children:[e.jsx(Ce,{className:"h-3 w-3"}),a("tasks.cancel_task")]}),Ft&&e.jsxs("button",{onClick:()=>R(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-3 h-8 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-input)] transition-colors cursor-pointer",children:[e.jsx(Lt,{className:"h-3 w-3"}),a("tasks.retry_task")]}),be&&e.jsxs("button",{onClick:lt,className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-3 h-8 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--bg-input)] transition-colors cursor-pointer",children:[e.jsx(ps,{className:"h-3 w-3"}),a("tasks.fork_task")]}),Ut&&e.jsxs("button",{onClick:()=>A(!0),className:"flex flex-1 md:flex-none items-center justify-center gap-1.5 rounded-[4px] px-3 h-8 text-[11px] font-medium text-[var(--accent)]",style:{backgroundColor:"rgba(34,197,94,0.12)"},children:[e.jsx(Nt,{className:"h-3 w-3"}),a("review.launch")]}),t.workerId&&!b&&e.jsxs("button",{onClick:()=>{he("pipeline"),setTimeout(()=>{var s,i;(i=(s=et.current)==null?void 0:s.scrollIntoView)==null||i.call(s,{behavior:"smooth",block:"center"})},50)},className:"hidden lg:flex items-center justify-center gap-1.5 rounded-[4px] px-3 h-8 text-[11px] font-medium text-[var(--info)]",style:{backgroundColor:"rgba(59,130,246,0.12)"},children:[e.jsx(yt,{className:"h-3 w-3"}),a("tasks.cursor_tunnel")]})]}),Wt=e.jsxs("div",{className:"hidden w-[280px] shrink-0 flex-col gap-6 overflow-y-auto border-l border-[var(--border)] bg-[var(--bg-primary)] p-4 lg:flex",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.pipeline_stages")}),e.jsx(_t,{stages:j})]}),g&&e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2 text-[11px] text-[var(--text-secondary)]",children:["// time cost: ",g]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.activity_log")}),h.length>0?e.jsx("div",{className:"flex flex-col gap-1.5",children:h.slice(0,8).map((s,i)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-muted)]",children:s},i))}):e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_activity")})]})]}),ke=e.jsxs(e.Fragment,{children:[e.jsx(Ns,{isOpen:me,onClose:()=>O(!1),onConfirm:qt,taskId:x,isLoading:Dt}),e.jsx(ys,{isOpen:F,onClose:()=>{R(!1),ue(!1)},onConfirm:Bt,taskId:x,mrUrl:t.mrUrl??void 0,isLoading:Rt,reuseWorkspace:ze,onReuseWorkspaceChange:ue}),e.jsx(Ee,{isOpen:pe,onClose:()=>E(!1),onConfirm:Gt,title:a("tasks.fork_task"),message:a("tasks.fork_task_desc"),confirmLabel:a("tasks.fork_task"),confirmVariant:"accent",isLoading:At,children:e.jsxs("div",{className:"mt-3 flex flex-col gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["fork of #",x]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx(bt,{value:Ue,onChange:qe,options:Kt})]}),e.jsx("textarea",{value:Oe,onChange:s=>Fe(s.target.value),placeholder:a("tasks.fork_description_placeholder"),rows:4,className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsx(oe,{checked:Be==="replace",onCheckedChange:s=>Ge(s?"replace":"append"),label:e.jsxs("span",{children:[a("tasks.fork_replace_description"),e.jsx("span",{className:"mt-1 block text-[10px] text-[var(--text-muted)]",children:a("tasks.fork_append_hint")})]}),containerClassName:"w-full items-start rounded-[4px] border border-[var(--border)] bg-[var(--bg-primary)] px-3 py-2 text-[11px] text-[var(--text-secondary)]",indicatorClassName:"mt-0.5",labelClassName:"text-[11px] text-[var(--text-secondary)]"})]})}),H&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:e.jsxs("div",{className:"w-full max-w-sm rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-5 font-mono",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-bold text-[var(--text-primary)]",children:a("review.launch")}),e.jsx("button",{onClick:()=>A(!1),className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:e.jsx(Ce,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsxs("p",{className:"text-[11px] text-[var(--text-muted)]",children:["task #",x," — ",a("review.select_agents")]}),ne.length>0&&e.jsx("span",{className:"rounded-[4px] border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[10px] text-amber-500",children:"using project defaults"})]}),e.jsx("div",{className:"mb-4 flex flex-col gap-2",children:jt(Z).map(s=>e.jsx(oe,{checked:U.includes(s.value),onCheckedChange:()=>v(i=>i.includes(s.value)?i.filter(m=>m!==s.value):[...i,s.value]),label:s.label,containerClassName:"w-full gap-2.5 rounded-[4px] border border-[var(--border)] px-3 py-2 hover:bg-[var(--bg-input)] transition-colors"},s.value))}),e.jsx("textarea",{value:D,onChange:s=>T(s.target.value),placeholder:a("review.description_placeholder"),rows:3,className:"mb-3 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)] resize-none"}),e.jsx(oe,{checked:Te,onCheckedChange:Le,label:a("review.skip_fix_label"),containerClassName:"mb-3 w-full gap-2.5 rounded-[4px] border border-[var(--border)] px-3 py-2 hover:bg-[var(--bg-input)] transition-colors",labelClassName:"text-[var(--text-muted)]"}),e.jsx("input",{value:Ie,onChange:s=>De(s.target.value),placeholder:"--ref: Figma/Jira/Sentry URL",className:"mb-4 w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:zt,disabled:Re||U.length===0,className:"flex flex-1 items-center justify-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs font-bold text-black disabled:opacity-40 disabled:cursor-not-allowed",children:[e.jsx(Nt,{className:"h-3 w-3"}),a(Re?"common.processing":"review.launch")]}),e.jsx("button",{onClick:()=>A(!1),className:"rounded-[4px] border border-[var(--border)] px-4 py-2 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:a("common.cancel")})]})]})})]});return Ot&&N==="terminal"?e.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-[var(--bg-primary)] font-mono lowercase h-screen",style:{height:"100dvh",paddingTop:"env(safe-area-inset-top, 0px)",paddingBottom:"env(safe-area-inset-bottom, 0px)"},children:[ye,e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-5 shrink-0",style:{height:36,backgroundColor:"#111111"},children:[e.jsx(Ct,{task:t,ptyStatus:Qe,displayAgentType:Q,t:a,gap:"gap-3"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(St,{isFinished:b,takeoverState:ge,ptyRef:ae,t:a}),e.jsx("button",{onClick:()=>Ve(!1),className:"flex items-center rounded-[4px] bg-[var(--bg-card)] px-2.5 py-1 text-[var(--text-muted)]",children:e.jsx(gs,{className:"h-3 w-3"})})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(vt,{ref:ae,taskId:x,sessionId:t.currentSessionId??void 0,taskFinished:b,onStatusChange:Ye,onTakeoverChange:Ze})}),xt,ke]}):t.status===k.SUSPENDED?e.jsxs("div",{className:"flex h-full flex-col font-mono lowercase",children:[ot,ye,e.jsx("div",{className:"flex items-center gap-2 border-b px-4 md:px-6 py-2 text-xs shrink-0",style:{backgroundColor:"rgba(245,158,11,0.08)",borderColor:"rgba(245,158,11,0.2)",color:"var(--warning)"},children:a("tasks.task_suspended_banner")}),e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col md:flex-row gap-4 md:gap-6 p-4 md:p-6 overflow-y-auto",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-4",children:[e.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[e.jsxs("span",{className:"text-xl font-bold text-[var(--text-primary)]",children:["#",t.id]}),e.jsx("span",{className:"text-base text-[var(--text-secondary)] truncate max-w-[60%] preserve-case",children:e.jsx(ds,{content:t.description,children:ht(t,200)})}),e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px] font-bold text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:le})]}),e.jsx("div",{className:"flex items-center gap-2 md:hidden",children:e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px] font-bold text-[var(--warning)]",style:{backgroundColor:"rgba(245,158,11,0.12)"},children:le})}),o&&(()=>{const s=o.confirmType,i=s==="plan_decompose",m=s==="plan_review"||s==="code_review",u=s==="plan_review"?a("tasks.plan_review_message",{name:o.stageName}):i?o.prompt==="SPEC_PUSH_FAILED"?a("tasks.plan_decompose_push_failed_message"):a("tasks.plan_decompose_message"):s==="code_review"?a("tasks.code_review_message",{name:o.stageName}):o.prompt??a("tasks.pipeline_requires_confirmation"),y=a(s==="plan_review"?"tasks.approve_plan":i?"tasks.approve_plan_decompose":s==="code_review"?"tasks.approve_review":"tasks.confirm_and_proceed"),I=a(i?"tasks.reject_plan_decompose":m?"tasks.request_changes":"tasks.reject");return e.jsxs("div",{className:"rounded-[4px] border p-4",style:{borderColor:"rgba(245,158,11,0.27)",backgroundColor:"#1a1a1a"},children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.pending_confirmation")}),e.jsx("p",{className:"mb-3 text-xs text-[var(--text-secondary)]",children:u}),e.jsx("div",{className:"mb-3 flex flex-col gap-1.5 text-[11px]",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"stage"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:o.stageName})]})}),e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:flex-wrap md:gap-3",children:[e.jsx("button",{onClick:async()=>{try{await f.post(`web/tasks/${x}/confirm-stage`,{json:{stageName:o.stageName,approved:!0,feedback:""}}),V()}catch{$.error(a("tasks.confirm_failed"))}},className:"flex-1 md:flex-none rounded-[4px] bg-[var(--accent)] px-4 py-2.5 md:py-2 text-[11px] font-bold text-[#0c0c0c]",children:y}),e.jsx("button",{onClick:async()=>{try{await f.post(`web/tasks/${x}/confirm-stage`,{json:{stageName:o.stageName,approved:!1,feedback:""}}),V()}catch{$.error(a("tasks.confirm_failed"))}},className:"flex-1 md:flex-none rounded-[4px] bg-[#1a1a1a] px-4 py-2.5 md:py-2 text-[11px] text-[var(--destructive)]",style:{border:"1px solid rgba(239,68,68,0.27)"},children:I})]})]})})(),e.jsxs("div",{className:"flex flex-col gap-3 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"status"}),e.jsx("span",{className:"font-bold text-[var(--warning)]",children:le})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"created"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Y(t.createdAt)})]})]})]}),e.jsx("div",{className:"hidden md:flex flex-wrap items-center gap-2 py-2",children:j.map((s,i)=>{const m=s.status==="failed",u=s.status==="completed",y=s.status==="running"&&t.status===k.SUSPENDED,I=m?"var(--destructive)":u?"var(--accent)":y?"var(--warning)":"#525252",_=m?"rgba(239,68,68,0.12)":u?"rgba(34,197,94,0.12)":y?"rgba(245,158,11,0.12)":"transparent";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"rounded-[4px] px-2.5 py-1 text-[11px]",style:{color:I,backgroundColor:_,fontWeight:y?700:400,border:y?`1px solid ${I}`:void 0},children:y?"confirm":`${s.name}${u?" ✓":m?" ✗":""}`}),i<j.length-1&&e.jsx("div",{className:"h-px w-6 bg-[var(--border)]"})]},s.name)})}),e.jsxs("div",{className:"hidden md:block min-h-[200px] flex-1 rounded-[4px] border border-[var(--border)] bg-[#0c0c0c] p-4",children:[e.jsx("p",{className:"mb-2 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.pty_output")}),e.jsxs("div",{className:"flex flex-col gap-1",children:[h.slice(-10).map((s,i)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-secondary)]",children:s},i)),h.length===0&&e.jsx("p",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_output")})]})]})]}),e.jsxs("div",{className:"hidden w-[280px] shrink-0 flex-col gap-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:flex",children:[e.jsx("span",{className:"text-[13px] font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"status"}),e.jsx("span",{className:"font-bold text-[var(--warning)]",children:le})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsx("span",{className:"text-xs font-bold text-[var(--accent)]",children:a("tasks.stage_timeline")}),e.jsx("div",{className:"flex flex-col gap-2",children:j.map(s=>{const i=s.status==="completed"?"var(--info)":s.status==="failed"?"var(--destructive)":s.status==="running"?"var(--warning)":"#525252",m=s.status==="failed"?"var(--destructive)":s.status==="running"?"var(--warning)":"#a3a3a3",u=s.status==="completed"?"completed":s.status==="running"?"suspended":s.status==="failed"?"failed":"pending";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"h-2 w-2 shrink-0 rounded-[4px]",style:{backgroundColor:i}}),e.jsxs("span",{className:"text-[11px]",style:{color:m,fontWeight:s.status==="running"?700:400},children:[s.name," ",u]})]},s.name)})}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsx("div",{className:"flex flex-col gap-1.5 text-[11px]",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"created"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Y(t.createdAt)})]})})]})]}),o&&e.jsx(gt,{isOpen:!!o,onClose:nt,taskId:x,stageName:o.stageName,timeoutSeconds:o.timeout,confirmType:o.confirmType,prompt:o.prompt,onSubmitted:V}),ke]}):e.jsxs("div",{className:"flex h-full flex-col overflow-hidden font-mono lowercase",children:[ot,e.jsxs("div",{className:"flex flex-wrap items-center gap-3 gap-y-1 border-b border-[var(--border)] bg-[var(--bg-primary)] px-4 py-2 shrink-0 md:hidden",children:[e.jsx(_e,{status:t.status,agentType:t.agentType}),g&&e.jsxs("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:["// time cost: ",g]}),e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t.projectKey}),t.workerName&&e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)]",children:t.workerName}),t.branch&&(K(p,t.branch)?e.jsx("a",{href:K(p,t.branch),target:"_blank",rel:"noopener noreferrer",className:"shrink-0 text-[11px] text-[var(--text-muted)] hover:text-[var(--info)] hover:underline truncate max-w-[80px] md:max-w-[120px] transition-colors",children:t.branch}):e.jsx("span",{className:"shrink-0 text-[11px] text-[var(--text-muted)] truncate max-w-[80px] md:max-w-[120px]",children:t.branch}))]}),ye,t.errorMessage&&e.jsxs("div",{className:"flex items-center gap-2 border-b px-6 py-2 text-xs shrink-0 bg-[var(--destructive)]/10 text-[var(--destructive)]",style:{borderColor:"rgba(239,68,68,0.2)"},children:["// error: ",t.errorMessage]}),w&&e.jsxs("div",{className:"flex items-center gap-2 border-b px-4 md:px-6 py-2 text-xs shrink-0 text-[var(--info)]",style:{backgroundColor:"color-mix(in srgb, var(--info) 8%, transparent)",borderColor:"color-mix(in srgb, var(--info) 20%, transparent)"},children:[e.jsx(fs,{className:"h-3.5 w-3.5 shrink-0"}),e.jsxs("span",{children:[a("tasks.queue_position_banner",{position:String(w.position),total:String(w.total)}),w.position>1?` — ${a("tasks.queue_ahead",{count:String(w.position-1)})}`:` — ${a("tasks.queue_next")}`]})]}),o&&e.jsx(gt,{isOpen:!!o,onClose:nt,taskId:x,stageName:o.stageName,timeoutSeconds:o.timeout,confirmType:o.confirmType,prompt:o.prompt,onSubmitted:V}),e.jsxs("div",{className:"flex min-h-0 flex-1 overflow-hidden",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[e.jsx("div",{className:"flex items-center border-b border-[var(--border)] shrink-0 overflow-x-auto no-scrollbar",children:["terminal","pipeline","logs","detail"].map(s=>e.jsx("button",{onClick:()=>he(s),className:`shrink-0 whitespace-nowrap px-4 py-2.5 text-xs transition-colors ${N===s?"border-b-2 border-[var(--accent)] text-[var(--accent)] font-medium":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:a(s==="terminal"?"tasks.terminal":s==="pipeline"?"tasks.pipeline_tab":s==="logs"?"tasks.logs":"tasks.detail_tab")},s))}),N==="terminal"&&e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-3 md:px-5 shrink-0",style:{height:36,backgroundColor:"#111111"},children:[e.jsx(Ct,{task:t,ptyStatus:Qe,displayAgentType:Q,t:a}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(St,{isFinished:b,takeoverState:ge,ptyRef:ae,t:a}),!b&&ge==="requesting"&&e.jsxs("span",{className:"flex items-center gap-1.5 px-2.5 h-10 md:h-8 text-[11px] text-[var(--warning)]",children:[e.jsx(It,{className:"h-3 w-3 animate-spin"}),a("tasks.requesting_takeover")]}),!b&&t.currentStage&&t.status==="SUSPENDED"&&e.jsxs("button",{onClick:async()=>{try{await f.post(`web/tasks/${x}/confirm-stage`,{json:{stageName:t.currentStage,approved:!1,feedback:""}}),V()}catch{$.error(a("tasks.confirm_failed"))}},className:"hidden md:flex items-center gap-1.5 rounded-[4px] bg-[var(--bg-card)] px-2.5 h-10 md:h-8 text-[11px] text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors",children:[e.jsx(us,{className:"h-3 w-3"}),a("tasks.skip_stage")]}),e.jsx("button",{onClick:()=>Ve(!0),className:"hidden md:flex items-center rounded-[4px] bg-[var(--bg-card)] px-2.5 h-10 md:h-8 text-[var(--text-muted)]",children:e.jsx(vs,{className:"h-3 w-3"})})]})]}),e.jsxs("div",{className:"border-b border-[var(--border)] px-4 py-2 shrink-0 md:hidden",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[t.currentStage&&e.jsxs("span",{className:"text-[11px] font-semibold text-[var(--accent)]",children:[a("tasks.stage"),": ",t.currentStage]}),e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["agent: ",Q]}),t.workerName&&e.jsxs("span",{className:"text-[11px] text-[var(--text-muted)]",children:["worker: ",t.workerName]})]}),e.jsx("div",{className:"overflow-x-auto no-scrollbar pr-4",style:{borderRadius:0},children:e.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[e.jsx("span",{className:"shrink-0 text-[11px] font-bold text-[var(--accent)]",children:a("tasks.stage_progress")}),j.map((s,i)=>{const m=s.status==="completed",u=s.status==="running",I=s.status==="failed"?"var(--destructive)":m||u?"var(--accent)":"#525252";return e.jsxs("div",{className:"flex items-center",children:[e.jsxs("span",{className:"shrink-0 text-[11px] leading-normal whitespace-nowrap",style:{color:I,fontWeight:u?600:400},children:[s.name,m?" ✓":u?" ...":""]}),i<j.length-1&&e.jsx("div",{className:"mx-1.5 h-px w-4 shrink-0",style:{backgroundColor:I}})]},s.name)})]})})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e.jsx(vt,{ref:ae,taskId:x,sessionId:t.currentSessionId??void 0,taskFinished:b,onStatusChange:Ye,onTakeoverChange:Ze})}),xt]}),N==="pipeline"&&e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsx("div",{className:"mb-4 md:mb-5 overflow-x-auto no-scrollbar",style:{borderRadius:0},children:e.jsx("div",{className:"flex items-center py-5",children:j.map((s,i)=>{const m=s.status==="completed",u=s.status==="running",_=s.status==="failed"?"var(--destructive)":m||u?"var(--accent)":"#525252";return e.jsxs("div",{className:"flex items-center",style:{flex:i<j.length-1?1:void 0},children:[e.jsxs("div",{className:"flex flex-col items-center gap-1.5",children:[e.jsxs("div",{className:"flex h-6 w-6 md:h-7 md:w-7 items-center justify-center rounded-full shrink-0",style:{backgroundColor:_},children:[m&&e.jsx("span",{className:"text-[11px] md:text-xs font-semibold text-[#0c0c0c]",children:"✓"}),u&&e.jsx("span",{className:"h-2 w-2 md:h-2.5 md:w-2.5 rounded-full bg-[#0c0c0c]"})]}),e.jsx("span",{className:"text-[11px] leading-normal font-medium whitespace-nowrap",style:{color:_},children:s.name})]}),i<j.length-1&&e.jsx("div",{className:"mx-1 md:mx-2 h-0.5 flex-1 min-w-3 rounded-full",style:{backgroundColor:i<(je>=0?je:0)?"var(--accent)":"#525252"}})]},s.name)})})}),t.currentStage&&e.jsxs("div",{className:"mb-4 md:mb-5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 text-xs leading-relaxed",children:[e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// stage: ",t.currentStage," (",je+1,"/",j.length,")"]}),t.startedAt&&e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// elapsed: ",Y(t.startedAt).replace(" ago","")]}),g&&e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// time cost: ",g]}),e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// retries: ",t.retryCount,"/2"]})]}),!t.currentStage&&g&&e.jsx("div",{className:"mb-4 md:mb-5 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 text-xs leading-relaxed",children:e.jsxs("p",{className:"text-[var(--text-secondary)]",children:["// time cost: ",g]})}),e.jsx("button",{onClick:()=>he("terminal"),className:"flex-1 min-h-[100px] rounded-[4px] border border-dashed border-[var(--border)] flex items-center justify-center gap-2 text-[11px] text-[var(--text-muted)] hover:border-[var(--accent)] hover:text-[var(--accent)] transition-colors",children:e.jsxs("span",{children:["// ",a("tasks.view_terminal")]})}),e.jsxs("div",{className:"mt-4 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 lg:hidden",children:[e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"mt-2 flex flex-col gap-1.5 text-[11px]",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"branch"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.branch??"-"})]}),ct]})]}),e.jsxs("div",{className:"flex flex-col gap-6 mt-4 lg:hidden",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.pipeline_stages")}),e.jsx(_t,{stages:j,runningBg:"bg-[var(--bg-input)]",py:"py-2"})]}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[11px] font-medium text-[var(--text-muted)]",children:a("tasks.activity_log")}),h.length>0?e.jsx("div",{className:"flex flex-col gap-1.5",children:h.slice(-12).map((s,i)=>e.jsx("p",{className:"text-[11px] leading-relaxed text-[var(--text-muted)]",children:s},i))}):e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.no_activity")})]})]})]}),N==="logs"&&e.jsxs("div",{className:"flex flex-1 flex-col gap-3 md:gap-5 overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)] md:hidden",children:a("tasks.task_logs")}),e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:gap-3",children:[e.jsx("div",{className:"flex items-center gap-1 overflow-x-auto no-scrollbar md:hidden",children:["","error","system"].map(s=>e.jsx("button",{onClick:()=>{Xe(s),q(0)},className:`shrink-0 rounded-[4px] px-2.5 py-1 text-[11px] ${X===s?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)]"}`,children:s||"all"},s))}),e.jsx("div",{className:"hidden md:block",children:e.jsx(bt,{value:X,onChange:s=>{Xe(s),q(0)},options:[{value:"",label:"all"},{value:"stage_change",label:"stage_change"},{value:"info",label:"info"},{value:"warning",label:"warning"},{value:"error",label:"error"},{value:"system",label:"system"}],className:"w-36"})}),e.jsxs("div",{className:"flex flex-1 items-center gap-2 rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] px-3 py-2",children:[e.jsx(ts,{className:"h-3.5 w-3.5 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:a("tasks.search_logs"),value:se,onChange:s=>{$t(s.target.value),q(0)},className:"flex-1 bg-transparent text-xs text-[var(--text-primary)] outline-none placeholder:text-[var(--text-muted)]"})]})]}),e.jsxs("div",{className:"flex flex-col gap-0.5",children:[We.map((s,i)=>e.jsxs("div",{className:`flex items-start md:items-center gap-2 md:gap-4 rounded-[4px] px-2 md:px-3 py-2 text-[11px] md:text-xs ${i%2===0?"bg-[var(--bg-card)]":""}`,children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:new Date(s.timestamp).toLocaleTimeString("en-US",{hour12:!1})}),e.jsx("span",{className:`shrink-0 font-medium ${Es(s.type)}`,children:s.type}),e.jsx("span",{className:"min-w-0 break-words md:truncate text-[var(--text-primary)]",children:s.message})]},s.id)),We.length===0&&!Mt&&e.jsx("p",{className:"py-8 text-center text-xs text-[var(--text-muted)]",children:a("tasks.no_log_entries")})]}),te>50&&e.jsxs("div",{className:"flex items-center justify-center gap-1",children:[Array.from({length:Math.ceil(te/50)}).slice(0,5).map((s,i)=>e.jsx("button",{onClick:()=>q(i),className:`rounded-[4px] px-2 py-1 text-xs ${J===i?"bg-[var(--accent)] text-black font-medium":"text-[var(--text-muted)] hover:text-[var(--text-primary)]"}`,children:i+1},i)),Math.ceil(te/50)>5&&e.jsx("button",{onClick:()=>q(J+1),disabled:J>=Math.ceil(te/50)-1,className:"rounded-[4px] px-2 py-1 text-xs text-[var(--text-muted)] disabled:opacity-30",children:">"})]})]}),N==="detail"&&e.jsxs("div",{className:"flex flex-1 flex-col gap-4 md:gap-5 overflow-y-auto p-4 md:p-6 lg:p-8",children:[e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(ss,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.detail_basic_info")})]}),e.jsxs("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:[e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_creator")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.creatorName??"-"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("common.created_at")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:cs(t.createdAt)}),e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:Y(t.createdAt)})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("common.status")}),e.jsx(_e,{status:t.status,agentType:t.agentType})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_project")}),e.jsx(ie,{to:`/projects/${t.projectKey}`,className:"text-xs text-[var(--info)] hover:underline transition-colors",children:t.projectKey})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_worker")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:Ne})]}),g&&e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_time_cost")}),e.jsx("span",{className:"text-xs text-[var(--text-primary)]",children:g})]}),t.branch&&e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_branch")}),K(p,t.branch)?e.jsx("a",{href:K(p,t.branch),target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--info)] hover:underline transition-colors truncate",children:t.branch}):e.jsx("span",{className:"text-xs text-[var(--text-primary)] truncate",children:t.branch})]}),t.mrUrl&&/^https?:\/\//.test(t.mrUrl)&&e.jsxs("div",{className:"flex flex-col gap-1 rounded-[4px] bg-[var(--bg-primary)] p-3",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.mr_link")}),e.jsx("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[var(--info)] hover:underline truncate",children:((mt=t.mrUrl.match(/!?\d+$/))==null?void 0:mt[0])??"view"})]})]})]}),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(ft,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.detail_task_name")})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[t.name&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_ai_name")}),e.jsx("span",{className:"text-sm font-medium text-[var(--text-primary)]",children:t.name})]}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_task_id")}),e.jsxs("span",{className:"text-xs text-[var(--text-secondary)]",children:["#",t.id]})]}),t.sourcePlatform&&e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-[11px] text-[var(--text-muted)]",children:a("tasks.detail_source")}),e.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:t.sourcePlatform})]})]})]}),t.taskMode==="plan"&&t.status===k.COMPLETED&&(()=>{let s="main";if(t.configSnapshot)try{const m=JSON.parse(t.configSnapshot);m.defaultBranch&&(s=m.defaultBranch)}catch{}const i=Ls(p,s);return i?e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(ft,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("plan.view_spec")})]}),e.jsxs("p",{className:"mb-2 text-xs text-[var(--text-muted)]",children:["the spec document was pushed to ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:s})," at ",e.jsx("span",{className:"text-[var(--text-secondary)]",children:"docs/specs/"})]}),e.jsxs("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1.5 rounded-[4px] border border-[var(--border)] px-3 py-1.5 text-xs text-[var(--info)] hover:underline transition-colors",children:[e.jsx(yt,{className:"h-3 w-3"}),a("plan.view_spec")]})]}):null})(),e.jsxs("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-4 md:p-5",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(as,{className:"h-3.5 w-3.5 text-[var(--accent)]"}),e.jsx("span",{className:"text-[11px] font-bold text-[var(--accent)]",children:a("tasks.detail_description")})]}),e.jsx("div",{className:"rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] p-4 overflow-x-auto",children:e.jsx("pre",{className:"whitespace-pre-wrap break-words text-xs leading-relaxed text-[var(--text-secondary)] font-mono",children:t.description})})]})]})]}),N==="terminal"&&Wt,N==="pipeline"&&e.jsxs("div",{className:"hidden w-[420px] shrink-0 flex-col gap-5 overflow-y-auto border-l border-[var(--border)] bg-[var(--bg-primary)] p-5 lg:flex",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.task_info")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-xs",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"project"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.projectKey})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"creator"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.creatorName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"worker"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:t.workerName??"-"})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("common.created_at")}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Y(t.createdAt)})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx("span",{className:"text-[var(--text-primary)]",children:Ne})]}),g&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:"time cost"}),e.jsx("span",{className:"text-[var(--text-primary)]",children:g})]}),ct]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.workspace_section")}),e.jsxs("div",{className:"flex flex-col gap-1.5 text-xs",children:[e.jsxs("div",{className:"flex min-w-0 justify-between",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:"branch"}),e.jsx("span",{className:"ml-4 min-w-0 truncate text-[var(--text-primary)]",children:t.branch??(B==null?void 0:B.branch)??"-"})]}),e.jsxs("div",{className:"flex min-w-0 justify-between",children:[e.jsx("span",{className:"shrink-0 text-[var(--text-muted)]",children:"worktree"}),e.jsx("span",{className:"ml-4 min-w-0 truncate text-[var(--text-primary)]",children:(B==null?void 0:B.path)??"-"})]}),t.mrUrl&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-[var(--text-muted)]",children:a("tasks.mr_link")}),e.jsx("a",{href:t.mrUrl,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-[var(--info)] hover:underline",children:((pt=t.mrUrl.match(/!?\d+$/))==null?void 0:pt[0])??"view"})]})]})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{ref:et,className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.cursor_tunnel_section")}),t.workerId?e.jsx(js,{taskId:x,taskFinished:b,compact:!0}):e.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.no_worker_assigned")})]}),e.jsx("div",{className:"h-px bg-[var(--border)]"}),e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("span",{className:"text-[13px] font-semibold text-[var(--accent)]",children:a("tasks.stage_timeline")}),e.jsx("div",{className:"flex flex-col gap-2 text-xs",children:j.map(s=>{const i=s.status==="completed"?"✓":s.status==="running"?"→":"·",m=s.status==="running"?"var(--accent)":s.status==="completed"?"var(--info)":s.status==="failed"?"var(--destructive)":"#525252",u=s.status==="completed"?"done":s.status==="running"?"running...":s.status==="failed"?"failed":"pending";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-semibold",style:{color:m},children:i}),e.jsx("span",{className:s.status==="running"?"font-medium":"",style:{color:m},children:s.name}),e.jsxs("span",{className:"text-[11px]",style:{color:"#525252"},children:["— ",u]})]},s.name)})})]})]})]}),ke]})}export{Ys as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{R as he,f as G,a as U,o as u,j as e,l as re,u as fe,i as ge,v as ae,r,h as D,X as ye,k as je,w as L,x as ke,H as Ne,t as Y,y as Ce,z as Z,m as we}from"./index-CqgRY3L6.js";import{u as ee}from"./task.store-BfdxbFUg.js";import{T as oe}from"./TaskStatusBadge-Ieecwysj.js";import{f as ne}from"./date-CmcdoD87.js";import{T as Se}from"./Tooltip-hO7lE45q.js";import{G as le}from"./git-fork-Tz0-ma48.js";import{S}from"./Select-PNbJCK1d.js";import{a as _e}from"./task-constants-DiU1z_dP.js";import{g as Te}from"./agent-type-options-DPcGCrTV.js";import{C as Ee}from"./copy-sq8YNzps.js";import{E as te}from"./EmptyState-B0pdsOsA.js";import{T as se}from"./Skeleton-C9OmZNVj.js";import{P as Pe}from"./plus-DSLmbw91.js";import{C as Fe}from"./chevron-left-B9OwsObK.js";import{C as Ae}from"./chevron-right-BDxmkY05.js";import"./status-colors-CpKIU449.js";import"./chevron-down-Byw_H7qa.js";const De=he.memo(function({task:s}){const d=G(),{t:c}=U(),x=(a,b)=>c(`common.${a}`,{n:b}),i=s.status===u.COMPLETED||s.status===u.FAILED||s.status===u.CANCELLED;return e.jsxs("tr",{onClick:()=>d(`/tasks/${s.id}`),className:"cursor-pointer border-b border-[var(--border-row)] transition-colors hover:bg-[var(--bg-input)]",children:[e.jsxs("td",{className:"w-16 py-3 pr-4 font-mono text-xs font-medium text-[var(--text-secondary)] text-right tabular-nums",children:["#",s.id]}),e.jsx("td",{className:"py-3 pr-4 text-sm text-[var(--text-primary)] preserve-case",children:e.jsx(Se,{content:s.description,children:re(s)})}),e.jsx("td",{className:"py-3 pr-4",children:e.jsx(oe,{status:s.status})}),e.jsx("td",{className:"py-3 pr-4 font-mono text-xs text-[var(--text-secondary)]",children:s.projectKey}),e.jsx("td",{className:"py-3 pr-4 font-mono text-xs text-[var(--text-secondary)]",children:s.developerName??s.creatorName??"-"}),e.jsx("td",{className:"py-3 pr-4 font-mono text-xs text-[var(--text-secondary)]",children:s.workerName??"—"}),e.jsx("td",{className:"py-3 font-mono text-xs text-[var(--text-muted)]",children:e.jsxs("span",{className:"flex items-center gap-2",children:[ne(s.createdAt,x),i&&e.jsx("button",{onClick:a=>{a.stopPropagation(),d(`/tasks/${s.id}?action=fork`)},className:"shrink-0 rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--accent)] hover:bg-[var(--bg-input)] transition-colors",title:c("tasks.fork_task"),children:e.jsx(le,{className:"h-3 w-3"})})]})})]})});function Ie({isOpen:n,onClose:s,projects:d,projectsLoading:c,onSubmit:x,isSubmitting:i}){const{t:a}=U();fe(o=>o.user);const b=ge();ae(n);const[p,M]=r.useState(""),[v,O]=r.useState(""),[g,B]=r.useState("feat"),[m,I]=r.useState(""),[C,_]=r.useState(""),[h,T]=r.useState(""),[y,E]=r.useState(""),[j,k]=r.useState(""),[P,K]=r.useState(""),[z,q]=r.useState([]),[$,w]=r.useState(""),N=d.find(o=>o.key===p),W=Te(o=>o,N==null?void 0:N.agentType);r.useEffect(()=>{if(!n||(M(""),O(""),B("feat"),I(""),_(""),T(""),E(""),k(""),K(""),w(""),!b))return;const o=new AbortController;return D.get("admin/developers",{searchParams:{status:"active"},signal:o.signal}).json().then(q).catch(()=>{}),()=>o.abort()},[n,b]);async function F(o){if(o.preventDefault(),w(""),!p||!v.trim()){w(a("tasks.project_and_description_required"));return}try{await x({projectKey:p,description:v.trim(),workerId:j||void 0,developerId:P?Number(P):void 0,taskType:g,branchSlug:C.trim()||void 0,agentType:m||void 0,targetBranch:h.trim()||void 0,issueRef:y.trim()||void 0})}catch(H){const R=H instanceof Error?H.message:a("tasks.failed_to_create_task");w(R)}}return n?e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 font-mono",style:{backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:e.jsxs("div",{className:"w-full max-w-[480px] rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",onClick:o=>o.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between border-b border-[var(--border)] px-6 py-4",children:[e.jsxs("h2",{className:"text-sm text-[var(--text-primary)]",children:["// ",a("tasks.new_task")]}),e.jsx("button",{onClick:s,className:"text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)]",children:e.jsx(ye,{className:"h-4 w-4"})})]}),e.jsxs("form",{onSubmit:F,className:"px-6 py-5",children:[e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.project")}),e.jsx(S,{value:p,onChange:M,options:d.map(o=>({value:o.key,label:o.name})),placeholder:a(c?"common.loading":"tasks.select_project"),disabled:c})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.task_type")}),e.jsx(S,{value:g,onChange:B,options:_e})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.form_agent_type")}),e.jsx(S,{value:m,onChange:I,options:W})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.task_description")}),e.jsx("textarea",{value:v,onChange:o=>O(o.target.value),placeholder:a("tasks.describe_task_placeholder"),rows:4,className:"w-full resize-none rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2.5 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.target_worker")}),e.jsx("input",{type:"text",value:j,onChange:o=>k(o.target.value),placeholder:a("tasks.any_able"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2.5 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.branch_slug")}),e.jsx("input",{type:"text",value:C,onChange:o=>_(o.target.value),placeholder:a("tasks.branch_slug_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2.5 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.target_branch")}),e.jsx("input",{type:"text",value:h,onChange:o=>T(o.target.value),placeholder:a("tasks.target_branch_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2.5 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"})]}),e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.issue_ref")}),e.jsx("input",{type:"text",value:y,onChange:o=>E(o.target.value),placeholder:a("tasks.issue_ref_placeholder"),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] px-3 py-2.5 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"})]}),b&&e.jsxs("div",{className:"flex flex-col gap-1.5",children:[e.jsx("label",{className:"text-xs text-[var(--text-muted)]",children:a("tasks.assign_developer")}),e.jsx(S,{value:P,onChange:K,options:z.map(o=>({value:String(o.id),label:o.name})),placeholder:a("tasks.select_developer")})]}),$&&e.jsx("div",{className:"rounded-[4px] bg-[#2a1515] border border-[var(--destructive)]/30 px-3 py-2 text-xs text-[var(--destructive)]",children:$})]}),e.jsxs("div",{className:"mt-6 flex items-center justify-end gap-3",children:[e.jsx("button",{type:"button",onClick:s,className:"rounded-[4px] border border-[var(--border)] bg-transparent px-4 py-2 text-xs text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]",children:a("common.cancel")}),e.jsx("button",{type:"submit",disabled:i||!p||!v.trim(),className:"rounded-[4px] bg-[var(--accent)] px-4 py-2 text-xs text-black transition-opacity hover:opacity-90 disabled:opacity-40",children:a(i?"common.creating":"tasks.create_task")})]})]})]})}):null}function Re({isOpen:n,onClose:s,onForceCreate:d,onViewExisting:c,similarTask:x,isLoading:i}){const{t:a}=U();return ae(n),!x||!n?null:e.jsx("div",{style:{position:"fixed",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--modal-backdrop, rgba(12,12,12,0.6))"},children:e.jsxs("div",{onClick:b=>b.stopPropagation(),style:{width:"100%",maxWidth:"480px",backgroundColor:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:"4px",padding:"1.5rem",fontFamily:"'JetBrains Mono', monospace"},children:[e.jsxs("div",{style:{marginBottom:"1.25rem"},children:[e.jsxs("div",{style:{color:"var(--accent)",fontSize:"0.875rem",fontWeight:600,display:"flex",alignItems:"center",gap:"0.5rem"},children:[e.jsx(Ee,{style:{width:"1rem",height:"1rem"}}),a("tasks.dedup_title")]}),e.jsx("div",{style:{color:"var(--text-muted)",fontSize:"0.7rem",marginTop:"0.25rem"},children:a("tasks.dedup_description")})]}),e.jsxs("div",{style:{marginBottom:"1.25rem",padding:"0.75rem",border:"1px solid var(--border)",borderRadius:"4px",backgroundColor:"var(--bg-primary)"},children:[e.jsxs("div",{style:{color:"var(--text-muted)",fontSize:"0.65rem",fontFamily:"'JetBrains Mono', monospace"},children:["#",x.id," · ",x.status]}),e.jsx("div",{style:{color:"var(--text-primary)",fontSize:"0.75rem",marginTop:"0.375rem",lineHeight:"1.5"},children:x.description})]}),e.jsxs("div",{style:{display:"flex",gap:"0.75rem"},children:[e.jsx("button",{type:"button",onClick:s,disabled:i,className:"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:border-[var(--text-muted)]",style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:i?"not-allowed":"pointer",opacity:i?.7:1,transition:"color 0.15s, border-color 0.15s"},children:a("common.cancel")}),e.jsx("button",{type:"button",onClick:()=>c(x.id),style:{flex:1,padding:"0.5rem",backgroundColor:"transparent",color:"var(--text-muted)",border:"1px solid var(--border)",borderRadius:"4px",fontSize:"0.75rem",fontFamily:"'JetBrains Mono', monospace",cursor:"pointer"},children:a("tasks.view_existing")}),e.jsx("button",{type:"button",onClick:d,disabled:i,style:{flex:1,padding:"0.5rem",backgroundColor:"var(--warning)",color:"#0C0C0C",border:"none",borderRadius:"4px",fontSize:"0.75rem",fontWeight:600,fontFamily:"'JetBrains Mono', monospace",cursor:i?"not-allowed":"pointer",opacity:i?.7:1},children:a(i?"common.creating":"tasks.dedup_create_anyway")})]})]})})}function Le({task:n}){const s=G(),d=n.status===u.COMPLETED||n.status===u.FAILED||n.status===u.CANCELLED;return e.jsxs("div",{onClick:()=>s(`/tasks/${n.id}`),className:"cursor-pointer rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)] p-3 transition-colors active:bg-[var(--bg-input)]",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("span",{className:"text-[11px] text-[var(--text-primary)] leading-tight line-clamp-2 preserve-case",title:we(n),children:["#",n.id," ",re(n)]}),e.jsxs("span",{className:"flex items-center gap-1.5 shrink-0",children:[d&&e.jsx("button",{onClick:c=>{c.stopPropagation(),s(`/tasks/${n.id}?action=fork`)},className:"rounded-[4px] p-1 text-[var(--text-muted)] hover:text-[var(--accent)] transition-colors",children:e.jsx(le,{className:"h-3 w-3"})}),e.jsx(oe,{status:n.status})]})]}),e.jsxs("div",{className:"mt-1.5 flex items-center gap-2 text-[11px] text-[var(--text-muted)]",children:[e.jsx("span",{children:ne(n.createdAt)}),e.jsx("span",{children:"·"}),e.jsx("span",{children:n.projectKey}),n.workerName&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:n.workerName})]})]})]})}const Me=[{key:"all",labelKey:"tasks.tab_all"},{key:u.RUNNING,labelKey:"tasks.tab_running"},{key:u.QUEUED,labelKey:"tasks.tab_queued"},{key:u.COMPLETED,labelKey:"tasks.tab_completed"},{key:u.FAILED,labelKey:"tasks.tab_failed"},{key:u.CANCELLED,labelKey:"tasks.tab_cancelled"}],Oe=20;function st(){const n=G(),{t:s}=U(),{tasks:d,loading:c,fetchTasks:x}=ee(),i=je(t=>t.taskSeq),[a,b]=r.useState("all"),[p,M]=r.useState(L.DEVELOP),[v,O]=r.useState(""),[g,B]=r.useState(""),[m,I]=r.useState(""),[C,_]=r.useState(void 0),[h,T]=r.useState([]),y=ee(t=>t.nextCursor),[E,j]=r.useState(!1);ke(r.useMemo(()=>e.jsxs("button",{onClick:()=>j(!0),className:"flex items-center gap-1.5 rounded-[4px] bg-[var(--accent)] px-3 py-1.5 text-xs font-mono text-black transition-opacity hover:opacity-90",children:[e.jsx(Pe,{className:"h-3.5 w-3.5"}),s("tasks.new_task")]}),[s]));const[k,P]=r.useState([]),[K,z]=r.useState(!1),[q,$]=r.useState([]),[w,N]=r.useState(!1),[W,F]=r.useState(!1),[o,H]=r.useState(null),[R,J]=r.useState(null),Q=r.useCallback(t=>{const l={limit:String(Oe)};return p&&(l.taskMode=p),a!=="all"&&(l.status=a),v&&(l.projectKey=v),g&&(l.developerId=g),t&&(l.cursor=t),l},[a,p,v,g]);r.useEffect(()=>{x(Q(C))},[Q,C,x,i]),r.useEffect(()=>{_(void 0),T([])},[a,p,v,g]),r.useEffect(()=>{let t=!1;return(async()=>{try{const[f,be]=await Promise.all([D.get("web/projects").json(),D.get("web/projects/-/developers").json()]);if(t)return;P(f),$(be)}catch{}})(),()=>{t=!0}},[]),r.useEffect(()=>{if(!E||k.length>0)return;z(!0);let t=!1;return(async()=>{try{const f=await D.get("web/projects").json();t||P(f)}catch{}finally{t||z(!1)}})(),()=>{t=!0}},[E,k.length]);const ce=r.useCallback(async t=>{N(!0);try{const l=await D.post("web/tasks",{json:{projectKey:t.projectKey,description:t.description,workerId:t.workerId,developerId:t.developerId,taskType:t.taskType,branchSlug:t.branchSlug,agentType:t.agentType,targetBranch:t.targetBranch,issueRef:t.issueRef}}).json();j(!1),n(`/tasks/${l.task.id}`)}catch(l){if(l instanceof Ne&&l.response.status===409){try{const f=await l.response.json();if(f.confirmRequired){H({id:f.confirmRequired.taskId,description:f.confirmRequired.message,status:"active"}),J(t),j(!1),F(!0);return}}catch{}Y.error(s("tasks.similar_task_exists"))}else{const f=l instanceof Error?l.message:String(l);Y.error(f)}}finally{N(!1)}},[n]),ie=r.useCallback(async()=>{if(R){N(!0);try{const t=await D.post("web/tasks",{json:{...R,force:!0}}).json();F(!1),J(null),n(`/tasks/${t.task.id}`)}finally{N(!1)}}},[R,n]),A=r.useMemo(()=>{if(!m.trim())return d;const t=m.toLowerCase();return d.filter(l=>(l.name??"").toLowerCase().includes(t)||l.description.toLowerCase().includes(t)||String(l.id).includes(m))},[d,m]),de=r.useCallback(()=>{y&&(T(t=>[...t,C??""]),_(y))},[y,C]),xe=r.useCallback(()=>{h.length!==0&&(_(h.at(-1)||void 0),T(t=>t.slice(0,-1)))},[h]),pe=h.length+1,me=r.useMemo(()=>[{value:"",label:s("tasks.filter_project")},...k.map(t=>({value:t.key,label:t.name}))],[k,s]),ue=r.useMemo(()=>[{value:"",label:s("tasks.filter_developer")},...q.map(t=>({value:String(t.id),label:t.name}))],[q,s]),ve=r.useMemo(()=>[{value:"",label:s("tasks.filter_mode")},{value:L.DEVELOP,label:s("tasks.mode_develop")},{value:L.PLAN,label:s("tasks.mode_plan")},{value:L.REVIEW,label:s("tasks.mode_review")},{value:L.AUTOMATION,label:s("tasks.mode_automation")}],[s]),V=s(m?"tasks.try_adjusting_search":"tasks.create_first_task"),X=m?void 0:e.jsx("button",{onClick:()=>j(!0),className:"rounded-[4px] bg-[var(--accent)] px-5 py-2 text-[11px] font-bold text-black",children:s("tasks.create_task")});return e.jsxs("div",{className:"mx-auto max-w-6xl px-2 py-4 md:px-4 md:py-6 font-mono",children:[e.jsxs("div",{className:"mb-4 flex flex-col gap-3 md:gap-4 md:flex-row md:items-center",children:[e.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1 md:pb-0 no-scrollbar pr-4 md:pr-0",children:Me.map(t=>e.jsx("button",{onClick:()=>b(t.key),className:`shrink-0 rounded-[4px] px-3 py-2 h-10 md:h-8 text-xs transition-colors ${a===t.key?"text-[var(--accent)] bg-[var(--bg-input)]":"text-[var(--text-muted)] bg-[var(--bg-card)] hover:text-[var(--text-secondary)]"}`,children:s(t.labelKey)},t.key))}),e.jsxs("div",{className:"flex flex-col gap-2 md:ml-auto md:flex-row md:items-center",children:[e.jsxs("div",{className:"relative md:w-52",children:[e.jsx(Ce,{className:"absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)]"}),e.jsx("input",{type:"text",placeholder:s("tasks.search_tasks"),value:m,onChange:t=>I(t.target.value),className:"w-full rounded-[4px] border border-[var(--border)] bg-[var(--bg-input)] py-1.5 pl-8 pr-3 text-xs text-[var(--text-primary)] placeholder:text-[var(--text-muted)] outline-none focus:border-[var(--accent)]"}),m&&e.jsx("button",{onClick:()=>I(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-[var(--text-muted)] hover:text-[var(--text-secondary)]",children:"x"})]}),e.jsx(S,{value:p,onChange:M,options:ve,className:"md:w-36"}),e.jsx(S,{value:v,onChange:O,options:me,className:"md:w-40"}),e.jsx(S,{value:g,onChange:B,options:ue,className:"md:w-40"})]})]}),e.jsx("div",{className:"hidden md:block rounded-[4px] border border-[var(--border)] bg-[var(--bg-card)]",children:e.jsxs("table",{className:"w-full text-left",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-[var(--border)] text-[11px] font-medium text-[#525252]",children:[e.jsx("th",{className:"w-16 px-4 py-2.5 text-right",children:s("tasks.id")}),e.jsx("th",{className:"px-4 py-2.5",children:s("tasks.description_col")}),e.jsx("th",{className:"px-4 py-2.5",children:s("tasks.status_col")}),e.jsx("th",{className:"px-4 py-2.5",children:s("tasks.project_col")}),e.jsx("th",{className:"px-4 py-2.5",children:s("tasks.assignee")}),e.jsx("th",{className:"px-4 py-2.5",children:s("tasks.worker")}),e.jsx("th",{className:"px-4 py-2.5",children:s("tasks.time")})]})}),e.jsxs("tbody",{children:[c&&A.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"p-4",children:e.jsx(se,{rows:5})})}),!c&&A.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:7,className:"p-4",children:e.jsx(te,{icon:Z,title:s("tasks.no_tasks_found"),description:V,action:X})})}),A.map(t=>e.jsx(De,{task:t},t.id))]})]})}),e.jsxs("div",{className:"flex flex-col gap-2 md:hidden",children:[c&&A.length===0&&e.jsx("div",{className:"p-4",children:e.jsx(se,{rows:5})}),!c&&A.length===0&&e.jsx(te,{icon:Z,title:s("tasks.no_tasks_found"),description:V,action:X}),A.map(t=>e.jsx(Le,{task:t},t.id))]}),(h.length>0||y)&&e.jsxs("div",{className:"mt-6 flex items-center justify-between",children:[e.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["// page ",pe]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:xe,disabled:h.length===0,className:"flex items-center justify-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[e.jsx(Fe,{className:"h-3.5 w-3.5"}),s("tasks.prev")]}),e.jsxs("button",{onClick:de,disabled:!y,className:"flex items-center justify-center gap-1 rounded-[4px] border border-[var(--border)] px-2.5 py-1 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] hover:border-[var(--accent)] disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:[s("common.next"),e.jsx(Ae,{className:"h-3.5 w-3.5"})]})]})]}),e.jsx(Ie,{isOpen:E,onClose:()=>j(!1),projects:k,projectsLoading:K,onSubmit:ce,isSubmitting:w}),e.jsx(Re,{isOpen:W,onClose:()=>{F(!1),J(null)},onForceCreate:ie,onViewExisting:t=>{F(!1),J(null),n(`/tasks/${t}`)},similarTask:o,isLoading:w})]})}export{st as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as m,r as e,j as t}from"./index-CqgRY3L6.js";var b=m();function g({content:n,children:a,delay:l=100,className:i}){const[p,c]=e.useState(!1),[u,f]=e.useState({top:0,left:0}),r=e.useRef(null),o=e.useRef(null),x=e.useCallback(()=>{r.current=setTimeout(()=>{if(o.current){const s=o.current.getBoundingClientRect();f({top:s.top-4,left:s.left+s.width/2})}c(!0)},l)},[l]),d=e.useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),c(!1)},[]);return n?t.jsxs(t.Fragment,{children:[t.jsx("span",{ref:o,onMouseEnter:x,onMouseLeave:d,className:i,children:a}),p&&b.createPortal(t.jsx("div",{role:"tooltip",style:{position:"fixed",top:u.top,left:u.left,transform:"translate(-50%, -100%)",zIndex:9999},className:"pointer-events-none max-w-sm rounded-[4px] bg-[var(--bg-card)] px-2.5 py-1.5 text-xs text-[var(--text-primary)] shadow-lg border border-[var(--border-row)] preserve-case",children:n}),document.body)]}):t.jsx(t.Fragment,{children:a})}export{g as T};
|