Repository navigation
fix active tab - #139
fix active tab#139
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughRefactors next-tab selection logic and adds extensive tests: history-based selection, sibling/group navigation, top-level positional fallback, and cross-workspace edge cases. Group removal now uses findNextTab to pick a new active tab and prunes history entries when a child tab is deleted. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant UI as UI / Close Action
participant Finder as findNextTab
participant Hist as Tab History Stack
participant Group as Group Siblings
participant Top as Top-level Tabs
participant Work as Workspace Tabs
Note over Finder: Priority order (checked iteratively)
UI->>Finder: request next for closedTab in workspace
Finder->>Hist: check most-recent entries for valid tab
alt history hit
Hist-->>Finder: return recent valid tab
else no history hit
Finder->>Group: look for sibling (same parent)
alt sibling found
Group-->>Finder: return sibling
else no sibling
Finder->>Top: determine relative top-level position
alt next/prev top-level found
Top-->>Finder: return top-level tab
else fallback
Finder->>Work: pick first remaining workspace tab
Work-->>Finder: return fallback tab
end
end
end
Finder-->>UI: nextTabId (or undefined)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
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 |
* chore(deps): bump simple-git to 3.36.0 to patch GHSA-hffm-xvc3-vprc Closes Dependabot alerts #65 and #139 (RCE via --config option injection). Current call sites pass static option arrays, so exposure was theoretical, but bumping is defense-in-depth. * chore(deps): bump next 16.2.1 -> 16.2.6 across all apps 16.2.6 patches every flagged Next.js Dependabot CVE, including the proxy/middleware bypass advisories (GHSA-26hh-7cqf-hhc6, etc.) that matter most given web/admin/api enforce auth via proxy.ts. Patch-level bump, no breaking changes in the 16.2.x range.
Summary by CodeRabbit
Tests
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.