feat(export): add --depth flag to rdc rt for depth target export#239
Conversation
Add a --depth boolean flag to `rdc rt` that routes to /draws/<eid>/targets/depth.png (the rt_depth VFS handler) instead of color<target>.png, giving users an ergonomic path to the raw depth attachment. - --target default becomes a None sentinel so --depth + explicit --target can be detected and rejected with a UsageError; effective default of 0 is preserved and help text still documents it. - --overlay keeps its early-return priority, so --depth is inert under --overlay (no mutual-exclusion error). - Help text distinguishes --depth (raw depth attachment export) from --overlay depth (RenderDoc overlay visualization). - Regenerate commands.json and the skill quick-ref so check-commands and check-skill-ref CI gates stay green.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
📝 WalkthroughWalkthroughThis PR introduces a ChangesAdd --depth flag to rdc rt command
Sequence DiagramsequenceDiagram
participant User
participant CliHandler as rt_cmd handler
participant VfsRouter as VFS router
participant DepthTarget as /draws/{eid}/targets/depth.png
participant ColorTarget as /draws/{eid}/targets/color{index}.png
User->>CliHandler: rdc rt --depth --output out.png
CliHandler->>CliHandler: Check depth flag set
CliHandler->>CliHandler: Validate target is None
CliHandler->>VfsRouter: Route to depth.png
VfsRouter->>DepthTarget: Fetch raw depth attachment
DepthTarget->>CliHandler: Return PNG bytes
CliHandler->>User: Write out.png (depth texture)
User->>CliHandler: rdc rt --target 1 --output out.png
CliHandler->>CliHandler: Check depth flag not set
CliHandler->>VfsRouter: Route to color1.png
VfsRouter->>ColorTarget: Fetch color target
ColorTarget->>CliHandler: Return PNG bytes
CliHandler->>User: Write out.png (color target)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
🚥 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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (2)
openspec/changes/2026-06-09-rt-depth-flag/test-plan.md (1)
85-89: 💤 Low valueAdd language identifiers to fenced code blocks.
The code blocks in the manual verification section would benefit from
bashorshelllanguage identifiers for proper syntax highlighting.📝 Proposed fix
- ``` + ```bash rdc open capture.rdcApply the same fix to the other three code blocks at lines 92, 100, and 106.
Also applies to: 92-97, 100-103, 106-109
🤖 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 `@openspec/changes/2026-06-09-rt-depth-flag/test-plan.md` around lines 85 - 89, Add language identifiers (bash) to the fenced code blocks in the manual verification section containing the shell commands so they get proper syntax highlighting; specifically update the blocks that contain the commands starting with "rdc open capture.rdc" and the corresponding "rdc rt <EID> --depth -o /tmp/depth_local.png" examples (the four blocks around those commands) by changing the opening fences from ``` to ```bash.openspec/changes/2026-06-09-rt-depth-flag/proposal.md (1)
20-22: 💤 Low valueAdd language identifier to fenced code block.
The code block would benefit from a
bashorshelllanguage identifier for proper syntax highlighting.📝 Proposed fix
-``` +```bash rdc rt <EID> [--depth] [-o output.png] [--raw]</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@openspec/changes/2026-06-09-rt-depth-flag/proposal.mdaround lines 20 - 22,
The fenced code block in proposal.md lacks a language identifier; update the
triple-backtick fence for the CLI examplerdc rt <EID> [--depth] [-o output.png] [--raw]to include a language tag (e.g., bash or shell) so the
block becomesbash ...to enable proper syntax highlighting in the
document.</details> <!-- cr-comment:v1:2649ff63467cb15b4763e37f --> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.Nitpick comments:
In@openspec/changes/2026-06-09-rt-depth-flag/proposal.md:
- Around line 20-22: The fenced code block in proposal.md lacks a language
identifier; update the triple-backtick fence for the CLI examplerdc rt <EID> [--depth] [-o output.png] [--raw]to include a language tag (e.g., bash or
shell) so the block becomesbash ...to enable proper syntax highlighting
in the document.In
@openspec/changes/2026-06-09-rt-depth-flag/test-plan.md:
- Around line 85-89: Add language identifiers (bash) to the fenced code blocks
in the manual verification section containing the shell commands so they get
proper syntax highlighting; specifically update the blocks that contain the
commands starting with "rdc open capture.rdc" and the corresponding "rdc rt
--depth -o /tmp/depth_local.png" examples (the four blocks around those
commands) by changing the opening fences fromtobash.</details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `deeebaca-9904-4abf-b36e-4453d724fbd2` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 621528f8c04e3f60cccd0ba0d91683ca78d8ce09 and cb65ffc3e69d5b78a0f2bea19b6ab52c7c343b80. </details> <details> <summary>📒 Files selected for processing (7)</summary> * `docs-astro/src/data/commands.json` * `openspec/changes/2026-06-09-rt-depth-flag/proposal.md` * `openspec/changes/2026-06-09-rt-depth-flag/tasks.md` * `openspec/changes/2026-06-09-rt-depth-flag/test-plan.md` * `src/rdc/_skills/references/commands-quick-ref.md` * `src/rdc/commands/export.py` * `tests/unit/test_export_commands.py` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Summary
Adds a
--depthflag tordc rtso the depth attachment can be exported directly:Follow-up to #236 / #237: the issue's verification steps used
rdc rt --depth, but only the backend (rt_depthhandler, VFS route/draws/<eid>/targets/depth.png) was implemented — the CLI flag itself was never added. Depth export previously requiredrdc cat /draws/<eid>/targets/depth.pngorrdc snapshot.Implementation
--depthroutes to the existing/draws/{eid}/targets/depth.pngVFS path (works in both local and remote replay mode since feat(remote): support texture/RT/depth export in remote replay mode #237); no backend changes.--targetdefault changed to aNonesentinel so an explicit--targetcombined with--depthraises a cleanUsageError(effective default remains color target 0; help text unchanged).--overlaykeeps priority: its branch early-returns, so--depthis inert under--overlay(note--overlay depthrenders the RenderDoc depth overlay, while--depthexports the raw depth attachment — help text spells out the distinction).commands.jsonand the skill quick-ref regenerated (check-commands/check-skill-refpass).Testing
-o, overlay precedence. Full suite: 2956 passed.rdc rt 11 --depth -oproduced the expected depth gradient in local mode (SaveTexture) and remote--proxymode (GetTextureData grayscale);rdc rt 11 --depth --target 0errors with exit 2; remote color export unaffected.Summary by CodeRabbit
New Features
--depthflag to therdc rtcommand to export raw depth attachment texture.Documentation
--depthoption and its mutual exclusivity with--target.Bug Fixes
--targetoption spelling from-targetto--target.Tests