Repository navigation
Description
Summary
When a property that has closed values is changed to type Node, the
closed values are not removed. They also stop being visible anywhere in the UI,
because Logseq does not render a closed-value list for Node properties.
The result is a property that looks correctly configured in every screen the UI
offers, but still carries a stale enum in the database. That enum is still
enforced by validate-db's fix-non-closed-values! pass, which deletes any
value not in it — and since a Node property's values are node references while
the orphaned enum holds text choices, every value of that property is
eligible for deletion.
This issue is about the orphaned state itself. The deletion behaviour is filed
separately as a companion issue, because the two are independently fixable: a
graph that already contains an orphaned enum stays dangerous even if the
deletion pass is corrected, and correcting the type-change path does nothing for
graphs already in this state.
Version
Logseq DB version, desktop macOS arm64 (build 2287).
db-worker-node build-time 2026-07-28T15:15:45Z, revision 9a11243-dirty.
Steps to reproduce
- Create a property with type Text and give it two closed values
(e.g.raster,vector). - Change the property's type to Node.
- Open the property's configuration and look for the closed values.
Expected: either the closed values were removed as part of the type change,
or they are shown somewhere so the user knows they still exist — or the type
change is refused while closed values exist, the way a many→one cardinality
change is already refused when data would be lost.
Actual: the closed values are still in the database, reachable via
:block/_closed-value-property, but appear in no UI surface. There is no way to
discover or delete them from within the app.
Evidence from a real graph
In the graph where this was found, the affected property was the only one of
eleven closed-value properties whose logseq.property/type was node; the
other ten were all default.
Creation timestamps show the ordering: the property was created at
1783816803975 and its first closed value at 1783816803982 — seven
milliseconds later, i.e. created together as a Text property with an enum. The
second closed value followed about three days on. Both long predate the type
being node.
There is no UI path to add closed values to a Node property, so they cannot have
been added after the change. The only consistent reading is that the property
was retyped and the closed values were left behind.
Why it matters
The invisibility is the harmful part. A user inspecting the property sees a
correctly configured Node property. Nothing indicates that a stale enum exists,
that it is still being enforced, or that running "Validate graph" will delete
data because of it.
Verified fix in that graph: deleting the two orphaned closed-value entities
directly made the property behave correctly, because fix-non-closed-values!
selects on :block/_closed-value-property and skips properties with none. That
repair required going outside the app.
Suggested fixes
- Remove closed values when a property's type changes to one that does not
support them. - Or refuse the type change while closed values exist, with a message,
matching the existing precedent for many→one cardinality changes. - Failing either, surface orphaned closed values in the property
configuration UI so they can be seen and removed.
Related
Companion issue: #1068 — validate-db's fix passes silently delete user data
(no notification, :debug-only logging, no :block/updated-at bump, no UI
refresh). That issue is what turned this configuration inconsistency into
actual lost work.
Activity
tiensonqin commentedon Aug 18, 2026
@ChipNowacek afaik property type can't be changed after it's used, can you provide more reproducible steps on how you manage to change the property type?
ChipNowacek commentedon Aug 18, 2026
The type change is blocked only while the property currently has values —
update-propertytests(seq (d/datoms @conn :avet db-ident))(deps/outliner/src/logseq/outliner/property.cljs:323). Closed values don't produce those datoms, so clearing the assigned values makes the property count as unused again and the change goes through.On a fresh graph:
arm-a, type Text.rasterandvectorto two blocks.The enum is still attached afterwards:
with
194's:logseq.property/type=node.fix(property): give the closed-values type-change refusal an i18n key
yuxi-liu-wired commentedon Oct 27, 2026
Fixed in logseq/logseq#13882 (fix(db): deleting or converting a node no longer leaves what depended on it broken). Its description has the cause and the test that pins it; it fails on current master and passes with the fix.
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key
fix(property): refuse a property type change while it has closed values
fix(property): give the closed-values type-change refusal an i18n key