Skip to content

Studio 重构(1-2b):元数据列表加「修改时间」列和「有未发布的改动」标记 #36898

Description

@os-support-ai

repo:objectstack#3 · os-support-ai · session_01WGufzufqmKuir7GiTdwGd3Z

③ topic child · Source: topic #36890 (decisions 2 and 14). Part of #36890.

要做的

  1. 列表加「修改时间」列,数据来自 1-2a 的兄弟字段;代码包自带、没有存储行的项显示为空(决定 2:维护者已知 HotCRM 上这一列大多为空)。可按这一列排序。
  2. 「有未发布的改动」标记直接用现有台账 GET /api/v1/meta/_drafts(packages/metadata-protocol/src/protocol-drafts.ts:77;Studio 外壳已在读,StudioPendingDraftsContext、SD/studioItemDraftStatus.ts),不改协议。上线时已有的人工草稿同样标出来(决定 14)。
  3. AI 写的草稿和人写的草稿标记要区分(沿用 StudioAiDraftNotice 的 by 判断)。

验收

  • 改一项后列表里它的时间更新、标记出现;发布后标记消失。
  • 代码包自带的项时间为空,不报错。

Blocked-by: #36894
Blocked-by: #36896

Grading: area:ux · Feature · metadata list · builders, often · evidence: read from code. Topic child ⇒ p2.
Dedupe: covered by #36894.
Reader: seat repo:objectstack#3, one os-dev card. Size S. Metadata-protocol: none. Wave 2.

Activity

  1. added
    enhancement
    priority:p2
    on Nov 24, 2026
  2. added
    pm:blocked
    domain:ui
    on Nov 24, 2026
  3. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#3 · os-support-ai · session_01WGufzgNtKtppbRbXmHGH8x

    Claim: PM loop round 1
    Session: session_01WGufzgNtKtppbRbXmHGH8x
    Account: os-support-ai
    Branch: claude/issue-36898-list-changed-column
    Worktree: objectstack-issue-36898
    Domain: domain:ui
    Seat: repo:objectstack#3
    Area: ux-E2
    File surface: NEW modules under ui/packages/app-shell/src/views/metadata-admin/ (the 「修改时间」 cell value read off the list response's changedAt sibling, the 「有未发布的改动」 marker read off the existing /meta/_drafts ledger with the AI-vs-human by split) with their own new test files; a minimal mount in ResourceListPage.tsx; the modified-time sort key in metadataListState.ts; the client reader of the list envelope if it drops changedAt; Studio strings in ui/packages/i18n/**; changeset 36898-list-changed-column.md; reads (does not edit) studio-design/studioItemDraftStatus.ts, StudioAiDraftNotice.tsx; ⛔ no protocol change, no StudioDesignSurface.tsx (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: default — dispatch-gates.mjs --tier: "Model tier — no path-derived mandate", effort: medium (small console-only card: one surface, no spec/protocol/ADR, not Tier H)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: none
    Premise: holds (read on origin/main 6902acb: changedAt sibling served since PR #36940 (1cda7ea); StudioPendingDraftsContext and studioItemDraftStatus in studio-design/studioItemDraftStatus.ts:58, 71; StudioAiDraftNotice.tsx exists; list sort state in metadataListState.ts since PR #36939)
    Pre-claim lane: repo:objectstack seat 3 area ux-E2 (epic #36890 list side); ui/packages/app-shell/src/views/metadata-admin/, domain:ui, area:ux
    Pre-claim deps: Blocked-by: #36894 — PR #36940 MERGED 2026-11-24T12:21Z; Blocked-by: #36896 — PR #36939 MERGED 2026-11-24T11:16Z; pm:blocked removed on those merges
    Prior rulings read: card thread 0 comments; governing text is epic #36890 decision 2 (column empty for code-shipped items; 「有草稿」 from the existing ledger, no protocol change) and decision 14 (existing human drafts marked 「有未发布的改动」)
    Serial constraints cleared: in-area #36897 (branch claude/issue-36897-list-objectgrid, no PR yet) swaps the same list's table; this card puts its cell and marker in new modules with a minimal ResourceListPage.tsx mount, so #36897 re-hosts them on its grid; overlap-check against #36897's head before every push, and whichever lands second merges the other

  4. added
    pm:dispatched
    and removed
    pm:blocked
    on Nov 24, 2026
  5. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#3 · os-support-ai · session_01WGufzgNtKtppbRbXmHGH8x
    os-dev-report

    Reported 2026-11-24T13:27Z. Draft PR #36983.

    {
      "issue": 36898,
      "status": "done",
      "branch": "claude/issue-36898-list-changed-column",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/36983",
      "remote_head": "origin/claude/issue-36898-list-changed-column @ 3671d23047763cfa0691256d025d55f857845c59",
      "session": "session_01WGufzgNtKtppbRbXmHGH8x",
      "premise_still_valid": true,
      "summary": "Premise held on origin/main 6902acbe (re-merged to 144d368e): the list answer serves changedAt, but MetadataClient.listResponse dropped it, so the reader now carries it (entries parsed with the spec's own rule). The generic metadata list gains a 修改时间 column (empty for code-shipped items), a `changed` sort key in metadataListState.ts (missing times last both ways, ‹ › order kept equal through useListOrderedNames), and a 有未发布的改动 mark from the existing /meta/_drafts ledger with AI drafts (copilot/MCP, isAgentDraftSurface, the StudioAiDraftNotice rule) marked 「AI 的改动未发布」. Cell value, sort comparison and mark live in new modules (listChangedAt.ts, listDraftMarks.ts, ListChangedCell.tsx) with card-named tests; ResourceListPage.tsx mount is 15 lines. Verified in a booted showcase app with a real MCP-door AI draft, a person's draft and a live save; screenshots (deviceScaleFactor 2) in the PR body.",
      "tests": "HEAD 3671d2304: pnpm --dir ui exec vitest run --maxWorkers=2 (4 new test files + listRegistrations-12349 + metadataListState-36896 + useListScrollRestore-36896 + all ResourceListPage.*) -> Test Files 19 passed (19), Tests 130 passed (130), lock VERDICT command-exit 0. type-check @object-ui/data-objectstack, @object-ui/i18n, @object-ui/app-shell -> exit 0, all three scripts echoed. Ablations via scripts/ablation-replace.mjs (src-aliased, no dist leg needed): missing-last flipped in listChangedAt.ts -> 4 red, restored blob 8212f4df4d0a; AI judgement removed in listDraftMarks.ts -> 2 red, restored blob 9d8aae37116f; git diff HEAD empty after both.",
      "gates": "Local: dispatch-gates --commands derived 39 families; 38 run in a loop with exit captured before any pipe, all exit 0; `pnpm --dir ui exec vitest run scripts/` under the lock: Test Files 172 passed | 2 skipped, exit 0. --ran reconciliation with `:: exit N` lines: '39 derived famil(ies) accounted for — 39 run, 0 NOT-MEASURED (a DERIVED zero)'. check:new-line-citations (ui rule 11): 0 new, exit 0. check-nul-bytes OK. overlap-check: origin/main merges cleanly; #36978 (ObjectGrid swap, head 1137895db4) conflicts in ResourceListPage.tsx, expected and declared in both claims. CI on 3671d2304: in_progress at report time (Lint, Type Check, Governed Surface Queue Guard, Check Changeset, Check PR Size, PR-body guards running; opt-in/queue jobs skipped).",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "line_budget": "734 changed lines (724+/10-) across 14 files, over the ~600 S-card guide: ~400 source/locale/changeset, ~335 tests. Reported, not trimmed; single PR, no split.",
      "files_changed": [".changeset/36898-list-changed-column.md", "ui/packages/data-objectstack/src/metadata-client.ts", "ui/packages/data-objectstack/src/metadata-client.listChangedAt-36898.test.ts", "ui/packages/app-shell/src/views/metadata-admin/listChangedAt.ts", "ui/packages/app-shell/src/views/metadata-admin/listChangedAt-36898.test.ts", "ui/packages/app-shell/src/views/metadata-admin/listDraftMarks.ts", "ui/packages/app-shell/src/views/metadata-admin/listDraftMarks-36898.test.ts", "ui/packages/app-shell/src/views/metadata-admin/ListChangedCell.tsx", "ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.changedColumn-36898.test.tsx", "ui/packages/app-shell/src/views/metadata-admin/ResourceListPage.tsx", "ui/packages/app-shell/src/views/metadata-admin/metadataListState.ts", "ui/packages/app-shell/src/views/metadata-admin/useListOrderedNames.ts", "ui/packages/i18n/src/namespaces/studio/en.ts", "ui/packages/i18n/src/namespaces/studio/zh.ts"],
      "deviations": [
        "File surface: useListOrderedNames.ts (8 lines) edited beyond the claim's list, so the detail's ‹ › order reads the same change times under sort=changed (the card's 'keep orderedListNames consistent with the visible order').",
        "Ledger read through the list's metadata client (listDrafts) instead of usePendingDrafts: measured, usePendingDrafts' global fetch escaped to a real socket in 4 existing ResourceListPage tests (network-escape guard red), Studio's StudioPendingDraftsContext wraps the area's list but not Setup's, and its rows carry no package/member. Same ledger, same client scope as the list's items; re-read with the list and on emitMetadataRefresh.",
        "Line budget over the ~600 S guide (734); reported, not split.",
        "test:repo not run locally (CI owns it); diff touches none of its tests.",
        "Screenshots hosted as an orphan commit e80fcad491af on branch claude/issue-36898-list-changed-column-shots (one extra git push, no REST write), referenced by sha from the PR body."
      ],
      "dev_effort": "medium",
      "rounds": 1,
      "mcp_calls": "0",
      "api_writes": "2 — relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST /repos/objectstack-ai/objectstack/issues/36983/assignees), post-stamped os-dev-report comment (POST /repos/objectstack-ai/objectstack/issues/36898/comments)",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": ["none — acceptance notes only: a person's draft save does not move the time (the plain list serves the published row's time; the mark shows instead); never-published drafts have no list row; a bundle row without a member matches any member's draft"]
    }
  6. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#3 · os-support-ai · session_01WGufzgNtKtppbRbXmHGH8x

    Claim amendment 2026-11-24T13:53Z (L1-b (3) REWORK 7133485320, S1 + S2):

    • File surface adds ui/packages/app-shell/src/views/metadata-admin/useListOrderedNames.ts (8 lines: the detail's ‹ › order follows sort=changed, which the card's "keep orderedListNames consistent with the visible order" requires) and ui/packages/data-objectstack/src/metadata-client.ts (the list reader carries changedAt through).
    • Clause-②: yes (widening) replaces Clause-②: no: MetadataListAnswer, exported from @object-ui/data-objectstack's entry, gains an optional changedAt member, an addition to that published package's public surface (precedents 36011-restore-factory-view, fix(plugin-approvals): the no-approver decide refusal and a multi-slot submitter notice read in the reader's language #36846). Metadata-protocol: none and the patch level stand. The yes owes a TIER_DEFAULT contract review, run by L1-b (3) on the new head.
  7. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#3 · os-support-ai · session_01WGufzgNtKtppbRbXmHGH8x

    Claim amendment 2026-11-24T14:03Z (carrier line for the amendment above, per L1-b (3) on REWORK 7133485320; precedent #36846 amendment 7122541004):
    Clause-②: yes (widening) (was no)
    Metadata-protocol: none
    File surface adds: ui/packages/app-shell/src/views/metadata-admin/useListOrderedNames.ts, ui/packages/data-objectstack/src/metadata-client.ts

  8. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack#3 · os-support-ai · session_01WGufzgNtKtppbRbXmHGH8x

    Close-out 2026-11-24T14:42Z: PR #36983 merged 2026-11-24T14:41Z (8c29b81), closing this card by Fixes. Delivered: 「修改时间」 column on the generic metadata list, fed by the list's changedAt sibling (#36894), empty for code-shipped items; a changed sort key (missing times last), with the ‹ › order following it; 「有未发布的改动」 marked from the existing /meta/_drafts ledger, AI drafts (copilot / MCP, the isAgentDraftSurface rule StudioAiDraftNotice uses) marked 「AI 的改动未发布」. MetadataListAnswer in @object-ui/data-objectstack now carries changedAt (Clause-②: yes (widening)). L1 ACCEPT 7134181690, L2 PASS 7134164920. Nothing left on this card; #36897 (PR #36978) re-hosts the cell on its grid.

  9. removed
    pm:dispatched
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:uxdomain:uienhancementpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions