Repository navigation
feat(console): a grid row whose record has open comment threads shows a dot after the record name - #39106
Conversation
… a dot after its name Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhdHJJKEk4qyMAEUoz
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhdHJJKEk4qyMAEUoz
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhdHJJKEk4qyMAEUoz
…s group header reads Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzhdHJJKEk4qyMAEUoz
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhdHJJKEk4qyMAEUoz 2026-12-02T09:14Z · Final green head for L1: |
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhGA3zoCFquQgku4pm L1 review — ACCEPT on
|
|
repo:objectstack@os-support-ai · os-support-ai · session_01WGufzhdHJJKEk4qyMAEUoz 2026-12-02T09:16Z · Landing on
State: ready + auto-merge (squash) now; #39082 closes on merge via |
Requested by Yibo Wang · project thread
Fixes #39082
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
On an object's list view drawn as a grid, a record with at least one open comment thread (top-level, not resolved) shows a small dot after its name (epic #39077 ruling 7; Q4 and Q5 answered 「按推荐」: open threads only, every object with feeds on, marker only, object list views only).
objectViewRowCommentDot.tsx, wraps the list the renderer draws. It takes the rows the list reports throughonRowsChange(still relayed to the host's handler unchanged), and feeds their ids to the existinguseRecordCountsfrom@object-ui/plugin-detail, with comments asked and attachments not. The hook is unchanged. A page of rows costs one grouped read (POST /data/sys_comment/query,record_id IN (page ids),parent_idnull,is_resolvednot true), never one per row. It is asked again on a new page (the id set changes), on a list re-read (the renderer's combined refresh key is the hook'sreloadKey), and on asys_commentwrite announced on the data-invalidation bus.objectDef.enable.feeds !== false(the record page's own test, ruling 8), and never while the list draws a board. A board reports its cards through the sameonRowsChangechannel. A report made under a board is tagged and never read as grid rows, before or after a layout switch.rowAdornmentis now composed: the managed environment's Users marker and the dot each draw where they apply, and both draw when both apply. When no row has an open thread, the grid gets exactly the adornment it got before (the host's, or none), so its title cells are unchanged.role="img"witharia-labelandtitlefrom the existingkanban.cardFooter.commentskey ("Open comments: {{count}}", zh-Hans 「未解决的评论:{{count}}」). It is the same number the board's foot count shows, so no locale key is added.objectViewListRenderer.tsxonly adds the call. Itsreturn (becameconst drawList = (dots) => (, so the ListView JSX keeps its indentation, and the function returns the wrapper keyed by the list identity. Two props now readdots.*.content/docs/frontend/plugins/plugin-grid.mdx, under "A node beside a row's title".Tests
New
ObjectView.rowCommentDot-39082.test.tsx, through the real consoleObjectViewand the realListView:sys_commentread for the page, askingrecord_id: { $in: ['t1','t2'] },parent_id: nullandis_resolved: { $ne: true }; the dot on the row with threads, none on the other; accessible name "Open comments: 2";notifyDataChanged({ objectName: 'sys_comment' })with a re-read answering nothing, the dot is gone (2 reads in total);enable.feeds: false: zerosys_commentreads and no dot;PERMISSION_DENIED): no dot, no list error state, no error toast, rows still drawn;Ablations (each a one-time proof through
scripts/ablation-replace.mjs, mutation verified on disk and restored to the HEAD blob):Ablation readings
rowAdornment={dots.rowAdornment}reverted to the managed marker alonefeedsOn={objectDef?.enable?.feeds !== false}set totrueasked = feedsOn && !drawsBoardset tofeedsOnasked && !shown.boardset toaskedObjectView.listUrlState-11860.test.tsxwent red under this change. ItsqueryGroupHeadersspy recorded every object's group read as "the grouped grid's", so the dot'ssys_commentread showed asgroupBy: ['record_id']. The spy now records only the list object's reads, the same filter itsfindspy already applies. Nothing it asserts about grouping changed.Acceptance notes
ObjectViewandListView, with a data source shaped like the server's grouped door.groupingNeedsHeaderQuery) reports no row sequence to the host today, so it draws no dot. A client-grouped grid reports its open groups' rows and does draw dots. The phone card view's title draws the dot through the samerowAdornment.kanbannamespace. It is reused rather than duplicated because Clause-② stays no.Verification
Read first, by risk:
ui/packages/app-shell/src/views/objectViewRowCommentDot.tsx:RowCommentDots, the board tag inhandleRowsChange, and therecordIdsgate.ui/packages/app-shell/src/views/objectViewListRenderer.tsx: thedrawList/RowCommentDotshand-off at the end ofrenderListView.ui/packages/app-shell/src/views/ObjectView.rowCommentDot-39082.test.tsx.Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/views/ObjectView.rowCommentDot-39082.test.tsxshould report 7 passed.Local runs
All at head 49b6e0a (tree objectstack-ai/objectstack).
pnpm --dir ui exec vitest run packages/app-shell/src/views/ObjectView.rowCommentDot-39082.test.tsx: 7 passed (7).pnpm --dir ui exec vitest run packages/app-shell/src/views/ObjectView.listUrlState-11860.test.tsx packages/app-shell/src/views/ObjectView.rowCommentDot-39082.test.tsx: 2 files, 47 passed.ObjectView.*suites plus the five suites that read the list's shown rows (objectViewRecordNavigation.listRows-27524,recordPaneGroupScope-28461,recordDrawerStack.rootStepper-26679,recordDrawerStack.prefetch-27056,RecordDetailView.topBar-27524): 109 files, 960 passed and 1 failed. The failure waslistUrlState-11860, fixed in this PR as described above and re-run green. That run was at the head before the fixture commit, and the fixture commit touches only that test file.pnpm --filter @object-ui/app-shell type-check(tsc --noEmitandtsc -p tsconfig.test.json, which includessrc/**/*.test.tsx): exit 0.node scripts/pm/dispatch-gates.mjs --commandsderived 71 families; all 71 ran locally, each with its exit code recorded.--ranreconciliation: "71 derived, 71 run, 0 NOT-MEASURED, 0 UNRUN".check:skill-examplesfirst exited 3 (PREREQUISITE NOT MET, client-react unbuilt); afterpnpm --filter @objectstack/client-react buildit exited 0. Also ranpnpm check:changeset-fixed(exit 0).pnpm --dir ui run check:new-line-citations: 0 new citations.Test UIfarm (app-shell alone has about 2,500 test files, more than the 10-minute foreground cap) andType Check UI. CI runs both.🤖 Generated with Claude Code
https://claude.ai/code/session_01WGufzhdHJJKEk4qyMAEUoz