Skip to content

Filtering a multi-element array doesn’t work [Views] #664

@natesilva

Description

@natesilva

To reproduce:

  1. Add multiple tags to a note’s frontmatter:
tags:
  - blues
  - chicago
  1. Create a view with a condition that filters on one of the tags, like tags / contains / blues:
Image

Expected result:

The view should include the note that has the blues tag.

Actual result:

The note is not included in the view.

⚠️ In the Tolaria sidebar, you may have to click away from the view, and then go back to the view -- or restart Tolaria -- to see the problem in effect.

Workaround:

  • If the tag is a wikilink, it will be included in the view.
  • If there is only one tag on the note, it will be included in the view.

Reproducibility

I can sometimes repro this bug and sometimes not. Sorry about that. It is a real issue. I am not familiar with the codebase, but AI claims this is the reason:

The "sometimes works" path (frontend)

When you edit tags through the property panel UI, scalarPropertyValue() in src/hooks/frontmatterOps.ts:101-104 converts ["music-venue", "chicago", "blues"] into the string "music-venue,chicago,blues" and writes that into entry.properties.tags. The contains filter then works by accident — "music-venue,chicago,blues".includes("music-venue") is true.

The "breaks it" path (Rust re-parse)

Any time the Rust backend re-parses the file (save, vault reload, file change, reload_vault_entry), extract_properties() in src-tauri/src/vault/frontmatter.rs:293-327 encounters the multi-element YAML array and silently drops it entirely — the key doesn't appear in properties at all. Now contains("music-venue") resolves to null → false.

So the pattern is:

Event entry.properties.tags Filter works?
Just edited tags in UI "music-venue,chicago,blues" (string) Yes (substring match)
After save / reload / re-parse absent (dropped by Rust) No

This also means the contains filter gives false positives on the stringified form — contains("chi") would match because "chicago" contains "chi", and contains("blues") would also match "music-venue,chicago,blues" as a substring, but that's not element-level matching.

Screen capture video

Screen.Recording.2026-05-14.at.9.24.21.PM.mp4

Tolaria sanitized diagnostics
Generated: 2026-05-15T03:22:40.704Z
Build: 2026.5.14
Release channel: stable
Runtime: tauri
Platform: MacIntel
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)

Recent diagnostics:
No safe recent diagnostics were available.

Notes: paths and token-like strings are redacted. This bundle is sanitized and optional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions