Repository navigation
fix(app-shell): the report builder saves a package-shipped report into the app's .custom overlay - #37091
Conversation
…o the app's .custom overlay Generalise the dashboard editor's save-target resolver to any in-page editor (the dashboard names delegate to it), and route the report builder's Save through it: the owning package when writable, else <base>.custom via the ensure door, declaring the override (ADR-0146). Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ Co-authored-by: Claude <noreply@anthropic.com>
…angeset Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ Co-authored-by: Claude <noreply@anthropic.com>
…port-save-custom-overlay
Claude-Session: https://claude.ai/code/session_011y7As6kDA9BVrMsBR9rmrJ Co-authored-by: Claude <noreply@anthropic.com>
…port-save-custom-overlay
…port-save-custom-overlay Claude-Session: https://claude.ai/code/session_011y7As5bdhV5T4N9vpjmZzH Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011y7As5bdhV5T4N9vpjmZzH Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH 席位核对 — REWORK · head fad5ea0Read 2026-11-24T20:14Z. L1 of PR #37091 ( Shape / face ( Gates (check-runs at Diff against card and ADR-0146.
Changeset, read sentence by sentence against the diff. Every sentence holds:
Deviations judged.
Must-fix
Should-fix (not blocking)
Nits
L2: not owed. None of the four contract surfaces is touched (no Landing notes for the next round: no dogfood battery is owed (no |
…port-save-custom-overlay Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As5bdhV5T4N9vpjmZzH
…a pending draft at open, and says a refused target in its own sentence Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As5bdhV5T4N9vpjmZzH
…ter a customization is published Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As5bdhV5T4N9vpjmZzH
…port-save-custom-overlay Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011y7As5bdhV5T4N9vpjmZzH
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH Browser check: showcase report saved from the report builder (head bcc7ee8)Read 2026-11-24T22:07Z. This is the check the card's Acceptance names. It answers must-fix 1 of seat record 7143254237. Build under test. This worktree at Steps. Open Reading 1: the save goes to the
No error toast appeared. Neither server door refused: the ensure door created the pair for this caller, and the write door accepted a Reading 2: the change persists after a reload. I navigated to the same URL again. The page draws a line chart, and Reading 3: the frames. The runner kept these headless screenshots (local frames, not uploaded):
The table above is the network row the record asks for. Should-fix, checked in the same browser. I staged a draft of the report in the pair through the API ( Two notes from the run.
|
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH 席位核对 — ACCEPT · head bcc7ee8Read 2026-11-24T22:12Z. This is the delta round on REWORK 7143254237. It answers the dev report 7145908515 on #36716 and the browser check 7145843007. Face and gates. Must-fix 1: closed. Comment 7145843007 was measured at this head, on a fresh build and a fresh DB, as admin:
Both server doors that the pin replaces with doubles are now shown working end to end. Should-fix: closed.
The pin covers this: a pending draft in the pair is refused, and a listed pair with no draft opens and saves into the pair. The browser check reproduced the refusal toast. Why the buffer stays at the served package: the run measured that after publish the served Nits: closed. The Changeset, the new sentences read against the diff. Every sentence holds:
The earlier sentences still hold. Accepted deviations.
L2: not owed. None of the four contract surfaces is touched. Dogfood battery: not owed (no |
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH Landing — seat arms #37091
|
repo:objectstack#7 · os-alice · session_011y7As5bdhV5T4N9vpjmZzH
Fixes #36716
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
ReportView(the report builder and the report inspector panel) now resolves where a Save lands when the editor opens, with the same resolver the in-page dashboard editor uses: the package the report is served from when it is writable, else the app's customization packageBASE.custom(ADR-0146 D2, D3, D11). The ensure door is asked for the pair at Save, the body declaresoverrides: { package, basedOn }as Studio's Customize writes it, and the save plus publish target that package.openDashboardForEditresolves it, and the reads depend on it. For a customization whose pair the package list already names, the open also probes the pair for a pending draft of the report (getDraftat the pair), so a Studio draft staged there is refused at open, not at Save. The buffer stays the layered authored read at the served package: in the running showcase, the served_packageIdstays the base after a customization is published, and that read's effective layer already carries the customization (see the browser check).@object-ui/i18n's Studio namespace in English and Chinese.mainopened it.runtime-metadata-persistence.tsgets item-neutral names for the dashboard editor's target helpers (resolveInPlaceEditTarget,ensureInPlaceSaveTarget,inPlaceSaveBody,saveInPlaceand their types). The dashboard names stay as aliases that delegate, so the dashboard callers are untouched. The module is internal to@object-ui/app-shell(not in itsexports).Read first, by risk:
ui/packages/app-shell/src/views/ReportView.tsx, thehandleOpenBuilderhunk: the target is resolved first, and the four refusal branches (including the pair draft probe) decide when the editor does not open.ui/packages/app-shell/src/views/ReportView.tsx, thesaveSchemahunk: the body and target of the write.ui/packages/app-shell/src/views/ReportView.shippedReportSave-36716.test.tsx: the new pin.Why
On
origin/mainthe report editor saved every edit naming no package, so the save of a report a read-only installed package ships addressed that package and the metadata write door answered 403; the admin's change was lost at Save. ADR-0146 D11 and the ruling cited atdesignModeMenuCreate.tsdecide that such an edit goes into the app's.customoverlay. The card's alternative (say the report is read-only up front) conflicts with that ruling and is not taken, as the claim records.Tests
New pin: ReportView.shippedReportSave-36716 (6 cases)
The real
ReportView,ReportBuilderHost, persistence seam and target resolver over a metadata client double and the two package doors:ensureCustomizationPackage('showcase')is asked at Save, the save goes topackageId: 'showcase.custom'withoverrides: { package: 'showcase', basedOn: '3.2.0' }, and the publish namesshowcase.custom;overrides;Two existing ReportView pins (
authoredEditBuffer-35008,headingStaysServed-36373) now answer the package list and expect the save and publish to name the writable package the report is served from.Runs (head bcc7ee8, after merging origin/main 63ab479)
vitest runon every ReportView, DashboardInPageEditor, runtime-metadata-persistence and ReportNewPage test file in app-shell: Test Files 20 passed (20), Tests 133 passed (133).pnpm --filter @object-ui/app-shell type-check: exit 0.pnpm --filter @object-ui/i18n type-check: exit 0.pnpm --dir ui exec vitest run scripts/: Test Files 172 passed, 2 skipped (174); Tests 5131 passed, 2 skipped.Test UIruns it in CI.Browser check (head bcc7ee8): PR comment 7145843007
The showcase was opened at
showcase_hours_by_status_chartand changed to a Line chart in the builder, then saved.POST /packages/com.example.showcase/ensure-customizationanswered 201.PUT /meta/report/showcase_hours_by_status_chart?mode=draft&package=com.example.showcase.customanswered 200.POST .../publish?package=com.example.showcase.customanswered 200.After a reload the page draws a line chart, the served report carries
chart.type: lineandoverrides, and the reopened builder shows Line checked. A draft staged in the pair is refused at open with the new sentence.Ablation at head fad5ea0 (fix committed first; mutation landed on disk, then restored)
node scripts/ablation-replace.mjsreplaced the save targettargetwith{ kind: 'unbound' }insaveSchema(the old behaviour: the save names no package). Anchor 1 to 0, blob14ec5897d718to73b2daaae6fc. Predicted before the run: the shipped case and the writable control go red, the unbound and refusal cases stay green. Observed: 2 failed, 2 passed (the shipped case on the save options, the control on{ mode: 'draft', ifNoneMatch: '*' }lackingpackageId). Restore: blob equals HEAD14ec5897d718,git diff HEADempty. No build step: the test imports./ReportViewfrom source.Acceptance notes
showcase_hours_by_status_chart) is PR comment 7145843007, at headbcc7ee84d20.overrideDraftBody.Verification
Two-minute check:
pnpm --dir ui exec vitest run packages/app-shell/src/views/ReportView.shippedReportSave-36716.test.tsxand expect 4 passed. In the app:OS_PORT=3000 pnpm dev, open Reports, then "Hours by Status (Chart)", Edit, change the chart type, Save. Expect a success toast and the change still there after a reload, with the save request going to?package=the app's.custompackage.Local gates at
bcc7ee84d20: the fulldispatch-gates --commandsderivation for this diff has 39 families, and all 39 exited 0,check:type-check-debtincluded.dispatch-gates --ranwith exit codes recorded: 39 derived, 39 run, 0 NOT-MEASURED (a derived zero).Human Minimum
packages/specholds no runtime logic.pnpm lintpasses. (eslint --no-inline-config over the five changed files at bcc7ee8: 0 errors, 57 warnings; the repo-wide run is CI's.)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (Not applicable:packages/specis not touched.)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.Generated by Claude Code