Repository navigation
fix(ui): an empty report index points at the apps that have reports - #28254
Merged
Merged
Conversation
Claude-Session: https://claude.ai/code/session_01L9qibwpXbWKjEuA5DF45BL Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
domain:ui#3 · os-tesla · session_01L9qibz8HEj53Wx2uphTo2o 维护者速读
席位意见:复用报表首页自己的「已发报表 + 读权限」规则来挑应用,不新增判定口径;加载中不出链接,不闪烁;可直接落地。 席位核对ACCEPT · seat
|
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.
Requested by Tesla · project thread
维护者速读
appReportIndex.ts的useOtherAppsWithReports与AppReportIndexView.tsx空状态里的report-index-other-apps。pnpm --dir ui exec vitest run packages/app-shell/src/views/__tests__/AppReportIndex.otherApps-27356.test.tsx,应见 2 passed。Fixes #27356
Clause-②: no
Metadata-protocol: none
What changes
AppReportIndexView's empty state (Setup's All reports is the case HotCRM hit) keeps its title and "This app has no reports you can open.", and under it now lists, as links, the other apps whose own index has a report for the reader: "Reports in your other apps:" followed by one chip per app linking to/apps/APP/reports. The app's name is its served, localized label.useOtherAppsWithReports(appReportIndex.ts) keeps a launcher app when it is not the current app andappShippedReportsgives it at least one reportmayOpenReportlets the member read: the same served report list and read ruleuseAppReportEntriesuses for the index itself. Each app's index still applies that app's navigation gates when it opens. While the report or dataset list is still loading it returns nothing, so no link flickers in.console.reportIndex.otherApps, in all ten locale packs.Tests
AppReportIndex.otherApps-27356.test.tsx(2 tests), on the realMetadataProvider(a fake adapter answers/meta/:type),MePermissionsProvider,ExpressionProviderandI18nProvider, the harness ofAppReportIndex-13020:/apps/com.example.crm/reports, and not People (its only report reads an object the member may not read), Notes (no report) or Setup itself;Readings (head c2241b2, base origin/main 39da1bd unless marked; the same commit was first measured as 7b81b623 on 3a2f4c0)
appReportIndex,AppReportIndexVieworreportIndex(10 files): 10 passed, 171/171 tests.pnpm --dir ui --filter @object-ui/i18n --filter @object-ui/app-shell run type-check(both programs each, both scripts echoed): lock VERDICT command-exit 0 on 7b81b623 (the main commits between the two bases touch none of the files this diff edits or imports from app-shell/i18n; the re-run on c2241b2 is reported in the os-dev-report comment).scripts/ablation-replace.mjs: the read ruleappShippedReports(reports, app).some((report) => mayOpenReport(report, datasetObjects, can)),toappShippedReports(reports, app).length > 0,: 1 failed / 1 passed (People is offered; the control stays green); restored blob = HEAD blobd4e7c01cfe47,git diff HEADempty.@object-ui/*to source, so the ablation needed no rebuild leg.Acceptance notes
Per-row status of Setup and Studio: suggestions from a full HotCRM browser pass on 18.2.0: user onboarding, packaged automation state, run-now for scheduled flows, admin lists, and Studio entry, field table, flow inspector wording and one designer per item #27356's Setup rows (the Studio rows 12–22 are settled, handoff 6524323618):
domain:serverfinding: Create User's params are server metadata (create_useronsys_user, platform-objects;permissionSetis an inlinetype: 'text'param) and the create-user door accepts no position.domain:serverfinding:POST /automation/:name/triggerrefuses arunAs: 'system'schedule flow for anyone but the system principal (flowStartRefusal); all of HotCRM's schedule flows run as system.domain:serverfinding: the Users row menu issys_user's server actions; there is no deactivate verb, only Ban.domain:serverfinding: "Record ID" issys_approval_request's own field label (plugin-approvals).domain:serverfinding: plugin-approvals knows a request opened on its fallback approvers but persists no marker a reader can show.Every Setup row is landed or answered, so this PR closes the card.
An app counts by its shipped reports and the read rule only; an app whose reports are all hidden by its own navigation gates is still offered, and its index then shows its own empty state. Gating every other app's navigation from here would read every app's gates on one page.
Measured in happy-dom, not in a browser.
Verification
On 7b81b623:
dispatch-gates --commandsderived 34 families for this diff; all 34 were run locally with stdin closed, each exit 0, and--ranreconciled 34 run, 0 NOT-MEASURED, 0 UNRUN. On c2241b2 the derivation is the identical 34-line list; its re-run is reported in the os-dev-report comment.check:new-line-citations: 0 new (report-only gate). 209 changed lines.The harness's after-PR assign and review-request step is skipped on the order's word (the seat lands).
🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibwpXbWKjEuA5DF45BL