You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(tables): normalize contact filter values, keep clears through a retype
Greptile's P1: an equality filter on an Email or Phone column matched nothing.
`parseFilterScalar` gated type-aware parsing on `jsonbCast !== null`, but that
asks how the comparison is PERFORMED, not whether the stored form differs from
what the user typed. Email and Phone canonicalize on write and compare as text,
so they were skipped — a filter for `Ada@Example.com` was accepted and then
silently missed the stored `ada@example.com`, likewise `020 1234 5678` against
`+442071234567`. Types now declare `canonicalizesValues`, which is the question
the filter actually needs answered.
Second: a type change carrying `precision: null` dropped the clear. The routes
stripped nulls before `updateColumnType`, and `buildConvertedColumn` carries
un-supplied keys forward from the old column — so the stripped null read as
"not mentioned" and restored the very setting the user had cleared. Clears now
reach the retype, where absent and cleared are finally distinguishable.
`metadataWithoutClears` keeps serving the create and validate paths, which have
nothing to remove; its comment claiming the retype rebuilt from scratch was
simply wrong.
`buildConvertedColumn` is exported for the test, matching the three helpers this
module already exports for the same reason.
0 commit comments