Skip to content

fix(ui): show structured metadata lists without flattening their records - #969

Merged
runkids merged 3 commits into
runkids:mainfrom
salmonumbrella:fix/okf-structured-metadata-lists
Nov 21, 2026
Merged

runkids merged 3 commits into
runkids:mainfrom
salmonumbrella:fix/okf-structured-metadata-lists

Conversation

@salmonumbrella

Copy link
Copy Markdown
Contributor

Type

  • Bug fix
  • Small improvement (docs, typo, minor refactor)
  • Feature proposal (proposals/ only — see CONTRIBUTING.md)
  • Approved feature or large change (the linked issue has the approved label)

Summary

In the Fields view, lists containing mappings or nested lists (for example metadata.sources, metadata.verified, or an x- extension with a mixed list) were shown as an empty comma-separated input, and typing replaced the records with strings.

Now custom root and metadata values that are mappings, or lists containing mappings or nested lists, use the existing read-only JSON view and labels. Records survive unrelated edits, save and reopen. The row's remove control still deletes them. Scalar lists such as metadata.targets stay editable. wiki/frontend.md documents the rule.

Testing

  • A new FrontmatterEditor regression test fails on the base branch and passes with this change.
  • 18 focused component and frontmatter round-trip tests pass.
  • Typecheck, targeted oxlint/oxfmt and the context router pass.

Linked Issue

Partial context for #894 and #637; does not close either.

Checklist

  • I've read CONTRIBUTING.md, including its AI-assisted contributions section
  • I've reviewed every line of the diff and can explain it — AI review completed; human review pending
  • Tests included and passing (make check) — for code changes — focused checks only (above); full make check not run
  • No unrelated changes in the diff
  • Scope is focused — one concern per PR

AI-assisted implementation and review.

Refs #894
Refs #637

Show structured custom lists as read-only JSON so editing another field cannot obscure records or invite accidental replacement with strings.
Keep the save and removal coverage required for structured lists while avoiding repeated checks of values already verified after reopening.
@salmonumbrella

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T11:53:59.348551Z 3183b9c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 3183b9c178

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@salmonumbrella
salmonumbrella marked this pull request as ready for review November 20, 2026 11:51
@runkids

runkids commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Thanks @salmonumbrella. This does what the description says: on main a list of mappings renders as an empty input and typing replaces the records; with this change it uses the read-only JSON view, and scalar lists stay editable. I ran the new test against main (fails) and against this branch (passes).

One thing before we merge: please tick "reviewed every line" yourself.

Optional, not blocking: the four toHaveTextContent assertions check displayed text, which wiki/frontend.md (Dashboard Tests) leaves to screenshots. The textbox check and the save round trip are enough.

@runkids
runkids merged commit 8690918 into runkids:main Nov 21, 2026
10 checks passed
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