Skip to content

New datasource dialog defaults to managed, which cannot sync an existing database's tables, and does not say so #30327

Closed

Description

@objectstack-fleet

epic:#26676#1 · zhuangjianguo · session_cdb7a717def74e719988f089fbaa18ff

Filing gate: ③ the maintainer's direct order, verbatim: 「你发现的问题都立卡,安全问题总专用的安全密卡通道,需要进一步分析的进一步测试,还是没有把握的用决策卡。」 (2026-11-05). Found in a real-user browser walkthrough of Setup on main 04f36b63f8, with a test app and a local test deployment.

Business reason. The page says 连接外部数据库,并将其中的表同步为对象. Someone following that with the defaults ends up with a datasource that has no sync button and no explanation.

Reader. The UI lane dev for ui/packages/app-shell/src/views/metadata-admin/datasource/DatasourceResourcePage.tsx:190.

Duplicates. Searched datasource schemaMode default managed external dialog (12 hits). #24837 and #24772, both closed, are about Sync and the default datasource's status. None covers this default.

Measured

  • The dialog's 结构模式 defaults to 托管(表结构由 ObjectStack 管理).
  • A datasource saved in that mode shows only 测试. 同步对象 appears only on the external one. GET …/remote-tables answers 400 with an English message citing ADR-0015.
  • In my test the managed datasource left the source table unchanged, with the same tables and columns.
  • With 外部 selected, the flow works: sync offers the table, reads work and writes are refused.

Not measured: what managed mode does to the source database when an object is later bound to it. Whether that can alter a customer's tables is what makes the default matter, so the dev should settle it first.

Expected

  • The modes are explained in business words where they are chosen, including which one to pick to read an existing database.
  • The default fits the page's stated purpose. I suggest 外部, unless the dev finds a reason that a new datasource needs managed. If so, say it in the PR.
  • A managed datasource says why it has no sync, rather than just having no button.
  • Driver form labels such as Filename and Auto-migrate schema read in the console's language.

Activity

  1. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: first-touch audit · p3 · domain:ui · pm:queue · 2026-11-05T07:08Z

    ⛔ Not a claim.


    Generated by Claude Code

  2. added
    domain:uiDomain lane — seat card indexed by label:pm:seat
    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 Nov 5, 2026
  3. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#5 · os-sales · session_01L6bhgVwQZbHRRM9CaXeKif

    Claim: PM loop round 9 · 2026-11-05T15:24Z
    Session: session_01L6bhgVwQZbHRRM9CaXeKif
    Account: os-sales
    Branch: claude/project-thread-5qt4jg (card thread of this project; a thread can push only its designated branch — measured platform exception to claude/issue-<n>-<slug>)
    Worktree: objectstack-issue-30327
    Domain: domain:ui
    Seat: domain:ui#5
    File surface: ui/packages/app-shell/src/views/metadata-admin/datasource/DatasourceResourcePage.tsx (the New datasource dialog: schema-mode default and wording, the managed datasource's no-sync note, the SQLite Filename placeholder) + new studio namespace keys (en/zh) + their tests + one root .changeset/. ⛔ packages/**: if the driver form labels (Filename, Auto-migrate schema) come from the server's driver schema, the dev reports it and the seat files a domain:server card.
    Container & model: M, mode:thread, model: default, effort: high
    Clause-②: yes (expected: new studio keys; the dev declares the final arm)
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6652026711
    Premise: holds (on origin/main 8e5fabe5 the dialog still defaults to managed and holds :memory: as a value)
    Serial constraints cleared: PR #30493 (this seat, the same file) merged 2026-11-05T15:17Z; the branch starts from it. One PR carries this card and #30331's ui half, because both change the same dialog.

    Dispatch order lives in the card thread's opening message.

  4. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#5 · os-sales · session_01L6bhgTJT1f9c473zqg7Zhd
    os-dev-report

    {
      "issue": 30327,
      "issues": [
        30327,
        30331
      ],
      "status": "done",
      "branch": "claude/project-thread-5qt4jg",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/30561",
      "head": "fd64ec80",
      "session": "session_01L6bhgTJT1f9c473zqg7Zhd",
      "premise_still_valid": true,
      "summary": "One PR for #30327 and the domain:ui half of #30331 (server half #30395, merged); body Fixes #30327 and Fixes #30331. (1) Managed measured first, on base 8e5fabe5 through PUT /api/v1/meta/object/NAME on a runtime managed sqlite datasource over an existing file: parts (3 columns, 2 rows) gained 9 platform columns, rows kept; legacy_items (_id, title, 2 rows) was dropped and recreated empty (driver-sql initObjects, sql-driver-rotation.ts). External control on a copy: both tables unchanged. So no reason a new datasource needs managed: the dialog now starts on external (with external: {}), the select is ordered External, Managed, Validate only, the two main options are relabelled in business words, and a sentence under the select says what the chosen mode does and which one reads an existing database. (2) A managed row other than default says why it has no Sync and points to a new External datasource. (3) Text and number boxes with a JSON-Schema default start empty with the default as placeholder (Filename :memory:, host, port, schema); a new datasource's Test and Create still send the default for an empty box, so the request is unchanged; edits unchanged. 4 new studio rows en+zh, 2 changed. Head fd64ec80 = code 21745ff7 plus evidence commit 83b029a7 and its removal, tree identical.",
      "tests": "New DatasourceResourcePage.newDatasourceModes-30327.test.tsx, 7 cases. Moved pins: externalBlock-11368 (chooses a mode unless External), locale-13460 (reads External on the new dialog). pnpm --dir ui exec vitest run packages/app-shell/src/views/metadata-admin/datasource packages/app-shell/src/views/metadata-admin/ResourceHistoryPage.rollbackConfirm-13333.test.tsx packages/i18n: Test Files 105 passed (105), Tests 1509 passed 13 skipped, lock VERDICT command-exit 0. Ablations via scripts/ablation-replace.mjs, each restored blob == HEAD: start managed 2 failed/5; box defaults as values 2 failed/5; explainsNoSync false 2 failed/5; empty box sends nothing 1 failed/6. Live rig: showcase objectstack dev + console vite, zh-CN 1440 before/after shots in the PR body (evidence commit 83b029a7); a datasource created through the new dialog was sent schemaMode external with external {} and the typed filename, and offers Sync.",
      "gates": "dispatch-gates --commands: 35 derived, each exit 0; --ran: 35 derived, 35 run, 0 NOT-MEASURED (derived zero). The Type Check UI job's 21 ui checks (incl. check:spec-symbols, check:i18n-keys, check:i18n-drift, type-check:coverage): exit 0 each. check:new-line-citations 0 new. turbo type-check for @object-ui/app-shell and @object-ui/i18n: 69 tasks successful. eslint on 6 changed files: 0 errors. PR check-runs: not yet reported at report time.",
      "dogfood_battery": "n/a: no ! in the PR title and no (narrowing) arm",
      "line_budget": "7 files, +409 -17 (source +80, tests +250, i18n +12 -4, changeset +18)",
      "deviations": "The placeholder treatment covers every defaulted text or number box, not only SQLite Filename (same append trap; request unchanged). Commit trailers are model-free per repo hook. PR assignee and review request left to the seat (thread rule).",
      "mcp_calls": "github issue_read x4 (get, get_comments on both cards), pull_request_read x1 (get, read-back); subscribe_pr_activity x1 (session subscription, not a GitHub write); no MCP GitHub write",
      "api_writes": "relay pr_create (run 42059874911, PR 30561, 14791 bytes read back identical, assignees none), this os-dev-report via post-stamped; plus git push (not REST)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · driver-sql initObjects (sql-driver-rotation.ts) drops and recreates an existing table that has _id and no id when an object is stored on a managed SQL datasource: rows lost · reach: PUT /api/v1/meta/object/legacy_items with datasource customer_managed (runtime managed sqlite datasource on an existing file), 2 rows before, 0 after, on base 8e5fabe5 · dedupe words: managed datasource drop table _id, initObjects legacy _id rebuild, schema sync data loss",
        "carrier: seat files a domain:server card · driver form labels and descriptions (Filename, Auto-migrate schema, Host, Port, field descriptions, the driver description) are the JSON-Schema title/description of packages/spec/src/data/driver/*.zod.ts, served by GET /api/v1/datasources/drivers (service-datasource driver-catalog.ts); measured live: sqlite entry title Filename and Auto-migrate schema in a zh console · dedupe words: driver config title locale, datasource drivers catalog i18n, Filename label zh",
        "noted, not filed: spec describes validate-only as like external but mismatches warn instead of fail, while no runtime code distinguishes it from external (boot validation reads external.validation.onMismatch only); not measured live; the dialog sentence claims only what holds"
      ]
    }
  5. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#5 · os-sales · session_01L6bhgVwQZbHRRM9CaXeKif

    Landed at 2026-11-05T16:42Z: PR #30561 merged as 0d54279e73 (seat ACCEPT 6663075162 on head fd64ec80, TIER_DEFAULT contract review PASS 6663047260), Fixes #30327 and Fixes #30331. The merge read 2026-11-05T16:41Z on the PR.

    probe reading
    git grep -c "NEW_DATASOURCE_SCHEMA_MODE|withBoxDefaults" origin/main -- ui/packages/app-shell/src/views/metadata-admin/datasource/DatasourceResourcePage.tsx 6 (a new datasource starts on External; a driver box's default is a placeholder, sent when left empty)
    card state closed (completed) by the merge

    State change: pm:dispatched removed. Server follow-ups from the card thread: #30562 (a managed SQL datasource drops and recreates an existing _id-without-id table, rows lost) and #30563 (driver form labels are English in every console language).

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

Metadata

Metadata

Assignees

Labels

domain:uiDomain lane — seat card indexed by label:pm:seatenhancementNew feature or requestpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions