@@ -11,7 +11,7 @@ import { fileURLToPath } from "url";
1111import * as crypto from "node:crypto" ;
1212import { Client } from "pg" ;
1313import { startMcpServer } from "../lib/mcp-server" ;
14- import { fetchIssues , fetchIssueComments , createIssueComment , fetchIssue , createIssue , updateIssue , updateIssueComment , fetchActionItem , fetchActionItems , createActionItem , updateActionItem , type ConfigChange } from "../lib/issues" ;
14+ import { fetchIssues , fetchIssueComments , createIssueComment , fetchIssue , createIssue , updateIssue , updateIssueComment , fetchActionItem , fetchActionItems , createActionItem , updateActionItem , withVisibleHiddenFlag , type ConfigChange } from "../lib/issues" ;
1515import { fetchReports , fetchAllReports , fetchReportFiles , fetchReportFileData , renderMarkdownForTerminal , parseFlexibleDate } from "../lib/reports" ;
1616import {
1717 executeJoeCommand ,
@@ -4798,9 +4798,10 @@ withOrgOptions(issues.command("list"))
47984798 . option ( "--status <status>" , "filter by status: open, closed, or all (default: all)" )
47994799 . option ( "--limit <n>" , "max number of issues to return (default: 20)" , parseInt )
48004800 . option ( "--offset <n>" , "number of issues to skip (default: 0)" , parseInt )
4801+ . option ( "--hidden-only" , "list only hidden issues (PostgresAI staff)" )
48014802 . option ( "--debug" , "enable debug output" )
48024803 . option ( "--json" , "output raw JSON" )
4803- . action ( async ( opts : OrgOptions & { status ?: string ; limit ?: number ; offset ?: number ; debug ?: boolean ; json ?: boolean } ) => {
4804+ . action ( async ( opts : OrgOptions & { status ?: string ; limit ?: number ; offset ?: number ; hiddenOnly ?: boolean ; debug ?: boolean ; json ?: boolean } ) => {
48044805 const spinner = createTtySpinner ( process . stdout . isTTY ?? false , "Fetching issues..." ) ;
48054806 try {
48064807 const rootOpts = program . opts < CliOptions > ( ) ;
@@ -4839,16 +4840,22 @@ withOrgOptions(issues.command("list"))
48394840 status : statusFilter ,
48404841 limit : opts . limit ,
48414842 offset : opts . offset ,
4843+ hiddenOnly : ! ! opts . hiddenOnly ,
48424844 debug : ! ! opts . debug ,
48434845 } ) ;
48444846 spinner . stop ( ) ;
48454847 const trimmed = Array . isArray ( result )
4846- ? ( result as any [ ] ) . map ( ( r ) => ( {
4847- id : ( r as any ) . id ,
4848- title : ( r as any ) . title ,
4849- status : ( r as any ) . status ,
4850- created_at : ( r as any ) . created_at ,
4851- } ) )
4848+ ? ( result as any [ ] ) . map ( ( r ) =>
4849+ // Route through the same helper as `issues view` so the
4850+ // "render is_hidden only when true" rule lives in one place.
4851+ withVisibleHiddenFlag ( {
4852+ id : ( r as any ) . id ,
4853+ title : ( r as any ) . title ,
4854+ status : ( r as any ) . status ,
4855+ created_at : ( r as any ) . created_at ,
4856+ is_hidden : ( r as any ) . is_hidden ,
4857+ } )
4858+ )
48524859 : result ;
48534860 printResult ( trimmed , opts . json ) ;
48544861 } catch ( err ) {
@@ -4889,7 +4896,7 @@ withOrgOptions(issues.command("view <issueId>"))
48894896 spinner . update ( "Fetching comments..." ) ;
48904897 const comments = await fetchIssueComments ( { apiKey, apiBaseUrl, issueId, debug : ! ! opts . debug } ) ;
48914898 spinner . stop ( ) ;
4892- const combined = { issue, comments } ;
4899+ const combined = { issue : withVisibleHiddenFlag ( issue ) , comments } ;
48934900 printResult ( combined , opts . json ) ;
48944901 } catch ( err ) {
48954902 spinner . stop ( ) ;
0 commit comments