Skip to content

Feat/finmmtl 310 add multi relative filters#45

Merged
garethj2 merged 5 commits into
masterfrom
feat/FINMMTL-310-add-multi-relative-filters
Jun 24, 2026
Merged

Feat/finmmtl 310 add multi relative filters#45
garethj2 merged 5 commits into
masterfrom
feat/FINMMTL-310-add-multi-relative-filters

Conversation

@garethj2

@garethj2 garethj2 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Add relativizeOn support for customizing relative Haystack filters. This work introduces a new relativizeOn mechanism that allows records to define their own preferred tags for relativization, replacing the previous hardcoded logic in src/filter/util.ts.

Key changes:

  • New src/filter/relativize.ts module replaces src/filter/util.ts
  • Records can now define a relativizeOn tag (HList of HStr) to specify which tags should be used when generating relative filters
    • Supports special expansion identifiers:
      • {dis} — expands to the first available display name tag (dis, name, tag, or navName)
      • {markers} — expands to all marker tags on the record
      • {kind} — expands to the kind tag for point records
  • New makeRelativeHaystackFilterForTarget() function generates relative filters for a target record by traversing the containment hierarchy
  • Supports resolveCache for efficient resolution across multiple calls
  • New options: useRelativizeOn, includeIntermediateRecords, includeTargetMacro, resolve, resolveCache, and prefixPath
  • Comprehensive test coverage for all new functionality

@garethj2 garethj2 merged commit 113156b into master Jun 24, 2026
1 check passed
@garethj2 garethj2 deleted the feat/FINMMTL-310-add-multi-relative-filters branch June 24, 2026 08:36
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