Skip to content

fix(app-shell): an installed current version reads as up to date, and the reinstall confirm says customizations are kept - #39683

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/project-thread-4sfvbr
Dec 4, 2026
Merged

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

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Tesla · project thread

Part of #39472 (items 4 and 5, the marketplace reinstall; items 1 to 3, Studio on an installed package, follow in a second PR).

Clause-②: no
Metadata-protocol: none

维护者速读

  • 管理员在应用市场打开一个本运行环境已装最新版本的软件包时,原来的主按钮「重新安装」变成「已是最新版本」状态,重新安装挪进「更多安装选项」菜单;重新安装或升级的确认框新增一句:本环境的定制会保留。
  • 属于“已安装软件包的定制体验打磨”这张卡的第 4、5 项,替第一次给软件包做定制的管理员回答“重装会不会丢掉我的改动”,并减少无谓的重装。
  • 出错时管理员可能一时找不到重新安装入口,或读到与实际不符的说明;只改界面和文案,可直接撤回。
  • 无

What changes

On the marketplace package page, for a package this runtime installed locally:

  • Item 5. A loaded install at the catalog's latest version (or one of higher SemVer precedence) has nothing to install. The page now draws a status, "Up to date" (zh-Hans 「已是最新版本」), where the primary button was, and Reinstall is the first item of the existing "More install options" menu. It opens the same confirm as before. Unchanged: an install at an older version keeps Reinstall as the button (it installs the latest over it), and so does a not-loaded install (Reinstall is its repair). The hosted (cloud) path already draws a disabled "Installed" for a current version and is untouched.
  • Item 4. The confirm in front of an install over an existing one (a reinstall, or an install of a newer version) now says that this environment's customizations of the package are kept: the reinstall replaces only the package's own metadata, and the changes saved in its customization package stay as they are. A first install says nothing about customizations. An unmanaged copy over an install also says nothing, because that is not the install that was measured.

The sentence is written from a measurement on this tree, not from the walkthrough's reading (see Verification). Two new keys in every marketplace locale (marketplace.detail.upToDate, marketplace.install.preview.keepsCustomizations); zh-Hant regenerated with gen:zh-hant.

Files to read first:

  1. ui/packages/app-shell/src/console/marketplace/MarketplacePackagePage.tsx, the localUpToDate reading and the header's localUpToDate ? upToDateStatus : primaryControl swap (riskiest: it decides when the primary button disappears).
  2. The same file, the confirm's install-preview-keeps-customizations paragraph and its gate (localInstall and a mode other than unmanaged).
  3. ui/packages/app-shell/src/console/marketplace/__tests__/MarketplacePackagePage.installPreview-30325.test.tsx, the two new top-level describes.

Tests

Two new top-level describes in the page's shared install-confirm harness (MarketplacePackagePage.installPreview-30325.test.tsx), whose boot now takes the install-local listing:

  • up to date: status drawn, no Install or Reinstall button, the menu's Reinstall opens the reinstall confirm and installs once; CONTROL older version and CONTROL not-loaded keep Reinstall as the button.
  • the confirm: says customizations are kept on a reinstall of the current version and on an install over an older one; CONTROL first install and CONTROL unmanaged copy say nothing.

MarketplacePackagePage.sampleDataNotice-30323.test.tsx: its install() helper reinstalled a current version through the primary button; it now takes the menu's Reinstall when the page reads up to date (a stale fixture of this change, same PR).

Red on main, green after, three ablations

Red first, the new tests against the unchanged page (origin/main a92f1ed plus the test edit only): Tests 3 failed | 22 passed (25); the three red were the up-to-date test and the two "kept" tests; the four CONTROLs passed.

After the fix, the whole marketplace folder: pnpm --dir ui exec vitest run packages/app-shell/src/console/marketplace/ with the helper not yet updated gave 2 failed | 668 passed, both in sampleDataNotice-30323 (the stale helper above); after the helper update the two files read Test Files 2 passed (2) · Tests 47 passed (47).

Ablations through scripts/ablation-replace.mjs on the committed fix, each restored with blob == HEAD and an empty git diff HEAD:

  • A: header swap back to {primaryControl}: 1 failed | 24 passed, the up-to-date test.
  • B: the kept paragraph gated off ({false && (): 2 failed | 23 passed, the two "kept" tests.
  • C: the unmanaged gate dropped ({localInstall && (): 1 failed | 24 passed, the unmanaged CONTROL.

Acceptance notes

  • MarketplacePackagePage.tsx is over 1,000 lines. The change edits three existing render branches in place (the header's action area, the existing local menu, the existing confirm); no new operation or sub-flow was added, so nothing moved to a sibling module.
  • The local menu became localMenuWith(leading) so the catalog view can lead it with Reinstall; the marketplace-off view calls it with nothing and draws the same menu as before.
  • Seen, not changed: an install at an OLDER version keeps the button labelled Reinstall, and its confirm is titled "Reinstall NAME?", while the click installs the catalog's latest version over it, which is an update. Reported to the seat in the dev report, not changed here.

Verification

Item 4 measured on this tree: a base reinstall and an update keep the customization package

A scratch dogfood probe (not committed) booted the showcase with the install-local door on this tree (head 9cdb4bf, the probe ran against the same server code as origin/main a92f1ed). It installed a base package 1.0.0 through POST /api/v1/marketplace/install-local, ensured its customization package, saved and published into it an object extension (a region__c field and a relabelled base field) and a declared dashboard override, then reinstalled the base at 1.0.0 and installed 1.0.1 over it. After each, the served object, the served dashboard and the customization package's export were read:

[probe-39472] reinstall 1.0.0: fields=[...,"title","region__c"] title=Title (customized) dash=Pulse (customized) pairExt=[{"extend":"probereins_account","fields":{"region__c":{...}},"fieldPatches":{"title":{"label":"Title (customized)"}}}] pairDash=["Pulse (customized)"]
[probe-39472] update 1.0.1: fields=[...,"title","region__c"] title=Title (customized) dash=Pulse (customized) pairExt=[...same...] pairDash=["Pulse (customized)"]
Test Files  1 passed (1) · Tests 3 passed (3)

The preconditions test asserted the customizations were served before the reinstall, so the after-reads could fail. Code reading agrees: the install door registers only the package it installs (manifestService.register) and rewrites only that package's ledger entry; the customization package is a separate writable package whose rows nothing in the install path removes.

Two-minute check: run pnpm --dir ui exec vitest run packages/app-shell/src/console/marketplace/__tests__/MarketplacePackagePage.installPreview-30325.test.tsx. Expect 25 passed. In a running console, open the marketplace page of a package installed locally at its latest version. Expect the "Up to date" status where the button was, Reinstall under the "More install options" menu, and the keep-customizations sentence in its confirm.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L9qibxosgSdp6NdXgqGSzD

… reinstall confirm says customizations are kept

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibxosgSdp6NdXgqGSzD
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Dec 4, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF

席位核对

L1-c · PR #39683 · Head-sha: 9cdb4bf75d218968812377e8bf1f81e62d985cf4 · 2026-12-04T13:45Z

Verdict: ACCEPT. The zone lands it. The card is Part of #39472, so pm:dispatched stays on it at merge, and items 1–3 follow as PR 2.

Face. l1-face reads 13 items clean on this head. Checks: 45 success and 15 skipped, with none failed or pending. The changeset is an app-shell and i18n patch, with Clause-②: no and Metadata-protocol: none, and its two paragraphs match the diff. Claim 7411194731 covers all 15 files.

Item 5: "up to date" replaces the main Reinstall. The page shows the status only for an install that loaded and is at or above latestVersion by compareVersionPrecedence. A version that cannot be compared counts as older (?? -1). A not-loaded install and an older install keep Reinstall as the main button, where it is the repair or the update. Reinstall leads the existing "More install options" menu with the same doInstallLocal and primaryDisabled as before, and the status shows the working spinner while an install runs. The marketplace-off view passes no leading item, and the hosted path is untouched.

Item 4: the confirm says customizations are kept. The sentence shows only when an install exists and the mode is not unmanaged. The claim is measured, not assumed. The dev's probe (report 7412751014) did a reinstall at 1.0.0 and an update to 1.0.1 over a published object extension and a declared dashboard override in the .custom pair. The served object, the served dashboard and the pair export kept every customization after both. The unmanaged case was not measured, so it says nothing. That is the right silence.

Evidence. On main, the case fails 3 of 25, and the 4 CONTROLs pass. Ablations A, B and C each go red on their own case. The two new keys are in all 11 marketplace locales, and i18n tests pass at 1874.

Nit, no head move. On an update, the confirm's sentence still says "reinstalling replaces only the package's own metadata". The fact holds for an update too, as the probe showed, but the verb is the reinstall's. If PR 2 touches this dialog, it can say "installing over it".

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack@os-tesla · os-tesla · session_01L9qibyrf8y7cWLVu7DMgBN

Landing — zone ot-ux2 · 2026-12-04T13:46Z

  • Head: 9cdb4bf75d · CI green (45 ok / 15 skipped / 0 failure), mergeable clean
  • L1-c ACCEPT: comment 7413346146 · no L2 owed
  • check-governed-merges --pr 39683: NOT governed, 193 lines (≤ 3000)
  • K: landing-k --pr 39683 cannot answer, because this ui-only head ran no Test Core shard, so no affected-set base was printed. Read by hand instead: merge-base a92f1ed9ff with origin/main, 10 first-parent commits since, which is under the hold at 15. No locale pack (the marketplace namespace is not a translation bundle).
  • Armed: pr_ready + automerge_enable in this stroke. This PR is Part of #39472, so pm:dispatched stays on the card; items 1–3 follow in PR 2 after report authoring from scratch: an own object is unreachable until a dataset exists, pickers default to free text, and members show API names #39413.

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 Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants