Skip to content

Record timeline: compact rows name no actor, and an audit reader sees every action twice #30122

Closed

Description

@objectstack-fleet

epic:#26676#1 · zhuangjianguo · session_cdb7a717def74e719988f089fbaa18ff

From a real-user walkthrough of the development flow, filed on the maintainer's word: 「第一组:会卡住人或误导人,立卡」 (2026-11-04). Measured on main 987ff33b88 unless a line says otherwise. Test project scaffolded with create-objectstack@18.3.0.

Context: #27055 made the record page one merged timeline of discussion, activity and field history.

What a customer sees

Two people work a ticket, and the timeline on the record page reads 「已修好 @张三」 and 「更新了 Repair Ticket "打印机卡纸":Status」 with no name on any row, so nobody can tell who did what. An administrator also sees each action twice: 「创建了 Repair Ticket」 and, beside it, a long diff, 「负责人 — → Dev Admin; Subject — → admin two rows; Equipment — → CNC-01…」.

Measured

  • No actor: the compact rows show none, by screenshot on main. The data has it: sys_activity.actor_name is filled on each row.
  • Twice: on an object with trackHistory, one create gives one sys_activity row and one sys_audit_log row, and one update does the same (create, update in the log; Created…, Updated… in activity). The page draws both, 「动态 2」 for one create. RecordDetailView.tsx:2388-2390 adds the audit source when enable.trackHistory is on.
  • Who sees it: a reader without sys_audit_log access sees one row per action, measured for a member on the published 18.3.0.

Expected

Every row says who. One action reads as one row for everyone, with the field diff available on that row for a reader allowed to see it.

Activity

  1. added
    bug
    on Nov 4, 2026
  2. objectstack-fleet commented on Nov 4, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: first-touch audit · p2 · domain:ui · pm:queue · 2026-11-04T16:25Z

    ⛔ Not a claim.


    Generated by Claude Code

  3. added
    domain:ui
    pm:queue
    priority:p2
    on Nov 4, 2026
  4. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-support-ai · session_01WGufzfE4V9fzZgJLrLDmMC

    ⛔ Not a claim. Input for this card from #30074's live check (PR #30294, ruling C): on a lead with field history on, the record's creation is said twice under 全部: the activity created row and the audit create entry listing the initial values (shot /mnt/project-files/ui-orders/30074-shots/lead-history-on-all.png). This is the same "audit reader sees every action twice" family this card names; #30294 does not change it. This card goes after #30294 lands.

  5. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-support-ai · session_01WGufzfE4V9fzZgJLrLDmMC

    Claim: PM loop round 5
    Session: session_01WGufzic59DvGAbu7U78pZt
    Account: os-support-ai (the seat's linked user as GET /user answers it; always the card's assignee)
    Branch: claude/project-thread-7ocxgx
    Worktree: objectstack-issue-30074
    Domain: domain:ui
    Seat: domain:ui#1
    File surface: ui/packages/plugin-detail/src/recordTimelineStream.ts (pairing an activity row with its audit entry), the timeline renderers (RecordActivityTimeline.tsx, renderers/record-activity.tsx and their compact-row parts), ui/packages/app-shell/src/views/RecordDetailView.tsx only if the host must pass something, their tests, one root .changeset/ file; ⛔ ACTIVITY_TYPE_TO_FEED_TYPE not edited; ruling C (#30074, 6649643659) not regressed; no server, REST or spec change (stop on breach; explain in the report)
    Container & model: M, mode:thread, model: TIER_DEFAULT (p2), effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the record timeline (mergeTimelineStream and the compact rows) draws an activity row and its audit entry as two rows, and (per the card, to re-measure) some rows without the actor | sys_activity.actor_name is filled and the audit diff belongs on the same action | every record-page reader of an object with field history, today
    Thread-read: 6650421989
    Premise: holds in part (two rows per action on a history-on lead, shot 30074-shots/lead-history-on-all.png, origin/main c1240a38); the missing-actor half is to be re-measured first (the #30074 shots show the actor on both kinds of row)
    Serial constraints cleared: #30074 (PR #30294 merged c1240a38ac); no other open PR touches recordTimelineStream.ts / RecordActivityTimeline.tsx (read this act).

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

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-support-ai · session_01WGufzic59DvGAbu7U78pZt
    os-dev-report

    Stamp: 2026-11-05T06:40Z

    {
      "issue": 30122,
      "status": "done",
      "branch": "claude/project-thread-7ocxgx",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/30342",
      "session": "session_01WGufzic59DvGAbu7U78pZt",
      "premise_still_valid": true,
      "summary": "Premise holds in part. Actor: the stream's compact rows already name the actor on main c1240a38 (and on 987ff33b88); the one face without a visible actor was the 动态 panel peek row (title only), now fixed. Twice: holds; mergeTimelineStream now pairs an activity row with the audit entry the same action wrote (same record; audit create/update/delete to activity created/updated/deleted; same actor by user_id = actor_id, or by name when neither names a user; within TIMELINE_PAIR_WINDOW_MS 5000; nearest first, each once) and draws ONE row: the activity row carrying the audit item as fieldHistory, its diff on a second line of that row. 变更 and panel changes_only show each audit entry on its own (ruling C unchanged); unpaired rows draw as before. No host, server, REST or spec change. Count: the 动态 N badge is the server's timeline count (spec-defined upper bound) and can still read one more than drawn rows after a create; left to a follow-up card as agreed with the seat.",
      "tests": "head 0b041cec. New pins (recordTimelineStream-27055 top-level describe): create pairs, update pairs, unpaired stays two rows, different actors no pair, window edge pairs and one past does not, different kind no pair, nearest first, system pairs by name; renderer: audit reader one row with summary+actor+diff line, non-audit reader one row no diff, 变更 shows the audit diff alone, every peek row names its actor. Ruling C pins from #30294 unchanged and green. Targeted 3 files: Test Files 3 passed (3), Tests 80 passed (80). plugin-detail whole + app-shell recordPageTiers-26678: Test Files 370 passed | 1 skipped (371), Tests 3303 passed | 18 skipped (3321), VERDICT 0. type-check plugin-detail exit 0, app-shell exit 0 after full build. Ablation (ablation-replace.mjs, anchor 'const pairs = pairActions(activity, changes);' to an empty map, src via ui vitest alias, no dist leg): anchor 1 to 0, blob a406f0a324ba to b2e7fb7be1e8; 6 red = exactly the pair-needing pins; restored blob == HEAD a406f0a324ba, git diff HEAD empty. Live CRM zh-CN: admin create+update a lead, 全部 = 2 rows each with diff, 变更 = 2 audit entries alone, peek rows name actor, badge 动态3; member with crm_sales_user + scratch set reading sys_activity/sys_comment (sys_audit_log 403): 全部 = same 2 rows no diff, badge 动态2. Measured skew activity timestamp vs audit created_at: 1 ms, same user id. Shots: /mnt/project-files/ui-orders/30122-shots/ (8 png).",
      "gates": "dispatch-gates --commands --repo objectstack-ai/objectstack at 0b041cec: 35 commands run serially after a full build, exit captured before pipes: 35 of 35 exit 0. --ran: '35 derived famil(ies) accounted for -- 35 run, 0 NOT-MEASURED (a DERIVED zero -- all 35 recorded an exit code and none of them is 3)'. check-sdui-manifest exit 0; ui vitest scripts/ 170 passed | 2 skipped; ui check:new-line-citations 0 new. CI check-runs on 0b041cec: in_progress at report time, not waited on.",
      "dogfood_battery": "n/a -- no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "3 -- issue_read get x1, issue_read get_comments x2; reads only",
      "api_writes": "2 -- relay pr_create x1 (run 41981899493, PR #30342 read back identical 10732 bytes, draft, no labels, no assignees); os-dev-report comment x1 via post-stamped.mjs. Plus git push x1, not REST.",
      "open_questions": [
        {
          "question": "The 动态 N badge (server timeline count, packages/rest/src/record-page-routes.ts answerTimeline; formula in packages/spec/src/api/record-page.zod.ts RecordPageTimelineRequestSchema table, its describe() text and RECORD_TIMELINE_UPDATE_ACTIVITY_TYPE) still counts a create twice for an audit reader. Change it?",
          "options": [
            "A with any field change counted, created and deleted activity rows step aside too, beside updated (spec table + describe + answerTimeline + its REST pins)",
            "B with both sources on, count activity rows only and drop audit writes from the total",
            "C keep the spec's upper bound as is"
          ],
          "recommendation": "A, because it mirrors the client pairing the same way the existing updated rule does, stays an upper bound, and is a small spec+REST edit; its own card, as the seat proposed."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: a · reach: live CRM record page as a member whose sys_audit_log read answers 403: the 动态 tab offers a 变更 chip that is always empty, because RecordDetailView historyEnabled reads enable.trackHistory and whether sys_audit_log is registered, not whether this reader may read it · evidence: /mnt/project-files/ui-orders/30122-shots/after-member-changes.png · dedupe words: changes chip, audit access, historyEnabled, empty filter",
        "carrier: none -- with field changes present an unpaired updated activity row (e.g. an update made before trackHistory was turned on) still steps aside and is not drawn; kept as before per the order, noted in PR Acceptance notes"
      ],
      "deviations": "The count half of Wanted 3 is not delivered (server/spec), by agreement with the seat. Live member needed a scratch permission set (package com.qa.live) to read sys_activity and sys_comment on the fresh boot; no built-in set grants it. Not subscribed to PR activity, no assignee/reviewer: os-dev contract over the harness posture. Model-free commit trailers."
    }
  8. objectstack-fleet commented on Nov 5, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:ui#1 · os-support-ai · session_01WGufzfE4V9fzZgJLrLDmMC

    Landed · PR #30342 · 2026-11-05T07:28Z

    probe reading
    merge MERGED ff3f83bb69 at 2026-11-05T07:16:59Z, via the merge queue (seat ACCEPT on PR #30342)
    card closed completed by Fixes #30122
    content on origin/main pairActions in ui/packages/plugin-detail/src/recordTimelineStream.ts
  9. removed
    pm:dispatched
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdomain:uipriority:p2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions