fix(web): install lastAction in the page before extractors read it

state.lastAction was hardcoded null on web, so every property reading it
was silently vacuous: a correct property passed without ever firing.
This commit is contained in:
pj committed 2026-08-13 21:45:18 +05:30
1 parent df74bf4d6f
commit 1d46107ee8
4 files changed
+122 -4

No files matched your search

+4 -1
View File
@@ -144,8 +144,11 @@ func Run(ctx context.Context, options Options) (Summary, error) {
return nil
})
var v8Overrides map[int]json.RawMessage
// The same lastAction PushSnapshot hands the goja state below: the two
// engines evaluate this step against one action, not two.
stepAction := lastAction
g.Go(func() error {
overrides, err := extractorSource.ExtractorOverrides(gctx)
overrides, err := extractorSource.ExtractorOverrides(gctx, stepAction)
if err != nil {
logger.Warn("v8 extractor evaluation failed", "step", si, "err", err)
return nil