swarm-tickets 2.0.2 → 2.0.3

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.
@@ -86,6 +86,9 @@ class JsonAdapter extends BaseAdapter {
86
86
  if (filters.status) {
87
87
  tickets = tickets.filter(t => t.status === filters.status);
88
88
  }
89
+ if (filters.excludeStatus) {
90
+ tickets = tickets.filter(t => t.status !== filters.excludeStatus);
91
+ }
89
92
  if (filters.priority) {
90
93
  tickets = tickets.filter(t => t.priority === filters.priority);
91
94
  }
@@ -223,6 +223,10 @@ class SqliteAdapter extends BaseAdapter {
223
223
  query += ' AND status = ?';
224
224
  params.push(filters.status);
225
225
  }
226
+ if (filters.excludeStatus) {
227
+ query += ' AND status != ?';
228
+ params.push(filters.excludeStatus);
229
+ }
226
230
  if (filters.priority) {
227
231
  query += ' AND priority = ?';
228
232
  params.push(filters.priority);
@@ -218,6 +218,9 @@ class SupabaseAdapter extends BaseAdapter {
218
218
  if (filters.status) {
219
219
  query = query.eq('status', filters.status);
220
220
  }
221
+ if (filters.excludeStatus) {
222
+ query = query.neq('status', filters.excludeStatus);
223
+ }
221
224
  if (filters.priority) {
222
225
  query = query.eq('priority', filters.priority);
223
226
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swarm-tickets",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Lightweight ticket tracking system for AI-powered bug fixing with Claude-flow/Claude Code. Supports JSON, SQLite, and Supabase storage.",
5
5
  "main": "ticket-server.js",
6
6
  "bin": {
package/ticket-server.js CHANGED
@@ -47,7 +47,7 @@ async function findAvailablePort(startPort) {
47
47
 
48
48
  // ==================== TICKET ENDPOINTS ====================
49
49
 
50
- // GET all tickets
50
+ // GET all tickets (excludes closed by default for performance)
51
51
  app.get('/api/tickets', async (req, res) => {
52
52
  try {
53
53
  const filters = {};
@@ -55,6 +55,12 @@ app.get('/api/tickets', async (req, res) => {
55
55
  if (req.query.priority) filters.priority = req.query.priority;
56
56
  if (req.query.route) filters.route = req.query.route;
57
57
 
58
+ // Exclude closed tickets by default (use ?include_closed=true to include them)
59
+ const includeClosed = req.query.include_closed === 'true';
60
+ if (!includeClosed && !filters.status) {
61
+ filters.excludeStatus = 'closed';
62
+ }
63
+
58
64
  const tickets = await storage.getAllTickets(filters);
59
65
  res.json(tickets);
60
66
  } catch (error) {
@@ -445,7 +445,6 @@
445
445
  <option value="open">Open</option>
446
446
  <option value="in-progress">In Progress</option>
447
447
  <option value="fixed">Fixed</option>
448
- <option value="closed">Closed</option>
449
448
  </select>
450
449
  </div>
451
450
 
@@ -464,7 +463,6 @@
464
463
  <option value="open">Open</option>
465
464
  <option value="in-progress">In Progress</option>
466
465
  <option value="fixed">Fixed</option>
467
- <option value="closed">Closed</option>
468
466
  </select>
469
467
  </div>
470
468
 
@@ -575,7 +573,6 @@
575
573
  <option value="open">Open</option>
576
574
  <option value="in-progress">In Progress</option>
577
575
  <option value="fixed">Fixed</option>
578
- <option value="closed">Closed</option>
579
576
  </select>
580
577
  </div>
581
578
  <div class="form-group">