Repository navigation
fix(apps): surface the trust reason when Update All hits a trust-gated app - #29936
Conversation
|
Reviewer note: this is a UI copy change. Update All now shows one notice line per trust-gated app (new key |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the batch catch now uses the same Notes
[DESIGN-REVIEWED] 9f7a421 Description read[DESCRIPTION-READ] cbc967b4089752dc4e25e5c212749141bcb72a987905b13188970b4c23da9c26 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The new line says what happened and gives the next step. Confusion only appears in a mixed batch, where the banner's existing first-line heading makes the trust line look like part of the failure. Notes
[UX-REVIEWED] 9f7a421 Description read[DESCRIPTION-READ] d305093e935e189992c76ca7638f9c71a2e2594df0c8d4e9d7fdd68ee00cb898 That sha256 names everything this verdict read: the PR description, plus the 4 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing to check. What this change shipsInventory (4 items) — 3 justifiedIntent: when Update All hits an app that needs execution trust, the user should be told it needs permission, not just that it failed. FIX.
[FIRST-PRINCIPLES-REVIEWED] 9f7a421 Description read[DESCRIPTION-READ] 42cbf0cff7a2204de41830381cd2fedb72f7ff503bbd824dbafdd019d7e14b76 That sha256 names the PR description this verdict read. Recompute it with |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
587fbae to
942b9a5
Compare
|
Addressed in 942b9a5. The blocking finding was correct: in ja, de, ru, zh-CN, ko, hi and bn the notice named a literal "Update" button, but that row button renders the translated label ( |
942b9a5 to
b429e44
Compare
b429e44 to
b070878
Compare
b070878 to
603aa2e
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for this fix. The code looks right. One evidence item has to be resolved before this can merge.
website/src/pages/apps/useAppUpdates.ts:220-221andwebsite/src/i18n/locales/en.json:6727: when Update All runs into a trust-gated app, users now read a new sentence in the Discover > Updates banner. The UX review on this head could not evaluate that sentence because no screenshot shows it. Its PASS is only a formatting downgrade, so the new user-facing text would merge without anyone seeing it rendered. Smallest fix: attach a screenshot of Apps > Discover > Updates after Update All, with one trust-gated app and one app that really fails, so both notice lines appear. This is a fork PR, so attach it through the GitHub web UI or commit it undertemp-screenshots/. Then re-run the UX lane on the new head. Or, if you think a text-only notice line in an existing banner needs no screenshot, please say so in a comment and a maintainer will decide.
What the review checked on this head: the new isTrustDeniedError branch matches the one runUpdate already uses, and the local-only trust check still runs first. The only updateAll host (DiscoverPage) wires onTrustDenied and rowUpdatesInPlace, so the advice in the notice is accurate. The two new tests pass, and both fail when the hook is reverted to main. Each trust-gated app getting its own notice line, next to the existing consent and repository-trust lines, is a clean fit.
Optional, not required to merge:
- The comment at
useAppUpdates.ts:213-217lists two non-failure outcomes. The new execution-trust case is a third one it could mention. needsTrustandtrustNeededare very close names for different buckets. A name likeexecutionTrustNeededwould be harder to mix up.- The UX lane left wording notes ("needs trust" may be unclear to a newcomer, and it could say which row to use). A short reply either way would help.
|
Evidence added on head 20dbc99: On the optional points:
|
|
Thanks for adding the screenshot. The code still looks right, and the earlier review item is resolved on this head. Earlier item: the missing screenshot of the new banner line is fixed. What this review checked on this head:
What still holds this PR: PR Readiness is red on one item, the UX lane's BLOCK on this head. A maintainer needs to decide how it is answered. Context for that decision:
Optional, not required:
|
Withdrawn: every item in this review is fixed or answered on the current head (see the follow-up comment). Other holds on this PR are listed there.
20dbc99 to
ce6be74
Compare
|
Updated on head ce6be74. I reworded the On the banner concern itself: you are right that the non-error lines (needs permission, needs repository trust, needs consent) share the one red error banner, which is wider than this change. I kept that structure here to stay in scope and opened a follow-up to split the non-error lines out of the error banner: #33452. Re-running the UX lane on this head now. |
…d app
Update All caught every per-app error into one failed_to_update list
without checking isTrustDeniedError, so an app that needs execution trust
reported a bare "Failed to update" with no reason while the per-row
Update opened the trust dialog. Branch the batch catch the same way
runUpdate does: collect trust-denied apps into their own bucket and name
each with a notice that points to its per-row Update, leaving real
failures in failed_to_update. No trust is auto-granted and no app is
dropped silently. The notice names the app and reads on its own
("was not updated: it needs your permission") so a mixed batch is
unambiguous.
Closes #29758
Evidence for the reworded pages.appsPage.update_needs_trust line: Apps > Discover > Updates after Update All with one app that needs permission and one genuine failure, so both notice lines render. Review-only; temp-screenshots/29758/ is removed after merge.
ce6be74 to
9f7a421
Compare
buluoray
left a comment
There was a problem hiding this comment.
Update All lists apps that need trust on their own line, separate from failed updates. Trust is never granted automatically. Tested.
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for the fix and for the follow-up work. Nothing blocks on this head.
Earlier items: the missing screenshot is fixed. temp-screenshots/29758/update-all-trust-reason.png is committed and shows a mixed batch with this head's English string. The wording concern is fixed too: the line now says the app was not updated and names the next step in every locale. The red banner tone is deferred to #33452, and the UX lane passes on this head.
What this review checked on this head: the new isTrustDeniedError branch in updateAll runs after the localOnlyTrustRepository check, and the two error codes are disjoint, so no app lands in two buckets. A trust-blocked app is not counted as updated. DiscoverPage is the only updateAll host, and it wires onTrustDenied and rowUpdatesInPlace, so the advice to use the row's own Update button is accurate. The batch never grants trust by itself. Both new tests fail with the hook change reverted, and they use mocked promises with no timers. PR Readiness is green.
Done well: the fix reuses the predicate runUpdate already uses instead of adding a second detector, and the mixed-batch test keeps a real failure ("disk full") on the failure line, separate from the trust line.
Optional:
- The description still opens with
<!-- no-visual-delta -->, says "Manual verification N/A", and says one commit. The head has two commits and a screenshot of a real run. You can fix this with a description edit and no push. - The mixed-batch test uses only
toContain. Asserting the full notice withtoBe, as the neighbouring test does, would pin one line per app. The trust fixtures could also use the real ApiError shape (statusplus a JSONbody) like the local-only test. needsTrustandtrustNeededare easy to mix up. A name likeexecutionTrustNeededand a line in the comment atuseAppUpdates.ts:213-217would help.
Problem / Motivation
Goal: When "Update All" hits an app that needs execution trust, tell the user that app needs trust instead of reporting a bare "Failed to update" with no reason.
Bug fix: with two updatable registry apps whose trust is not current, clicking Apps > Discover > Updates > Update All shows the banner "Failed to update: " with no dialog and no reason, and both apps stay on their old version. The per-row Update on the same rows opens the trust dialog and updates, so the reason exists but Update All never surfaces it.
Why it matters
A user who clicks Update All on apps that only need a trust grant gets a dead-end failure with no next step, even though the per-row Update makes the fix obvious. They cannot tell a trust gate apart from a real update failure, so the apps silently stay stale.
Not a goal
What changed (motivation -> approach -> change)
Observed symptom: trust-gated apps report "Failed to update" with no reason under Update All. Root cause:
updateAllcatches every per-app error straight into onefailedlist without checkingisTrustDeniedError, while the per-rowrunUpdatealready branches on exactly that code. So a trust refusal and a genuine failure are indistinguishable in the batch path.Change: branch the batch catch the same way
runUpdatedoes. A caught error thatisTrustDeniedErrorrecognises goes into a newneedsTrustbucket; anything else stays a real failure infailed. After the loop, each trust-gated app gets its own notice line (new keypages.appsPage.update_needs_trust) naming the app and pointing to its per-row Update; genuine failures still aggregate intofailed_to_update. This mirrors howconsentNeededis already surfaced per app. No app is skipped silently and no trust is auto-granted.Backwards compatibility
Removes nothing: adds one error-bucket branch and one notice string; the existing success, failure, consent and refusal paths are unchanged.
Tests
Two tests added to
website/src/pages/apps/useAppUpdates.test.tsx: a trust-gated app in a batch is surfaced withupdate_needs_trustand not folded intofailed_to_update; and a batch with one trust block and one real failure separates the two onto their own notice lines.Proof: PROVEN pages.appsPage.update_needs_trust tests fail with the production hunk reverted (both new tests RED on reverted production, GREEN with the fix; verified by hand since prove.py runs Python only and this is a frontend test).
Manual verification
N/A -- unit coverage exercises the batch catch branch directly against a trust-denied rejection shape; staging a real multi-app trust-gated backend batch adds nothing the unit test does not already pin.
Screenshots / video
Apps > Discover > Updates after Update All, with one trust-gated app (Crew Manager, execution trust lapsed) and one app that really fails (todo.txt). Both notice lines now show in one banner: the new
update_needs_trustline names the trust-gated app with its reason instead of folding it intoFailed to update.The
temp-screenshots/29758/folder is for review only and will be removed after merge.Unrelated CI notes
These red lanes are not caused by this diff (frontend hook + locale strings only); none touches their code:
Frontend Tests (1/2/3)->Frontend Coverage Merge->Coverage Gate: one root cause,src/test/ChatPage.dirStaging.test.tsx > ChatPage file-chip remove parity > the same file picked under two differently-rooted slots keeps both chips (pickedFileTokens is not slot-scoped). This is a main-only failure: the same test fails the same way on the unrelated PR fix(a11y): expose open state on three more disclosure toggles #29993 (an accessibility change that touches none of this code). That file is not in this diff and passes locally on this branch (66/66). The Coverage Gate log shows it fails closed only becausefrontend-test=failure(backend-test=success), so there is no coverage regression here.Backend Tests (Windows) (4): a strict-xfail flake ontest/scale_budget/test_catalog_budget.pyfrom stale scale-F4 markers, main-only (it also flips on unrelated PRs); the dedicated cleanup for those markers is tracked separately. It is green on this head but flips intermittently.Frontend Tests (4)(and theFrontend Coverage Merge/Coverage Gateit cascades into):src/test/framerMotionMockStableTags.test.ts > every framer-motion mock under src caches its motion componentsflagssrc/test/ChatSidebar.boardRenameOfflineScope.test.tsx. Neither file is in this diff (which touches no framer-motion code), and the gate test is byte-identical to origin/main, so this is a pre-existing main failure, not this change. The same lane fails the same way on the unrelated PRs fix: hand incident chat exits in an app pop-out to the main window #31314 and fix(dashboard): keep unsent split-view and Bot chat text across a page reload #31308.Related Issues
Closes #29758
Sibling sweep
Swept: grep for every
catchthat aggregates app-update errors without anisTrustDeniedErrorbranch inwebsite/src/pages/apps/andwebsite/src/components/appstore/.Sibling: website/src/pages/apps/useAppUpdates.ts:runUpdate -- not affected -- already branches on
isTrustDeniedError(it is the pattern this fix copies).Siblings: none --
updateAllwas the only batch catch in the update path that dropped the trust code.Pattern harvest
Rule candidate: review-prompt
Pattern: a batch/aggregate error handler swallowing a specific recoverable error code that the single-item handler beside it already branches on, hiding the reason from the user.
Checklist