From 3bbbe7844185ba764d021e21290251e1e8abfebd Mon Sep 17 00:00:00 2001 From: Hamed Ahmadi <107760095+hamedtkd@users.noreply.github.com> Date: Tue, 10 Nov 2026 14:35:50 +0330 Subject: [PATCH 1/6] feat(manage): reuse rich Jira issue export with optional images --- docs/CAPABILITIES.md | 2 +- src/features/jira-manager/ManageJiraView.tsx | 9 ++++++-- src/features/jira-manager/manage-export.ts | 24 ++++++++++++++++++++ src/features/worklog/WorklogExportSheet.tsx | 14 +++++++----- tests/manage-jira-export.test.mjs | 18 +++++++++++++++ 5 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 src/features/jira-manager/manage-export.ts create mode 100644 tests/manage-jira-export.test.mjs diff --git a/docs/CAPABILITIES.md b/docs/CAPABILITIES.md index 28c25af..7c54a17 100644 --- a/docs/CAPABILITIES.md +++ b/docs/CAPABILITIES.md @@ -217,7 +217,7 @@ QueueMint includes a preview-first time logging workflow while keeping Jira work - The relevant-today filter requires evidence from today: an existing worklog, an update today, or completion today. In Progress by itself is not enough. At most eight issues are ranked. - Estimates never decide what the user worked on. After selection, they can either weight a chosen target duration or be used exactly through Estimate only mode, which uses Jira remaining estimate and does not stretch worklogs to the daily target. - Each issue row exposes status, assignee, sprint/backlog, estimate, time already logged today, and last update. -- Worklog context can be copied/downloaded as an AI-ready JSON package with selected/visible issue metadata, already-logged time, and the full per-issue Jira description. Images are opt-in, embedded as Base64 from Jira attachments only on explicit export, with 20-image, 1.5 MiB/image, and 10 MiB total caps; skipped images are reported in the JSON and UI. +- Manage Jira and Worklog both export selected/visible issues as AI-ready JSON with full Jira descriptions and optional Base64 screenshots. Worklog additionally includes already-logged time. Images are opt-in, embedded as Base64 from Jira attachments only on explicit export, with 20-image, 1.5 MiB/image, and 10 MiB total caps; skipped images are reported in the JSON and UI. - Worklog descriptions never submit blank: per-issue descriptions override the shared draft description, and otherwise QueueMint generates `Worked on ISSUE-KEY: issue summary` with a final issue-key-only fallback in the Jira writer. - AI-produced JSON can be pasted or uploaded and is converted into the same editable review table before any Jira write. - Optional OpenAI allocation uses only the explicit selected issue set plus the user's work note and disclosed context. diff --git a/src/features/jira-manager/ManageJiraView.tsx b/src/features/jira-manager/ManageJiraView.tsx index 1f75b1a..bfae24a 100644 --- a/src/features/jira-manager/ManageJiraView.tsx +++ b/src/features/jira-manager/ManageJiraView.tsx @@ -1,5 +1,5 @@ -import { type ChangeEvent } from "react" -import { ArrowUpDown, Bookmark, ChevronLeft, ChevronRight, CircleDot, Eye, History, Inbox, Layers3, Leaf, List, ListChecks, LoaderCircle, Play, RefreshCcw, TimerReset, Save, Search, SlidersHorizontal, SquareKanban, Trash2, UserCheck, UsersRound, XCircle } from "lucide-react" +import { useState, type ChangeEvent } from "react" +import { ArrowUpDown, Bookmark, ChevronLeft, ChevronRight, CircleDot, Eye, History, Download, Inbox, Layers3, Leaf, List, ListChecks, LoaderCircle, Play, RefreshCcw, TimerReset, Save, Search, SlidersHorizontal, SquareKanban, Trash2, UserCheck, UsersRound, XCircle } from "lucide-react" import { SimpleSelect, SprintVisual } from "@/components/jira-controls" import { Badge } from "@/components/ui/badge" import { Button } from "@/components/ui/button" @@ -12,12 +12,16 @@ import { LiveIssueCard, LiveIssueListRow } from "./LiveIssueViews" import { ManageFiltersPanel } from "./ManageFiltersPanel" import { ManageMutationConfirmDialog } from "./ManageMutationConfirmDialog" import { ManagePowerTools } from "./ManagePowerTools" +import { buildManageJiraAiPackage } from "./manage-export" +import { WorklogExportSheet } from "@/features/worklog/WorklogExportSheet" import type { ManageJiraScreenProps } from "./manage-types" import { useManageJiraModel } from "./useManageJiraModel" type ManageJiraViewProps = ManageJiraScreenProps & ReturnType export function ManageJiraView(args: ManageJiraViewProps) { + const [exportOpen, setExportOpen] = useState(false) + const [exportIssues, setExportIssues] = useState([]) const { t, locale, project, boards, selectedBoardId, boardLoading, onBoardChange, sprints, users, issues, selectedKeys, scope, setScope, search, setSearch, loading, message, onRefresh, onMove, onBulkEdit, onWorklog, onPreparePowerTool, savedActions, onUseSavedAction, onDeleteSavedAction, onDeleteView, onOpenIssue, historyCount, onHistory, onDelete, draggedKey, setDraggedKey, overLane, setOverLane, moveTarget, pendingMutation, setPendingMutation, view, setView, sort, setSort, filtersOpen, setFiltersOpen, saveViewOpen, setSaveViewOpen, saveViewName, setSaveViewName, typeFilter, setTypeFilter, priorityFilter, setPriorityFilter, statusFilter, setStatusFilter, assigneeFilter, setAssigneeFilter, sprintFilter, setSprintFilter, labelFilter, setLabelFilter, estimateFilter, setEstimateFilter, myIssuesOnly, setMyIssuesOnly, setPage, pageSize, setPageSize, currentUser, matchingSavedViews, createdIssues, activeFilterCount, visibleIssues, hasActiveFiltering, createdScopeCount, boardScopeCount, pageCount, safePage, pageIssues, groups, allPageSelected, allMatchingSelected, moveItems, toggle, requestMoveSelection, requestAssignToMe, confirmPendingMutation, clearFilters, applySavedView, saveCurrentView, selectPage, selectMatching, filterItems } = args return (
@@ -145,6 +149,7 @@ return ( {t.selected}