Open Code Review: inspect review scope, filters and model work
Build a read-only review-scope explorer for Open Code Review
Turn the selector into a learning project that explains exclusions and keeps planned coverage separate from executed review results.
What you will learn
- Make exclusion reasons visible
- Keep planned and executed coverage apart
- Define acceptance before adding visuals
Before you start
- Git changes and merge-base comparisons
- Basic CLI use and model API credentials
Choose a review scope, explain exclusions, prepare a controlled pilot and distinguish source inspection from runtime evidence.
Key takeaways
- A scope explorer can teach exclusion order without model access.
- Selection and executed coverage need separate states.
- The proposed extension is not an upstream commitment.
Make exclusion reasons visible
A useful extension would show each changed path beside its selection reason and the source of that reason. Display the old and new paths for renames, because the pinned selector checks both for secret patterns. Link each explanation to the reviewed source revision.
Keep the interface read only at first. Feed it synthetic decisions or a sanitized preview artifact, without repository write access or model credentials. This gives learners a way to understand selection without creating a new route for publishing comments or merging code.
Keep planned and executed coverage apart
Use separate panels for selected files and completed review work. A file may be selected but remain unfinished because of a provider failure or budget outcome. Showing both states prevents a green selection indicator from being interpreted as successful model review.
Add a small fixture set containing a normal file, a deleted file, a secret path and a template name. The .ssh/.env.example case is useful for teaching why a basename exception does not settle the full path decision. Mark each fixture as synthetic and state which function produced it.
Define acceptance before adding visuals
The first acceptance check is that every displayed decision matches its input artifact and the pinned source interpretation. Test the interface with empty results, unknown reason values and incomplete runs. Render filenames and descriptions as text rather than trusted HTML.
Only add richer visualization when it helps explain a relationship, such as old and new paths in a rename. A compact SVG flow is sufficient for this initial project. This proposal is our learning exercise; it is not an announced upstream roadmap or an implemented product feature.
Decision guide
| Criterion | Option A | Option B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
Implementation steps
- 1
Define a read-only artifact format with revision and selection reason.
- 2
Render synthetic decisions separately from execution outcomes.
- 3
Test unknown states and untrusted display strings before adding visual effects.
Copy-ready example
{
"proposal": true,
"revision": "189be5b024d3309dd10fdc8cd8ee31b2530c210b",
"input": "synthetic selection artifact",
"oldPath": ".env",
"newPath": "config.txt",
"selectionReason": "secret path",
"execution": "not started",
"readOnly": true
}Frequently asked questions
Does this project require Three.js?
No. A table and a small flow diagram can explain the current relationships. Use additional graphics only if they answer a concrete reader question.
Is this feature already shipped upstream?
This chapter proposes an independent learning exercise and does not claim an upstream release.
Sources
- Open Code Review / internal/agent/selection.goSource checked 2026-09-18
- Open Code Review / internal/config/allowlist/secret_path.goSource checked 2026-09-18
- Open Code Review / internal/config/allowlist/secret_path_test.goSource checked 2026-09-18
- Open Code Review / pages/src/content/docs/en/architecture.mdSource checked 2026-09-18