feat: update document title when artifact is decoded#20
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded a Changes
Sequence Diagram(s)(No sequence diagrams generated — change is a single-component UI effect.) Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Changes from previous review: The fragment budget limit was increased from 8000 to 8192 characters across all documentation and code. No issues found in the new changes. Reviewed by minimax-m2.5 · 644,566 tokens |
Deploying agent-render with
|
| Latest commit: |
0b6de66
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cf2ce622.agent-render.pages.dev |
| Branch Preview URL: | https://claude-dynamic-document-titl.agent-render.pages.dev |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/viewer-shell.tsx`:
- Around line 283-286: The current useEffect uses the nullish-coalescing
operator with activeArtifact?.title ?? envelope?.title which treats an empty
string as a valid title; change the logic in the useEffect to pick the first
non-empty trimmed title from activeArtifact.title, then envelope.title, and
finally the literal "agent-render" (e.g., compute a title by checking
activeArtifact?.title?.trim() and envelope?.title?.trim() and falling back to
"agent-render"), then assign that to document.title; reference the useEffect
block and the activeArtifact, envelope, and document.title identifiers when
making the change.
🪄 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: bd212d02-01c2-4161-90b9-c4cd374a50cd
📒 Files selected for processing (1)
src/components/viewer-shell.tsx
Sets document.title to the active artifact's title (or envelope title) when a fragment is decoded, giving users meaningful browser tab labels instead of the static "agent-render" default. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use .trim() || fallback instead of ?? so that empty-string titles don't produce a bare " — agent-render" browser tab label. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
67c790e to
0b6de66
Compare
Summary
document.titleto the active artifact's title (or envelope title) when a fragment is decoded"agent-render"when no title is availableTest plan
titlefield — verify the browser tab shows"<title> — agent-render""agent-render"🤖 Generated with Claude Code
Summary by CodeRabbit