Excerpts from ChatGPT/Codex Desktop Linux deb chatgpt_26.818.21641_amd64.deb -> /usr/lib/chatgpt/resources/app.asar (https://persistent.oaistatic.com/codex-app-prod/linux/deb/pool/main/c/chatgpt/chatgpt_26.818.21641_amd64.deb) ======== isFullReconciliationDue in .vite/build/main-Cwjv9Ibf.js @ 2101161 isFullReconciliationDue(e){return!e.isComplete||e.lastFullReconciliationAt==null}};functio ======== requestStartupSync (only caller that can request a `full` scan) in .vite/build/main-Cwjv9Ibf.js @ 2088810 requestStartupSync(){return this.setSyncEnabled(!0),this.fullReconciliationDue=this.isFullReconciliationDue(this.store.readSyncState()),this.requestRun(this.fullReconciliationDue?`full`:`incremental`,this.fullReconciliationDue,!0).then(e=>(e===`backoff`&&this.scheduleColdFullSweepRetry(),e))}setSyncEnabled(e){if(!(this.disposed| ======== incremental catalog page source: listThreads({archived:false,...}) in .vite/build/main-Cwjv9Ibf.js @ 2112764 function d8(e,t,r){return{id:e,hostKind:t,listPage:async({cursor:t,limit:i},a)=>{let o=await r.listThreads({archived:!1,cursor:t,limit:i,parentThreadId:null,sortKey:`updated_at`,sortDirection:`desc`,sourceKinds:n.ki,useStateDbOnly:!0},{...a,source:`thread_catalog`});return{items:o.data.map(t=>({id:t.id,updatedAt:t.updatedAt,entry:zx(t,e)})),nextCursor:o.nextCursor,onAccepted:e=>e.observeThreads(o.data)}},readItem:asy ======== catalog coordinator handleNotification -> applyAuthoritativeRemoval on thread/archived in .vite/build/main-Cwjv9Ibf.js @ 2089905 handleNotification(e){if(this.disposed)return;let t=n.xn(e.params);if((e.method===`thread/archived`||e.method===`thread/deleted`)&&t!=null){this.pendingThreadRefreshes.delete(t),this.dirtyThreadRefreshes.delete(t),this.unresolvedImportedThreadIds.delete(t),this.reportedImportedThreadReadFailures.delete(t),this.publishMutation(this.store.applyAuthoritativeRemoval(t),[]);return}if(e.method===`thread/name/updated`&&t!=n ======== applyAuthoritativeRemoval: DELETE FROM local_thread_catalog in .vite/build/main-Cwjv9Ibf.js @ 669896 applyAuthoritativeRemoval(e){let t=this.runInTransaction(()=>{this.nextObservationSequence();let t=this.db.prepare(`DELETE FROM local_thread_catalog WHERE host_id = ? AND thread_id = ? RETURNING missing_candidate`).get(this.hostId,e)?.missing_candidate===0?[e]:[];return t.length>0&&this.bumpCatalogRevision(),{catalogRevision:this.readCatalogRevision(),changedThreadIds:[],removedThreadIds:t}});re ======== IPC broadcast version table (thread-archived => version 2) in .vite/build/src-PzwkD6WC.js @ 296660 e`,WEB:`web`},g_=`New tab`,__={"thread-stream-state-changed":11,"thread-stream-following-changed":1,"thread-stream-following-status-requested":1,"ipc-connection-reset":1,"thread-read-state-changed":2,"thread-archived":2,"thread-unarchived":1,"thread-owner-discovery":1,"thread-follower-start-turn":2,"thread-follower-load-complete-history":1,"thread-follower-compact-thread":1,"thread-follower-steer- ======== IpcClient.sendBroadcast wire shape in .vite/build/src-PzwkD6WC.js @ 1418003 async sendBroadcast(e,t,{targetClientIds:n}={}){if(!this.socket||!this.socket.writable)throw Error(`not-connected`);if(n?.length===0)return;let r=v_(e),i={type:`broadcast`,method:e,sourceClientId:this.clientId,targetClientIds:n,params:t,version:r},a=JSON.stringify(i),o=Buffer.byteLength(a,`utf8`);if(o>268435456){this.logger.warning(`[IPC] Dropping broadcast: payload too large`,{safe:{method:e,payloadBytes:o,maxIpcFrameBytes:qse},sensitive:{}});return}let s=g9(a);h9(this.socket,i,s)}addBroadcastHandler(e,t){return t ======== frame encoding: u32 LE length prefix + JSON in .vite/build/src-PzwkD6WC.js @ 1410653 function g9(e){let t=Buffer.byteLength(e,`utf8`),n=Buffer.alloc(4+t);return n.writeUInt32LE(t,0),n.write(e,4,`utf8`),n}function _9(e){return g9(JSON.stringify(e ======== IpcRouter.handleBroadcast: forwards to every registered client except sender in .vite/build/src-PzwkD6WC.js @ 1412286 handleBroadcast(e,t){let n=t.targetClientIds==null?null:new Set(t.targetClientIds),r=Array.from(this.clients.values()).filter(t=>t.socket!==e&&t.socket.writable&&(n==null||n.has(t.id)));if(r.length===0)return;let i=this.clients.get(e)?.id??t.sourceClientId,a={...t,sourceClientId:i};try{let e=_9(a);for(let t of r)h9(t.socket,a,e)}catch(e){let n=mv(e);this.logger.info(`[IPC] Dropping broadcast after send failure`,{safe:{method:t.method,recipientCount:r.length},sensitive:{error:n}})}}async handleRequest(e,t){if(t.meth ======== receiver drops broadcasts whose version != expected in .vite/build/src-PzwkD6WC.js @ 1428306 async function dce(e,t){if((e.version??0)===v_(e.method))switch(e.method){case`automation-capability-event`:await t.automationCapabilityEventReceived({sourceClientId:e.sourceClientId,params:e.params}) ======== webview archive flow: params {hostId, conversationId, cwd} in webview/assets/app-initial-DAkTNeXg.js @ 1302067 e.setThreadPinned({threadId:t,pinned:!1}),o!==void 0&&e.archivedPinnedThreadPlacements.set(a,{beforeThreadId:o,expiresAt:Date.now()+e.archiveUndoDurationMs})}catch{}e.removeConversationFromCache(t),e.broadcastThreadArchived({hostId:e.hostId,conversationId:t,cwd:n}).catch(n=>{e.logger.warning(`Failed to broadcast archived thread`,{safe:{conversationId:t},sensitive:{error:n}})}),s&&e.emitThreadArchived(t)}finally{e.archivingConversationIds.delete(t)}}functio ======== webview IPC receiver: invalidate search + evict (in-memory suppression) in webview/assets/app-initial-DAkTNeXg.js @ 1381581 handleThreadArchived(e){this.dispatchMessageToView({type:`invalidate-thread-search`,hostId:this.hostId}),this.conversationCacheEvictor.evictConversation(e,{reason:`archive-notification`})}async handle ======== evictConversation archive-notification => suppressArchivedConversation + removeThreadSummary in webview/assets/app-initial-DAkTNeXg.js @ 1107310 evictConversation(e,t){switch(t.reason){case`archive`:case`archive-notification`:this.params.clearPersistedUnreadState(e),this.params.threadStore.suppressArchivedConversation(e),t.reason===`archive-notification`&&this.params.emitThreadArchived(e),this.params.threadStore.removeThreadSummary(e);break;case`delete`:this.params.clear ======== suppressedArchivedConversationIds is an in-memory Set in webview/assets/app-initial-DAkTNeXg.js @ 1196215 suppressArchivedConversation(e){this.suppressedArchivedConversationIds.has(e)||(this.suppressedArchivedConversationIds.add(e),this.notifyAnyConversationCallbacks({forceAny:!0}))}unsuppressArchivedConversation(e){this.recordThreadAvailability(e),this.suppressedArchivedConversationIds.delete(e),this.notifyAnyConversationCallbacks(