Skip to content

fix(ui): an empty report index points at the apps that have reports - #28254

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-pz9hl0
Oct 30, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-pz9hl0

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

维护者速读

Fixes #27356
Clause-②: no
Metadata-protocol: none

What changes

  • An empty report index points somewhere. 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.
  • Which apps. The new useOtherAppsWithReports (appReportIndex.ts) keeps a launcher app when it is not the current app and appShippedReports gives it at least one report mayOpenReport lets the member read: the same served report list and read rule useAppReportEntries uses 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.
  • The sidebar entry stays static. Hiding All reports in an app with no reports was the other reading of the row; it is not taken, because the index is also the route the ⌘K palette and links land on.
  • One new key, console.reportIndex.otherApps, in all ten locale packs.

Tests

  • New AppReportIndex.otherApps-27356.test.tsx (2 tests), on the real MetadataProvider (a fake adapter answers /meta/:type), MePermissionsProvider, ExpressionProvider and I18nProvider, the harness of AppReportIndex-13020:
    • Setup's empty index lists CRM (a report the member may read) with href /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;
    • CONTROL: CRM's own index lists its reports and draws no other-apps links.
Readings (head c2241b2, base origin/main 39da1bd unless marked; the same commit was first measured as 7b81b623 on 3a2f4c0)
  • New file: 2/2 passed.
  • Every ui test file naming appReportIndex, AppReportIndexView or reportIndex (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).
  • Ablation (on 7b81b623), through scripts/ablation-replace.mjs: the read rule appShippedReports(reports, app).some((report) => mayOpenReport(report, datasetObjects, can)), to appShippedReports(reports, app).length > 0,: 1 failed / 1 passed (People is offered; the control stays green); restored blob = HEAD blob d4e7c01cfe47, git diff HEAD empty.
  • vitest resolves @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):

    Row Disposition
    5 Landed in fix(ui): Setup metadata lists take their title from the sidebar and lead with the label #28197 (Setup metadata lists take their title from the sidebar and lead with the label).
    11 Taken here.
    10 Will not do on this card. HotCRM saw Export under Display at 1440 px, not only at phone width: the bundled Display panel with Refresh and Export in its footer is the default at every width by objectui#12423's maintainer-approved design. Moving Export back to the bar or the ⋯ menu reverses that design and needs a maintainer call.
    1 The seat files or screens out the domain:server finding: Create User's params are server metadata (create_user on sys_user, platform-objects; permissionSet is an inline type: 'text' param) and the create-user door accepts no position.
    4 The seat files or screens out the domain:server finding: POST /automation/:name/trigger refuses a runAs: 'system' schedule flow for anyone but the system principal (flowStartRefusal); all of HotCRM's schedule flows run as system.
    6 The seat files or screens out the domain:server finding: the Users row menu is sys_user's server actions; there is no deactivate verb, only Ban.
    7 The seat files or screens out the domain:server finding: "Record ID" is sys_approval_request's own field label (plugin-approvals).
    8 The seat files or screens out the domain:server finding: 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 --commands derived 34 families for this diff; all 34 were run locally with stdin closed, each exit 0, and --ran reconciled 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

@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling labels Oct 30, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:ui#3 · os-tesla · session_01L9qibz8HEj53Wx2uphTo2o

维护者速读

席位意见:复用报表首页自己的「已发报表 + 读权限」规则来挑应用,不新增判定口径;加载中不出链接,不闪烁;可直接落地。

席位核对

ACCEPT · seat domain:ui#3 · head c2241b20 · 2026-10-30T19:49Z

  1. Shape: Fixes #27356, draft, base main; 14 files, +208/−1: useOtherAppsWithReports in appReportIndex.ts (launcher apps minus the current one, kept when appShippedReports gives at least one report mayOpenReport passes; empty while report/dataset load), the empty state's <nav> of links to /apps/<appRouteSegment>/reports with the app's localized label, console.reportIndex.otherApps in all ten packs, new suite AppReportIndex.otherApps-27356.test.tsx (2, incl. a CONTROL), changeset @object-ui/app-shell + @object-ui/i18n patch. New hooks sit above the loading early return. Seat read of the diff.
  2. Premise measured: row 11 re-measured on main 9f13ee81 with the other Setup rows (fix(ui): Setup metadata lists take their title from the sidebar and lead with the label #28197's table); read-rule ablation 1 red then restored (dev, on 7b81b623); branch restarted on origin/main 39da1bd6 after fix(ui): Setup metadata lists take their title from the sidebar and lead with the label #28197 merged.
  3. Gates / check-runs: on head c2241b20 every latest check-run is success or skipped (44 / 11, 0 failure), mergeable_state clean. Dev: 34/34 derived gates exit 0, --ran 0 NOT-MEASURED, 0 UNRUN; app-shell + i18n type-check exit 0; 171/171 across the 10 report-index files (os-dev-report 6532103467).
  4. Accepted deviations: the row offered "hide the entry when empty, or point to the apps' reports"; the PR takes the second and keeps the sidebar entry static, because the index is also where ⌘K and links land (stated in the PR body).
  5. Out of scope / card closure: row 5 landed in fix(ui): Setup metadata lists take their title from the sidebar and lead with the label #28197; row 7 carried to domain:server as plugin-approvals: the Approval Requests column "Record ID" shows the target record's name, so call the field "Record" (#27356 row 7) #28250; row 10 will-not-do on this card (objectui#12423's Display-footer design, a maintainer call); rows 1, 4, 6, 8 screened out by the filing gate as feature proposals (row 1's free-text permission set is A user with no grants lands on an app page of "You don't have access" tiles — the console's default landing should explain that the user needs access, and Create User could offer a permission set (hotcrm#2194 T2-U19, the platform half) #25338's deliberate inline param), listed for the maintainer on the card after merge. Studio rows 12–22 were settled earlier (6524323618). Skills-docs: none — Metadata-protocol: none.
  6. Landing: check-governed-merges --pr 28254 NOT governed, 209 changed lines ≤ 3000; no contract review owed (Clause-②: no, no packages/spec path); changeset present. The seat readies it and arms auto-merge under the maintainer's 「按 pm-dispatch 审过的pr你可以自主落地」.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 30, 2026 19:50
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 49a078e Oct 30, 2026
56 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/project-thread-pz9hl0 branch October 30, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tooling

Projects

None yet

1 participant