feat(webview): per-file restore-latest on change cards and corrected rollback confirm copy (B3b v2-15b, epic #1375) - #60
Open
easonLiangWorldedtech wants to merge 1 commit into
Conversation
…rollback confirm copy (B3b v2-15 ui, epic Zoo-Code-Org#1375)
Review statusThanks for contributing. This comment tracks the review sequence and the next action. Current step: Required CI passed. Waiting for automated review of the latest commit. If automated review does not start, a maintainer must restart it. Review-state labels are managed by this workflow; do not edit them manually. |
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.
What
B3b v2-15b (epic Zoo-Code-Org#1375): the restore-latest UI on change cards — a per-file "restore latest version" control (idle → confirm → pending → success/error) independent of the rollback control, plus the per-file rollback confirm warning copy. Stacked on
feat/fws-v2-15-restore-latest-api(base5ec15d56f); the UI half of the v2-15 split.ChangeCard.tsx(+105/−10):fileRestoreLatestControls(path, index)— idle native button (Historyicon, tooltip +aria-labelaffordance), confirm span with the localizedrestoreLatestWarningcopy, pending ring, successrestoredlabel, and an error state whose tooltip carries the failure detail with therestoreFailedfallback. ThefileRestoresstate and the per-file result routing bykind: restore-latest results update the restore control; everything else (including results posted beforekindexisted) the rollback control. The file rollback confirm span gains therollbackFileWarningcopy (the corrected rollback confirm copy from v2-15).ChangeCard.spec.tsx(+187/−4): the upstream v2-15 spec (5 restore-latest tests + 5t-mock entries) + the local round-2 superset (StandardTooltipinline-content mock, thewithinimport, thetitleassertion) + 4 new round-2 mutation tests added to make the Stryker gate green (below).rollbackFileWarning,restoreLatest,restoreLatestWarning,restored,restoreFailed— byte-identical to the upstream translations.Base-parity decisions
Built from the v2-15 source commit (
7a1d4e61b4c1, upstream PR Zoo-Code-Org#1412; its empty CI commits are skipped).ChangeCard.tsx= upstream v2-15 + 15 lines only: 6Stryker disable next-linedirective lines + 9 justification comment lines (upstream carries 0 directives). The v2-13/v2-14 directives on lines upstream rewrote were dropped (they no longer apply); the surviving ones carry into the rewritten regions, and 1 new directive covers the cancel handler (see Stryker below).ChangeCard.spec.tsx= upstream v2-15 spec + the local superset. Two local round-2 tooltip tests now match by content (getAllByTestId(...).some(...)): v2-15 adds a second per-row tooltip (restore-latest), so a baregetByTestIdmatches twice.changeCardkeys only — the upstream What's New marketing-text hunk is skipped as stale drift (same policy as v2-13).changeCardDetailstays optional inpackages/types(v2-9 documented divergence; untouched here).Stryker (local diff gate, base
5ec15d56f)Run 1 (head
6c4eee73d) was red with 7 blocking mutants (6 Survived + 1 NoCoverage), all in the new restore-latest region:ChangeCard.tsx:193(StringLiteral, Survived)rollbackFileWarningtextChangeCard.tsx:272(ObjectLiteral, Survived){ ...prev, [path]: IDLE }— resetting to IDLE is read-equivalent to dropping the key (fileRestores[path] ?? IDLE)Stryker disable next-line ObjectLiteraldirective (justified in-line)ChangeCard.tsx:274(StringLiteral, Survived)CancelChangeCard.tsx:295(StringLiteral NoCoverage + LogicalOperator Survived)state.error ?? t("…restoreFailed")right side is only evaluated when no error is given, and??vs `ChangeCard.tsx:306,:310(StringLiteral, Survived)aria-labelaffordance is never assertedFinal gate (head
45f810db9): 98 changed-code lines (webview lane) → 55 valid mutants: 55 Killed, 0 Survived, 0 NoCoverage, 0 timeout, 1 Ignored (= the newObjectLiteraldirective on the restore-cancel handler, run-1 line 272). 0 blocking.Gates
pnpm check-types11/11node scripts/find-missing-translations.js— all green (backend 7 files, frontend 9 files, package.nls 50 keys)ChangeCard.spec.tsxvitest: 39/39 (35 at the previous head + 4 new round-2 tests)--max-warnings=0), prettier clean, pre-committurbo lint11/117a1d4e61b4c1) exceeded the soft cap, hence the A/B split (A = 173 lines, B = 397 lines)