Skip to content

fix(web): match ConditionsEditor's flat lhs/rhs to the tagged where-condition shape - #223

Merged
07prajwal2000 merged 1 commit into
Fluxify-rest:mainfrom
07prajwal2000:fix/web-conditions-tagged-union
Aug 8, 2026
Merged

fix(web): match ConditionsEditor's flat lhs/rhs to the tagged where-condition shape#223
07prajwal2000 merged 1 commit into
Fluxify-rest:mainfrom
07prajwal2000:fix/web-conditions-tagged-union

Conversation

@07prajwal2000

Copy link
Copy Markdown
Collaborator

Summary

Found while verifying #222 (the bun.lock/Docker fix) with a real docker build: even after fixing the frozen-lockfile install, every Dockerfile still failed later at bun run build, on a genuine next build type-check error in apps/web unrelated to the lockfile.

whereConditionSchema's attribute/value became a tagged { kind, value } union (column vs literal) in packages/blocks/builtin/db/schema.ts, but 4 db block settings panels still passed those tagged objects straight through to the legacy ConditionsEditor, which expects flat string | number | boolean:

  • apps/web/src/components/editor/blocks/builtin/database/delete.tsx
  • apps/web/src/components/editor/blocks/builtin/database/getAll.tsx
  • apps/web/src/components/editor/blocks/builtin/database/getSingle.tsx
  • apps/web/src/components/editor/blocks/builtin/database/update.tsx

Fixed by unwrapping .value on read and re-tagging (column for lhs, literal for rhs) on write — the same approach apps/portal's serializeDbConditions/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 build passes (was failing with a type error in delete.tsx before the fix).
  • Full bun run build (all 4 workspace build tasks: web, portal, server, ai-gateway) passes.
  • Built docker/kit/Dockerfile end-to-end locally (docker build, all 3 stages) — succeeded. Test image removed afterward.
  • Pre-commit hook (lint, secret scan, fta analysis, unit tests) passed clean.

🤖 Generated with Claude Code

…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>
@07prajwal2000
07prajwal2000 added this pull request to the merge queue Aug 8, 2026
Merged via the queue into Fluxify-rest:main with commit 0016249 Aug 8, 2026
12 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.

1 participant