fix(web): match ConditionsEditor's flat lhs/rhs to the tagged where-condition shape - #223
Merged
07prajwal2000 merged 1 commit intoAug 8, 2026
Conversation
…ondition shape
whereConditionSchema's attribute/value became a tagged { kind, value } union
(column vs literal), but the db block settings panels still passed the
tagged objects straight through to ConditionsEditor, which expects flat
string/number/boolean. This broke `next build`'s type check for the whole
monorepo build, so every Docker image (kit/admin/worker-compiled) failed
at `bun run build` even after the frozen-lockfile fix. Unwrap .value on
read and re-tag (column for lhs, literal for rhs) on write, matching how
apps/portal's serializeDbConditions/parseDbConditions already do it for
the current db block settings panels.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Found while verifying #222 (the
bun.lock/Docker fix) with a realdocker build: even after fixing the frozen-lockfile install, every Dockerfile still failed later atbun run build, on a genuinenext buildtype-check error inapps/webunrelated to the lockfile.whereConditionSchema'sattribute/valuebecame a tagged{ kind, value }union (column vs literal) inpackages/blocks/builtin/db/schema.ts, but 4 db block settings panels still passed those tagged objects straight through to the legacyConditionsEditor, which expects flatstring | number | boolean:apps/web/src/components/editor/blocks/builtin/database/delete.tsxapps/web/src/components/editor/blocks/builtin/database/getAll.tsxapps/web/src/components/editor/blocks/builtin/database/getSingle.tsxapps/web/src/components/editor/blocks/builtin/database/update.tsxFixed by unwrapping
.valueon read and re-tagging (columnfor lhs,literalfor rhs) on write — the same approachapps/portal'sserializeDbConditions/parseDbConditions(apps/portal/src/components/canvas/panel/blocks/db/conditions.ts) already use for the current db block settings panels.Test plan
bun run --cwd apps/web buildpasses (was failing with a type error indelete.tsxbefore the fix).bun run build(all 4 workspace build tasks: web, portal, server, ai-gateway) passes.docker/kit/Dockerfileend-to-end locally (docker build, all 3 stages) — succeeded. Test image removed afterward.🤖 Generated with Claude Code