Skip to content

feat(webview): change card open-in-editor, native action buttons, typed checkbox handlers (B3c v2-14, epic #1375) - #58

Open
easonLiangWorldedtech wants to merge 1 commit into
feat/fws-v2-13-loc-i18nfrom
feat/fws-v2-14-change-card-l5
Open

feat(webview): change card open-in-editor, native action buttons, typed checkbox handlers (B3c v2-14, epic #1375)#58
easonLiangWorldedtech wants to merge 1 commit into
feat/fws-v2-13-loc-i18nfrom
feat/fws-v2-14-change-card-l5

Conversation

@easonLiangWorldedtech

@easonLiangWorldedtech easonLiangWorldedtech commented Sep 6, 2026

Copy link
Copy Markdown
Owner

What

B3c v2-14 (epic Zoo-Code-Org#1375): ChangeCard L5 — open-in-editor action, native action buttons, typed checkbox handlers. Stacked on feat/fws-v2-13-loc-i18n (base 6eb159311).

  • ChangeCard.tsx (+24): openFileInEditor(path) helper (normalizes the ./ prefix the same way FileChangesPanel does; the extension host resolves the path against the current cwd via the openFile webview message), onJumpToFile threaded into CodeAccordion, and a native ghost <Button> (change-card-file-open-N, codicon-link-external) on compact no-diff rows so keyboard users can open the file (Enter/Space activate it for free).
  • CheckpointSettings.tsx (+22/−7): typed checkbox handlers — CheckboxEventTarget type and e.currentTarget as CheckboxEventTarget | null in all three checkpoint handlers, data-testid="per-write-checkbox". Byte-identical to the L5 artifact (502f8ca98) plus 3 directive lines.
  • CheckpointSettings.spec.tsx (+19): two new enable-checkbox tests (check / uncheck, separate renders) + the settings:checkpoints.enable.label t mock entry.
  • ChangeCard.spec.tsx (+62): chat:changeCard.openFile mock + 3 open-in-editor tests (prefix normalization, both row shapes) + the title assertion.
  • SettingsView.spec.tsx (+6/−1): the VSCodeCheckbox mock's onChange forwards currentTarget: { checked: value } (the typed handlers read currentTarget).
  • 18 locales (+2/−1 each): the changeCard.openFile key + the ca rollbackFailed retranslation ("La revertida ha fallat""La reversió ha fallat", a feature-string quality fix ported from L5).

Base-parity decisions

Built from base→L5 residual diffs (L2→L5 diffs fail on base where L1→L2 drifted: the ca locale rollbackFailed retranslation, What's New text).

  • CheckpointSettings.tsx byte-identical to L5; CP.spec zero diff (base mock == L5 mock; this branch keeps its 3 extra changeCardDetail tests — a coverage superset).
  • SV.spec is mock-only: the typed handlers REQUIRE the mock to forward currentTarget; the L5 SV test rewrites are not ported (v2 keeps its own 3 changeCardDetail tests).
  • ccspec: the round-2 tests + the within import are retained (the sole 1-line vs-L5 delta).
  • Locales: the changeCard block only — the L2→L5 What's New highlights hunk is skipped as stale marketing drift (same policy as v2-13's en skip).
  • The 13 Stryker disable next-line directive lines from v2-13 carry over in ChangeCard.tsx (unchanged lines → no new suppression counts).

Stryker (local diff gate, base 6eb159311)

Run 1 was red with 10 blocking mutants (4 Survived + 6 NoCoverage):

Mutant Cause Fix
CheckpointSettings.tsx:97 ×6 (all NoCoverage) the enable-handler line is never executed — no enable-checkbox test exists in the base spec, and the L5 SV enable test was intentionally not ported 2 new CP.spec enable tests (separate renders — React restoreControlledState re-asserts the controlled checked prop after each discrete event, so one render observes at most one toggle) + directive
CheckpointSettings.tsx:62, :79 (OptionalChaining, Survived) the mock currentTarget is never null in JSDOM, so the ?. guard is unobservable in tests Stryker disable next-line OptionalChaining directives (justified in-line)
ChangeCard.tsx:332 (StringLiteral, Survived) the test asserted aria-label only, not title the title assertion in ccspec
ChangeCard.tsx:337 (ObjectLiteral, Survived) decorative icon style={{ fontSize: 13.5 }} Stryker disable next-line ObjectLiteral directive (justified in-line)

Final gate (head b1110b454): 32 changed-code mutants → 28 Killed, 0 Survived, 0 NoCoverage, 0 timeout, 4 Ignored (= the 4 new directives). stryker-diff unit tests 27/27 (WIN32 spawn shim reverted before push, as usual).

Gates

  • pnpm check-types 11/11
  • node scripts/find-missing-translations.js — all green (backend 7 files, frontend 9 files, package.nls 50 keys)
  • vitest on the 3 affected specs: 66/66
  • eslint 0 (webview-ui config, --max-warnings=0), prettier clean
  • diff budget: 23 files, +169/−26 (195 shortstat lines) < 400 soft cap — single PR, no split

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review status

Thanks 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.

@github-actions github-actions Bot added coderabbit-review-active Required CI passed; CodeRabbit review is active awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit labels Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-coderabbit Waiting for CodeRabbit to approve the latest commit coderabbit-review-active Required CI passed; CodeRabbit review is active

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants