Skip to content

ux: filter findings, non-preview open, quieter copy toasts#21

Closed
dmartinochoa wants to merge 1 commit into
ux-polish-2from
ux-polish-3
Closed

ux: filter findings, non-preview open, quieter copy toasts#21
dmartinochoa wants to merge 1 commit into
ux-polish-2from
ux-polish-3

Conversation

@dmartinochoa
Copy link
Copy Markdown
Member

Summary

Three small UX wins from the post-v0.2.0 review queue. Stacked on #20 — base is `ux-polish-2`.

What landed

#5 — Filter the Findings tree

  • `Pipeline-Check: Filter Findings` command opens an InputBox; matches against rule ID, message body, and file path (case-insensitive substring).
  • Re-invoking the command pre-fills the current filter so users can edit or clear it (empty input clears).
  • New `$(filter)` button on the Findings view title bar, between Scan and Change Grouping.
  • The badge updates to reflect the filtered count.
  • `lastFindingUris` still tracks the unfiltered universe so a publish for a currently-hidden URI still wakes the tree up — fixes a subtle bug class where a CLEAR of a filtered-out finding would never refresh.

#4 — Open Finding (non-preview)

  • `Pipeline-Check: Open Finding` context-menu entry on tree leaves.
  • Opens with `preview: false` — pins the file as a permanent tab so triaging multiple findings side-by-side doesn't create tab clutter.
  • The single-click default still uses preview, keeping the "scan through findings to triage" flow lightweight.

#7 — Quieter clipboard confirmations

  • Copy Rule ID and Copy LSP Install Command switch from `showInformationMessage` (modal toast) to `setStatusBarMessage` with a 2-second TTL.
  • The copy succeeds silently 95% of the time anyway; the status-bar message confirms the action without stealing focus.

Test plan

  • `npm run lint` clean
  • `npm run compile` clean
  • `npm test` — 137 tests pass (was 129 on ux: status bar severity color + what's-new notification #20; +8 filter behaviour)
  • `npm run smoke` clean
  • `npm run test:integration:compile` clean
  • Manual under F5: open the sample-workflow fixture; type `GHA` in Filter Findings → only GHA-* findings appear; clear filter (empty input) → all findings return.
  • Manual: right-click a leaf → "Open Finding" → opens as a permanent (non-italic) tab.
  • Manual: right-click a leaf → "Copy Rule ID" → status-bar message confirms.

Notes

  • The two leaf-context commands (`openNonPreview`, `openRuleDocs`, `copyRuleId`) all use the same `commandPalette: when: false` gating so they don't show up palette-wide without a node argument. Standard pattern; same as before.
  • The filter command's pre-fill behaviour is its own affordance: a user sees their current filter when they re-invoke. If you wanted a separate "Clear Filter" command for keybinding convenience, that's a one-liner follow-up.

🤖 Generated with Claude Code

Three small UX wins from the post-v0.2.0 review queue. Stacked on
ux-polish-2 (#20).

#5 — Filter the Findings tree
- Pipeline-Check: Filter Findings command opens an InputBox; matches
  against rule ID, message body, and file path (case-insensitive
  substring). Re-invoke pre-fills the current filter so users can
  edit or clear (empty input clears).
- New `$(filter)` button on the Findings view title bar.
- FindingsTreeProvider gets getFilter/setFilter/applyFilter. The
  badge tracks the filtered count; `lastFindingUris` still tracks
  the unfiltered universe so a publish for a currently-hidden URI
  still wakes the tree up (otherwise a CLEAR of a filtered-out
  finding would never refresh).
- 8 tests covering: default empty, rule-id match, case-insensitivity,
  message-body match, fsPath match, clear via empty string,
  whitespace trim, badge reflects filtered count.

#4 — Open Finding (non-preview)
- Pipeline-Check: Open Finding context-menu entry on tree leaves.
  Opens with `preview: false` — pins the file as a permanent tab so
  triaging multiple findings side-by-side doesn't create tab
  clutter. The single-click default still uses preview, keeping the
  common "scan through findings" flow lightweight.
- LeafLike type widened to include `uri` and `diagnostic.range`.

#7 — Quieter clipboard confirmations
- Copy Rule ID and Copy LSP Install Command switch from
  showInformationMessage (modal toast) to setStatusBarMessage with
  a 2-second TTL (CONFIRM_TTL_MS). The copy succeeds silently 95%
  of the time anyway; the status bar confirmation reads without
  stealing focus.

Wiring
- package.json: three new command declarations; view/title button
  for filter (group navigation@1, between scan and changeGrouping);
  view/item/context entry for openNonPreview (group navigation@0,
  top of the menu); commandPalette gates the leaf-context commands
  to `false` so they don't show palette-wide without a node.
- src/findingsView.ts: filter state + setFilter + getFilter +
  applyFilter (in findings()); sets the `pipelineCheck.filterActive`
  context key so future manifest contributions can paint a "filter
  active" affordance.
- src/test/integration/activation.test.ts: command-registration
  expected list grows by filter + openNonPreview.

Total: 137 tests pass (was 129 on #20; +8 filter behaviour). Lint,
compile, smoke, integration-compile 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: 4225d382-7430-4993-8ebc-c107b103e3b7

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 ux-polish-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

Closing as duplicate of #22 (same head branch ux-polish-3; #21's base ux-polish-2 is already merged into main). #22 carries the same commits and was merged to main.

@dmartinochoa dmartinochoa deleted the ux-polish-3 branch May 19, 2026 23:46
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