feat(webview): change cards UI and rollback buttons (B3b v2-13, epic #1375) - #56
Open
easonLiangWorldedtech wants to merge 1 commit into
Open
Conversation
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 change cards UI (v2-13, epic Zoo-Code-Org#1375): renders a per-step change card inside the chat for persisted
changeCardmessages — header with the file count, per-file rows with +/− diff badges, per-file and per-step rollback controls wired to the extension host through thecheckpointRollbackFile/checkpointRollbackStepmessages. Diffs come from the payload's per-filedifffield:fullcards expand by default,summarycards expand lazily, compact cards carry no diff.Stacked on #55 (v2-12 rollback wiring). Locales land in a separate stacked PR (#57) to keep this PR under the hard line cap.
Provenance
ChangeCard.tsx= the B3c L2 line (0e021ef96) plus four documented Stryker directives (see below).ChangeCard.spec.tsx= the B3c L2 spec (incl. the missing-task step-result tests) plus 13 round-2 mutation-coverage tests (the 13th —drops rollback payloads carried by messages of other types— closes the type-guard mutant found by the mutation gate: a foreigncheckpointRollbackResultpayload on a non-checkpointRollbackResultmessage must not be applied even when the card ts matches).ChatRow.tsx= the ChangeCard wiring (2 lines) unchanged from v2-13 line 1.Stryker directives
Four single-line
Stryker disable next-linedirectives suppress genuinely equivalent mutants (no test can observe the variant). New pattern for this repo (no prior directive precedent):if (parsed === undefined)guard —safeParsebelow rejectsundefinedinput identically; the early return is unobservable. (ConditionalExpression, BlockStatement)expandedFilesset — expansion only affects diff-carrying files; diff-less rows render compact either way. (MethodExpression, ConditionalExpression)filePath !== undefinedfile branch — a no-file-path result would update the state record under the key"undefined", which matches no card file and never renders. (ConditionalExpression)Stryker mutation-diff gate
Stryker diff gate (base = #55 head
aef395e05, head1ca004b95): 182 changed-code mutants acrossChangeCard.tsx+ChatRow.tsx(298 changed lines), 168 Killed, 0 Survived, 0 NoCoverage, 0 timeout, 14 ignored (4ignoreStatic+ 10 directive-suppressed, see above);ChangeCard.spec.tsx(27 tests) ran as the test set.Local gates
tsc --noEmit(viapnpm check-types): 11/11 tasks.webview-ui,ChangeCard.spec.tsx): 27 tests passed.--max-warnings=0on the touched webview-ui files + fullpnpm lintvia the pre-commit hook: clean; no suppression count changes (nosrc/files touched).Line budget
997 lines (soft cap 400 exceeded, hard cap 1000 respected):
ChangeCard.tsx327 +ChangeCard.spec.tsx667 +ChatRow.tsx3. The mutation gate binds the spec and the component into one unit — killing the surviving mutants requires tests and component code in the same PR. Locales (216 lines, 18 files) split into #57.