Code reference detail
wildcard-references.test.ts
reqlan rq/language/packages/language/test/wildcard-references.test.ts
| Idea | Status | Tags | Summary | Katz |
|---|---|---|---|---|
| idea_path_filter | done | Shared path-filter helper for [wildcard_references_webview] search seeding. Glob or substring match against workspace-relative path and file URI; leading `./` / `../` segments are stripped for relative filters; `**/` is implied when the filter has glob meta but is not already rooted with `**/`. Used only as a hard AND after fuzzy ranking — it never replaces the idea-name query. | 0.078 | |
| wildcard_references | done | Qualified path + idea-pattern references match multiple ideas across files. Surface forms: bracket `[…]` and wikilink `[[…]]` ( same `WildcardReference` target ). Path is a quoted string that may include shell-style globs ( `*`, `**`, `?` ) and `@/` import-root aliases ( [configuration_import_root_alias] ). Relative globs resolve against the defining document directory; `.` / `..` segments are collapsed before matching. Idea pattern is an unquoted `WILDCARD_NAME` that must contain at least one `*` or `?` Exact quoted-path plus idea stays ["./syntax.rq".reference_qualified]. Matching uses anchored globs ( not full JS regex ): path `*` is one segment, `**` crosses segments; idea `*` / `?` match within the idea name. Zero matches produce a warning diagnostic. One match also produces a warning — a wildcard is for many ideas; use a concrete ["./syntax.rq".reference_qualified] when only one idea matches ( ["../core_analysis/check.rq".check_wildcard_one] ). Path segment `/**/` must not be lexed as an empty block comment — see ["./syntax.rq".comments]. Lexer note: `ID` is a prefix of many wildcard names ( `import_` vs `import_*` ); the token builder sets `ID.LONGER_ALT = WILDCARD_NAME` so `import_*` is one token. Body prose `*` tokens are accepted via `WILDCARD_NAME` in PlainText so ordinary `*` characters still parse. Without that longer-alt, a live wildcard inside a block body can fail Idea recovery and leave later top-level ideas unindexed ( soft mtime sync will not rebuild until the `.rq` file changes ). Navigation does not emit N LocationLinks. A document-link click opens `reqlan.openWildcardReference` with `{ pathPattern, ideaPattern, fromUri }` ( see [wildcard_references_webview] ). Go-to-definition does not open that panel. Indexing fans out per ["../indexer/indexer.rq".wildcard_reference_edges] ( owned under ["../indexer/indexer.rq".index] ): native extract writes one `wildcard_reference` edge per catalog match; empty catalog / zero matches → one unresolved edge of that kind labeled with the pattern text. ["../core_analysis/check.rq".check] handles 0 - match and 1 - match fan-out through ["../core_analysis/check.rq".check_wildcard_zero] and ["../core_analysis/check.rq".check_wildcard_one] ( ["../core_analysis/check.rq".check_wildcard_sparse] ). Ideas Summary graph toggles those edges via ["../extension/workspace-summary/ideas_summary/graphical_graph.rq".wildcard_refs_toggle]. The server can answer `reqlan/wildcardReferenceAt`. Go-to-definition does not call it. Related: ["./syntax.rq".reference_embedding], ["./syntax.rq".reference_brackets], ["./syntax.rq".reference_wikilink], ["../indexer/indexer.rq".wildcard_reference_edges], ["../core_analysis/check.rq".check_wildcard_sparse], ["../core_analysis/check.rq".check_wildcard_zero], ["../core_analysis/check.rq".check_wildcard_one]. Illustrative forms ( fenced so this file does not embed live wildcards ): | 0.486 | |
| wildcard_references_webview | done | A click on the command document link for a [wildcard_references] target runs `reqlan.openWildcardReference` and opens a dedicated **wildcard matches** webview ( beside the editor ) that lists: - Stats: matching idea count, distinct file count, and @ status breakdown - Requirements: each matching idea with name, status, path, and summary ( click opens the idea ) - Files: each matching file with idea count ( click opens the file ) Secondary action **Open in Search** seeds the activity-bar ["../extension/local-context/activitybar-panels/search.rq".search_pane_seed] via `focusIdeaSearch` with: - `query`: idea pattern with glob meta softened for fuzzy search ( `import_*` → `import` ) - `pathFilter`: the path glob as a hard AND filter ( [idea_path_filter] ) Payload builder: `buildWildcardMatchesPayload` filters the index catalog by idea glob + path filter. Protocol for the matches panel is inline host ↔ webview ( `init` / `openIdea` / `openFile` / `openSearch` ). The document-link target is the command URI. Go-to-definition does not open the panel. Highlighting of the source reference must stay link-styled — see ["../extension/language/syntax/features-syntax.rq".syntax_highlighting] and ["../extension/language/syntax/features-syntax-highlighting.rq".wildcard_reference_highlighting]. | 0.199 |
Reference labels
idea_path_filter, wildcard_references, wildcard_references_webview