{"record":{"id":"2730c8605a76e95d","repo":"jackwener/OpenCLI","slug":"gemini-read-no-gemini-conversation-links-were-v","errorCode":null,"errorMessage":"'gemini read','No Gemini conversation links were visible in the sidebar. Open the sidebar and confirm at least one chat is listed under Recents.'","messagePattern":"'gemini read','No Gemini conversation links were visible in the sidebar\\. Open the sidebar and confirm at least one chat is listed under Recents\\.'","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"error","filePath":"clis/gemini/history.js","lineNumber":50,"sourceCode":"    description: 'List visible Gemini web conversation history from the sidebar',\n    domain: GEMINI_DOMAIN,\n    strategy: Strategy.COOKIE,\n    browser: true,\n    siteSession: 'persistent',\n    navigateBefore: false,\n    args: [\n        { name: 'limit', type: 'int', default: 20, help: 'Max conversations to show' },\n    ],\n    columns: ['Index', 'Id', 'Title', 'Url'],\n    func: async (page, kwargs) => {\n        const rawLimit = Number(kwargs?.limit ?? 20);\n        if (!Number.isInteger(rawLimit) || rawLimit < 1 || rawLimit > 200) {\n            throw new ArgumentError('limit', 'must be a positive integer ≤ 200');\n        }\n        await ensureGeminiPage(page);\n        const conversations = await getGeminiConversationList(page);\n        if (!conversations.length) {\n            throw new EmptyResultError(\n                'gemini history',\n                'No Gemini conversation links were visible in the sidebar. Open the sidebar and confirm at least one chat is listed under Recents.',\n            );\n        }\n        // The sidebar mixes a \"New chat\" affordance (URL = /app, no id) into\n        // the same link list; drop entries that don't resolve to a real\n        // conversation id so callers get a clean conversation list.\n        const rows = conversations\n            .map((row) => ({ id: extractGeminiId(row.Url), title: row.Title || '', url: row.Url || '' }))\n            .filter((row) => row.id);\n        return rows.slice(0, rawLimit).map((row, idx) => ({\n            Index: idx + 1,\n            Id: row.id,\n            Title: row.title,\n            Url: row.url,\n        }));\n    },\n});","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/gemini/history.js#L32-L68","documentation":"After validating limit, gemini history reads the sidebar conversation list; if it is empty the command throws EmptyResultError stating no conversation links were visible and suggesting the sidebar/Recents be checked. The library throws instead of returning an empty table so a UI render problem is not mistaken for 'no history'.","triggerScenarios":"Calling `opencli gemini history` when the Gemini sidebar shows no chats: brand-new account with zero conversations, sidebar collapsed/not loaded in time, signed-out state, or a Gemini UI change hiding Recents at scrape time.","commonSituations":"Freshly created Google account; incognito browser profile without prior chats; slow page load where Recents render after the extraction; temporary Gemini outage or A/B UI variant.","solutions":["Open Gemini in the browser and confirm at least one chat appears under Recents, then retry","Start a first conversation in Gemini so the sidebar has an entry, then run history again","Re-authenticate if the page is not signed in (ensureGeminiPage should surface this, but verify)","Retry after a short wait if the sidebar was still loading"],"exampleFix":"// before\nopencli gemini history   // fresh account, sidebar empty\n// after\n# create at least one Gemini chat first, then:\nopencli gemini history","handlingStrategy":"try-catch","validationCode":"const convos = await run(['gemini','history','--limit','1']);\nif (!convos.length) console.warn('No sidebar chats visible; create a Gemini conversation first');","typeGuard":"function hasConversations(list){ return Array.isArray(list) && list.length > 0; }","tryCatchPattern":"try {\n  return await run(['gemini','history']);\n} catch (e) {\n  if (String(e.message).includes('No Gemini conversation links were visible')) {\n    console.error('Sidebar empty: sign in and/or create at least one Gemini chat, then retry.');\n    return [];\n  }\n  throw e;\n}","preventionTips":["Ensure the account has at least one prior Gemini conversation","Verify sign-in state before scraping history","Retry after a short wait if the sidebar was still loading"],"tags":["empty-result","sidebar","cli","session"],"backgroundTag":"conversation-not-found","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}