Repository navigation
fix(ui): KPI tiles sit two across on a phone, the calendar footer counts its loaded dates, and record not-found names no access - #28060
Merged
Conversation
…indow count, not-found copy names no access A bare layout-grid count of four or more keeps two tiles across below sm; a windowed calendar's footer reads "N records loaded for these dates"; the record not-found description says the record may also be unreadable, since the server answers both with 404 RECORD_NOT_FOUND. Claude-Session: https://claude.ai/code/session_01Utp6CXNi3EtSwLHRSornGu Co-authored-by: Claude <noreply@anthropic.com>
…schema-catalog pins Claude-Session: https://claude.ai/code/session_01Utp6CXNi3EtSwLHRSornGu Co-authored-by: Claude <noreply@anthropic.com>
…access Claude-Session: https://claude.ai/code/session_01Utp6CXNi3EtSwLHRSornGu Co-authored-by: Claude <noreply@anthropic.com>
…entence Claude-Session: https://claude.ai/code/session_01Utp6CXNi3EtSwLHRSornGu Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Utp6CXNi3EtSwLHRSornGu Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe 席位核对ACCEPT · head
Generated by Claude Code |
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.
domain:ui#3 · os-bill · session_01Utp6CaJoinvGQSbHeDaWBe
Requested by Bill · project thread
维护者速读
ui/packages/components/src/renderers/layout/grid.tsx(裸数字的手机降级那段);ui/packages/plugin-list/src/ListView.tsx(record-count-bar 里的 calendarWindowed 分支);ui/packages/i18n/src/locales/en.ts(新键list.calendarRecordCount与改值的recordNotFoundDescription)。pnpm --dir ui exec vitest run packages/components/src/__tests__/grid-phone-tiles-27355.test.tsx packages/plugin-list/src/__tests__/ListView.calendarFooterCount-27355.test.tsx packages/app-shell/src/views/RecordDetailView.recordReadFailure-11902.test.tsx,预期 3 个文件全绿。Fixes #27355
Clause-②: no
Metadata-protocol: none
What changes
Rows 7, 8 and 11 of #27355, re-measured on
origin/mainat 3f02da1. Rows 1 and 5 are answered in the Acceptance notes and this PR does not touch them.gridwith a barecolumnscount used to ramp to one column belowsm, so a home page's KPI strip (columns: 4overobject-metrictiles, the same shape as the showcase home and the schema catalog'sreport/report-header-with-kpis) took a row per tile and filled a phone's first screen. A bare count of four or more now draws two across belowsmand the authored count frommd(grid grid-cols-2 md:grid-cols-4). That matches the dashboard's own phone layout, which already puts metric tiles two across (DashboardRenderer's mobile branch). A bare 2 or 3 still stacks on a phone and pairs fromsm, a bare 1 is one across everywhere, and an authored breakpoint object is drawn as written,{ xs: 1, md: 4 }included.main:page:tabsscrolls sideways with an edge fade on the side that hides a tab (useHorizontalOverflow+data-overflowmask incontainers.tsx), landed by fix(app-shell): Setup walkthrough rows — one name for Setup, confirms before Disable and before switching a packaged action off, read-only reasons, forced-reset wording #27849 after 18.2.0. Measured: the 18.2.0 release commit'scontainers.tsxhas nostripRef, the fix(app-shell): Setup walkthrough rows — one name for Setup, confirms before Disable and before switching a packaged action off, read-only reasons, forced-reset wording #27849 merge has it.calendarWindowed), so the footer'sdata.lengthis that window's records, not the view's. It readN records, the words the grid uses for the view's total. It now readsN records loaded for these dates(new count familylist.calendarRecordCount, every CLDR slot in all ten packs, mirrored inLIST_DEFAULT_TRANSLATIONS). Counting the view instead would need a second query without the window; the label is what the existing data path supports. A grid, a board and a calendar over rows handed in whole keepN records.getDatareads the record with the caller's context and throwsrecordNotFoundErrorwhen the read finds nothing, so a row the reader may not see answers404 RECORD_NOT_FOUNDexactly like a missing one, and the page cannot tell them apart without the server revealing existence.empty.recordNotFoundDescriptionanddetail.recordNotFoundDescriptionnow say "The record you are looking for does not exist, may have been deleted, or you may not have access to it." in all ten packs, andDETAIL_DEFAULT_TRANSLATIONSfollows. The record page's inline fallback (RecordDetailView.tsx) follows too. A refused read (403) still shows the access-denied state, unchanged.@object-ui/components,@object-ui/plugin-list,@object-ui/plugin-detail,@object-ui/i18npatch.Tests
ui/packages/components/src/__tests__/grid-phone-tiles-27355.test.tsx: 4, 5, 6, 8 and 12 across draw two on a phone and the authored count frommd; controls: 1, 2 and 3 across unchanged, an authored breakpoint object unchanged (three shapes,{ xs: 1, md: 4 }among them).ui/packages/plugin-list/src/__tests__/ListView.calendarFooterCount-27355.test.tsx: a windowed calendar counts the 12 records of its month (not the 42 of the object) as12 records loaded for these dates, and one record in the singular; controls: a grid over the same rows reads42 records, and a calendar over rows handed in whole reads42 records.grid-breakpoint-columns-7097,grid-flat-columns-retired-11505,grid-dom-attribute-whitelist, schema-cataloggrid-columns-key(threecolumns: 4examples), and the not-found constant inRecordDetailView.recordReadFailure-11902(its 403 and failed-load cases still assert no "may have been deleted").Runs (head 8686ef1 unless named)
check-i18n-call-site-keys,DetailView, the five grid pins, schema-cataloggrid-columns-key, both calendar footer/window files,RecordDetailView.recordReadFailure-11902,RecordDetailView.deleteConfirmDialog-11001,defaults-maps-mirror-en-pack, all ofpackages/i18n/src/__tests__/):Test Files 104 passed (104),Tests 1675 passed | 13 skipped (1688).main(packages/components/,packages/i18n/,packages/plugin-list/src/__tests__/,packages/plugin-detail/src/__tests__/,examples/schema-catalog/, plus the app-shell files above):Test Files 977 passed | 2 skipped, one red (DetailViewasserting the old sentence), fixed in 40a769c and green since.scripts/ablation-replace.mjs, anchorif (baseCols >= 4) {replaced byif (false) {, i.e. the old ramp; the test resolvesgrid.tsxfrom source):grid-phone-tiles-27355Tests 5 failed | 3 passed (8), the 5 = every four-or-more pin, the 3 = the controls; restored blob == HEAD41b7636b1aa5,git diff HEADempty.? t('list.calendarRecordCount', { count: data.length })replaced by thelist.recordCountcall, i.e. the old words over the same count;ListViewresolves from source):ListView.calendarFooterCount-27355Tests 2 failed | 2 passed (4), the 2 = the calendar label pins, the 2 = the grid and inline-data controls; restored blob == HEAD8866406e8d92,git diff HEADempty.pnpm --filter @object-ui/components --filter @object-ui/plugin-list --filter @object-ui/plugin-detail --filter @object-ui/i18n run type-check: exit 0 (each runstsc --noEmit && tsc -p tsconfig.test.json).pnpm run lintincomponents,plugin-list,plugin-detail,i18n: exit 0, 0 errors.node scripts/check-i18n-en-drift.mjs(ui): exit 0, 2 en values changed, 18 pack values followed.Acceptance notes
Per-row disposition of #27355 rows 1, 5, 7, 8 and 11, re-measured on
origin/mainat 3f02da1 (rows 2–4, 6, 9–10 and 12–13 are answered on the card by other seats):record:pathis a readout by design: its header comment records that it carries no handler and that click-to-advance is a separate feature, and its only channel, the record context, exposes no record-field write. The server side already exists (an update is judged by the object'sstate_machinevalidation rule, ADR-0020), so the card is a spec opt-in onRecordPathPropsplus a write channel and confirm in the renderer. Filed by the seat as #28061.⋯menu ends with Delete (sys_deleteinRecordDetailView's synthesized system actions, present in the 18.2.0 release commit too). It is gated by the samedeleteaffordance row (recordDeleteandrowDeleteare bothcrud: delete, grant: deleteinaffordanceGrants.ts) and the same per-record verdict as the list row menu, so a reader offered Delete in the list row is offered it in the header.RecordDetailView.deleteConfirmDialog-11001passes on this head. If HotCRM can name an object, role and page where the header lacks it, that is a new measurement;RecordDetailView.tsxchanges by one line: the inlinedefaultValueofempty.recordNotFoundDescriptionfollows the newensentence, whichcheck-i18n-call-site-keys(default-value drift) requires. No other line of that file is touched.Verification
Local gate subset derived by
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon this diff, each recorded with its exit code before any pipe and reconciled with--ran; every family CI runs is read from this PR's check-runs.Gate run (head 8686ef1)
dispatch-gates --commands: 34 commands, every one:: exit 0, among themnode scripts/check-sdui-manifest.mjsand its--self-test,pnpm check:type-check-coverage,pnpm check:type-check-debt,pnpm check:nul-bytesandpnpm --dir ui exec vitest run scripts/(Test Files 169 passed | 2 skipped (171)).dispatch-gates --ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.pnpm --dir ui run check:new-line-citationsexit 0 (0 new citations).Generated by Claude Code