Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

[app-shell] ActionParamDialog filterVisibleParams resolves a broken param visible SILENTLY, and in a direction decided by the predicate's dialect #4640

Closed

Description

@yinlianghui

Found while verifying objectstack-ai/objectstack#8500. Filed unassigned for triage — it is a
different evaluation face from that card (action param visibility, not action
visibility), and either way of fixing it flips a deliberately-pinned test, so it wants its
own decision rather than a rider.

Where

packages/app-shell/src/views/ActionParamDialog.tsx, filterVisibleParams — the gate in
front of every param the action param-collection dialog offers:

return params.filter((p) => {
  if (!p.visible) return true;
  try {
    return evaluator.evaluateCondition(p.visible);
  } catch {
    return true;
  }
});

This is also, almost certainly, the site objectstack#8500 quoted out of the minified
RecordDetailView-*.js chunk as try { return n.evaluateCondition(e.visible) } catch { return true }
— .visible read off a loop variable matches here literally, and the dialog is in that
chunk. (The header-action path that card is about is a different one and behaves
correctly; see the report on that card.)

Measured

Probed directly against filterVisibleParams on main (5bf5d2cb6), scope
{ os: { user: { id: 'u1' } }, record: { manager: 'u1' } }, one param:

visible param kept? warnings
record.@@@ bad (unparseable) kept (fail-open) 0 — silent
nope_undeclared == 1 (undeclared identifier) kept (fail-open) 0 — silent
${record.missing.id == 1} (legacy dialect, faults) dropped (fail-closed) 0 — silent
{ dialect: 'cel', source: 'not ] valid (' } kept (fail-open) 1
{ dialect: 'cel', source: 'os.user.id == record.manager.id' } kept (fail-open) 1
os.user.id == "u1" / == "u2" kept / dropped 0 (genuine verdicts)

Two things fall out:

  1. Silence. Three of the fault rows emit nothing at all. That is the state the standing
    2026-08-06 ruling on Conditional-visibility predicates (visibleWhen / visibleOn) fail OPEN and silently — a broken predicate is indistinguishable from no predicate #4051 / objectstack#5149 names as the one option that is not
    available: fail-open or fail-closed may be chosen, silent may not. Only the
    { dialect, source } envelope rows are loud, and they are loud by accident — the
    canonical helper one layer down warns for them, not this function.
  2. The fail direction is decided by the predicate's dialect, not by the surface. A bare
    string routes to the legacy JS evaluator (lenient, returns falsy, param silently
    DROPPED); an envelope routes to CEL (faults, param silently KEPT). One visible key,
    two opposite outcomes, chosen by whether the authored text happens to contain ${…} /
    === — which is the objectui#3314 shape, on a function that never got the
    toPredicateInput / evalRowPredicate conversion the rest of the predicate faces did.

Impact is asymmetric and both halves are bad: a silently DROPPED param means the dialog
never collects a value the server requires, so the action fails on submit with nothing
pointing at the predicate; a silently KEPT one offers a field the backend rejects, which is
the exact case create_user's features.phoneNumber == true gate exists to prevent.

Why this needs a decision rather than a patch

Neither obvious fix is verdict-neutral, and each flips a test that was pinned on purpose in
ActionParamDialog.test.tsx:

  • throwOnError: true + fail-open + warn flips "hides a feature-gated param when the
    flag is absent (conservative)"
    — under CEL a missing key is a fault, so
    features.phoneNumber == true against features: {} would start SHOWING the param.
  • throwOnError: true + fail-closed + warn keeps that one but flips "defaults to
    visible when the predicate is malformed (fail-open)"
    , and fail-closed on a param can
    hide a field the user must fill.
  • Routing through the canonical evalRowPredicate (which is what would end the dialect
    split and get the warn-once + label for free) additionally re-pins record / data to
    the row, and this surface's scope is the host predicate scope, which carries its own
    data. That shadowing is a behaviour change on its own.

My recommendation, for what it is worth: fail-open + loud, on the canonical entry, with
the data shadowing handled explicitly — a hidden required param is the harder failure to
diagnose than an extra field the server rejects with a message. But the conservative
feature-flag case is a real requirement pulling the other way and should be ruled on, not
guessed.

Blocked-by: nothing. Related: #4051 (the funnel that was loudened in rc.5),
objectstack-ai/objectstack#8500 (where this was measured), #3314 (one value, one answer).

Activity

  1. added theissue type on Aug 14, 2026
  2. os-zhuang commented on Aug 15, 2026

    @os-zhuang
    Contributor

    Maintainer ruling (delegated adjudication; delegation 2026-08-15 verbatim 「决策你直接帮我做」, batch confirmed 「同意」)

    Ruled: route through the canonical entry, fail-open + loud — with both pinned outcomes surviving. The mechanism is the implementer's; the outcomes are not.

    Binding outcomes:

    • (a) Genuine predicate faults (unparseable source, true evaluation fault) → fail-open, with a loud warning. Silent is not available (standing 2026-08-06 ruling on Conditional-visibility predicates (visibleWhen / visibleOn) fail OPEN and silently — a broken predicate is indistinguishable from no predicate #4051 / objectstack#5149). Fail direction: a silently hidden required param is the undiagnosable failure (the action fails on submit with nothing pointing at the predicate); an extra visible field gets a server rejection with a message. Two harms, the self-diagnosing one wins.
    • (b) The conservative feature-flag outcome survives: features.phoneNumber == true against features: {} must still evaluate false and hide the param. An absent-key comparison is a verdict, not a fault — it must not ride the fail-open branch. The ActionParamDialog.test.tsx pin "hides a feature-gated param when the flag is absent" keeps its outcome (the pin itself may be rewritten to assert the same outcome through the new entry, stated in the changeset).
    • (c) One dialect answer: the function goes through the canonical evalRowPredicate entry (ending the bare-string-vs-envelope fork deciding the fail direction — the ActionEngine.getActionsForLocation 把 CEL 信封塌回 legacy JS 求值路径,与每个渲染器的判决不一致 #3314 shape), and the data shadowing this surface carries is handled explicitly as the card requires, not inherited silently.

    ⛔ If implementation shows (a) and (b) cannot both be satisfied on the canonical entry, stop and report — do not sacrifice either to ship.

    Label flipped needs-user-decision → pm:queue.


    Generated by Claude Code

  3. yinlianghui commented on Aug 15, 2026

    @yinlianghui
    ContributorAuthor

    DELEGATED RULING — Option A: fail-open + loud, on the canonical entry (auto-adjudicated; seat session session_01RnQd8iMMUwXQEV1crFmQiQ, 2026-08-15, under the maintainer's in-session delegation. Veto window OPEN.)

    Ruling: filterVisibleParams routes through the canonical evalRowPredicate entry with throwOnError + warn-once; a faulting param visible resolves fail-open (param shown) with one named warning. The record/data shadowing the canonical entry introduces is handled explicitly — this surface's scope keeps its own data (the implementation names how in the PR body). The dialect fork (bare string → legacy JS → silent drop; envelope → CEL → silent keep) is deleted, not braced.

    Confidence-gate basis: the standing 2026-08-06 maintainer ruling on this class already delegates the direction — "fail-open or fail-closed may be chosen, silent may not" — so choosing A implements that ruling rather than making a new one. The two tests A flips are dev-authored pins with no maintainer provenance (checked), so nothing standing is overturned. Four prongs, aligned: business — a silently dropped REQUIRED param is the undiagnosable failure (action fails at submit with nothing pointing at the predicate), while the one measured consumer of the conservative direction (create_user's features.phoneNumber display gate) degrades to a server-rejected-with-message field; long-term — one evaluator, one answer (the objectui#3314 invariant), removing a dialect-dependent verdict; AI-error-resistance — the fault becomes visible at authoring time with the param named; scope — reuses the canonical entry, deletes a special case.

    Execution: needs-user-decision → pm:queue in the same stroke. The flipped pins must keep asserting substance (the new verdict + the warning's name), and the feature-flag case gets an explicit test documenting its new behavior — the honest counter-pull recorded in code, not lost.


    Generated by Claude Code

  4. self-assigned this
    on Aug 15, 2026
  5. yinlianghui commented on Aug 15, 2026

    @yinlianghui
    ContributorAuthor

    Claim: PM loop round 6
    Session: session_01RnQd8iMMUwXQEV1crFmQiQ
    Branch: claude/issue-4640-param-visible-loud
    Worktree: objectui-issue-4640
    Domain: repo:objectui
    File surface: packages/app-shell/src/views/ActionParamDialog.tsx (filterVisibleParams) + its test file + the canonical predicate entry in packages/core if a scope-shadowing knob is needed (evaluator region) (stop on breach; explain in the report)
    Container & model: M, mode:subagent, model: opus
    Serial constraints cleared: in-flight #4508 also touches packages/core but in the chart-series region (disjoint files, mutually named); RecordDetailView.tsx is free (#8499 merged test-only); #4644 holds metadata-admin field designer, #4648 holds parity/registry — disjoint; no open dev PR touches ActionParamDialog (checked this round).


    Generated by Claude Code

  6. yinlianghui commented on Aug 15, 2026

    @yinlianghui
    ContributorAuthor
    {
      "issue": 4640,
      "status": "done",
      "branch": "claude/issue-4640-param-visible-loud",
      "pr": "https://github.com/objectstack-ai/objectui/pull/4674",
      "premise_still_valid": true,
      "summary": "Card's table re-derived on current main (b1119ece4) — unchanged from 5bf5d2cb6, premise holds. filterVisibleParams now routes through the canonical evalRowPredicate: faults resolve fail-open with ONE warning naming the action and param and quoting the predicate, and the dialect fork (bare string -> legacy JS -> silent drop; envelope -> CEL -> silent keep) is deleted. The record/data shadowing is handled by a new explicit `rowless` option on the canonical entry (evaluator region, in the declared surface): this surface has no row, so nothing is bound over the host scope and its own data/record survive — the evaluation-entry half of the rule usePredicateRecordContext already states on the binding side (#4075); row surfaces keep the #3796 default untouched. Two routing-required guards: a boolean `visible` short-circuits as a verdict (#3492), and declaredness is asked once via hasDeclaredPredicate so blank/empty-envelope predicates are not reported as faults. ⚠️ TWO CARD COMMENTS DIFFER AND THE PM SHOULD SEE IT: the 01:59 ruling asserts an absent-key comparison is 'a verdict, not a fault' and adds a stop-clause; MEASURED, that premise is false on this engine — features.phoneNumber == true over features:{} fails with '[runtime] No such key: phoneNumber', so it takes the fail-open branch and the param is now SHOWN (loudly) where it used to be hidden silently. The 06:00 DELEGATED RULING (which the dispatch names as the spec) anticipates exactly this and requires the case documented as new behavior, so I implemented it and did not stop — flagging, not deciding. has(features.phoneNumber) && features.phoneNumber == true keeps the conservative outcome with no fault and is portable to the server; deployments that DECLARE the flag are unmoved. Also fixed in the same file/defect class, named with its evidence in the PR body: a faulting {dialect,source} envelope reported its source as the literal \"(expression)\" and, that being the warn-once key, the first faulting envelope under a label silenced every other one — the envelope is the shape spec normalizes every predicate into, so it was the likeliest and least diagnosable one, and it is precisely the shape this card's deliverable is about.",
      "tests": "All at 461d3bfa2 (final commit; git rev-parse --short HEAD from the same run). `pnpm exec vitest run packages/app-shell/src/views packages/core/src/evaluator` -> 'Test Files 254 passed (254) | Tests 2672 passed | 1 skipped (2673)'. Downstream consumers of the touched core entry (useExpression, page-header-predicate-dialect, page-header-actions, action-record-predicate-root, predicate-surface-parity, bulkEligibility, ConditionalFormattingEditor) -> '7 passed (7) | 213 passed (213)'. type-check for @object-ui/core + @object-ui/app-shell both 'Done', with the closure BUILT first (pnpm --workspace-concurrency=2 --filter '@object-ui/app-shell^...' build) and the rebuild verified reaching the artifact: `rowless?: boolean` present at packages/core/dist/evaluator/listConditional.d.ts:77. Gates run: check-control-bytes OK (4198 files), check-changeset-presence OK (4 source files of 2 released packages, 1 changeset), check-changeset-no-major OK, check-changeset-fixed OK, check-phantom-dependencies OK, check-type-check-coverage OK, check-lint-coverage OK, plus lint for both packages (0 errors, warnings pre-existing). Self-scan for control bytes over all 5 changed files: no matches. REVERSE VERIFICATION, direction predicted before each run: (1) restore the old catch{return true} -> predicted the card's silent verdicts resurrect; measured 8 red (2 loudness cases, warn-once, boolean verdict, both dialect-fork cases, feature-flag flip) — 2 MORE than I predicted, and the surprise is reported as measured: `has()` also fails on the old path because the legacy evaluator cannot answer it, so the migration spelling is itself a product of this change; (2) drop `rowless` only -> predicted exactly the two host-scope cases; measured exactly 2 red; (3) revert the envelope-source fix in core -> predicted one case per package; measured exactly those 2; (4) cross-package type check with rowless:\"yes\" from app-shell -> TS2322 'string' is not assignable to 'boolean | undefined', proving app-shell compiles against the REBUILT core .d.ts. Each leg ran from the committed state, restored via git checkout of the branch ref at that path; tree confirmed byte-identical to 461d3bfa2 (git diff HEAD --quiet) before the final green pass. No ablation in this card. skip-changeset label: N/A — this PR changes published source and ships a changeset (gate confirmed); the label read-back did not resolve through the available tools (get_labels rejects the PR number), so no label state is claimed.",
      "open_questions": [
        {
          "question": "The card's two 2026-08-15 ruling comments disagree on a measurable fact: the 01:59 comment says an absent-key comparison is 'a verdict, not a fault' and instructs to STOP if fail-open and the conservative feature-flag outcome cannot both hold; the 06:00 DELEGATED RULING (named as the spec by the dispatch) accepts the flip and requires it documented. Measurement settles the fact — it IS a fault ('[runtime] No such key: phoneNumber') — so the two cannot both be satisfied on the canonical entry.",
          "options": [
            "A - Ship as implemented (later ruling governs): fail-open + loud, the flip documented in code, has() named as the portable spelling that restores the conservative outcome.",
            "B - Honour the 01:59 stop-clause and hold the PR for a fresh maintainer decision on whether an absent feature key may show a param.",
            "C - Special-case absent-key faults back to a false verdict on this surface — restores the old outcome but re-introduces a surface-local dialect of 'fault', against the one-value-one-answer invariant."
          ],
          "recommendation": "A, and it is already implemented. The later ruling is dated after the earlier one, is the one the dispatch names as the spec, and explicitly anticipates this exact case ('the honest counter-pull recorded, not lost') — so it resolves the case the earlier comment reserved rather than contradicting an undecided question. C is the option to refuse: it would put a second, surface-local meaning of 'fault' back into the evaluator, which is the #3314 shape this card exists to delete. If the PM disagrees, B costs only a revert of the app-shell call site — the core `rowless` and envelope-source fixes stand on their own."
        }
      ],
      "out_of_scope_findings": []
    }

    Generated by Claude Code


    Generated by Claude Code

  7. yinlianghui commented on Aug 15, 2026

    @yinlianghui
    ContributorAuthor

    ACCEPT — PR #4674 (reviewer of record; readings taken on GitHub at head 461d3bfa2, which matches the local gate-union HEAD in both the report and the PR body).

    • Shape: draft → main, first line Fixes #4640 — correct: the full ruled deliverable lands in this one PR, so the merge should close this card. No closing keyword near any other open card's number.
    • Scope (from changed files, 5): ActionParamDialog.tsx + its test (the claimed surface), listConditional.ts + its test (the claimed evaluator region — the rowless scope-shadowing knob is exactly the conditional half of the claim), and a real changeset. The envelope-source fault-report fix rides in the same evaluator region: same defect class (a predicate fault the author cannot see), mechanical, file unclaimed by others (The chart null-category bucket has two identity collisions: it merges a null group with an empty-string group, and collides with a stored value spelling the label #4508 holds chart-series only), same gate family, named in the PR body with measured evidence — adjacency conditions met, accepted.
    • Changeset: real, minor × (@object-ui/core, @object-ui/app-shell) — right, not empty-frontmatter: user-visible behavior change plus a new public evaluator option, and the changeset's "behaviour change worth knowing" section documents the feature-flag flip with the has() migration. Bump Policy / Fixed Group / Declaration gates all green on this head.
    • Evidence: 254 files / 2672 tests green over the two touched regions; 7 downstream consumer files / 213 tests green; type-check with the dependency closure built first and the rebuilt rowless?: boolean verified in dist — plus the cross-package TS2322 probe proving app-shell compiles against the rebuilt .d.ts, which answers the stale-dist question directly. Reverse verification predicted direction first on all four legs; leg 1 measured 8 red where 6 were predicted, and the surprise (has() also fails on the old path) is reported as measured, not smoothed over — that is the honest shape.

    Adjudication of the flagged ruling conflict (the report's open question): Option A — ship as implemented. On the record:

    1. The 01:59 ruling comment's outcome (b) rested on "an absent-key comparison is a verdict, not a fault." Measured, that premise is false on the canonical engine (features.phoneNumber == true over features: {} ⇒ [runtime] No such key). A ruling's binding force does not survive its measured premise; this is the same falsified-premise discipline the lane applied on [Decision] spec 17.0.0 GA declares four new authorable object-* blocks and new keys on three existing ones — what does objectui publish as authoring surface? #4648 today.
    2. The later 06:00 delegated ruling anticipated exactly this case — it named the create_user feature-flag consumer as degrading to a server-rejected-with-message field and required the counter-pull documented in code. The dev implemented the later ruling and flagged rather than decided: correct behavior on both counts, and the stop-clause's substance (report the collision) was in fact honored — the collision is reported, in the PR body and here.
    3. Option C is refused outright: a surface-local "absent key = false" carve-out re-introduces a second meaning of fault into the evaluator — the ActionEngine.getActionsForLocation 把 CEL 信封塌回 legacy JS 求值路径,与每个渲染器的判决不一致 #3314 shape this card exists to delete.
    4. Bounding facts that make A safe: deployments that declare the flag are unmoved; the conservative outcome remains one spelling away (has(features.phoneNumber) && …), portable to the server engine; and the flip is loud with the predicate quoted, never silent — the 2026-08-06 maintainer floor (silence unavailable) is satisfied.

    Maintainer veto window OPEN on this conflict resolution, as with every delegated ruling; the revert cost is one app-shell call site — the core rowless and envelope-source fixes stand on their own regardless.

    Type Check + Test shards are still converging on this head; ready + auto-merge flips when they conclude green. pm:dispatched comes off at close.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions