Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…inatedResult Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
hotlong
marked this pull request as ready for review
January 31, 2026 04:58
Copilot stopped work on behalf of
hotlong due to an error
January 31, 2026 04:58
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a TypeScript compilation error in the TaskList component by correcting the handling of paginated query results. The issue was caused by attempting to access a non-existent records property on the PaginatedResult type.
Changes:
- Removed reference to non-existent
recordsproperty from result handling logic - Updated comment to accurately reflect the supported result formats
This was referenced Oct 30, 2026
scbdzhwl
pushed a commit
to scbdzhwl/objectstack-analysis
that referenced
this pull request
Nov 16, 2026
…es, queued sends, preview empty state, customer wording, labels (objectstack-ai#33333) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XMSqDQ6rFzuAgQQqZdfkhkC)_ Refs objectstack-ai#32984 (items 1, 2 and 3 in full; the ui halves of items 4 and 5). Items 4 and 5 each keep a producer half in the cloud build agent, named under Acceptance notes, so this PR does not close the card. Clause-②: yes (widening) — measured on this diff: `ChatbotEnhancedProps` (exported by the published `@object-ui/plugin-chatbot`) gains three optional props, `resolveObjectLabel`, `resolveFieldLabel` and `resolveFieldTypeLabel`; the published `@object-ui/i18n` packs gain ten keys and one count family, `chatbot.build.needsAttention` (its base key plus each locale's plural slots), in all eleven shipped locales, and change or remove none. Metadata-protocol: none ## 维护者速读 - 改了什么:AI 搭建聊天五处:方案卡徽标按真实进度显示(已确认 → 正在搭建… → 已搭建,或「未搭建成功 · 没有创建任何内容」并重新给出「开始搭建」);回复进行中输入的消息排队在输入框上方、回复结束后自动发送,可取消;新会话创建期间的第二条消息并入第一条,不再丢(同一条连按两次只发一次,附件也只带一次);草稿预览里未发布对象的列表显示空状态和「发布后这里会显示记录」,不再显示 OBJECT_NOT_FOUND;搭建问题先给一句面向客户的话,给 agent 的原文收进默认折叠的「技术详情」;修改确认卡用对象、字段、字段类型的显示名;已发布草稿徽标上的「N 项需要处理」走语言包,不再是英文。 - 为什么改:原来只要出现过一次 apply_blueprint 调用,方案卡就显示「已搭建」,哪怕六次都被拒、什么都没建;回复中途发的消息、新会话创建瞬间的第二条消息会无声丢失;预览页把引擎的报错原文给客户看;给 agent 的指令(Do NOT publish…)原样展示;确认卡全是机器名。 - 风险与回滚:纯界面。方案卡判定改为读 apply_blueprint 结果的 status(drafted / published 才算已搭建),若云端改了这个信封字段,卡会显示「未搭建成功」而不是误报已搭建。预览空状态只拦预览模式下、本对象列表读取的 OBJECT_NOT_FOUND 一种答复,其他错误照常显示。回滚即 revert。 - 先看:`ChatbotEnhanced.tsx` 的 `resolvePlanBuildStates` 与 `applyBlueprintOutcome`(徽标判定);同文件 `handleSubmit` 的排队分支和发送 effect;`preview/unpublishedObjectReads.ts`(只吞那一种答复)。 - 两分钟验证:`pnpm --dir ui exec vitest run packages/plugin-chatbot/src/__tests__/ChatbotEnhanced.buildChat-32984.test.tsx packages/app-shell/src/views/ObjectView.unpublishedPreview-32984.test.tsx`,预期 `Tests 15 passed (15)`。 - 需要你做的:无,席位落地。 ## What changes - **Item 1, the plan card's badge (`ui/packages/plugin-chatbot/src/ChatbotEnhanced.tsx`).** `builtPlanIds` counted any `apply_blueprint` after a plan as built, running or refused. It is replaced by `resolvePlanBuildStates`, which gives every plan card one of `pending · confirmed · building · built · failed`. An attempt is built only when its result envelope says `drafted` or `published`; a call with no result is `building` while the turn is live and `failed` once it has ended; a refusal (`blueprint_not_confirmed` and the like) or an errored call is `failed`. Any built attempt after the plan outranks earlier failures. A click on Build it reads `confirmed` until the next attempt speaks: the approval is keyed to the tool-invocation count at the click, so an attempt that already failed before the click does not overwrite it. `failed` shows "Not built — nothing was created" beside Build it and Adjust, so the user can approve again. An `awaiting_confirmation` answer still leaves the card pending (objectui#8343), and a running or built plan is still never offered a second Build it (objectstack-ai#432). `resolveProposalCardState` learns `building` and `buildFailed` for the header. - **Item 2, a message typed while a turn runs.** The composer was disabled while the assistant answered. It now stays usable: a submit while `isLoading` goes into a queue drawn above the box ("Sends when the current reply finishes"), and the oldest queued message is sent on the next task after the turn ends. Each queued item has Cancel, which puts its text back in the box. The not-sent rollback (`sendError` tests) is unchanged. - **Item 2, the first send of a new conversation (`ui/packages/app-shell/src/console/ai/AiChatPage.tsx`, `useDeferredFirstSend`).** While the first send is creating the conversation, a second submit was dropped without a word (it kept the first message and discarded the second). It now joins the held first message, which has not left the browser yet, so both reach the agent as the first turn. A repeat (the same text and the same files, a file being the same object or the same name, size, type and lastModified) is held once; a different message joins, and a file both carry is not doubled. - **Item 3, the draft preview of an unpublished object.** New `ui/packages/app-shell/src/preview/unpublishedObjectReads.ts`: `withUnpublishedObjectReads(ds, onUnpublished)` wraps the data source so a `find` the engine refuses with `OBJECT_NOT_FOUND` (read through `answeredLoadFailure`) answers an empty page and reports the object. That holds for any object the engine has not registered, read through this source (a lookup into another drafted object included), not only the listed one. `objectViewListRenderer.tsx` installs it only when `usePreviewDrafts()` says the page is in the draft preview, and only the listed object's own empty state changes, to "Records appear here once you publish" with a sentence on why. Any other failure (a 403, a 500, a refused `findOne`), and every read outside the preview, reaches the list unchanged. - **Item 4, build issues.** The chip reads "N to fix" through the pack (it was English in every locale). The issues block leads with one customer sentence (`chatbot.build.issuesSummary`, or `warningsSummary` when there are only warnings); the verification messages, written for the agent, move into a closed details element, "Technical details". Folded in (seat ruling, same defect class): the published draft badge's failed-item suffix ("· N need attention", English with an `s` picked on `=== 1`) now reads the count family `chatbot.build.needsAttention`. - **Item 5, the change card.** Three optional props resolve names: `resolveObjectLabel(name)`, `resolveFieldLabel(objectName, fieldName)` and `resolveFieldTypeLabel(type)`. The card's target reads `Customer · Phone` with the machine name on the tooltip, and the params lead with the field type's localized name. `AiChatPage` passes resolvers built from `readObjectsByName` (each object by name, when a change card asks: the chat dock mounts this pane on an app's object-list open, where reading the whole `objects` registry at render would undo objectui#12811), `useObjectLabel` and `fieldTypeName(type, locale)`. `openPathObjectReaders-12811.test.ts` gains AiChatPage's row, kind `byName`. A name the metadata does not hold yet (a field the change is about to add) shows as given. - **`ui/packages/i18n`**: ten keys and the `needsAttention` count family in all eleven locales (`chatbot.plan.confirmed`, `chatbot.plan.buildFailed`, `chatbot.build.issuesCount`, `issuesSummary`, `warningsSummary`, `issuesDetails`, `chatbot.composer.queued`, `queuedCancel`, `preview.unpublishedList.title`, `message`). zh-Hant is the generator's output (`gen:zh-hant`). `chatbot.build.issuesCount` joins `COUNT_NEUTRAL.invariant` in `count-families-11445.test.ts`: in every pack the number stands before an infinitive, after a label, or with a counter, so no word agrees with it. - **`.changeset/32984-build-chat-honest-states.md`**: patch for `@object-ui/plugin-chatbot`, `@object-ui/i18n` and `@object-ui/app-shell`, with both declaration lines. ## Tests New pins, each driving the real component (and, for the chat, the real `uiMessagesToChatMessages` mapper over wire-shaped parts): - `plugin-chatbot/src/__tests__/ChatbotEnhanced.buildChat-32984.test.tsx`, 12 cases. Item 1: six refused applies read failed with Build it offered again; an errored apply reads failed; a running apply reads building with no Build it; an apply the ended turn never answered reads failed; refused then built reads built; a click after a refusal reads confirmed. Item 2: Enter during a turn queues the text in sight and sends it when the turn ends; Cancel restores the text; control, Enter with no turn sends at once. Item 4: the summary sentence carries no agent text, the details element is closed and holds it, the chip reads `1 to fix`. Item 5: object, field and type by label with the machine names in `title`; control, an unknown name shows as given. - `app-shell/src/views/ObjectView.unpublishedPreview-32984.test.tsx`, 3 cases through a real `ObjectView` and `ListView` under a forced `PreviewModeProvider`: the empty state with the publish sentence and no `OBJECT_NOT_FOUND`; control, the same answer outside the preview is still an error; control, a 500 inside the preview is still an error. - `app-shell/src/console/ai/__tests__/useDeferredFirstSend.test.tsx`: a second message during the create joins the first; the double-submit case submits the same text twice and expects it once; a doubled submit with one file is held once (text once, file once); control, a second submit with a different file joins, and the file both carry is not doubled. - `plugin-chatbot/src/__tests__/ChatbotEnhanced.needsAttention-32984.test.tsx`, 3 cases under a real `I18nProvider` (its own file, so the provider's module-level global cannot leak into the provider-less pins): zh-Hans reads 「2 项需要处理」 and no English; en reads `1 needs attention` and `2 need attention`; control, no failed item, no suffix. - Existing fixtures updated to the new truth: `ChatbotEnhanced.test.tsx` fixtures give their `apply_blueprint` a `drafted` result (one with no result now reads failed once the turn has ended), and the optimistic-click tests in `ChatbotEnhanced.test.tsx`, `sendError` and `planApprovalPending-11666` expect `proposed-plan-confirmed`. `awaitingConfirmBuild-8343`'s running case renders with `isLoading` and expects building. Ablations (`scripts/ablation-replace.mjs`, each anchor hit once, each restored with `git diff HEAD` empty; ui vitest resolves `@object-ui/*` from source, so no rebuild leg): | mutation | red | |:--|:--| | A1 any `apply_blueprint` result counts as built | 2 item-1 cases, 2 failed / 16 passed | | A1b a running apply counts as built | 3 item-1 cases and objectstack-ai#8343's running case, 4 failed / 14 passed | | A2 send immediately while a turn runs | both queue cases, 2 failed / 10 passed | | A2b a second first-send is dropped (the old branch) | the join case | | A3 no unpublished-object wrapper | the empty-state case, 1 failed / 2 passed | | A4 technical details open | the item-4 case | | A5 no label resolvers | the label case | | B1 the old join condition (`content !== held.content || files present`) | the doubled-with-a-file case, 1 failed / 14 passed | | B4 the old English suffix | the zh-Hans case, 1 failed / 2 passed (the en forms happen to match the old English) | A2's first attempt was refused by the tool (its multi-line anchor was passed through a shell string and never matched; nothing was written) and re-run with the anchor passed as an argument. ## Acceptance notes - **Item 4's producer half (carrier: cloud).** The text the customer should read is still made in the cloud build agent: `apply_blueprint`'s verification `issues[].message` is written to the agent ("Do NOT publish…"). The ui now folds it away behind a generic sentence; a per-issue customer sentence needs the producer to send one. - **Item 5's producer half (carrier: cloud).** A field the change is about to add is not in the metadata yet, so it keeps its machine name. The `changes_proposed` rows could carry the label the agent chose. - **Item 2, as reported.** The card's mechanism could not be reproduced here (the chat server is in cloud). Measured on `main`: the composer textarea was disabled while `isLoading`, so the two paths that could lose a message in the ui were Enter during a turn (now queued) and the second submit during the first send's create (now joined). - **Producer issue, left.** `PublishHealthLine` prints the publish-health issue messages the server sends, verbatim. The words are the producer's; not changed here. - **The card's "Also seen, smaller", not addressed here.** The 「· 补充」 tag reproduces on the tree: a plan field the producer marks `suggested: true` draws a dashed chip ending 「· 补充」 (`chatbot.plan.suggestedField`), with no legend and a tooltip that shows only the machine name, so nothing says what it means. The roughly 5 s blank thread before the first bubble reproduces as a mechanism, read on the tree, not timed: on a new conversation the first message waits in `useDeferredFirstSend`'s stash, outside the transcript, until `POST /conversations` answers and the pane remounts on the new id, so nothing is drawn for that long; the 5 s itself is the server's latency and was not measured here. ## Verification All readings at head `7888f40d` (base `d4fbb4db`, `origin/main` when the branch was cut) unless a line says otherwise. <details><summary>Tests</summary> Round 1 (head `09f30cfb`): plugin-chatbot + i18n `Test Files 199 passed (199)`; app-shell, the 95 files that import the changed modules, `Tests 744 passed (744)`; the two new pin files `Tests 15 passed (15)`. Type-check of i18n, plugin-chatbot and app-shell exit 0. Patch round 1 (head `7888f40d`): - `pnpm --dir ui exec vitest run packages/plugin-chatbot/ packages/i18n/ packages/app-shell/src/console/ packages/app-shell/src/preview/ packages/app-shell/src/views/ObjectView.unpublishedPreview-32984.test.tsx` at `b258a44f`'s content: `Test Files 517 passed`, with 1 failed (518): `all-locales-key-parity` asked the new family for its base key in every pack. The base key landed in `7888f40d`, and `packages/i18n/` plus the needsAttention pin then read `Test Files 103 passed (103)`, `Tests 1897 passed | 13 skipped (1910)`, VERDICT command-exit 0. The 517 green files include `openPathObjectReaders-12811.test.ts` (the CI red on `09f30cfb`) and `useDeferredFirstSend.test.tsx`. - Type-check: the `@object-ui/app-shell^...` closure rebuilt, then `pnpm run type-check` in i18n, plugin-chatbot and app-shell chained with `&&`: VERDICT command-exit 0. </details> <details><summary>Gates</summary> `dispatch-gates --commands --repo objectstack-ai/objectstack` at `7888f40d` derives the same 40 commands as round 1; all 40 plus `pnpm check:changeset-fixed` exit 0, each code captured before any pipe. `--ran` with exit codes: "40 derived famil(ies) accounted for — 40 run, 0 NOT-MEASURED (a DERIVED zero)". Round 1's one red, `check:test-source-alias` at `6d7affa4`, was fixed in `09f30cfb`. The CI type-check lanes the derivation names as not runnable locally are left to CI. </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5pAEP2nn4Qk4wi1V3u)_ <!-- signed: domain:ui#1 · os-project-manager · session_01FEkQ5nWoa1Ze1QzjRTSYXD --> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: objectstack-fleet[bot] <332303061+objectstack-fleet[bot]@users.noreply.github.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.