{"record":{"id":"0af780244c67029b","repo":"jackwener/OpenCLI","slug":"view-all-button-not-visible","errorCode":null,"errorMessage":"View all button not visible","messagePattern":"View all button not visible","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/qoder/ui.js","lineNumber":217,"sourceCode":"            { Field: 'Info', Value: info || '(no popover detected after click)' },\n        ];\n    },\n});\n\n// -------- view-all --------\ncli({\n    site: 'qoder',\n    name: 'view-all',\n    access: 'write',\n    description: 'Click \"View all\" to show all Quests.',\n    domain: 'localhost',\n    strategy: Strategy.UI,\n    browser: true,\n    args: [],\n    columns: ['Status'],\n    func: async (page) => {\n        const res = await evaluateQoder(page, clickByTextScript(['View all']));\n        if (!res?.ok) throw new CommandExecutionError(res?.reason || 'View all button not visible', '');\n        return [{ Status: 'clicked' }];\n    },\n});\n\n// -------- add-workspace --------\ncli({\n    site: 'qoder',\n    name: 'add-workspace',\n    access: 'write',\n    description: 'Click \"Add Workspace\" — opens the folder picker. Note: this opens a system file-picker dialog that Qoder controls; the actual folder selection must be done in the UI by the user.',\n    domain: 'localhost',\n    strategy: Strategy.UI,\n    browser: true,\n    args: [],\n    columns: ['Status'],\n    func: async (page) => {\n        const res = await evaluateQoder(page, clickByTextScript(['Add Workspace']));\n        if (!res?.ok) throw new CommandExecutionError(res?.reason || 'Add Workspace button not found', '');","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/qoder/ui.js#L199-L235","documentation":"The Qoder 'view-all' (credits detail) UI command clicks a visible element containing the text 'View all'. When clickByTextScript returns {ok:false} — no visible button/tab/anchor matches — the command throws CommandExecutionError('View all button not visible'). This means the credits-detail 'View all' control was not present when the script ran.","triggerScenarios":"Running 'view-all' without first opening the Credits Usage popover (precondition of the flow), the popover closed before the click, Qoder renamed the button, or the 'View all' text is rendered in an element type clickByTextScript does not consider.","commonSituations":"Calling view-all standalone instead of after the credits command; popover auto-dismissed (click outside, Escape) between steps; localized UI where the label is not literally 'View all'; Qoder update changed wording to 'See all' or an icon.","solutions":["Run the 'credits' command first so the Credits Usage popover is open, then run view-all immediately.","Reduce the delay between opening the popover and clicking (or add a wait ensuring the popover is still visible).","Add alternate text patterns ('See all', 'View All') to the clickByTextScript call if the label differs.","Check for a localized UI; match the exact rendered label via CDP DevTools.","Re-run if a transient focus change dismissed the popover."],"exampleFix":"// before\nclickByTextScript(['View all'])\n// after: tolerate label variants\nclickByTextScript(['View all', 'View All', 'See all'])","handlingStrategy":"validation","validationCode":"async function viewAllVisible(page) {\n  const probe = await page.evaluate(`(() => {\n    const el = Array.from(document.querySelectorAll('button, [role=\"button\"], a'))\n      .find(b => (b.innerText||'').trim().toLowerCase() === 'view all');\n    return !!el && el.getBoundingClientRect().width > 0;\n  })()`);\n  if (probe !== true) throw new Error('Open the Credits Usage popover first (run qoder credits).');\n}","typeGuard":"function isClickResult(res) {\n  return res !== null && typeof res === 'object' && typeof res.ok === 'boolean';\n}","tryCatchPattern":"try {\n  await cli.run(['qoder', 'credits']);\n  await cli.run(['qoder', 'view-all']);   // immediately after credits\n} catch (e) {\n  if (String(e.message).includes('View all button not visible')) {\n    console.error('Popover closed early — run credits then view-all without delay.');\n  } else throw e;\n}","preventionTips":["Always run view-all as part of the credits flow, never standalone","Minimize delay between opening the popover and clicking","Avoid clicking elsewhere or pressing Escape while the popover is open","Account for localized UI labels in non-English environments"],"tags":["ui-automation","electron","cdp","selector-not-found"],"backgroundTag":"ui-element-not-found","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}