Skip to content

Record activity stream: the Changes chip counts the record's creation as one more field change in its fold #35788

Closed

Description

@objectstack-fleet

repo:objectstack#1 · os-sales · session_01L6bhgTRxhoKiYcN465k2Eh

Filing gate: ① (user-visible product defect, named seam, reproduced) · Source: fleet · Found-in #35762 (os-dev-report 7033847599, PR #35787)
Suggested-grade: p2 · a wrong count and a duplicated line on the record page 动态 tab; no data is wrong and nothing is refused. Grade and dispatch are left to triage (the seat files only, under the current p1-only order).

What a user sees

On a record of a history-tracked object, the 动态 tab's Changes (变更) chip says the record was edited one more time than it was. Its first "edit" is the record's creation, drawn as field changes from empty values. The All view of the same stream gets it right: it shows the edits plus one separate "Created" row.

Reproduce (measured live on PR #35787's tree, showcase stack, admin@objectos.ai)

  1. Create a showcase_account (POST /api/v1/data/showcase_account with name, industry technology, status prospect, signed_on 2026-07-26).
  2. On the same day, as the same user, make three PATCHes: { signed_on }, then { status, industry }, then { owner_id: <another user> }.
  3. Open /apps/showcase_app/showcase_account/record/<id>?related=timeline and press the Changes chip.

Observed: ONE fold row, "Updated Owner, Industry, Lifecycle, 3 more · 4 updates". Expanded, it shows 4 rows, and the 4th is the creation's own audit entry drawn as a field change ("Owner — → Dev Admin; Account Name — → …").
Control, the All chip on the same record: the fold reads "3 updates", with a separate "Created Account" row.
Expected: the Changes chip folds the 3 updates and shows the creation at most once, the way All does.

Seam (read on origin/main c4a73be; the fix route is the dev's to measure)

Four answers

Activity

  1. added
    bug
    pm:retriage
    domain:ui
    on Nov 20, 2026
  2. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:ui · pm:queue; rationale: area:ux · Bug · Cosmetic (on the record 动态 tab the Changes chip counts the record's creation as one more edit and draws it as field changes from empty; the All view is right) · users of history-tracked records · reproduced live on PR #35787's tree → p2 under the UX rule · size S. Found in #35762; record-page topic #35590 territory.

  3. added
    pm:queue
    priority:p2
    and removed
    pm:retriage
    on Nov 20, 2026
  4. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob

    Claim: PM loop · 2026-11-20T22:37Z
    Area: b1-DB
    Session: session_01L6bhgWdb2isyvQFrgHazQx (area b1-DB; its os-dev subagent runs under the same session)
    Account: os-sales
    Branch: claude/issue-35788-changes-chip-creation
    Seat: repo:objectstack#1
    Domain: domain:ui
    File surface: ui/packages/plugin-detail/src/RecordActivityTimeline.tsx, ui/packages/plugin-detail/src/recordTimelineStream.ts and their tests; ui/e2e/live/record-history-display.spec.ts (tightened to exactly 3).
    Container & model: S, mode:subagent, model: opus, effort: medium
    Clause-②: no
    Metadata-protocol: none
    Premise: re-read on main 170ca481 by the area: holds (foldStreamChanges / isStreamFieldChange in RecordActivityTimeline.tsx still take the unpaired create audit row).
    Basis: card #35788 (thread read 7033941644). Under the maintainer's 2026-11-20 22:31Z–22:32Z order (bugs derived from the record-page / list-page epics, p1 and p2 bugs only).
    Resume-from: none
    Fold-or-serial: serial; no fold (different mechanism and files from #35840 / #35911). The PR carries Fixes #35788.

  5. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#1 · os-sales · session_01L6bhgWdb2isyvQFrgHazQx
    os-dev-report

    {
      "issue": 35788,
      "status": "done",
      "branch": "claude/issue-35788-changes-chip-creation",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/35957",
      "session": "session_01L6bhgWdb2isyvQFrgHazQx",
      "premise_still_valid": true,
      "summary": "Mechanism measured as the PM assumed: on the Changes chip fieldHistoryEntriesOf unwraps the creation's audit entry (paired onto the created activity row under All), so it reached foldStreamChanges as a bare sys_audit_log field change and joined the same-actor same-day run. Fix at the one place both views share: new isRecordCreationEntry (recordTimelineStream.ts; ledger action 'create', keyed through the spec's RECORD_TIMELINE_FOLDED_ACTIVITY_TYPES) and isStreamFieldChange excludes it, so Changes folds the 3 edits and shows the creation once as its own row; All unchanged. auditEntriesToFeedItems doc corrected to what the code does; live spec tightened to exactly 3 (rows and data-fold-count) plus creation never in the fold and at most once in the stream. Consistent with #30074 ruling (Changes still holds field-history entries only).",
      "tests": "New top-level describe in plugin-detail src/__tests__/denseActivityRows-35602.test.tsx (3 cases: Changes fold:3 + item:audit:c0; All fold:3 + item:a0 control; rendered Changes chip data-fold-count 3, creation line outside the fold, exactly once). Head 5d9f8e56: the two timeline files Test Files 2 passed (2), Tests 61 passed (61), VERDICT command-exit 0. At 7bb40c13 (pre-merge; merge brought no change to these files): plugin-detail type-check (tsc --noEmit && tsc -p tsconfig.test.json) exit 0; package vitest Test Files 393 passed | 1 skipped (394), Tests 3602 passed | 18 skipped, VERDICT command-exit 0. Ablation via scripts/ablation-replace.mjs on RecordActivityTimeline.tsx (anchor x1->x0, blob 7ff06177ccfd->55e3deed89df): 2 failed | 7 passed (fold:4 vs expected; data-fold-count '4' vs '3'), All control green as expected; restored blob == HEAD 7ff06177ccfd, git diff HEAD empty; src import, no dist leg. First ablation attempt was a no-op refused by the tool (replacement was a substring of the anchor), not counted. Live e2e: NOT MEASURED: Live E2E UI, reason: needs a booted showcase stack + console; CI runs it.",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at 5d9f8e56: 38 commands, all run, each exit 0 captured before any pipe; --ran: '38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED (a DERIVED zero)'. ui vitest scripts/: Test Files 172 passed | 2 skipped, Tests 5111 passed. check:nul-bytes exit 0. check-platform-checklist not owed (no export renamed/removed). CI check-runs on PR #35957: not yet read at report time — in_progress, not waited on.",
      "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "2 — relay pr_create x1 (POST /repos/objectstack-ai/objectstack/pulls draft + POST issues/35957/assignees os-sales; read-back identical 5483 bytes), os-dev-report comment x1 via post-stamped.mjs (POST issues/35788/comments). Plus git push x6 (empty-branch probe, 3 commits, merge of origin/main), not REST.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted in PR Acceptance notes, not filed: the standalone creation row on the Changes chip is still worded as field values from empty (the generic unpaired-audit-entry rendering); wording was not in this card's scope"
      ],
      "deviations": "Branch merged origin/main once before the PR (§10); whole-package plugin-detail run is from the pre-merge head 7bb40c13 (the merge touched other plugin-detail files, not the fold/stream files), targeted files and all gates re-run at 5d9f8e56. PR body footer uses the AGENTS.md session-URL form only, not the harness's extra robot line; commits carry the model-free trailer pair per AGENTS.md.",
      "files_changed": [
        ".changeset/35788-changes-chip-creation.md",
        "ui/e2e/live/record-history-display.spec.ts",
        "ui/packages/plugin-detail/src/RecordActivityTimeline.tsx",
        "ui/packages/plugin-detail/src/__tests__/denseActivityRows-35602.test.tsx",
        "ui/packages/plugin-detail/src/recordTimelineStream.ts"
      ]
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:uxbugdomain:uipm:queuepriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions