Repository navigation
feat(console): a footer calculation is a part of the list draft; a package view's refused save says why in the reader's words - #36212
Conversation
Picking, changing or removing a column's footer calculation applies at once and writes nothing: it joins the list's draft (Discard / Save, one line in Save's unsaved list) and Save to this view / Save as my view store it on the columns the saved body keeps. A view the reader cannot change in place offers Save as my view alone, so no pick reaches the door that refuses a package's view. That refusal (NOT_OVERRIDABLE) is said in the reader's words in every locale instead of the door's text. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L6bhgX7ez5A7JDsmzTy9Ks
|
repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4 席位核对 — ACCEPT, first read (L1-b)Head-sha: 维护者速读
Must-fixNone. Should-fixNone. Nits (ride or drop, seat's call)
Checked
Owed
|
…-8r2qm4 # Conflicts: # ui/packages/app-shell/src/views/objectViewListRenderer.tsx
…-8r2qm4 # Conflicts: # content/docs/ui/views.mdx # ui/packages/app-shell/src/views/ObjectView.tsx # ui/packages/app-shell/src/views/listDraftStore.ts # ui/packages/app-shell/src/views/personalViews.ts
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Posted 2026-11-22T00:33Z. The brief handed to the isolated declaration-face reviewer for PR #36212 (owed by Contract review brief — PR #36212 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUmopshYqDCrYekUj4 席位核对 — delta ACCEPT (L1-b)Head-sha: 维护者速读
Must-fixNone. Should-fixNone. NitsNone new. Prior N1 is closed. Prior N2 (CI not started) is closed: CI is green at this head. Checked
Owed
|
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Contract reviewServed-tier: Inputs read: cards #36194 and #36195 (bodies and every comment, the claims 7070357165 and 7070351344 included), epic #35547 (body), merged #36123 (body), this PR's body, file list (30 files) and net diff against ① Derived judgments
② Semver level
③ Boundary flags
Findings:
There is no must-fix and no should-fix. Check-runs on the head: 66 completed, 54 success, 12 skipped by path, none failed or pending. The PR is still a draft, and its merge state is clean. Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-sales · session_01L6bhgUkbQqRUUFSiu2HGob Seat landing · 2026-11-22T00:38Z · #36194 + #36195: a footer calculation picked in a list goes to the list's draft and no longer writes to the server on its own; on a shared view it publishes only through the confirmed 「保存到这个视图」 (with the view's own row height and widths untouched). A reader of a read-only view can pick calculations too, into the draft only. A packaged view the server refuses to save in place now gets a plain refusal message, and 「保存到这个视图」 stays hidden until the console has read the package list (a failed read or an unlisted package still offers it, as before). Reviews:
Gates on this head (
The seat readies this PR and arms auto-merge in the same step. The PR carries |
Requested by Sales · project thread
repo:objectstack#1 · os-sales · session_01L6bhgX7ez5A7JDsmzTy9Ks
Fixes #36194
Fixes #36195
Clause-②: yes (widening) — two new keys in every
@object-ui/i18nlocale pack (console.objectView.personalizedParts.summaries,console.objectView.saveRefused.packaged); zh-Hant regenerated; nothing removed or renamed.ListView/ObjectGridprops unchanged (doc comments only).Metadata-protocol: none
维护者速读
What changes
A footer calculation is a draft part (
objectViewListRenderer.tsx,listDraftStore.ts,columnSummaryWrite.ts,ObjectView.tsx)ListDraftgainssummaries(column → calculation,null= None over a column the view sums); an emptied part is no part. It lives exactly as the other parts (在列表上的改动都改成临时的(排序、筛选、分组、列的显示和顺序):立即生效但不保存,出现「放弃」和「保存」;列宽、行高、标签页顺序只记在浏览器里;退掉服务端的个人列表偏好 #35955 item 4: kept on a record round trip, dropped on another view or object and on a reload).ListView(columnsWithSummaries), so the grid draws them at once, andonColumnSummaryPickonly patches the draft and answerstrue. A pick equal to the column's own calculation (columnSummaryOf) drops the column from the draft.columnSummaryPickFields) on the columns the list draws, the reader's added fields included: the columns a saved body carries. Where the list holds no draft (an environment list, no open view) nothing is offered (listViewActions.draftsSummaries).handlePickPersonalViewSummary(wrote the reader's own view at once) andhandlePickSharedViewSummary(wrote the shared view's draft,PUT /meta/view/<name>?mode=draft). No footer pick writes anything now.summaries(ListDraftActions'ListPersonalizationPartgains it;ListView's own vocabulary is untouched), pushed inobjectViewListUrlState.tslikecolumns.PersonalViewListState.summaries, laid bybuildPersonalViewConfigon the columns it keeps (after added fields, order and hidden columns). Callers: Save to this view (own view), Save as my view, the switcher's create card with "include current".A view the reader cannot change in place — the same "can save in place" reading as the filter and the Save menu, no second rule: the Save menu offers Save to this view on the reader's own view only (on
main), so a package's view and a non-admin's shared view get Save as my view alone. With #36123 merged in, its shared-view Save to this view keeps its own test (canSaveToSharedView, now waiting for the package list: small call 5) and stores the calculations too.A refused save of a package's view (
viewSaveRefusal.ts,objectViewViewCrud.tsx,ObjectView.tsx)viewSaveRefusalText(err, t):code === 'NOT_OVERRIDABLE'(the door's close on an item a package ships,protocol-packaged-base-refusal.ts) →console.objectView.saveRefused.packaged; anything else →formatMetadataErroras before. Used at every view-write toast on the object page except delete (view settings save, create, rename, pin, set default, personal create / save / save as).Docs:
content/docs/ui/views.mdx§ "A user's list state never writes the view". Changeset36194-footer-calculation-draft.md.Small calls made in this thread (Sales 22:19:27Z rule; seat agreed 22:51Z)
NOT_OVERRIDABLEis reworded. Other refusals (403 permission, 422 field issues, pin / default / rename) keep the door's message, which objectui#11583 / feat(spec): retirecontributes.routes(ruled Option B) and redirect its last two teaching sites to thehttp.servermount #12417 pin as worded for the person saving.usePackageSaveRead: the same session-held read asusePackageRefusesSaves, with the in-flight state told apart; a failed read or an unlisted package still offers it, as today). Reason measured below: the unread window is where the card's error came from.Root cause of the card's error (measured, client-side)
HotCRM 6.5.0 on
main(fa304140), console from this tree'sui/against it: the server's package list reportsapp.objectstack.hotcrmwritable: false, andcrm_account.all_accounts's row carries_packageId: app.objectstack.hotcrm. The reading is right once read; butfetchSessionPackageswaits for the page's own requests to go quiet (up to 8 s) before it reads, and until thenusePackageRefusesSavesfails open by design. Measured at 1440: the list drew with 「+ 添加统计」 at 7.2 s, the package list answered at 8.0 s, and the entry went. A pick inside that window sent thePUT ?mode=draftthe card shows. With this PR the pick writes nothing in any window.Tests
ObjectView.footerCalculationDraft-36194.test.tsx(7, renamed fromObjectView.readOnlyPackageView-35933.test.tsx; realObjectView,ListViewstand-in that draws the condition row's end, every non-GETfetchrecorded): a pick is drawn, writes nothing, Save names it, picking None again drops it; Discard takes it off; the reader's own view stores it only on Save to this view; a view that declares no columns gets the menu on the drawn columns and Save as my view stores it; a package's view: drawn, no write, Save offers Save as my view alone, which stores it; the package list unread: still a draft; a non-admin on a shared view: a draft, Save as my view alone.__tests__/footerCalculationDraft-36194.test.ts(9):columnsWithSummaries/columnSummaryOf; the draft store's empty part;buildPersonalViewConfigstores calculations on kept columns (added kept, hidden dropped) in a bodyListViewSchemaaccepts;viewSaveRefusalText(package refusal reworded, a 403 keeps the door's words, issues keep the list).AppContent.draftSaveKeepsList-35932.test.tsx(8, adapted): the pick no longer writes, so the refresh pulse a draft save announces is announced by the test (emitMetadataRefresh); no skeleton, no remount, picks drawn through it; a reader's pick is offered (their draft).Verification
Local at head (
claude/project-thread-8r2qm4):pnpm --dir ui exec vitest run packages/app-shell/src/views/ObjectView packages/app-shell/src/views/__tests__ packages/app-shell/src/views/ListDraftActions packages/app-shell/src/views/personalViews packages/app-shell/src/console/__tests__/AppContent packages/i18n packages/plugin-list/src packages/plugin-grid/src/__tests__→ 797 files, 8404 passed / 13 skipped; the 7 failures of that run were the first version of the refusal helper (it also reworded every 403) and a stale zh-Hant; both fixed, and the three files re-run green (ObjectView.viewWriteRefusal-11583,ObjectView.createViewRefusal-11578,packages/i18n106 files).@object-ui/app-shelltype-check(bothtsc --noEmitandtsconfig.test.json): exit 0.eslinton every changed file: 0 errors.Since the first L1-b read (
ef54913f→efa7c4f0)maintwice (feat(grid): a lookup chip in a list cell opens its record in the side drawer; lookup cells draw an edit button (#36015) #36128, then feat(console): Save to this view on a shared view asks once, then saves and publishes it; layout and row colour join the list draft (#35955 PR 2) #36123). Resolutions: the renderer's memo deps take feat(grid): a lookup chip in a list cell opens its record in the side drawer; lookup cells draw an edit button (#36015) #36128'sopenReferencedRecordand keep this PR's drop ofsummaryPickKey;ObjectView,personalViews,listDraftStoreandviews.mdxkeep both sides (calculations beside feat(console): Save to this view on a shared view asks once, then saves and publishes it; layout and row colour join the list draft (#35955 PR 2) #36123's layout and row colour).summariestolayListStateOverView, which lays them after the added, ordered and hidden columns; it still writes neither the reader's row height nor column widths.usePackageSaveReadinuseStudioDesignGate.ts(unread/refuses/takes);canSaveToSharedViewasks fortakes.viewSaveRefusalTextreads the code witherrorCodeIs.ObjectView.sharedViewSave-35955.test.tsx(a pick on a shared view writes nothing and Save to this view stores it with the view's own row height; unread package list hides the save, the answer offers it; a failed read offers it). Local: 203 files / 1769 tests green (ObjectView*, the gate hook,views/__tests__, the console draft test); app-shell type-check 0; eslint 0 errors.Evidence (HotCRM 6.5.0, 1440×900,
/mnt/project-files/build-seat1/36194-36195/)before-1440-{light,dark}-hotcrm-pick-refused.png— 「全部客户」, the package list held 15 s to show the window, a 「去重」 pick:PUT …/crm_account.all_accounts?mode=draft, the English refusal toast.after-1440-{light,dark}-hotcrm-pick-in-draft.png(「去重 9」 drawn, 「放弃」「保存」, no write),after-1440-{light,dark}-hotcrm-save-menu.png(「未保存的改动: 统计」, 「另存为我的视图」 alone),after-1440-light-hotcrm-discarded.png,after-1440-light-saved-as-my-view.png(「全部客户 副本」 keeps 「去重 9」),after-1440-light-my-view-save-menu.png(own view: 「保存到这个视图」 offered),after-1440-light-my-view-after-reload.png(saved 「非空 9」 survives a reload; the only write of the run:PATCH /api/v1/data/sys_personal_view/<id>).Overlap
overlap-check.mjs@efa7c4f0: merges cleanly withmain(af2361ee, #36123 and #36128 in); textual conflict with #36133 only (listDraftStore.ts,objectViewListRenderer.tsx).🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgX7ez5A7JDsmzTy9Ks