Skip to content

Fix the Properties panel rejecting Obsidian-style empty tags: /…#400

Merged
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync
Jun 30, 2026
Merged

Fix the Properties panel rejecting Obsidian-style empty tags: /…#400
inkeep-oss-sync[bot] merged 1 commit into
mainfrom
copybara/sync

Conversation

@inkeep-oss-sync

Copy link
Copy Markdown
Contributor

Fix the Properties panel rejecting Obsidian-style empty tags: / aliases: frontmatter. Files that use Obsidian's default "no tags" shape (an empty tags: list whose only item is a blank - , or a bare tags: with no value) parse to YAML null, which the read schema previously rejected for the whole frontmatter block — so the panel showed nothing (or an error banner) and refused every edit, even to the file's other valid properties. The read path now coerces these empty shapes to empty values (tags:\n- reads as an empty list, a bare tags: as empty text), so the panel reads and edits these files normally. Files are not rewritten on disk until you actually edit a property.

…tter (PRD-7216) (#2295)

* fix(open-knowledge): accept Obsidian-style empty tags/aliases frontmatter (PRD-7216)

Obsidian writes an empty `tags:` / `aliases:` list as a one-element block
sequence whose only item is blank (`tags:\n- `), and a bare `tags:` as a
null scalar. yaml@2 parses both to `null`, which the frontmatter read
schema excluded (null is the RFC 7396 merge-patch delete sentinel). Because
parseFmRegion validates the whole map, one empty list rejected the entire
block: the Properties panel showed nothing and refused every edit, even to
the file's other valid keys. ~92% of a real Obsidian vault is affected.

Coerce these null shapes to empty values at the single read-path boundary
(z.preprocess on FrontmatterMapSchema): null seq element -> dropped
([null] -> []), null mapping value -> '' (empty text). Both structured
readers (parseFmRegion for the panel; parseFrontmatterYaml for disk, the
agent-write gate, and the tag indexer) inherit it, so they can't drift.
The coercion rewrites only the JS view; the yaml CST the write path mutates
is untouched, so files aren't rewritten on disk until the user edits a
property. null stays out of the per-value write/patch schema, so it still
means delete in RFC 7396 patches.

Whole-block reflow on first edit (PRD-7217) is separate and out of scope.

* review: drop session-stat/PRD markers from source comments; pin Obsidian-null at the agent-write HTTP gate

Addresses claude[bot] review on #2295:
- Remove the `~92%` session statistic from the `coerceNullFrontmatter`
  JSDoc and the region test comment (it lives in the commit message; in
  source it rots without a reproducible query — OK comment discipline).
- Drop the new `PRD-7217` marker from a test comment; keep the substance
  ("a separate, pre-existing concern").
- Add an integration test: a `replace` agent-write of Obsidian's
  `tags:\n- ` / `aliases:\n- ` shape returns 200 (not 400) and reads back
  coerced, pinning the HTTP boundary so a future early-guard before the
  schema call can't silently regress it.

---------

GitOrigin-RevId: 372b7b9e97091b67debc96a574bed54cec02d923

@inkeep-internal-ci inkeep-internal-ci Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval from agents-private public-mirror-sync (run: https://github.com/inkeep/agents-private/actions/runs/28475439166). Source of truth is the monorepo; direct edits on inkeep/open-knowledge are overwritten on next sync.

@inkeep-oss-sync
inkeep-oss-sync Bot merged commit 4072290 into main Jun 30, 2026
1 check passed
@inkeep-oss-sync
inkeep-oss-sync Bot deleted the copybara/sync branch June 30, 2026 21:02
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.

1 participant