docs: stop validate_ui_refs flagging JSX props and code fences as Command Palette commands - #472
docs: stop validate_ui_refs flagging JSX props and code fences as Command Palette commands#472rachaelrenk wants to merge 1 commit into
Conversation
…mands
The Command Palette check reported 12 findings, half of which were
extractor false positives rather than doc errors.
Quoted strings were captured regardless of surrounding syntax, so
component props and CSS values were treated as command names:
<DemoVideo label="Block Divider Demo" />
<VideoEmbed title="Command Palette Demo" />
<figure style={{ maxWidth: "375px" }}>
Prompt examples inside fenced code blocks were also scanned, so a
prompt quoting the Oz web app's "New run" flow was reported as a
missing Warp Command Palette command.
- Skip quoted strings that fall inside an HTML/JSX tag span. Matching
the tag span rather than a `word=` prefix avoids suppressing prose
like `Palette: "Open theme picker"`.
- Skip fenced code blocks, matching the precedent set by missing_docs'
strip_code_spans() helper.
- Extend the self-test to assert both filters drop the bogus captures
while genuine prose references are still detected.
Command Palette findings drop from 12 to 6. The remaining 6 are a
separate problem: real commands absent from the extracted snapshot
because _extract_command_palette_commands() reads only two because _extract_command_palette_commands() reads only two becaucobecause _extract_command_palette_commands() reads only two bthored-By: Oz <oz-agent@warp.dev>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR tightens the validate_ui_refs Command Palette extractor so quoted JSX/HTML attribute values and fenced code examples are ignored, and extends the self-test coverage for those false-positive cases.
Concerns
- No blocking correctness, security, or spec-alignment concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Summary
The
validate_ui_refsCommand Palette check reported 12 findings onmain. Half were extractor false positives rather than documentation errors, which makes the check noisy and easy to start ignoring.This fixes the false positives. It does not touch any documentation content.
The problem
extract_command_palette_refs()captured any quoted string on a line near a "Command Palette" mention, regardless of the surrounding syntax. Two categories leaked through.Component props and CSS values. Quoted strings inside JSX tags were treated as command names:
That produced findings for
Block Divider Demo,Tab Indicator Demo,Logout Demo,Command Palette Demo, and375px.Fenced code blocks. Prompt examples were scanned as if they were live UI references. In
agents/capabilities/computer-use/testing-and-recordings.mdx, a prompt describing the Oz web app's "New run" creation flow was reported as a missing Warp Command Palette command — a different product's UI, quoted inside a fenced text block.Changes
.agents/skills/validate_ui_refs/validate_ui_refs.pyword=prefix, so legitimate prose such asPalette: "Open theme picker"is not suppressed.missing_docsskill'sstrip_code_spans()helper, which exists so CLI examples don't trigger prose-oriented findings.--self-testwith a fifth case asserting both filters drop the bogus captures while genuine prose references are still detected. This runs in CI, so the behavior is locked in.Result
Command Palette findings drop from 12 to 6, with no documentation changes.
What is deliberately not fixed
The remaining 6 findings are a different problem and are left alone on purpose:
Exit Vim Insert Mode(×2),Toggle Mouse Reporting,Warpify SSH Session,Share pane, andShare session.These appear to be real commands, and the docs are correct —
keyboard-shortcuts.mdxdocumentsToggle Mouse Reportingwith the actionworkspace:toggle_mouse_reporting. I confirmed none of them exist in the snapshot's 164 extracted commands. The cause is that_extract_command_palette_commands()reads only two Rust source files:Commands registered anywhere else are invisible to it. Here the tool is wrong and the docs are right, so "fixing" these would mean corrupting correct documentation. Broadening the extractor changes the snapshot and needs verification against a real warp checkout, which makes it a separate change with its own risk profile.
Worth noting that command findings are never auto-fixed — only path and format issues have a
fix_type— so--fixwas never at risk of editing these pages.Notes for reviewers
--allalso reports one Settings path finding onmain, inreference.mdx:55(Settings > Platformshould now beSettings > Cloud platform > Oz Cloud API Keys). I verified it is pre-existing by re-running the check against pristinemain; it is unrelated to this change and left out to keep this PR to tooling only.Verification
--self-testpasses, including the new case.src/content/docs/are modified.Co-Authored-By: Oz oz-agent@warp.dev