Repository navigation
feat(console): report index groups reports by object, with All/Recent views and search - #27622
Draft
objectstack-fleet[bot] wants to merge 6 commits into
Draft
objectstack-fleet[bot] wants to merge 6 commits into
objectstack-fleet[bot] wants to merge 6 commits into
Conversation
…ws, search Claude-Session: https://claude.ai/code/session_01Utp6CYhwxF1tGkRRemmhXK Co-authored-by: Claude <noreply@anthropic.com>
…arch; changeset Claude-Session: https://claude.ai/code/session_01Utp6CYhwxF1tGkRRemmhXK Co-authored-by: Claude <noreply@anthropic.com>
…-f6jl7y Claude-Session: https://claude.ai/code/session_01Utp6CYhwxF1tGkRRemmhXK Co-authored-by: Claude <noreply@anthropic.com>
The view preference's docblock named the store by file name, which the new-line-citations check reads as a cross-file address. Name the declaring helper instead. Claude-Session: https://claude.ai/code/session_01Utp6CYhwxF1tGkRRemmhXK Co-authored-by: Claude <noreply@anthropic.com>
… text On a running console the cell cut "Opened 4 seconds ago" to "Opened 4 seconds a...": eight rem is narrower than the English string at the row's text size. Widen it to twelve rem, keep the truncation for longer translations, and carry the whole text as the cell's title. Claude-Session: https://claude.ai/code/session_01Utp6CYhwxF1tGkRRemmhXK Co-authored-by: Claude <noreply@anthropic.com>
useReportObjectLabels reads getItemsByType('object') when the app's
object scope cannot be read, so the objectui#12811 census counts it as
a reader of the whole object list and failed on the unclassified file
(Test UI 5/16 on ac7be1f). It reads readObjectScope on the open path,
like useServedViewItems and useObjectPresence: add it as a scope row.
Claude-Session: https://claude.ai/code/session_01Utp6CYhwxF1tGkRRemmhXK
Co-authored-by: Claude <noreply@anthropic.com>
This branch has not been 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.
domain:ui#2 · os-bill · session_01Utp6CY2n1JmZZKrHgtp9jC
Requested by Bill · project thread
Refs #27526
Clause-②: no
Metadata-protocol: none
维护者速读
os:pref:reports.index.view。ui/packages/app-shell/src/views/appReportIndex.ts(主对象推导reportPrimaryObject、分组groupReportsByObject、偏好声明)→AppReportIndexView.tsx(视图与搜索)→ 新测试AppReportIndex.groupsViews-27526.test.tsx。pnpm --dir ui exec vitest run packages/app-shell/src/views/__tests__/AppReportIndex.groupsViews-27526.test.tsx,预期 17/17 通过。What changes
The app's report index (
/apps/APP/reports,AppReportIndexView) listed every report the member may open as one flat list. It now follows the card's Target 1–3, except the 「我创建的」 view and the row's owner, which have no data source (see Acceptance notes).reportPrimaryObjectinappReportIndex.tstakes the object of the first dataset the report binds, inreportDatasetsorder (its owndataset, then eachblocks[].dataset), that the dataset list maps to an object. Rule chosen for a report with several datasets: the first dataset that resolves to an object, so a joined report whose first block names an unknown dataset still lands under the object of its next block. A report with none goes to the 「其它」 section.groupReportsByObject: first the objects the app's served navigation names (type: 'object'entries, in the orderflattenNavigationfirst meets them), then the objects it does not name, by label, then 「其它」. Each section header is a button witharia-expandedthat shows the count and collapses its section (visit-only state).REPORT_INDEX_VIEW_PREFERENCE, declared throughdefineWorkspacePreferencein theuserscope, stored as{"value":"all"|"recent","v":1}underos:pref:reports.index.view; a reader who never chose, or whose stored value the codec does not read, sees All reports. Recent reads the recent-items store (useRecentItems, thereportentries and theirvisitedAt) and lists the index's reports the reader opened, most recent first, as one flat list: the order is the point of that view, so it is not split by object (my reading of Target 1 + 2; the sections apply to All reports). A recent report the index does not list (another app's, an unreadable one) is not shown.timeAgoin the display locale), with the link's overlay covering the row. The object and time cells hide belowsm.useReportObjectLabelslabels the sections (plural) and rows (singular) from the object definitions the shell reads for the app: the app's package object scope, the samereadObjectScoperead the navigation gates already make, plus the grouped objects outside the package by name; an app with no package reads those objects by name. The index still never reads the whole object registry (the existing CONTROL pin holds, and a new one beside it).console.reportIndex.*keys in all ten packs:viewsLabel,viewAll,viewRecent,searchPlaceholder,searchLabel,otherSection,lastOpened,recentEmpty,noMatch.The ⌘K palette reads the same
useAppReportEntries; its entries gain an optionalobjectand are otherwise unchanged.Why
Maintainer ruling on the card, quoted verbatim: 「ui(索引页按对象分组 + 最近/我的/全部)」. A flat list stops working once an app ships more than a handful of reports.
Tests
New
ui/packages/app-shell/src/views/__tests__/AppReportIndex.groupsViews-27526.test.tsx(17 tests), through the realMetadataProvider,MePermissionsProvider,ExpressionProvider,RecentItemsProviderandI18nProvider:{"value":"recent","v":1}and read back by a fresh mount; an unreadable stored value is no choice; Recent with nothing opened says so; no 我创建的 button;The three existing index files (
AppReportIndex-13020,.navContributions-13273,.navGates-26892) pass unchanged.Run at head
ac7be1f1(after the merge ofmain):pnpm --dir ui exec vitest run --maxWorkers=2 packages/app-shell/src/views/__tests__/ packages/app-shell/src/__tests__/plus the ⌘K palette,AppContent,AppHeader, sidebar and route-chunk files that readuseAppReportEntriesor the console routes (58 named files): Test Files 162 passed (162), Tests 1514 passed (1514). The rest of the app-shell suite is CI'sTest UI; it was not run here.pnpm --filter @object-ui/i18n test: 89 files, 1374 tests passed (the packs' key-parity pins included).scripts/ablation-replace.mjs(restored and proved restored): navigation order replaced by label order, 2 tests red; primary object taken from the first dataset only, 3 red; the view held inuseStateinstead of the preference, 2 red; Recent listing every report, 3 red.Acceptance notes
/meta/report(origin/main556f3230): the served list item is the stored row's parsed body plus_packageId(storedOverlayEntriesinpackages/metadata-protocol/src/protocol-stored-overlay-reads.ts); the row'screated_bycolumn is read intoMetadataRecord.createdByby the database loader but never reaches a served item;METADATA_READ_DECORATIONSis_diagnosticsand_draftonly;ReportSchemadeclares no owner or creator key; and a code-authored report (every HotCRM report) has no creator at all. Per the dispatch, no key was invented here, the view and the column are left out, and this PR saysRefs #27526. Options for the maintainer, with the seat's four-axis write-up in the report comment: A serve the stored row's creator as a read-time decoration on metadata reads (a spec + metadata-protocol card in the engine lane), then a small ui follow-up adds 我创建的 and the owner cell; B drop both from the ruling (code-authored reports never have a creator).ui/AGENTS.md✨ Set up Copilot instructions #2 asks a feature to update the package README and itscontent/docs/frontend/page; no docs page describes the report index today and the dispatch's file surface excludes docs, so none is written here.examples/app-showcase) and its result are recorded in theos-dev-reportcomment on Report index page: group reports by their primary object (derived, no key) and offer 最近 / 我创建的 / 全部 views #27526.Verification
Typecheck and lint (head `ac7be1f1`)
pnpm --filter @object-ui/app-shell type-check: exit 0, after rebuilding the@object-ui/app-shell^...closure the merge moved; the new test file is intsconfig.test.json's program (--listFilesOnlycount 1).pnpm --filter @object-ui/i18n type-check: exit 0.eslinton the three touched app-shell files: 0 errors. Its 5 warnings areno-explicit-any: 3 on lines ofappReportIndex.tsthatmainalready has, 2 on thegetObjectSchematest double the new file copies fromAppReportIndex-13020.test.tsx.pnpm --dir ui check:new-line-citations: 0 new citations.Derived gates
At head
ac7be1f1,node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 34 derived (the same list as at the merge headb5723584); each run and recorded, reconciled with--ran: "34 derived famil(ies) accounted for — 34 run, 0 NOT-MEASURED".pnpm --dir ui exec vitest run scripts/timed out in 3 files under the concurrent gate loop and passed when run alone (Test Files 169 passed, 2 skipped); the line below is the solo run.Human Minimum
packages/specholds no runtime logic. (packages/specuntouched.)pnpm lintpasses. (eslint on the touched files: 0 errors; the repo-wide run is CI's.)main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code