feat: add raw/rendered toggle for markdown and CSV artifacts#21
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 26 minutes and 20 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe viewer shell now supports toggling between rendered and raw view modes for markdown and CSV artifacts. When viewing these artifact types, users can switch between the rendered preview and raw code representation, with conditional toolbar actions that respect the active view mode. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 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 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 |
Deploying agent-render with
|
| Latest commit: |
0ea343f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ee687ab5.agent-render.pages.dev |
| Branch Preview URL: | https://claude-raw-rendered-toggle.agent-render.pages.dev |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge OverviewVisual design refresh with new editorial aesthetic. No functional changes to core viewer shell or Rendered/Raw toggle logic from previous review. Changes include:
Note: Fragment budget limit updated from 8000 to 8192 chars in docs only. Files Reviewed (1 file)
Reviewed by minimax-m2.5-20260211 · 174,818 tokens |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/viewer-shell.tsx (1)
557-558: Consider using a more semantic language token for CSV raw mode.Using
"textile"as the language token works (falls through to no highlighting), but "textile" is actually a markup language, making this choice misleading. A more self-documenting option would be an empty string or"text".♻️ Suggested change
- <CodeRenderer artifact={{ ...csvArtifact, kind: "code", language: "textile" }} onReady={markRendererReady} /> + <CodeRenderer artifact={{ ...csvArtifact, kind: "code", language: "text" }} onReady={markRendererReady} />🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/viewer-shell.tsx` around lines 557 - 558, The CSV raw-mode artifact currently passes language: "textile" which is misleading; update the CodeRenderer invocation that builds the artifact (the expression creating {...csvArtifact, kind: "code", language: "textile"}) to use a more semantic token such as an empty string or "text" (keep the rest of the artifact and the onReady handler markRendererReady unchanged) so CSV raw viewMode === "raw" is self-documenting and doesn't imply textile markup.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/components/viewer-shell.tsx`:
- Around line 557-558: The CSV raw-mode artifact currently passes language:
"textile" which is misleading; update the CodeRenderer invocation that builds
the artifact (the expression creating {...csvArtifact, kind: "code", language:
"textile"}) to use a more semantic token such as an empty string or "text" (keep
the rest of the artifact and the onReady handler markRendererReady unchanged) so
CSV raw viewMode === "raw" is self-documenting and doesn't imply textile markup.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 0d694ac6-a4d3-4028-ac61-e5aacfcfb9b6
📒 Files selected for processing (1)
src/components/viewer-shell.tsx
Adds a toggle in the viewer toolbar that lets users switch between the rendered view and the raw source for markdown and CSV artifacts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ca31a34 to
0ea343f
Compare
Summary
.md, plain text for CSV)Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features