Repository navigation
D21: the repository lens — one widget, two vocabularies, and a drill-in - #104
Merged
Merged
Conversation
Brett's observation: 'our repo selector is now very similar to the lens function but for documents in repos vs keywords in documents.' It is the same mechanism, and the code proves it — buildLensModel reads a snapshot in exactly two places (the vocabulary with counts; which terms a document carries), so a projection serves the whole widget unchanged. repositoryVocabulary() re-expresses a composed snapshot in the lens's own shape: terms are member repositories, 'documents' are cross-repository document IDENTITIES, and an identity carries a repository when that repository has it. Rings therefore become CARRIER COUNTS, which also names D19/D20 in the lens's vocabulary: union is ring 1 and inward, shared is ring 2 and inward, strict intersection was the centre. The lens engine, the bullseye geometry, the label-collision work and the co-occurrence hints are all reused verbatim. The Lens tab gains a keywords|repositories switch, offered only on a composed view. The repository rail's ticks ARE the visible set: the lens opens on it and writes through, so the filter and the lens never disagree, redrawing locally because it holds the whole aggregate. Activating the bullseye's centre or a sector — from the region or from the labelled drill-in pane beside it — scopes the whole shell to that region's documents. The scope is a DOCUMENT SET; every other plane keeps only what references it. A banner states documents, identities and the combination, and clears. No contract growth: pure view derivations over data the composition already carries. Two guards moved and say why: the bullseye's activation-handler pin now states the vocabulary gate (the keyword lens still passes no opts), and the drill-scope storage goes through guardedSessionStorage. Suites 2770 passed (exit 0); strict validation green; live-checked across the whole gesture set. Co-Authored-By: Claude Fable 5 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
There was a problem hiding this comment.
Pull request overview
This PR introduces a “repository vocabulary” mode for the existing Lens widget on composed (multi-repo) snapshots, reusing the same lens engine/geometry to visualize repository membership as terms and cross-repo document identities as dots, and adds a drill-in gesture that scopes the whole dashboard to a selected bullseye region.
Changes:
- Add
repositoryVocabulary(),identitiesFor(), andscopedSnapshot()to adapt composed snapshots into the lens’s existing input shape and to support drill-in scoping. - Extend the Lens tab UI with a vocabulary switch (keywords ↔ repositories), repository-aware copy/labels, and a drill-in pane + bullseye activation handler gated to the repository vocabulary.
- Wire drill-in scope storage + banner into the app shell and add Node-driven tests covering the new projection and scoping behavior.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/ideation-dashboard/test_project_aggregates.py | Adds Node harness assertions for repository-vocabulary projection, ring semantics, identities targeting, and scoping behavior. |
| tests/ideation-dashboard/test_bullseye_widget.py | Updates the “activation handler” guard test to assert the new repository-only wiring condition. |
| scripts/ideation_dashboard/web/views/lens.js | Implements vocabulary switching, repository-vocabulary rendering, drill-in pane, and repository-only activation wiring. |
| scripts/ideation_dashboard/web/views/composed-model.js | Adds the repository vocabulary adapter, bullseye-region → identities targeting, and snapshot scoping by identity. |
| scripts/ideation_dashboard/web/styles.css | Adds styles for the vocabulary switch, drill-in pane, and drill banner. |
| scripts/ideation_dashboard/web/index.html | Adds the drill banner host element. |
| scripts/ideation_dashboard/web/app.js | Stores/applies drill scope and passes new lens seams (unnarrowed composed snapshot, visible set, drill-in callbacks). |
| openspec/changes/add-repository-lens/tasks.md | Tracks implementation tasks and verification status for the change. |
| openspec/changes/add-repository-lens/specs/ideation-dashboard/spec.md | Captures the new requirements/scenarios for repository vocabulary and drill-in scoping. |
| openspec/changes/add-repository-lens/proposal.md | Provides rationale and scope boundaries for the change. |
| ideation/staging/dashboard-project-scoping/dashboard-project-scoping.md | Records the D21 decision/context and ties it to this change. |
| docs/ideation-dashboard-session-runbook.md | Documents the new Lens tab repository vocabulary and drill-in behavior for operators. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
32
to
+36
| // design D1): this view and the staging workbench's lens panel consume the same | ||
| // widget, so the two surfaces cannot drift. This tab supplies no `onActivate`, | ||
| // so the rendered SVG is exactly what it was before the lift. | ||
| import { renderBullseye } from "./bullseye.js"; | ||
| import { identitiesFor, isComposed, repositoryVocabulary } from "./composed-model.js"; |
Comment on lines
+444
to
+449
| line.appendChild(el("span", "n", row.documents.length + " doc" | ||
| + (row.documents.length === 1 ? "" : "s"))); | ||
| const go = el("button", "cbtn", "drill in"); | ||
| go.type = "button"; | ||
| go.title = "scope the dashboard to these " + row.documents.length | ||
| + " document" + (row.documents.length === 1 ? "" : "s"); |
Comment on lines
+432
to
+436
| if (!rows.length) { | ||
| pane.appendChild(el("div", "drill-empty", | ||
| "No " + ctx.vocab.term + " is visible — tick one to draw the bullseye.")); | ||
| return pane; | ||
| } |
Comment on lines
+637
to
+639
| if (vocab.id === "repositories" && options.onVisible) { | ||
| options.onVisible([...state.checked]); | ||
| } |
Comment on lines
+777
to
+782
| rawSnapshot, visible: view ? view.visible : null, | ||
| onVisible: (repositories) => { | ||
| if (!composed) return; | ||
| storeViewState(rawSnapshot.repository, | ||
| { visible: repositories, mode: view.mode }); | ||
| }, |
brettheap
added a commit
that referenced
this pull request
Nov 23, 2026
…tirement-accounting Brett Heap ratified #1365 at 89dbe6e with #104 at ea7a46206413 for source acceptance only, authorized ordered landing when green, then isolated P07 continuation. All required runnable checks pass at the exact head and local nine-role Codex review is clear. The author and authenticated actor are both brettheap; the standing self-authored-PR approval exception permits bypassing only missing human approval. No checks, rules or source bytes are changed. Main added only the independently landed #1366 exact QA receipt registration/test, with no overlap in this candidate. Local merge-tree verifies the combined tree before landing; separate post-merge CI remains required evidence. Factory lands before wallet #104. Setup/dispatch unauthorized; feedback deferred; blocked writes unreplayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Realizes Brett's observation that the repository filter and the keyword lens are the same mechanism, plus the three realization choices he made: the switch lives in the Lens tab, the filter keeps its own quick control with the lens as the deep view, and the drill-in is a scoped view with no new persistence.
The insight, made structural
buildLensModelreads a snapshot in exactly two places — the vocabulary with counts, and which terms a document carries. Everything downstream is vocabulary-agnostic. SorepositoryVocabulary()re-expresses a composed snapshot in the lens's own shape (terms = member repositories, "documents" = cross-repository document IDENTITIES) and the entire widget serves the repository plane with no engine change: rings, sectors, dots, label-collision geometry, co-occurrence hints, andbullseye.jsitself.Rings become carrier counts, which also names the filter's modes in the lens's vocabulary: union is ring 1 and inward, shared is ring 2 and inward, and the old strict intersection was the centre.
What ships
No contract growth: no schema, route, or gate verb. Saving a repository recipe (workbench manifest / add-as-cluster) is deliberately out of scope and would be a successor change with real gate-verb growth.
Two guards moved, both stating the new rule
ctx.onDrill ? { onActivate: … } : undefined, with the handler existing only for the repository vocabulary — the keyword lens still passes no opts, so its regions stay inert.guardedSessionStorage()(the blocked-site-data seam), which is what the doxbench transport guard was protecting.Verification
domains: rail of 5 with identity counts, 219 identities on rings 5..1 (215/1/1/2), sectors naming real combinations includingdocs/credentialing.mdunder Ledgerx ∧ Ops ∧ codex; unticking redrew to 4 repos / 214 identities with no reload and moved the filter label to "⧩ 4 of 5 Repos"; centre drill-in scoped to 8 documents / 2 identities andclearrestored. Zero console errors, page errors, >=400 responses.openspec validate --all --strictgreen.Task 4.4 (Brett's first real drill-in session) stays open.
🤖 Generated with Claude Code