Skip to content

Studio field type picker: typing a type name and pressing Enter picks the current type, not the first match #26194

Closed

Description

@objectstack-fleet

Filing gate ②: a maintainer ruling, carried out as child 8 of the nine that #26059's ruling (Q3) names. ⛔ Not a claim.

In Studio's Add field popover and the field inspector, typing "Number" into the type search and pressing Enter keeps the field's current type ("Phone") instead of choosing Number. The current type stays at the top of the filtered list and keeps the highlight, and Enter picks the highlighted item. The user has to click the match with the mouse.

Part of #26059
Ruling-ref: 6416233738 (#26059 (comment))
Ruling: batch #396 item 1, letter Q1 是 / Q2 不做 / Q3 分拆 / Q4 框架. This card is Q3 child 8 (ui, p3): item 7. Brief 6415795834, item-by-item reading 6415971852 (item 7).
Filed by domain:ui seat 2 (domain:ui#2) · os-steve · session session_01SMps7wq7rBTk53e8KTSEup, first claimant of #26059. Domain, grade and route are triage's on first touch.

Business reason. Builders who model objects in Studio type to find a field type. Enter silently keeps the old type, so a keyboard user commits the wrong type, or nothing, without noticing. The component's own documentation promises the opposite.

Reader who acts. The domain:ui execution seat, dispatch step: one os-dev, one PR on ui/packages/app-shell/src/views/metadata-admin/inspectors/FieldTypePicker.tsx plus one test.

Spec contract. None changes.

Duplicate check. A local scan of the 1,962 newest issues (all states, #22168–#26181) for FieldTypePicker.{0,200}(Enter|highlight)|field.?type.{0,60}(search|picker).{0,120}Enter found 0 hits. objectui#12516 introduced the search.

Ruled scope (ruling Q3 item 8)

  • FieldTypePicker highlights the first match when a query is present, so Enter picks it.

Anchors (re-read on origin/main 83a26c38)

  • ui/packages/app-shell/src/views/metadata-admin/inspectors/FieldTypePicker.tsx:
    • :41–47 holds (the reading cited :40–47). It is the doc block "The search (objectui#12516)", which ends "Enter picks the highlighted type".
    • The likely mechanism is <Command shouldFilter={false} defaultValue={current?.id}> at :245–247: cmdk keeps the current type as the highlighted value while the list filters.
    • The current type is scrolled into view on open (:192–196).
    • Choosing an item is onSelect={() => choose(row.id)} at :269.
  • The picker is used by ObjectFieldInspector and studio-design/AddFieldPopover (doc comment :49–50).

Expected / acceptance

  • With a non-empty query, the first matching type is highlighted, and Enter commits that type.
  • With an empty query, the current type is highlighted and scrolled into view as today. Re-choosing the current type still commits nothing.
  • The arrow keys still move through the filtered list.
  • One test: open the picker on a "Phone" field, type "Number", press Enter, and expect the Number type committed.

Activity

  1. added
    bugSomething isn't working
    domain:uiDomain lane — seat card indexed by label:pm:seat
    area:studioChanging a running app without code — authoring, publish, docs and the portal
    on Oct 26, 2026
  2. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    Triage: first grade — as filed · pm:queue · triage seat · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-26T16:03Z

    ⛔ Not a claim, ⛔ not a dispatch.


    Generated by Claude Code

  3. added
    pm:queueReady for the PM dispatch loop
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Oct 26, 2026
  4. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 1
    Session: session_017iXjUm1rujwDk7f3KT1Pkk (seat); implementing card thread session_01NWnUGWJGbeTmGLWfrfWFXB
    Account: os-steve
    Branch: claude/project-thread-yy2p7r (platform-assigned card-thread branch; a card thread can push only its assigned branch, and the name carries no issue number, so this claim is the identity record)
    Worktree: the card thread's own container
    Domain: domain:ui
    Seat: domain:ui#1
    File surface: ui/packages/app-shell/src/views/metadata-admin/inspectors/FieldTypePicker.tsx plus one new sibling test, and one root .changeset/ patch for @object-ui/app-shell. No registry package and no sdui record (stop on breach; explain in the report). ⛔ ui/.github/** and the root .github/workflows/ci.yml are out of bounds (maintainer's word, ui-merge epic in flight). Changeset in the root .changeset/.
    Container & model: small, mode:thread, model: TIER_DEFAULT (dispatch-gates --tier: no path-derived mandate), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a: renderer defect in ui/, the producing code is the cited ui file; no platform path covers it; reached through the public Console
    Thread-read: 6420793779
    Premise: holds (triage graded p3; origin/main 6862ef62: FieldTypePicker.tsx:246–247 still shouldFilter={false} defaultValue={current?.id}, and the doc block :47 promises "Enter picks the highlighted type"; read-only check by the seat 2026-10-26T16:51Z)
    Serial constraints cleared: none (no open PR touches FieldTypePicker; scanned all open PRs 16:48Z)

    Dispatch order handed to the card thread by the project coordinator (three partitions: ruling / mechanism hypotheses / suggested route); the dev does not claim, and starts only once this claim names its branch.

  5. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 26194,
      "status": "done",
      "branch": "claude/project-thread-yy2p7r",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/26259",
      "session": "session_01NWnUGWJGbeTmGLWfrfWFXB",
      "premise_still_valid": true,
      "summary": "FieldTypePicker now highlights, for a non-empty query, the first listed type the query names (shown name, id, id with spaces, English name), else the first listed row, so Phone + \"Number\" + Enter commits Number; empty query keeps the current type highlighted and re-choosing it commits nothing. Defect premise holds; the mechanism hypothesis (Command defaultValue keeps the current type highlighted) did NOT: cmdk 1.1.1 re-highlights the first rendered row on every search change even with shouldFilter=false, and Phone was that row because its description \"A phone number.\" matches \"number\" as a whole word and its Text group precedes Number. Route changed per the ruling intent: Command is controlled (value/onValueChange); a search change records the target and replaces cmdk first-row pick once; list order (pinned in catalog order by objectui#12516) is unchanged. Card assignee field was empty, so the PR carries no assignee.",
      "tests": "New FieldTypePicker.enterPicksFirstMatch-26194.test.tsx (5 cases). Red leg: base FieldTypePicker.tsx at 6862ef62 + new test: Tests 3 failed | 2 passed (5), failures expected [ phone ] to deeply equal [ number ]; restore proven by git diff HEAD empty and blob hash 94b77df2 equal to HEAD. Green at ae665e44: 28 files rendering the picker/inspector/Add field popover: Test Files 28 passed (28), Tests 304 passed (304) (os-verify-lock VERDICT command-exit 0). pnpm --filter @object-ui/app-shell type-check (tsc --noEmit + tsconfig.test.json) exit 0 after building the app-shell closure. Merged origin/main to 8d468f43 (ui overlap: tests only, lockfile unchanged); Console build turbo --filter=@object-ui/console: Tasks 71 successful, 71 total. Declared narrowing: full app-shell suite left to CI Test UI.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack: 35 families, all exit 0 at ae665e44/20553ec2 and re-run at final head 8d468f43 (derivation unchanged); --ran: 35 run, 0 NOT-MEASURED (a DERIVED zero, all 35 recorded an exit code). CI check-runs on PR 26259: in_progress at report time. Note from seat: main Test UI red on an unrelated ObjectSchema 48 vs 47 pin until 26231 merges.",
      "dogfood_battery": "n/a — no ! in the PR title and Clause-② no (no narrowing arm)",
      "mcp_calls": "3 — mcp__github__issue_read (get, get_comments x2); no write tools",
      "api_writes": "2 — pr_create via fleet-write relay (POST pulls, PR 26259, body read back identical 4415 bytes); this os-dev-report comment via post-stamped.mjs (POST issues/26194/comments)",
      "open_questions": [],
      "out_of_scope_findings": []
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:studioChanging a running app without code — authoring, publish, docs and the portalbugSomething isn't workingdomain:uiDomain lane — seat card indexed by label:pm:seatpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions