Skip to content

review-followups-3: CodeLens, per-provider toggles, pre-release tags#13

Closed
dmartinochoa wants to merge 1 commit into
review-followups-batch-2from
review-followups-batch-3
Closed

review-followups-3: CodeLens, per-provider toggles, pre-release tags#13
dmartinochoa wants to merge 1 commit into
review-followups-batch-2from
review-followups-batch-3

Conversation

@dmartinochoa
Copy link
Copy Markdown
Member

Summary

Third batch from the post-v0.1.1 review. Stacked on #12, base is `review-followups-batch-2`. Lands R26, R25, R24.

What changed

R26 — Inline CodeLens summary

  • New src/codeLens.ts: `FindingsCodeLensProvider` pins a "Pipeline-Check: 2 critical · 1 high" lens at the top of every scanned file.
  • Click navigates to the Findings panel (auto-generated `pipelineCheck.findings.focus` command).
  • Re-emits on every `onDidChangeDiagnostics`; the lens text tracks the latest LSP publish.
  • Registered via extension.ts against the shared `TRIGGER_DOCUMENT_SELECTOR`.

R25 — Per-provider toggles in settings

  • src/providers.ts refactored to a named `PROVIDERS` map. `TRIGGER_PATTERNS` is now derived from the map — two surfaces can't drift apart.
  • Dockerfile + Containerfile collapse to one `dockerfile` id (same syntax).
  • New `pipelineCheck.disabledProviders` setting (enum-constrained array). The LSP middleware drops every diagnostic for a URI whose provider sits in the disabled set, so the gutter / Problems / Findings / status bar / CodeLens all respect the toggle through one filter.
  • `providerForPath()` returns the provider id for a path. Tiny local glob matcher covers our pattern dialect (`**`, `*`, brace alternatives) — sufficient and side-steps a runtime dep.

R24 — Pre-release channel via tag naming

  • publish.yml: new "Detect pre-release tag" step. Tags with a `-` after the semver core (e.g. `v0.2.0-rc.1`) ship as pre-release; stable tags (`v0.2.0`) ship to the stable channel.
  • Detection sets `PRERELEASE_FLAG` (passed to `vsce publish`, `vsce package`, and `ovsx publish`) and `GH_PRERELEASE` (passed to `gh release create`).
  • Header comment documents the convention.

Test plan

  • `npm run lint` clean
  • `npm run compile` clean
  • `npm test` — 90 tests pass (was 75 on review-followups-2: nav, shared patterns, logging, test stub, CI check #12; +4 codeLens + +11 providers)
  • `npm run smoke` clean
  • Manual under F5: open the sample-workflow fixture; confirm the CodeLens at the top reads "Pipeline-Check: 4 critical" (or similar) and clicking it opens the Findings panel.
  • Manual settings test: add `"pipelineCheck.disabledProviders": ["dockerfile"]` to settings; open a Dockerfile; confirm no diagnostics appear.
  • First pre-release tag (whenever you're ready): `git tag v0.1.2-rc.1 && git push origin v0.1.2-rc.1` — should ship to the pre-release channel and the GitHub release should be marked prerelease.

Notes

  • The CodeLens shares the `onDidChangeDiagnostics` subscription with the Findings tree — no debouncing concerns; VS Code's runtime collapses lens fetches.
  • The glob matcher in `providers.ts` is hand-written so `providerForPath` works in both the editor and the unit-test environment. If it ever needs to handle a richer dialect (negation, character classes), swap in `minimatch` and drop the local impl.
  • Open VSX added `--pre-release` in v0.10. We're on `ovsx@^0.10.12`, so it works. Older versions ignore the flag silently.

🤖 Generated with Claude Code

Stacked on review-followups-batch-2 (#12). Lands R26, R25, R24.

R26 — inline CodeLens summary:
- src/codeLens.ts: FindingsCodeLensProvider pins a "Pipeline-Check:
  2 critical · 1 high" lens at the top of every scanned file.
  Click navigates to the Findings panel. Re-emits on every
  onDidChangeDiagnostics; the lens text tracks the latest LSP publish.
- summariseCounts and composeLensTitle are pure; tests pin the
  per-severity tally, severity-order rendering, and the "null when
  empty so the lens is omitted" contract.
- src/extension.ts: registers the provider with TRIGGER_DOCUMENT_SELECTOR.

R25 — per-provider toggles:
- src/providers.ts: PROVIDERS map keyed by ProviderId
  ('github-actions', 'gitlab', 'azure', 'bitbucket', 'circleci',
  'cloud-build', 'buildkite', 'drone', 'jenkins', 'dockerfile').
  Dockerfile + Containerfile collapse to one 'dockerfile' id since
  they share syntax. TRIGGER_PATTERNS is now derived from the map so
  the two can't drift.
- providerForPath(): glob-matches a path to a provider id. Tiny
  local glob matcher covers the dialect our patterns use (**, *,
  brace alternatives) — sufficient for the actual patterns and
  side-steps a runtime dependency.
- package.json: new pipelineCheck.disabledProviders setting (array
  of provider ids, enum-constrained). The middleware drops every
  diagnostic for a URI whose provider sits in the disabled set, so
  the gutter / Problems / Findings / status bar / CodeLens all
  respect the toggle through one filter.
- providers.test.ts: tests for every provider's path match,
  Dockerfile/Containerfile aliasing, Windows-backslash normalisation,
  and the "no match" return.

R24 — pre-release channel via tag naming:
- .github/workflows/publish.yml: new "Detect pre-release tag" step.
  Tags with a `-` after the semver core (e.g. v0.2.0-rc.1) ship as
  pre-release; stable tags (v0.2.0) ship to the stable channel.
  Detection sets PRERELEASE_FLAG (passed to vsce publish, vsce
  package, and ovsx publish) and GH_PRERELEASE (passed to gh release
  create). Header comment documents the convention.

Total: 90 tests pass (was 75 on #12). +4 codeLens + +11 providers.
Lint, compile, smoke all green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 26a97c98-925a-42d0-910b-b2d34710bb6b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch review-followups-batch-3

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dmartinochoa
Copy link
Copy Markdown
Member Author

Rolled into #16 (v0.2.0 mega-PR). Every commit from this branch is in #16's history; closing to consolidate the merge.

@dmartinochoa dmartinochoa deleted the review-followups-batch-3 branch May 19, 2026 11:05
dmartinochoa added a commit that referenced this pull request May 19, 2026
…release (#31)

#16 — switch PIP_INSTALL_COMMAND to `python -m pip install ...` instead
of the bare `pip install ...` form. Two real-world failure modes drove
this: a corporate Windows PowerShell ExecutionPolicy that allows
python.exe but blocks pip.exe (the shim is a script), and the case
where the official Python installer leaves `python` on PATH but not
`pip` (the Scripts directory wasn't added). Both are silent today —
the user sees "command not found" or a PowerShell policy error and
has no way to recover from the install-in-terminal CTA. The `python
-m pip` form sidesteps both by running pip via the interpreter, and
matches PyPA's own recommendation. README and sample-workflow README
copy updated.

#13 — status-bar relevance latch releases on folder removal. A
multi-root workspace user who removed the last CI folder used to see
the bar item pinned to "clean" for the rest of the session — the
`relevant` flag was a one-way latch. Now subscribes to
onDidChangeWorkspaceFolders and re-sweeps: when neither CI candidate
files nor current findings remain, the item hides again. Re-adding a
CI folder re-shows. The diagnostic check inside the recheck guards
against a momentary "no candidates" state during a rebuild
accidentally hiding the bar.

Tests: +6 (245 → 251). Install: +2 pinning the `python -m pip` prefix
and the [lsp] extra. Status bar: +4 covering the latch-release path
(hides on folder removal, holds on stale findings, re-latches on
folder add, single-subscription contract).

Stub additions: __stubWorkspaceFoldersListeners so tests can fire
onDidChangeWorkspaceFolders manually.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant