attributes selector does not discriminate from attributes collection
image

we shoudl show only attributes for the current collection, not all in the site.


Solution

PR #1421 was reworked to match Horacio's latest product answer: list every attribute saved on any document in the collection or query result, including empty values. Schema-only fields (such as Word Count) are no longer added; all-empty saved keys are no longer hidden. attributesSchema and childAttributesSchema remain excluded. Applies to collection pages and embedded Query blocks. This replaces the previous schema-plus-discovered-keys solution.

Root cause: getQueryBlockFilterOptions and buildQueryTableColumns already scoped discovered keys to the collection's documents, not the whole site, but excluded only BUILTIN_METADATA_KEYS. The schema-binding keys were not in that set, so they appeared as attributes: the earlier data fetch found childAttributesSchema on 66 Issue Tracker children and attributesSchema on 19 Notes children.

Verification reported by T3 — head 7de3c0f77: Four new regression tests (two table-model, one query-block-filter, one query-block-content) fail on old source and pass after. Before the final cleanup commit, typecheck and format check passed, shared tests passed (1771), and web tests passed (791). After simplifying two expressions without behavioral changes, touched UI query-block tests passed (71), shared query-block-filter tests passed (35), UI/shared typechecks and prettier passed. Full suites were not rerun after that final cleanup. Playwright Chromium captured the local production build with a local daemon test collection. Full agent-ci was not run because Docker is unavailable; GitHub CI remains the first full run.

Real-data expectations from the earlier fetch, not rerun after this rework: Issue Tracker would list Activity, AgentThread, Assignee, Owner, Priority, Project, Status, Type, User Story, status. Notes would list Assignee, Bitcoin, Status, Tags, User Story, auth, executor, limits, mode, secrets, service. Only the schema-binding keys are newly excluded.

Where exclusions live: App code, not a stored Seed exclusion list. Existing BUILTIN_METADATA_KEYS still excludes built-in page metadata. SCHEMA_BINDING_METADATA_KEYS in hm-types.ts lists attributesSchema and childAttributesSchema; the filter-options and table-column builders skip those keys. The previous schema-property union and empty-value filtering were removed. AgentThread remains visible as a saved attribute.

Before / After

Before: Unmodified code lists Child Attributes Schema alongside Assignee, Priority and Tags.

Before: Unmodified code: the Attributes popover lists the schema key 'Child Attributes Schema' next to Assignee, Priority and Tags.

After: Saved attributes, including empty Assignee, remain; schema-binding and schema-only fields are absent.

After: With the fix: every saved attribute is listed (Assignee, empty on every document; Priority; Tags), without 'Child Attributes Schema' or fields that only the schema declares.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Attributes
Type
(empty)
name
attributes selector does not discriminate from attributes collection
Owner
Status
Done
status
(empty)
Activity
(empty)
Priority
Low
User Story
(empty)
AgentThread
mcp:a570a86f-73e8-4612-ba62-e547e7665944
Attributes schemaThe fields this document carries.
Inherited from the parent's children attributes schema
Fetching schema…