diff --git a/src/App.tsx b/src/App.tsx index 8f214a6..5720e3e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -770,7 +770,20 @@ export default function App() { } contextFetchingRef.current = true; try { - setContextSessions(await getPaneContext(Array.from(distros))); + const sessions = await getPaneContext(Array.from(distros)); + // TEMP diagnostic — remove once the context bar is confirmed working. + console.log( + "[ctx] distros", + [...distros], + "→", + sessions.length, + "sessions:", + sessions.map( + (s) => + `${s.cwd} | ${s.contextTokens}tok | ${Math.round((Date.now() - s.lastActiveMs) / 1000)}s ago`, + ), + ); + setContextSessions(sessions); } catch (e) { console.warn("getPaneContext failed:", e); } finally { diff --git a/src/lib/layout/LeafPane.tsx b/src/lib/layout/LeafPane.tsx index 0cef00a..010ae3e 100644 --- a/src/lib/layout/LeafPane.tsx +++ b/src/lib/layout/LeafPane.tsx @@ -190,7 +190,13 @@ export default function LeafPane({ leaf }: { leaf: LeafNode }) { // which is the (often unset) spawn cwd and doesn't follow `cd`. const [liveCwd, setLiveCwd] = useState(null); const onPaneCwd = useCallback( - (cwd: string) => setLiveCwd((cur) => (cur === cwd ? cur : cwd)), + (cwd: string) => + setLiveCwd((cur) => { + if (cur === cwd) return cur; + // TEMP diagnostic — remove once the context bar is confirmed working. + console.log("[ctx] pane reported cwd via OSC7:", cwd); + return cwd; + }), [], );