Skip to content

Hide branch scopes from the Explorer's scope picker - #629

Merged
mthines merged 3 commits into
mainfrom
claude/hide-branches-scope-picker-3cgrwk
Sep 1, 2026
Merged

Hide branch scopes from the Explorer's scope picker#629
mthines merged 3 commits into
mainfrom
claude/hide-branches-scope-picker-3cgrwk

Conversation

@mthines

@mthines mthines commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Branch scopes (one-off PR/feature branches) churn constantly and were cluttering the Lore Explorer's scope picker at the top of the page — both the persistent chip strip and the "Browse all" searchable list.
  • ScopeSelector now filters out type === 'branch' nodes from both surfaces. The fix lives in ScopeSelector itself rather than in buildScopeTree/flattenScopeTree (lib/scope-tree.ts), since those are also used by GroomingRuleBuilder's separate scope picker, which still needs branch scopes for pruning stale branch lessons.
  • A branch scope that's the current selection (e.g. from a deep link) no longer gets a fallback chip in the strip either, consistent with branches being hidden from this picker entirely.

Test plan

  • pnpm nx typecheck web — clean
  • pnpm nx lint web — 0 errors (58 pre-existing warnings, unrelated to this change)
  • npx vitest run --config vitest.storybook.config.ts src/components/lore/ScopeSelector — all 7 tests pass, including a new BranchScopesHidden interaction test asserting a branch scope appears in neither the strip nor Browse-all

https://claude.ai/code/session_01KzSdeCpiCbm19JM9NJCqkq


Generated by Claude Code

Branch scopes (one-off PR/feature branches) churned constantly and cluttered
both the persistent chip strip and the Browse-all searchable list. Exclude
them in ScopeSelector itself, since buildScopeTree/flattenScopeTree are also
relied on by GroomingRuleBuilder's separate scope picker, which still needs
branches for pruning stale branch lessons.

Claude-Session: https://claude.ai/code/session_01KzSdeCpiCbm19JM9NJCqkq
@dash0-dev

dash0-dev Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

✅ Reviewed your changes — no issues found.
Updated 2026-09-01 19:26 UTC

Review details

Incremental review for commit 4f30775 (delta since ac24c9f).

Gate Status Details
Description vs. code Description matches the diff exactly — scope, files, and rationale unchanged since the prior review.
Prior review feedback 1 thread resolved since ac24c9f — no open review threads remain.
Documentation PR description and test plan clearly explain intent and behavior.
Self-review signals No debug logs, TODOs, or commented-out code in the delta.
Code review No new inline findings this run.

CI — All required checks pass (typecheck, lint, tests, Storybook, Vercel preview); several jobs report skipping (unaffected by this diff).

Run mode — incremental · 32 lines in delta

Memories — 331 indexed · 0 used

Quality — produced 0 → posted inline 0 (0 dropped, 0 deferred).

Integrations — not activated

Optimality (2.4c) — ran — delta only adds test coverage for an approach unchanged since the prior full review; no proposal met the materiality bar.

Standards (2.4d) — ran — delta is test-only (Storybook stories); no governing-doc violations found.

Skipped files — none

Reviewed by the pr-reviewer agent — open it to read how these gates and findings are produced.

Comment thread packages/web/src/components/lore/ScopeSelector.test.stories.tsx
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

The dashboard preview for this PR — redeployed on each push that changes the web app.

Name Status Preview Deployment (this commit) Updated (UTC)
lorekit ✅ Ready Visit Preview 4f30775 2026-09-01 19:17

Preview always points at the PR's latest commit; Deployment is this exact commit. · Comment /web-preview to force a redeploy. · Workflow logs

@mthines

mthines commented Sep 1, 2026

Copy link
Copy Markdown
Owner Author

/web-preview

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

❌ The dashboard preview for aa0361c failed to deploy (failure).

Open the run logs for the failure. Comment /web-preview to retry once it is fixed.

mthines and others added 2 commits September 1, 2026 19:46
…eSelector

Addresses dash0-dev review feedback on PR #629: assert that a branch scope
passed as the current selection (e.g. a deep link) still gets no fallback
chip in the strip, since it's filtered out of allScopes before the
selected-but-off-strip lookup runs.

Claude-Session: https://claude.ai/code/session_01KzSdeCpiCbm19JM9NJCqkq
@mthines
mthines marked this pull request as ready for review September 1, 2026 19:27
@dash0-dev

dash0-dev Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Darkplane auto-approval is enabled for this repository (mode: Auto-approve).

An evaluation will run once this pull request's CI checks have completed — no action needed.

@mthines
mthines merged commit 5756281 into main Sep 1, 2026
13 checks passed
@dash0-dev

dash0-dev Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Darkplane did not approve this pull request. Score 69.21 of 100, threshold 75. Blast radius 90, Evidence quality 72, Change footprint 45.

Darkplane did not approve this pull request. It scored 69.21 of 100, and 75 was required.

  • 🟡 Change footprint scored 45.
    The change touches ScopeSelector.tsx (+24/-12) with a new companion test story file (ScopeSelector.test.stories.tsx, +67/-0). The diff content itself could not be retrieved (tool returned no output), so the actual logic change is unverified; based on file scope and size, this looks like a small, localized UI filtering change to a single component plus added tests, but without seeing the diff I cannot confirm it avoids load-bearing logic.
The other 2 criteria
  • 🟢 Blast radius scored 90.
    The change is confined to a single UI component ScopeSelector.tsx (a filter added to exclude type === 'branch' from topNodes/allScopes) plus its own test stories; no shared logic like flattenScopeTree or buildScopeTree is touched, and GroomingRuleBuilder's separate scope picker is explicitly left untouched. The diff is small (+24/-12 source, +67 test), purely additive filtering logic with no schema, API, or cross-component changes, making it easy to revert.
  • 🟢 Evidence quality scored 72.
    All CI checks pass (typecheck, lint, Storybook interaction/visual tests, Vercel preview), and the diff added a new interaction test (BranchScopesHidden) plus a follow-up test (SelectedBranchGetsNoFallbackChip) addressing the automated reviewer's low-severity suggestion, showing the reviewer's feedback thread was resolved. Review coverage is from an automated bot only (no human reviewer signal), and detailed test assertions weren't independently inspected beyond commit history and CI status.

An AI evaluator produced these scores from the diff, the repository history, and the pull request text. The pull request text is author-controlled, so treat the scores as signals rather than proof. Reviewed for commit 4f30775.

Was this decision right? Give feedback

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.

2 participants