Repository navigation
feat: Agent sessions UI improvements - #649
Conversation
📝 WalkthroughWalkthroughThis PR enhances the ChangesTabStrip Enhancement and UI Integration
🎯 4 (Complex) | ⏱️ ~75 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/ui/README.md (1)
122-123: ⚡ Quick winConsider adding a code example for
renderSearchItemLabel.The documentation mentions
renderSearchItemLabelbut doesn't show how to use it. A brief example would help users understand the callback signature and return type.💡 Suggested example
<TabStrip tabs={tabs} openTabs={openTabs} selectedTabId={selectedTabId} renderSearchItemLabel={(tab) => ( <div className="flex items-center gap-2"> {tab.isLoading && <Spinner size="sm" />} <span>{tab.name}</span> </div> )} />🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/ui/README.md` around lines 122 - 123, Add a short usage example showing the renderSearchItemLabel callback on the TabStrip component to demonstrate the callback signature and return value; update the README to include a minimal JSX snippet that shows TabStrip with props (tabs, openTabs, selectedTabId) and renderSearchItemLabel returning a small element (e.g., a container with an optional Spinner and the tab.name) so readers can see how to render custom row content and access tab properties.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/ui/README.md`:
- Around line 110-119: The README example uses fontSize="12px" but the
implementation in ArtifactsContainerPanel.tsx passes fontSize={13}, causing a
type mismatch; update either the example or the component to be consistent: if
TabStrip.fontSize expects a number (e.g., number pixels) change the README
example to use a numeric value (fontSize={13}) and document units in README, or
if it should accept CSS strings update the component/prop type in
ArtifactsContainerPanel.tsx/TabStrip to accept string | number and handle string
units internally; reference the TabStrip prop and the usage in
ArtifactsContainerPanel.tsx when making the change.
In `@packages/utils/src/errors.ts`:
- Line 13: The replacement currently removes the sequence "Query failed: Error:
" anywhere in msg; change the logic in the code that sets msg (the msg variable
assignment in packages/utils/src/errors.ts) so the cleanup only removes that
sequence when it appears at the start of the message — e.g., use a
start-anchored regex or a startsWith check and slice off the prefix — so only
leading "Query failed: Error: " is stripped.
---
Nitpick comments:
In `@packages/ui/README.md`:
- Around line 122-123: Add a short usage example showing the
renderSearchItemLabel callback on the TabStrip component to demonstrate the
callback signature and return value; update the README to include a minimal JSX
snippet that shows TabStrip with props (tabs, openTabs, selectedTabId) and
renderSearchItemLabel returning a small element (e.g., a container with an
optional Spinner and the tab.name) so readers can see how to render custom row
content and access tab properties.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 004183d0-84b7-4b94-832f-5619ffedd05f
📒 Files selected for processing (11)
apps/sqlrooms-cli-ui/src/workspace/ArtifactsContainerPanel.tsxpackages/ai-core/src/AiSlice.tspackages/ai-core/src/components/AnalysisResult.tsxpackages/ai-core/src/components/SessionControls.tsxpackages/ui/README.mdpackages/ui/src/components/editable-text.tsxpackages/ui/src/components/tab-strip.tsxpackages/utils/src/errors.tspackages/utils/src/index.tspackages/utils/src/time.tspackages/webcontainer/src/components/CodeView.tsx
Summary by CodeRabbit
New Features
Documentation
Style & Refinements