Skip to content

Record activity shows no approvals: emit approval feed items from plugin-approvals so the one-line approval row appears (follow-up to #35602) #35723

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CZiaBg6rk7dpy1s9Me

Filing gate: ① the half of #35602 its PR cannot reach inside its file surface. Filed by area ux-3 on seat 5's ruling (B: keep the approval row host-supplied until a producer exists). Suggested grade: p2. ⛔ Not a claim; triage sets lane and grade.

What is missing

PR #35708 (#35602) draws an approval in the record activity stream as one line with 「看审批」, through an optional host callback onViewApprovals. Nothing emits approval feed items today, so the row is reachable only from items a host supplies. A user looking at a record under approval sees no approval in its activity. Context only: objectui#5877, and the producer census pin ui/packages/plugin-detail/src/renderers/__tests__/feedTypeProducerCensus-5877.test.ts.

Done when

Dedupe: issue search approval feed item producer, approval activity timeline → only #35602 (and the architecture card #25950, which rebuilds the approval UI and does not emit feed items).

Activity

  1. added
    finding
    on Nov 20, 2026
  2. objectstack-fleet commented on Nov 20, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in domain:server (plugin-approvals) · pm:queue; rationale: area:workflow · Feature (plugin-approvals emits approval feed items so the record activity stream shows its one-line approval row) · the half of #35602 (record-page topic #35590) its PR cannot reach → p2, the topic's grade.

  3. added
    area:workflow
    domain:server
    pm:queue
    priority:p2
    on Nov 20, 2026
  4. objectstack-fleet commented on Nov 24, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim: PM loop round 1 (zone wf-A, routed from wf-B by the seat)
    Session: session_01WGufzg3KqwSpt61Y8ovKK7
    Account: os-support-ai
    Branch: claude/issue-35723-approval-feed-items
    Worktree: objectstack-issue-35723
    Domain: domain:server
    Seat: repo:objectstack#3
    Area: wf-A
    File surface: packages/plugins/plugin-approvals/src/** (the approval feed producer, in a new sibling module where possible, with its real-kernel test in a new card-named file), the record activity read it feeds, ui/packages/plugin-detail/src/renderers/** (recordActivityFeed.ts producer map and the census pin feedTypeProducerCensus-5877.test.ts), ui/packages/app-shell/** host wiring of onViewApprovals to the record's Approvals tab, changesets. Any packages/spec/src/** touch (e.g. a new activity type value) is declared in the report with its reason and stays in this lane.
    Container & model: L, mode:subagent, model: default (no path-derived mandate), effort: high
    Clause-②: no (to be measured on the diff: approval is already a FeedItemType in packages/spec/src/data/feed.zod.ts:41; a new value in a published activity-type accept set would make it yes and owe the CONTRACT_REVIEW_TIER review)
    Metadata-protocol: none (to be measured; no authorable key expected)
    Responsibility: platform code in objectstack (plugin-approvals emits no approval feed item; follow-up to #35602) | the record activity stream draws the approval row only from host-supplied items (#35708) | every user viewing a record under approval; nobody sees approvals in its activity today
    Thread-read: 7029748028
    Premise: holds — on origin/main 517e415 PRODUCED_FEED_TYPES (ui/packages/plugin-detail/src/renderers/recordActivityFeed.ts:303) derives from ACTIVITY_TYPE_TO_FEED_TYPE (:143), which maps no activity type to approval; #35708 (the one-line row) merged as a3a74f2.
    Serial constraints cleared: same-package in-flight work: PR #37145 (#37041) and branch claude/project-thread-x90m5y (#35863) both edit packages/plugins/plugin-approvals/src/approval-service.ts and packages/spec/src/contracts/approval-service.ts. The producer goes in a sibling module; overlap-check.mjs runs against both before every push, and a hunk collision waits for the earlier PR to land, then rebases.
    Pre-claim lane: domain:server — the producer lives in packages/plugins/plugin-approvals/**; the ui/** census and host wiring stay in this lane by the lane-keep rule.
    Pre-claim deps: none named; source PR #35708 (#35602) merged; Approvals tab container (#35595) on main.
    Prior rulings read: onviewapprovals,approval-feed,produced_feed_types → 0 hits; none; thread: none; repo: objectstack-ai/objectstack. Seat 5 ruling B on #35602 (keep the row host-supplied until a producer exists) is what this card ends.

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

    @objectstack-fleet
    ContributorAuthor

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

    {
     "issue": 35723,
     "status": "done",
     "branch": "claude/issue-35723-approval-feed-items",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37188",
     "head": "dc763477535b0b6aa3397c14bc827154979afcc9",
     "session": "session_01WGufzg3KqwSpt61Y8ovKK7",
     "premise_still_valid": true,
     "summary": "Resumed from 51c3592be5. plugin-approvals (new approval-activity-feed.ts) appends one sys_activity row per submit/approve/reject/recall step on the governed record (type system, metadata.kind approval, source sys_approval_request) and a sys_activity read gate serves those rows only to callers the approvals service serves the request; plugin-detail maps that triple to the approval feed kind (approval now produced) and RecordDetailView wires the stream's View approval to the record's approvals tab via RecordViewApprovalsContext. This round fixed four WIP defects: a hook placed below RecordDetailView's early returns (broke 18 existing tests), the census pin listing note instead of approval, a record-page pin written into a harness that stubs SchemaRenderer (moved to RecordDetailView.harness.test.tsx), and gate reds (actor_id read ledger, tenant-audit census, optional-error-sink, query-options erasure, the 9557 test using approval as its unproduced example); docs table updated.",
     "tests": "head dc76347753: ui RecordDetailView.* (100 files) Test Files 100 passed, Tests 858 passed; plugin-detail full suite 417 passed + 1 red fixed and re-run (7 passed); plugin-approvals full suite 129 files / 1923 tests passed at 8fb5c70b3d, targeted re-run + typecheck green after later commits; plugin-detail and app-shell type-check exit 0 after building the app-shell^... closure. Ablation: provider value viewApprovals -> null via ablation-replace.mjs, 35723 pin red (1 failed, control passed), restore blob == HEAD, git diff HEAD empty.",
     "gates": "local: dispatch-gates --ran 106 derived / 106 run / 0 UNRUN. Fixed then re-run exit 0: check-tenant-audit-census, check:optional-error-sink, check:query-options-erasure. NOT MEASURED: check:i18n, check:dual-build-cjs-loads, spec check:skill-examples (exit 3 prerequisite), ui vitest scripts/ (SIGKILL by OOM killer), check:type-check-debt (its re-measure build stopped by me in the lock queue). CI: started on dc76347753, 25 check-runs, 20 in_progress, 5 skipped (opt-in/queue lanes); PR mergeable, mergeable_state blocked (draft/required checks), not dirty.",
     "dogfood_battery": "n/a - no ! in the PR title and no (narrowing) arm",
     "line_budget": "1072 changed lines (+1021 / -51), 17 files; under 1500 and 3000",
     "files_changed": [
      ".changeset/35723-approval-activity-feed.md",
      "content/docs/frontend/plugins/plugin-detail.mdx",
      "docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-approvals.md",
      "packages/plugins/plugin-approvals/src/approval-activity-feed.ts",
      "packages/plugins/plugin-approvals/src/approval-activity-feed-35723.integration.test.ts",
      "packages/plugins/plugin-approvals/src/approvals-plugin.ts",
      "packages/plugins/plugin-approvals/src/approver-address-readers.test.ts",
      "ui/packages/app-shell/src/views/RecordDetailView.tsx",
      "ui/packages/app-shell/src/views/RecordDetailView.harness.test.tsx",
      "ui/packages/plugin-detail/src/RecordChatterPanel.tsx",
      "ui/packages/plugin-detail/src/index.tsx",
      "ui/packages/plugin-detail/src/recordTimelineStream.ts",
      "ui/packages/plugin-detail/src/renderers/record-activity.tsx",
      "ui/packages/plugin-detail/src/renderers/recordActivityFeed.ts",
      "ui/packages/plugin-detail/src/renderers/__tests__/recordActivityFeed.approvalStep-35723.test.tsx",
      "ui/packages/plugin-detail/src/renderers/__tests__/recordActivityFeed.test.ts",
      "ui/packages/plugin-detail/src/renderers/__tests__/recordFeedDiagnosticBlockName-9557.test.tsx"
     ],
     "clause_2": "Clause-②: no (no packages/spec touch; approval already a FeedItemType value; sys_activity type stays system)",
     "metadata_protocol": "Metadata-protocol: none",
     "skills_docs": "not owed (kind none, no narrowing arm)",
     "governed": "check-governed-merges --pr 37188: NOT governed, 0 of 17 paths; 1072 lines under 3000",
     "overlap": "overlap-check VERDICT clean exit 0 vs origin/main 0439a04dc8 and #37185; no shared files with claude/project-thread-x90m5y or #37145 (approval-service.ts and spec contracts untouched)",
     "deviations": [
      "Dispatch order says drive CI green; os-dev.md says report when local validation is done and not wait on CI. Followed os-dev.md (it prevails on conflict); CI was in_progress at report time.",
      "Stopped my own queued check:type-check-debt whole-workspace build (descendant PIDs of my gate runner) to free the shared lock; that gate is NOT MEASURED locally.",
      "Lock queue: about 45 minutes of queue-timeouts behind another worktree's full dogfood run before acquiring; no narrowing needed in the end."
     ],
     "mcp_calls": "0",
     "api_writes": "2 - relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/37188/assignees, one stroke), post-stamped comment on #35723; plus git push (not REST)",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: none - noted, not filed: other plugin-approvals call sites (approval-service.ts logger?.error?.(msg, meta)) pass meta in the spec Logger's error slot under a loosely typed logger; no wrong answer measured at a public door, so outside the three filing classes."
     ],
     "Dev-effort": "high",
     "Rounds": "1 (resumed)"
    }
  7. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim amendment · 2026-11-25T03:11Z · to claim 7147655087 (PR #37188), per L1 7151680146 S2

    File surface, widened by files the change needs as direct consequences (each described in the PR body): ui/packages/plugin-detail/src/RecordChatterPanel.tsx, ui/packages/plugin-detail/src/index.tsx and ui/packages/plugin-detail/src/recordTimelineStream.ts (the approval triple read as the approval feed kind outside renderers/), content/docs/frontend/plugins/plugin-detail.mdx (the producer table), and the tenant-audit write census docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-approvals.md (the new sys_activity write). For the fix round (S1, the approval line in the reader's language), also the locale packs under ui/packages/i18n/src/locales/** if the line is composed in the console. Everything else in the claim stands.

  8. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

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

    {
     "issue": 35723,
     "status": "done",
     "branch": "claude/issue-35723-approval-feed-items",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37188",
     "head": "06a3c7640b5de8e8d3c0d665d426137e8d42077b",
     "session": "session_01WGufzg3KqwSpt61Y8ovKK7",
     "premise_still_valid": true,
     "summary": "Round 2 on the L1 REWORK (dc76347753). Merged origin/main (93bd45957b) clean. S1 by route (b), the #26167 precedent's shape: the stored summary is the English sentence from plugin-approvals' own catalog (approvalActivity*, ten ids in all eleven shipped packs), the row now carries flow_name/step_name beside action/step_label, and a new sys_activity middleware (bindApprovalActivityLocale) re-composes the line on find/findOne for a non-system read with a locale through readerLabelsFor, the step label from flows.FLOW.approvals.NODE.label, else the stored label. N1 done (revise/resubmit/cancel write entries), N2 honored as the CRUD mirror does (enable.activities false writes nothing), N3 pinned exactly, N4 sentence corrected. CI red on 05d82f29 (check:system-context-census, the new isSystem read had no row) fixed in f0b51c92.",
     "findings": {
      "S1": "fixed, route (b) server re-composes on read; pinned with a zh-CN reader ('已批准 · 经理审批', step label from an app flows pack) plus a summary-only projection, a no-locale reader and a system read; ablation red",
      "S2": "handled by the zone (claim amended); this round adds content/docs/permissions/system-context.mdx outside the amended surface (see deviations)",
      "N1": "fixed in the same code path: revise ('Sent back for revision · STEP'), resubmit, cancel (actor null) each pinned",
      "N2": "fixed: flag honored, consistent with audit-writers.ts; pinned",
      "N3": "fixed: 'Approved · Manager review' and 'Rejected · Manager review' pinned exactly, plus the stored metadata",
      "N4": "fixed in the PR body 维护者速读"
     },
     "tests": "head 06a3c7640b: plugin-approvals full suite Test Files 129 passed (129), Tests 1929 passed (1929) + typecheck (check:test-typecheck OK), VERDICT command-exit 0 (run before the cancel pin was added); 35723 integration file Tests 7 passed (7) at 06a3c7640b. Ablation: bindApprovalActivityLocale call replaced by a no-op via ablation-replace.mjs (anchor 1 to 0), zh-CN pin red (1 failed | 6 passed), restore blob == HEAD, git diff HEAD empty. UI files unchanged this round; round-1 UI readings stand.",
     "gates": "local: dispatch-gates --ran 106 derived / 104 run / 2 UNRUN; 101 exit 0. check:i18n exit 3 then its prerequisite build and re-run: OK (10 packages in sync), VERDICT command-exit 0. check:system-context-census OK + self-test pass after f0b51c92. NOT MEASURED locally (CI ran them green): check:dual-build-cjs-loads, spec check:skill-examples (exit 3 prerequisite); declared narrowing: pnpm --dir ui exec vitest run scripts/, check:type-check-debt. CI on 06a3c7640b: 71 check-runs, 60 success, 11 skipped (opt-in/queue/size lanes), 0 failed; all eleven required contexts success; mergeable_state clean; draft.",
     "ci_result": "green: 60 success / 11 skipped / 0 failed on 06a3c7640b; mergeable_state clean",
     "dogfood_battery": "n/a - no ! in the PR title and no (narrowing) arm",
     "line_budget": "1461 changed lines (+1409 / -52), 19 files; under 3000; not governed (0 of 19 paths)",
     "files_changed": [
      ".changeset/35723-approval-activity-feed.md",
      "content/docs/frontend/plugins/plugin-detail.mdx",
      "content/docs/permissions/system-context.mdx",
      "docs/audits/2026-08-tenant-audit-write-call-sites.counts/plugins/plugin-approvals.md",
      "packages/plugins/plugin-approvals/src/approval-activity-feed-35723.integration.test.ts",
      "packages/plugins/plugin-approvals/src/approval-activity-feed.ts",
      "packages/plugins/plugin-approvals/src/approvals-plugin.ts",
      "packages/plugins/plugin-approvals/src/approver-address-readers.test.ts",
      "packages/plugins/plugin-approvals/src/translations/messages.ts",
      "ui/packages/app-shell/src/views/RecordDetailView.harness.test.tsx",
      "ui/packages/app-shell/src/views/RecordDetailView.tsx",
      "ui/packages/plugin-detail/src/RecordChatterPanel.tsx",
      "ui/packages/plugin-detail/src/index.tsx",
      "ui/packages/plugin-detail/src/recordTimelineStream.ts",
      "ui/packages/plugin-detail/src/renderers/__tests__/recordActivityFeed.approvalStep-35723.test.tsx",
      "ui/packages/plugin-detail/src/renderers/__tests__/recordActivityFeed.test.ts",
      "ui/packages/plugin-detail/src/renderers/__tests__/recordFeedDiagnosticBlockName-9557.test.tsx",
      "ui/packages/plugin-detail/src/renderers/record-activity.tsx",
      "ui/packages/plugin-detail/src/renderers/recordActivityFeed.ts"
     ],
     "clause_2": "Clause-②: no (no packages/spec touch; no new published key or value)",
     "metadata_protocol": "Metadata-protocol: none",
     "deviations": [
      "content/docs/permissions/system-context.mdx is outside the amended claim surface: row 17 had to own the new middleware's isSystem read (the CI red on 05d82f29). Zone to amend the claim.",
      "ui/packages/i18n/src/locales/** was added to the claim but is untouched: route (b) needs no console locale pack.",
      "Two derived families left unrun locally as declared narrowing (ui scripts/ vitest, OOM-killed in round 1; check:type-check-debt, whole-workspace build); CI green on the head.",
      "Waited for CI on the final head per the zone order (os-dev.md would report at local validation); the zone order was followed for this card."
     ],
     "mcp_calls": "0",
     "api_writes": "2 - relay issue_patch PATCH /repos/objectstack-ai/objectstack/issues/37188 (PR body, read back identical 11162 bytes); post-stamped comment POST /repos/objectstack-ai/objectstack/issues/35723/comments (this report); plus git push (not REST)",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [],
     "Dev-effort": "high",
     "Rounds": "2"
    }
  9. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Claim amendment · 2026-11-25T05:20Z · to claim 7147655087 (PR #37188), fix round 2

    File surface, widened by one file: content/docs/permissions/system-context.mdx (its census row owns the isSystem read of the new sys_activity read middleware bindApprovalActivityLocale, which check:system-context-census requires). The locale packs under ui/packages/i18n/src/locales/** named in the previous amendment are not touched: S1 took the server route (the line is re-composed on read from plugin-approvals' own catalog), so no console pack moves. Everything else in the claim stands.

  10. objectstack-fleet commented on Nov 25, 2026

    @objectstack-fleet
    ContributorAuthor

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

    Close-out · zone wf-A · 2026-11-25T05:47Z: PR #37188 merged 2026-11-25T05:47Z as a03c3d4 (Tier S, L1 ACCEPT 7153741928, landing 7153756765). plugin-approvals now writes a sys_activity entry for each approval step on the governed record (submitted, approved, rejected, sent back, resubmitted, recalled, cancelled), served only to readers who may read the request and re-composed in the reader's language on read. The record activity stream draws each as the one-line approval row, 看审批 opens the record's Approvals tab, and the producer census counts approval as produced. Fixes closed this card; pm:dispatched removed. Nothing left open.

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

Metadata

Metadata

Assignees

Labels

area:workflowdomain:serverfindingpriority:p2

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions