Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
| const reviewedAssistantTerminal = activeAssistantReview ? harness.state?.sessions.find((session) => | ||
| session.id === activeAssistantReview.entry.harnessSessionId && session.cwd === activeAssistantReview.entry.cwd) : undefined; | ||
| const reviewedTerminalSummary = activeAssistantReview ? harness.history.find((summary) => | ||
| summary.harnessSessionId === activeAssistantReview.entry.harnessSessionId && summary.cwd === activeAssistantReview.entry.cwd) : undefined; |
There was a problem hiding this comment.
🟡 Aliased workspaces split mixed history
For symlinked workspaces, reviewedAssistantTerminal rejects the Terminal belonging to the reviewed Assistant. AssistantHistory.list returns realpath paths, while sessions retain their launch spelling. The mixed row loses its Terminal action and appears as separate history.
Learn more
Assistant history canonicalizes every requested and returned cwd with realpath. Terminal sessions retain the path normalized by path.resolve, which does not resolve symlinks. The new exact string comparisons therefore treat two spellings of the same directory as different scopes across both the rail and review pane.
Example: A session starts in /work/current, where current is a symlink to /repos/acme. Its Terminal session keeps /work/current, but its Assistant entry uses /repos/acme. Opening that Assistant shows no Terminal action, and history displays two rows instead of one mixed row.
Recommended fix: Give both history sources the same server-issued canonical cwd before comparing them. Apply the same identity rule in reviewedAssistantTerminal, reviewedTerminalSummary, assistantByStudio, and the row-level Terminal lookup; browser-only lexical normalization cannot resolve symlinks.
Was this helpful? React with 👍 or 👎 to provide feedback.
Primary change type
Problem and motivation
A successful refresh in one workspace could hide another workspace's Assistant history error, while an older batch could overwrite newer history. Grouped Assistant rows could also lose a Terminal-only transcript or let an older Assistant reveal override an explicit Terminal selection.
Summary and scope
Track Assistant history errors and published request revisions per cwd within the existing authority partition. Group records by exact Studio and cwd, retain access to Terminal-only transcripts, and order explicit Terminal focus above prior Assistant reveals. Keep dormant Terminal state distinct from confirmed Studio End.
Related work
Related issue: https://linear.app/sapiom/issue/SAP-3292
Depends on #1039. Native stack target: main.
Validation
86/86 history, End, Continue and Terminal browser cases plus 13/13 focused chat cases passed. Three deliberate ordering/error/focus regressions were detected and restored, followed by the clean suites. The screenshot-only directory case rerun passed. Frontend TypeScript, scoped formatting, explicit browser ESLint (zero errors; five existing unused warnings) and git diff --check passed. Fresh root build and lint passed; combined remaining tests and actual native/browser verification follow.
Tests and documentation
Added seven workspace ordering, mixed transcript, exact-cwd, focus and dormant Canvas regressions. Captured and inspected directory error/recovery, mixed history and Retry Resume images. Updated assistant-history.md. Increment: 398 changed lines including tests/docs/changeset; SDK pr:size is absent.
Compatibility and release impact
Security
AI assistance
Checklist
Disposable browser fixture action states; these are not historical baselines or native execution evidence.
Review disposition
The raw/canonical workspace alias finding in this increment is addressed by #1043, which carries server-verified path pairs through history discovery, mixed rows and Resume. Its actual symlink browser/native/PTY verification and reviewed visuals are linked from that follow-up.