Skip to content

Record page: the discussion's reads and writes become one unit other pages can mount #39083

Description

@os-support-ai

立卡门类别:③ 维护者直派(专题 #39077 的子卡)。Source: topic #39077
thread · os-support-ai · session_01WGufzirjTJ1sVFGR5sBPSL

Parent: #39077 · M1 打底 · card U2 of the epic's milestone table
定级:area:data · Task · priority:p1 set by the maintainer (see the Ruling-ref comment) · reach: n/a (new capability, maintainer direct) · evidence: read (isolated analysis on #39077, Served-tier: CONTRACT_REVIEW_TIER, tier verified)

维护者速读

  • 把记录页的评论读写整理成一块,列表页的评论栏能直接复用;记录页的样子和行为都不变。

业务理由:维护者原话「设计列表页本身整个对象的评论入口」「用fable 分析,并立专题卡, p1」「按推荐」——在列表页上直接看当前视图里各条记录的评论串、回复和解决,不用一条条点进记录。已定的九条规则和七条待定的结论在 #39077 正文与其评论里,本卡不复述。

动手的读者:席位为本专题开的专区(维护者「这个专题直接派发吧,并发5」「开一个专区派发」),os-dev 按本卡施工。

Dedupe: 评论 列表 in:title, comments panel list view, view comments feed, list page comments, comments across records, Attio comments (objectstack, incl. closed) → no open card covers this; related #36062 (closed, origin topic), #35947 (open, paused sibling topic).

Scope and acceptance

§N below points at the English analysis inside #39077.

  • Layer: UI (app-shell) · area:data · Task (a move with no behaviour change; triage may retype) · size L · p1
  • General building block named: a record-discussion unit keyed by (object, record id) that produces what the
    discussion context provides today.
  • Scope:
    • Move the record page's comment read, row-to-item mapping, reaction read, the reply / edit / delete / resolve /
      react handlers, the write-gate resolution and the two record verdicts out of the record view into one unit;
      the record page consumes it. Activity and attachments stay where they are.
    • No visible change, no new request, no request removed.
  • Acceptance:
    • Every existing record-page comment suite passes unmodified (the panel, phone page, resolved, counts, mentions,
      focus-by-link suites).
    • Browser: on a record page, post, reply, react, edit, delete, resolve and reopen all behave as before; the
      network panel shows the same requests in the same order on open.
    • The unit can be mounted for a second record on the same page without the two sharing state (unit test).
  • Order: no upstream card.
  • Clause-②: no if the unit stays internal to the package; yes (widening) if it is exported from a package entry.
  • Metadata-protocol: none
  • Likely files: ui/packages/app-shell/src/views/RecordDetailView.tsx (handleAddReply, handleEditComment,
    handleDeleteComment, handleResolveComment, handleToggleReaction, moderatesComments,
    updatesOthersComments, the DiscussionContextProvider hand-off), a new module beside it.

Generated by Claude Code

Activity

  1. added
    priority:p1
    pm:queue
    domain:ui
    on Dec 2, 2026
  2. os-support-ai commented on Dec 2, 2026

    @os-support-ai
    CollaboratorAuthor

    Ruling-ref: priority:p1 — maintainer, project thread, 2026-12-02: 「用fable 分析,并立专题卡, p1」 (07:13Z) and 「按推荐」 (07:36Z); recorded on #39077.

    thread · os-support-ai · session_01WGufzirjTJ1sVFGR5sBPSL


    Generated by Claude Code

  3. os-support-ai commented on Dec 2, 2026

    @os-support-ai
    CollaboratorAuthor

    Card thread: yes — per pm-dispatch dispatch-runbook.md 卡线程 (big card = L/XL or contract change): size L (a move out of the 7,000-line record view, ~100 suites exercise it). Not a zone mode:subagent card.

    thread · os-support-ai · session_01WGufzirjTJ1sVFGR5sBPSL


    Generated by Claude Code

  4. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

    Claim: card thread of seat repo:objectstack@os-support-ai, epic #39077 (list-page comments, the maintainer's 「这个专题直接派发吧,并发5」), M1 card U2
    Session: session_01WGufzhPdWmTd47Fi2bKYZS
    Thread session: session_01WGufzew8W6iW6kx7oqmWyo
    Account: os-support-ai
    Branch: claude/project-thread-cnziy4
    Domain: domain:ui
    Seat: repo:objectstack@os-support-ai
    File surface: ui/packages/app-shell/src/views/RecordDetailView.tsx, ui/packages/app-shell/src/views/useRecordDiscussion.ts (new module beside it), the new unit's test beside it, the existing app-shell tests that read the moved handlers (named in the report), a changeset. Stop on breach; explain in the report.
    Container & model: L, mode:card-thread, model: TIER_DEFAULT (dispatch-gates --tier prints no MANDATORY line), effort: high
    Clause-②: no (the unit stays internal to @object-ui/app-shell; its one other consumer, U3 #39085, is in the same package)
    Metadata-protocol: none
    Responsibility: n/a — feature card
    Thread-read: 7338448693
    Premise: holds on main 7814822. The record page's discussion handlers (handleAddComment, reply, edit, delete, resolve, near RecordDetailView.tsx:4188–4504), moderatesComments and the comment read in the feed effect move into one unit that another page can mount. The comment read shares one effect with the activity read, the record-page payload, per-source verdicts, Retry and the loading key, so the unit takes the page payload and retry as inputs, and the request order on open stays the same. Behaviour unchanged: the existing record-page tests pass unedited, or each edit is named in the report.
    Line budget: a move of about 1,000 lines. If the PR crosses the 3,000-line review line it goes to human review; it is never split to stay under it.
    Serial constraints cleared: check-handover.mjs --inflight over both paths reads no overlap; the one unread surface is #38415, a cross-repo watch of this seat with no file. U1 #39082 (zone osa-comments) and U3 #39085 (blocked on this card) do not touch these files now.

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

    @objectstack-fleet
    Contributor

    repo:objectstack@os-support-ai · os-support-ai · session_01WGufzew8W6iW6kx7oqmWyo
    os-dev-report

    Claim surface amend: the one existing test that reads the moved handlers sits in plugin-form, not app-shell. It is ui/packages/plugin-form/src/affordanceGrantMap-12082.test.tsx, the write census. Its six comment write keys are re-keyed from RecordDetailView.tsx :: RecordDetailView > … to useRecordDiscussion.ts :: useRecordDiscussion > …, with the same rows and verbs. No other file outside the claimed surface. All record-page suites pass unedited.

    {
      "issue": 39083,
      "status": "done",
      "branch": "claude/project-thread-cnziy4",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/39109",
      "session": "session_01WGufzew8W6iW6kx7oqmWyo",
      "premise_still_valid": true,
      "summary": "The record page's discussion (comment rows and read verdict per record key, the comment read on either reaction store, every comment write with its gates, and the moderate / update-others verdicts) moves verbatim from RecordDetailView into useRecordDiscussion, an internal app-shell hook keyed by object and record id. The record page mounts it once and still calls readComments inside its own feed effect beside the activity read, so the open sequence keeps its order. The hook reads nothing on mount, and a second mount for another record shares no state. Activity and attachments stay in RecordDetailView. 3,160 changed lines (+1,760 / -1,400), mostly the move: over the 3,000-line human-review line, not split.",
      "tests": "Final run on head cb872667: 27 record-page comment/feed/reaction suites + useRecordDiscussion.test.tsx + affordanceGrantMap-12082 = 29 files, 457 tests passed. The rest of the RecordDetailView.* suites pass in two batches (50 files / 422 tests, 32 files / 276 tests). New unit test (5 cases): no read on mount; per-record rows and reply counts; a refused read marks one record; a reply writes under its own record and keeps the other mount's items identical; mergeRows targets the right record. Browser (showcase account record, comments panel open), branch vs main: open-request record-scope sequences match, except an audit-log read that appears at random on both sides; payload POST bodies are byte-identical. Post, reply, react, edit, resolve, reopen and delete succeed on both sides with the same writes (POST sys_comment x2, POST sys_comment_reaction, PATCH sys_comment/:id, PUT comments/:id/resolution x2, DELETE sys_comment/:id), and the rows read back over the API are as expected.",
      "gates": "Local: all 38 dispatch-gates --commands exit 0. tsc --noEmit on app-shell tsconfig.json and tsconfig.test.json: 0 errors. ESLint on the 4 touched files: 0 errors, 158 warnings (main RecordDetailView.tsx alone: 156; most moved with the code). CI: the PR's check-runs had just started at report time; they are followed on the PR.",
      "mcp_calls": "0",
      "api_writes": "2 relay writes: pr_create (POST /repos/objectstack-ai/objectstack/pulls draft, plus the assignee leg POST .../issues/39109/assignees os-support-ai), and this os-dev-report comment (POST .../issues/39083/comments). Plus git push of the branch.",
      "classifier_refusals": [],
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }
  7. objectstack-fleet commented on Dec 2, 2026

    @objectstack-fleet
    Contributor

    repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhPdWmTd47Fi2bKYZS

    Claim amendment · 2026-12-02T09:07Z · claim 7338593488, PR #39109, from the card thread's os-dev report.
    File surface (added): ui/packages/plugin-form/src/affordanceGrantMap-12082.test.tsx, the write census only (+15/−12). It counts each comment write site by file, so the move re-keys its rows from RecordDetailView.tsx to useRecordDiscussion.ts. No assertion is relaxed, and every record-page suite passes unedited.
    Line count: the PR is 3,160 lines, over the 3,000-line review line, because about 1,400 lines move into the new module. It is not split, and it goes to human review per the 3,000-line rule.
    Serial constraints cleared: check-handover.mjs --inflight over the file reads no other in-flight surface on it.

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

Metadata

Metadata

Assignees

Labels

area:datadomain:uipm:dispatchedpriority:p1

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions