fix: history open session as tab for cross-project and Codex#730
fix: history open session as tab for cross-project and Codex#730pedramamini wants to merge 3 commits intomainfrom
Conversation
- Standardized multi-phase auto-run docs into one flat, dated subdirectory 📁 - Explicitly banned nested project/feature folder structures for phase outputs 🚫 - Improved guidance for clean lexicographic sorting with zero-padded phases 🔢 - Made it easier to add entire effort folders to auto-run at once ➕ - Clarified organization rules so related phase documents stay tightly grouped 🧭
…x session lookup (#251) Two fixes for "Open session as new tab" in History: 1. Thread projectPath from history entries through to handleResumeSession so sessions from different projects resolve correctly instead of always using activeSession.projectRoot. 2. Update Codex findSessionFile/findSessionFileRemote to also check metadata.payload.id, matching the newer Codex session format where the session ID lives in payload.id rather than the top-level id field.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThis PR addresses session-opening failures by threading project path context through history callbacks. Components now pass projectPath when resuming sessions, allowing resume logic to use the correct project root instead of always defaulting to the active session's root. Session storage also checks payload.id for Codex sessions. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes two independent bugs in the History panel's "open session as new tab" feature. Bug A threads Bug B updates Key changes:
Confidence Score: 4/5Safe to merge - both fixes are narrowly scoped, additive, and follow existing patterns without touching risky infrastructure. Both bug fixes are correct and well-tested. The only caveat is that the cross-project projectPath fix is partial: the session-pill button is fixed, but the HistoryDetailModal resume button still omits projectPath. This is a pre-existing gap rather than a regression introduced by this PR. src/renderer/components/HistoryPanel.tsx - the HistoryDetailModal onResumeSession callback does not forward projectPath, leaving the detail-modal cross-project resume path still broken. Important Files Changed
Sequence DiagramsequenceDiagram
participant H as HistoryEntryItem
participant HP as HistoryPanel
participant RP as RightPanel
participant URPP as useRightPanelProps
participant UASM as useAgentSessionManagement
participant IPC as window.maestro.agentSessions
H->>HP: onOpenSessionAsTab(agentSessionId, entry.projectPath)
HP->>RP: onOpenSessionAsTab(agentSessionId, projectPath)
RP->>URPP: onOpenSessionAsTab(agentSessionId, projectPath)
URPP->>UASM: handleResumeSession(agentSessionId, ..., projectPath)
UASM->>UASM: resolvedProjectRoot = projectPath or activeSession.projectRoot
UASM->>IPC: agentSessions.read(agentId, resolvedProjectRoot, agentSessionId, ...)
IPC-->>UASM: messages
UASM->>UASM: createTab with messages
Note over HP,RP: onResumeSession (detail modal path) still passes only agentSessionId
|
Summary
Closes #251
projectPathfrom history entries throughHistoryEntryItem→RightPanel→handleResumeSession, so sessions from different projects resolve correctly instead of always usingactiveSession.projectRoot. This fixes theAgentSessions read errorwhen opening sessions from a different project.findSessionFile()andfindSessionFileRemote()to also matchmetadata.payload?.idin addition tometadata.id, consistent with howparseSessionFile()already handles the newer Codex session format. This fixes empty tabs when resuming Codex sessions.Test plan
npm run lint)npm run lint:eslint)npm run test)Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Chores