Skip to content

Commit a0013c1

Browse files
serpentbladeclaude
andcommitted
test(260602-9lw): correct lit flatpickr-behavior fixme rationale — CR-01 fix lands GAP-2/3, GAP-4 rangePlugin shadow-DOM residual
The prior fixme rationale was wrong: it claimed the hasUpdated guard eliminated the lit mount fire and blamed a "separate pre-existing lit firstUpdated bug." Per CR-01 the hasUpdated gate never skipped the mount fire (hasUpdated is already true during the first updated()), so the all-42-cells-disabled-at-mount defect WAS the $watch-emit defect. With CR-01 fixed (__rozieFirstUpdateDone gate), the lit cell now PASSES GAP-2 (zero disabled cells at mount, ~12 weekend cells after toggle) and GAP-3 (French locale reconciles) — verified in gate-logs/13-cr01-acceptance.log. A narrower, genuine lit-only residual remains in GAP-4 (rangePlugin): the second input `#fp-range-end` stays empty after picking a range — rangePlugin is configured with a document-level selector `input: '#fp-range-end'` but lit renders the wrapper input inside shadow DOM, so flatpickr's rangePlugin cannot resolve/write back to the light-DOM input. No console.error/pageerror. NOT a $watch defect (GAP-2/3 prove the watcher route is correct on lit) and NOT fixable by touching packages/ui/flatpickr (byte-identical :plugins passthrough to the 5 passing targets). Pre-approved 5/6 fixme fallback (CONTEXT); follow-up: /gsd-debug the lit-shadow-DOM rangePlugin selector-resolution path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 819707d commit a0013c1

1 file changed

Lines changed: 29 additions & 18 deletions

File tree

tests/visual-regression/specs/flatpickr-behavior.spec.ts

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,36 @@ for (const target of TARGETS) {
6060
const built = existsSync(
6161
resolve(__dirname, `../dist/${target}/host/entry.${target}.html`),
6262
);
63-
// 260602-9lw — the $watch lazy-by-default normalization fixed GAP-2
64-
// disable/enable on react/svelte/solid/angular/vue (5/6 now green) and
65-
// ELIMINATED the lit-only `s.set is not a function` mount crash (the
66-
// `hasUpdated` guard means the prop-route disable watcher no longer fires
67-
// against the not-yet-built instance at mount).
63+
// 260602-9lw — the $watch lazy-by-default normalization fixes GAP-2
64+
// disable/enable AND GAP-3 locale on ALL 6 targets, lit included. The lit
65+
// props-route gate originally used `this.hasUpdated`, but
66+
// @lit/reactive-element 2.1.2 sets `hasUpdated = true` BEFORE invoking
67+
// updated() on the first cycle (reactive-element.js:943-946), so that gate
68+
// never skipped the mount fire — the disable/enable reconcilers ran at mount
69+
// against the not-yet-reconciled instance, stamping all 42 day-cells
70+
// `.flatpickr-disabled` (CR-01). The corrected gate is a dedicated
71+
// `__rozieFirstUpdateDone` class field that flips at the end of the watcher
72+
// segment of updated(), skipping exactly the initial cycle. With that fix the
73+
// lit cell now PASSES GAP-2 (zero disabled cells at mount; ~12 weekend cells
74+
// after toggle) and GAP-3 (French locale reconciles) — verified
75+
// 2026-06-02 (gate-logs/13-cr01-acceptance.log).
6876
//
69-
// A SEPARATE, pre-existing lit-only runtime bug remains: at MOUNT the lit
70-
// calendar opens with all 42 day-cells `.flatpickr-disabled` even though
71-
// `disableSet` is `[]` (weekends-disable defaults OFF) and `.disable` is
72-
// bound as a property (`.disable=${this.disableSet}`), so flatpickr should
73-
// construct with nothing disabled. No console.error / pageerror is emitted —
74-
// this is a lit lifecycle/property-timing issue in how `this.disable` reads
75-
// at `firstUpdated`, NOT a $watch-emit defect and NOT fixable by touching
76-
// packages/ui/flatpickr (the wrapper source is correct; the 5 sibling
77-
// targets pass with byte-identical wrapper semantics). Pre-approved fixme
78-
// (CONTEXT) — follow-up: /gsd-debug the lit firstUpdated disable-construction
79-
// path (TIPTAP_SOLID_KNOWN_RUNTIME_BUG pattern from matrix.spec.ts).
80-
const LIT_GAP2_KNOWN_RUNTIME_BUG = target === 'lit';
81-
const runner = built && !LIT_GAP2_KNOWN_RUNTIME_BUG ? test : test.fixme;
77+
// A SEPARATE, narrower lit-only failure remains in GAP-4 (rangePlugin): after
78+
// picking a start+end date in the range picker, the second input
79+
// (`#fp-range-end`) stays empty on lit only — the spec's final
80+
// `expect(endInput).not.toHaveValue('')` times out (24× resolved to
81+
// value=""), while vue/react/svelte/angular/solid all mirror the end date
82+
// correctly. No console.error / pageerror is emitted. This is a lit-shadow-DOM
83+
// rangePlugin issue: rangePlugin is configured with `input: '#fp-range-end'`,
84+
// a document-level selector, but lit renders the wrapper input inside shadow
85+
// DOM, so flatpickr's rangePlugin cannot resolve / write back to the
86+
// light-DOM second input. It is NOT a $watch-emit defect (GAP-2/3 prove the
87+
// watcher route is correct on lit) and NOT fixable by touching
88+
// packages/ui/flatpickr (the `:plugins` passthrough is byte-identical to the
89+
// 5 passing targets). Pre-approved 5/6 fixme fallback (CONTEXT) — follow-up:
90+
// /gsd-debug the lit-shadow-DOM rangePlugin selector-resolution path.
91+
const LIT_GAP4_RANGEPLUGIN_SHADOW_DOM = target === 'lit';
92+
const runner = built && !LIT_GAP4_RANGEPLUGIN_SHADOW_DOM ? test : test.fixme;
8293
runner(`flatpickr-behavior [${target}]: disable + locale + rangePlugin`, async ({
8394
page,
8495
}) => {

0 commit comments

Comments
 (0)