{"record":{"id":"09412a3b2117452a","repo":"jackwener/OpenCLI","slug":"no-items-in-tab-tablabel","errorCode":null,"errorMessage":"No items in tab '${tabLabel}'.","messagePattern":"No items in tab '(.+?)'\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/trae-solo/automation.js","lineNumber":93,"sourceCode":"        const t = (el.innerText || '').replace(/\\\\s+/g, ' ').trim();\n        if (!t || t.length < 3 || seen.has(t)) continue;\n        // Filter UI chrome (tabs / heading / 'Create manually' / etc.)\n        if (/^(Configured|Run History|Task Template|Create manually|Create in chat|Automation|Create from a template)$/.test(t)) continue;\n        seen.add(t);\n        const lines = t.split('\\\\n');\n        out.push({ title: lines[0].slice(0, 60), summary: (lines.slice(1).join(' ') || '').slice(0, 120) });\n      }\n      // If nothing matched, fall back to a quick text dump of the main panel.\n      if (!out.length) {\n        const fallback = (main.innerText || '').trim();\n        if (fallback) out.push({ title: '(empty)', summary: fallback.slice(0, 300) });\n      }\n      return out;\n    })()`);\n        const limit = Number.isInteger(kwargs.limit) && kwargs.limit > 0 ? kwargs.limit : 50;\n        const rows = (items || []).slice(0, limit);\n        if (!rows.length) {\n            throw new EmptyResultError('trae-solo automation-list', `No items in tab '${tabLabel}'.`);\n        }\n        return rows.map((r, i) => ({ Index: i + 1, Title: r.title, Summary: r.summary }));\n    },\n});\n","sourceCodeStart":75,"sourceCodeEnd":98,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/trae-solo/automation.js#L75-L98","documentation":"After switching to the requested automation tab and scraping rows from the page, the command throws EmptyResultError when zero items are found (after applying the limit slice). The library treats 'no rows' as an error so callers can distinguish an empty tab from a successful listing.","triggerScenarios":"Listing automation tasks in a tab that genuinely has no entries, or where the page's DOM containers (.task-list-base-content / main) rendered nothing recognizable as rows.","commonSituations":"New Trae SOLO install with no configured/run-history/task-template entries; wrong tab chosen (e.g. run-history before ever running a task); UI language or version change broke the DOM selectors so rows are invisible to the scraper; list not yet loaded when scraping ran.","solutions":["Verify the tab actually has items by opening Trae SOLO and looking at it manually","Switch to a different tab (e.g. 'configured') that you know has entries","Ensure the Trae SOLO window is fully loaded/on the automation view before listing","If items are visible but the scrape returns nothing, the DOM selectors may be stale — update the library or file an issue"],"exampleFix":"// before\nconst items = await traeSoloCli.automationList({ tab: 'run-history' }); // throws when empty\n// after\nlet items;\ntry {\n  items = await traeSoloCli.automationList({ tab: 'run-history' });\n} catch (e) {\n  if (e.name === 'EmptyResultError') items = [];\n  else throw e;\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  rows = await traeSoloCli.automationList({ tab });\n} catch (e) {\n  if (e instanceof EmptyResultError) rows = [];\n  else throw e;\n}","preventionTips":["Treat EmptyResultError as 'no data', not a crash — handle it explicitly","Confirm the tab has content in the Trae SOLO UI when results should exist","Keep the Trae SOLO window loaded/on-screen before scraping","If visible items return empty results, suspect stale DOM selectors and update the library"],"tags":["empty-result","ui-automation","trae-solo"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}