Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat(jira): add copy-pasteable status summary to JIRA reports

Adam Eivy983dd0762eea
diff --git a/client/src/pages/JiraReports.jsx b/client/src/pages/JiraReports.jsx
index 23a1b663c4..06ad6bb7aa 100644
--- a/client/src/pages/JiraReports.jsx
+++ b/client/src/pages/JiraReports.jsx
@@ -11,7 +11,9 @@ import {
CheckCircle,
Clock,
AlertCircle,
- Loader2
+ Loader2,
+ Copy,
+ Check
} from 'lucide-react';
import * as api from '../services/api';
@@ -119,6 +121,78 @@ function ReportCard({ report, onClick, isSelected }) {
);
}
+function StatusSummary({ report }) {
+ const [copied, setCopied] = useState(false);
+
+ // Build status text from report data (handles both new reports with statusSummary and older ones without)
+ const statusText = report.statusSummary || buildStatusText(report);
+
+ const handleCopy = async () => {
+ // Copy as plain text (strip markdown bold markers)
+ const plain = statusText.replace(/\*\*/g, '');
+ await navigator.clipboard.writeText(plain);
+ setCopied(true);
+ setTimeout(() => setCopied(false), 2000);
+ };
+
+ if (!statusText.trim()) return null;
+
+ return (
+ <div className="bg-port-card border border-port-border rounded-lg p-4">
+ <div className="flex items-center justify-between mb-2">
+ <h4 className="text-sm font-medium text-gray-300">Status Summary</h4>
+ <button
+ onClick={handleCopy}
+ className="flex items-center gap-1 text-xs text-gray-400 hover:text-white px-2 py-1 rounded hover:bg-port-border/50 transition-colors"
+ >
+ {copied ? <Check size={12} className="text-port-success" /> : <Copy size={12} />}
+ {copied ? 'Copied' : 'Copy'}
+ </button>
+ </div>
+ <div className="text-sm text-gray-300 whitespace-pre-wrap font-mono leading-relaxed">
+ {statusText.split('\n').map((line, i) => {
+ if (line.startsWith('**') && line.endsWith('**')) {
+ return <div key={i} className="text-white font-semibold mt-2 first:mt-0">{line.replace(/\*\*/g, '')}</div>;
+ }
+ if (line.startsWith('- ')) {
+ const ticketMatch = line.match(/^- ([A-Z]+-\d+): (.+)/);
+ if (ticketMatch) {
+ return (
+ <div key={i} className="ml-2">
+ <span className="text-port-accent">{ticketMatch[1]}</span>
+ <span className="text-gray-400">: {ticketMatch[2]}</span>
+ </div>
+ );
+ }
+ return <div key={i} className="ml-2 text-gray-400">{line.slice(2)}</div>;
+ }
+ return line ? <div key={i}>{line}</div> : <div key={i} className="h-1" />;
+ })}
+ </div>
+ </div>
+ );
+}
+
+function buildStatusText(report) {
+ const lines = [];
+ const { tickets } = report;
+ if (tickets.recentlyCompleted?.length > 0) {
+ lines.push('**Completed (last 7 days):**');
+ for (const t of tickets.recentlyCompleted) lines.push(`- ${t.key}: ${t.summary}`);
+ }
+ if (tickets.inProgress?.length > 0) {
+ lines.push('', '**In Progress:**');
+ for (const t of tickets.inProgress) lines.push(`- ${t.key}: ${t.summary} (${t.assignee})`);
+ }
+ if (tickets.todo?.length > 0) {
+ lines.push('', '**Up Next:**');
+ const shown = tickets.todo.slice(0, 10);
+ for (const t of shown) lines.push(`- ${t.key}: ${t.summary}`);
+ if (tickets.todo.length > 10) lines.push(`- ...and ${tickets.todo.length - 10} more`);
+ }
+ return lines.join('\n');
+}
+
function ReportDetail({ report }) {
if (!report) {
return (
@@ -141,6 +215,8 @@ function ReportDetail({ report }) {
</div>
</div>
+ <StatusSummary report={report} />
+
<div className="grid grid-cols-2 sm:grid-cols-4 gap-2">
<StatCard icon={BarChart3} label="Total Tickets" value={summary.totalTickets} />
<StatCard icon={CheckCircle} label="Done" value={summary.done} color="text-port-success" sub={`${summary.completedPoints} pts`} />
diff --git a/server/services/jiraReports.js b/server/services/jiraReports.js
index 92aec02b07..25536dbf07 100644
--- a/server/services/jiraReports.js
+++ b/server/services/jiraReports.js
@@ -120,6 +120,39 @@ export async function generateReport(appId, app) {
byPriority[priority]++;
}
+ // Build plain-text status summary for status calls/emails
+ const statusLines = [];
+ if (recentlyCompleted.length > 0) {
+ statusLines.push('**Completed (last 7 days):**');
+ for (const t of recentlyCompleted) {
+ statusLines.push(`- ${t.key}: ${t.summary}`);
+ }
+ }
+ if (inProgress.length > 0) {
+ statusLines.push('', '**In Progress:**');
+ for (const t of inProgress) {
+ statusLines.push(`- ${t.key}: ${t.summary} (${t.assignee})`);
+ }
+ }
+ const blocked = sprintTickets.filter(t =>
+ t.status?.toLowerCase().includes('block') ||
+ t.priority === 'Highest' && t.statusCategory === 'To Do'
+ );
+ if (blocked.length > 0) {
+ statusLines.push('', '**Blocked / Needs Attention:**');
+ for (const t of blocked) {
+ statusLines.push(`- ${t.key}: ${t.summary} [${t.status}]`);
+ }
+ }
+ if (todo.length > 0) {
+ statusLines.push('', '**Up Next:**');
+ for (const t of todo.slice(0, 10)) {
+ statusLines.push(`- ${t.key}: ${t.summary}`);
+ }
+ if (todo.length > 10) statusLines.push(`- ...and ${todo.length - 10} more`);
+ }
+ const statusSummary = statusLines.join('\n');
+
const report = {
appId,
appName: app.name,
@@ -127,6 +160,7 @@ export async function generateReport(appId, app) {
instanceId: jiraConfig.instanceId,
generatedAt: new Date().toISOString(),
date: new Date().toISOString().split('T')[0],
+ statusSummary,
summary: {
totalTickets: sprintTickets.length,
todo: todo.length,