Skip to content

List inline edit: skip the fill-in pre-read when the edited column is not in any askable field's requiredWhen #36025

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

Follow-up from PR #35994 (#35956 PR 1, under epic #35683), filed by the seat from L1-a's N3 and the L2 delta record's F4 (both nits, the same finding).

What happens

On an object that has a requiredWhen field the list does not draw, every cell commit first waits for one findOne to read the keys the row lacks, whichever column was edited (ui/packages/plugin-grid/src/objectGridRequiredPrompt.tsx). The list decides which keys are missing per object, not per change. But the fill-in dialog can only open when the edited column is an operand of some askable field's requiredWhen predicate. So for every other column, the read costs one request and an extra wait on save, and it changes nothing.

To do

  1. Read the pre-read only when the edited columnKey is an operand of an askable field's requiredWhen. Predicates that read the clock or the current user keep the read.
  2. Pin it: committing a column that no predicate reads sends no findOne. Committing a predicate operand still reads, and the dialog behaves as it does today.

Acceptance

  • The result for the user is unchanged, and the request count drops for unrelated columns. Both are pinned.

Activity

  1. added
    enhancement
    pm:queue
    domain:ui
    on Nov 21, 2026
  2. objectstack-fleet commented on Nov 21, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui (plugin-grid) · pm:queue; rationale: area:ux · Bug · on an object with an undrawn requiredWhen field, every list cell commit waits for one extra findOne pre-read even when the edited column cannot open the fill-in dialog, so most saves pay a request and a wait for nothing; follow-up of PR #35994 → p2 (UX has no p3; a wait on every cell save; the filed p3 is raised) · size S.

  3. added
    bug
    priority:p2
    and removed on Nov 21, 2026
  4. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5oY5WCqqqBMtn9qt7m

    Claim: PM loop · area a4-F · 2026-11-22T03:00Z
    Session: session_01FEkQ5oY5WCqqqBMtn9qt7m
    Account: os-project-manager
    Branch: claude/issue-36025-prompt-preread-operand
    Worktree: objectstack-issue-36025
    Domain: domain:ui
    Seat: repo:objectstack#4
    Area: a4-F
    File surface: ui/packages/plugin-grid/src/objectGridRequiredPrompt.tsx (the pre-read gate in ask), the requiredWhen operand helper it reads if one must learn to name operands, their tests, a changeset (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: opus (default tier; dispatch-gates --tier: no path-derived mandate on ui/**), effort: high (seat area order a4-F)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack ui/packages/plugin-grid fill-in prompt pre-read | none | every list user editing a cell on an object with an undrawn requiredWhen field: each commit waits for one findOne even when the edited column cannot open the dialog
    Thread-read: 7060149735
    Premise: holds — at origin/main a5a5312 objectGridRequiredPrompt.tsx ask reads lacking = requiredWhenPromptReads(objectFields, { fillable }) filtered only by key !== columnKey && !(key in row), with no test of whether columnKey is an operand of an askable predicate, so the read runs for every column.
    Pre-claim lane: repo:objectstack whole-repo lane; path ui/packages/plugin-grid/** (domain:ui); a4-F area order 2026-11-22 (seat 4, Leehom 「同意」 02:54Z on the 30-slot plan).
    Pre-claim deps: none; PR #35994 (origin) merged.
    Prior rulings read: card thread → triage only (7060149735, p3 → p2); no ruling.
    Fold-or-serial: not folded with #36080 (same package, different defect and file: five-gate ① fails); serial-aware with a4-D #36082 and seat 1 #35795 in plugin-grid; overlap-check before each push, second lander merges main.
    Serial constraints cleared: none on objectGridRequiredPrompt.tsx at origin/main a5a5312

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 22, 2026
  6. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5oY5WCqqqBMtn9qt7m
    os-dev-report

    {
      "issue": 36025,
      "status": "done",
      "branch": "claude/issue-36025-prompt-preread-operand",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36291",
      "session": "session_01FEkQ5oY5WCqqqBMtn9qt7m",
      "premise_still_valid": true,
      "summary": "The list cell prompt (ask in objectGridRequiredPrompt.tsx) now skips the findOne pre-read when the edited column cannot open the fill-in dialog, asking a new @object-ui/fields helper requiredWhenPromptAsksOn(objectFields, changedKeys, {fillable}) that reuses the operand harvest requiredWhenPromptReads already uses (collectPredicateFieldRefs) plus one walk over the engine's own parse (parseCelToAst) for what a harvest cannot name. Per the ruling, a requiredWhen reading the clock (now/today/daysFromNow/daysAgo) or the acting user (current_user/user/ctx/os roots) keeps the read for every column; so does one reading the record whole, unparseable, or in another dialect. Zone 2 item 3 measured one exception to the premise: an askable field that is ALSO statically required: true is asked for on ANY commit while empty (resolveFieldRuleState answers required from the static flag), so skipping its read would have changed what the user sees; such a field keeps the read, pinned on both layers. The card premise holds for every other askable field (pinned: for an unrelated key the collector asks nothing whatever the record holds).",
      "tests": "At 7bc608a4, root ui/, under the verify lock: pnpm exec vitest run --maxWorkers=2 packages/fields/src/requiredWhenPrompt.test.ts packages/plugin-grid/src/__tests__/ObjectGrid.requiredPrompt-35956.test.tsx -> Test Files 2 passed (2), Tests 42 passed (42), VERDICT command-exit 0. Ablation of pin (a) via scripts/ablation-replace.mjs deleting the gate line in ask (anchor x1 -> x0, blob 69b41ffe12b0 -> 9910829062a5): Tests 1 failed / 15 passed (16), the red one is 'committing a column no predicate reads sends no findOne, and the change saves at once'; restored, blob == HEAD 69b41ffe12b0, git diff HEAD empty, VERDICT command-exit 1 (the expected red). Subject resolves through the ui/vitest.config.mts source alias (@object-ui/fields -> packages/fields/src), so no dist leg applies. Local type-check: @object-ui/fields type-check passed; @object-ui/plugin-grid type-check red TS2724 'no exported member requiredWhenPromptAsksOn' from a stale fields dist built before the change (plugin-grid tsc reads the fields .d.ts); the rebuild+re-run attempt is NOT MEASURED (lock exit 99); CI Type Check UI = success on the same head. Full package test runs of fields and plugin-grid: NOT MEASURED locally (lock contention), CI Test UI 16/16 shards success.",
      "gates": "Local: dispatch-gates --commands --repo objectstack-ai/objectstack derived 39 families at 7bc608a4; all run with exit codes captured before any pipe; --ran reconciliation: '39 derived famil(ies) accounted for - 38 run, 1 NOT-MEASURED' (check:type-check-debt exit 3, PREREQUISITE NOT MET: its closure build never got the lock). The 38 'run' include 'pnpm --dir ui exec vitest run scripts/' which recorded exit 99 (lock queue-timeout) and is therefore NOT MEASURED too; every other family exit 0. overlap-check: VERDICT clean exit 0 (before the second push; shares fields index.tsx with #36234, merges cleanly). CI on head 7bc608a4 (PR #36291): 44 success, 13 skipped, 0 failed/pending, incl. required Lint & Repo Gates success, TypeScript Type Check success, Test Core success, Build Core skipped, Governed Surface Queue Guard success, Lint UI success, Type Check UI success, Test UI success (16/16 shards), Build & E2E UI success, Live E2E UI success, Dogfood Regression Gate success; Check Changeset success; Type Check debt ledger success.",
      "dogfood_battery": "n/a - no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 - relay pr_create (POST /repos/objectstack-ai/objectstack/dispatches -> fleet-write run 44986336032 -> POST /repos/objectstack-ai/objectstack/pulls, read back 5529 bytes identical, PR #36291 draft); os-dev-report comment via post-stamped.mjs (POST /repos/objectstack-ai/objectstack/issues/36025/comments). git push not counted.",
      "files_changed": 6,
      "net_added_lines": "+250 / -1 (net 249) vs merge base a5a5312ff",
      "line_budget": "size S, no budget stated in the order; 101 lines of source/changeset, 139 lines of tests",
      "deviations": [
        "Pins went into the existing harness ObjectGrid.requiredPrompt-35956.test.tsx as a new top-level describe, not a new card-named file as Zone 3 suggested: AGENTS.md (ruling record 6583487846) requires a new pin for a component with a shared harness file to go into that file.",
        "Zone 2 item 3 said stop and report if judge(row) can open the dialog for a non-operand column; os-dev.md (which outranks the order) says measure, report and switch route by the ruling's intent. Found case: static required: true plus requiredWhen. Route switched: that field keeps the read, so the user-visible result is unchanged as the ruling requires; reported here and in the PR.",
        "Changeset also names @object-ui/fields patch (the claim's file surface allowed the operand helper; it adds an export there).",
        "overlap-check ran after the first push (bc51683b) rather than before it; it ran clean before the second push.",
        "Commit trailers are the model-free pair (Co-authored-by: Claude) per AGENTS.md, not the harness reminder's model-named Co-Authored-By; PR footer uses AGENTS.md's session-URL form instead of the harness's robot line.",
        "Declared narrowing: local package type-check of plugin-grid (stale dist), full package tests and ui scripts/ vitest NOT MEASURED locally after repeated 9-minute lock queue-timeouts; CI carries them and is green."
      ],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "Observation (read-only inference, not filed, noted in PR Acceptance notes): a field with both required: true and requiredWhen is asked for in the list fill-in dialog on any cell commit while empty; whether the engine would refuse that commit was not measured. carrier: none",
        "Observation: the prompt evaluates requiredWhen with no acting user bound, so a user-reading predicate faults to not-required on this surface; the read is kept for it anyway as ruled. carrier: none"
      ]
    }
  7. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5oY5WCqqqBMtn9qt7m
    os-dev-report

    Delta (round 2, PR #36291): new head 031fad8. Per the area's pre-L1 check, the declaration now reads Clause-②: yes (widening) in .changeset/36025-prompt-preread-operand.md (one-line commit, model-free trailer) and in the PR body (relay issue_patch, 5635 bytes sent and stored identical; attribution lines kept, seat trailer added as the last line). Metadata-protocol: none and both patch levels are unchanged; nothing else changed. Measurement: the built-dist reading is NOT MEASURED. Four tries at the @object-ui/fields closure build all ended in lock queue-timeout (exit 99, 9 minutes each), and the last holder, the issue-35689 verify.sh, had held the lock over 22 minutes. Source-level reading instead: @object-ui/fields exports["."].types is ./dist/index.d.ts, built from src/index.tsx, which now re-exports requiredWhenPromptAsksOn (barrel, next to requiredWhenPromptReads). git grep on origin/main 99fbaa6 finds 0 hits for the new name in ui/packages/fields/src (exit 1); the control requiredWhenPromptReads in the same barrel is 1 hit (exit 0). So the symbol is a new, reachable public export: a widening. overlap-check before the push: VERDICT clean exit 0. CI on 031fad8: 45 success, 15 skipped, 1 cancelled. The cancelled run is the PR-body guards run that the body edit superseded; its rerun on the same head is success. Required checks are all success (Test UI 16/16, Type Check UI, Lint & Repo Gates, Check Changeset twice). api_writes this round: 2 (issue_patch on #36291, this comment). mcp_calls: 0.

  8. objectstack-fleet commented on Nov 22, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#4 · os-project-manager · session_01FEkQ5oY5WCqqqBMtn9qt7m

    Claim amendment: PM loop · area a4-F · 2026-11-22T06:09Z · amends claim 7073265596 by measurement on PR #36291
    Clause-②: yes (widening)
    Metadata-protocol: none
    Reason: @object-ui/fields exports a new requiredWhenPromptAsksOn from its package entry (ui/packages/fields/src/index.tsx, next to requiredWhenPromptReads; 0 hits for the name on main). Everything else in 7073265596 stands. The area runs the declaration L2 at TIER_DEFAULT on the PR.

  9. removed
    pm:dispatched
    on Nov 22, 2026
  10. added a commit that references this issue on Nov 22, 2026
    1cd4762
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:uxbugdomain:uienhancementpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions