Skip to content

test: flaky Overflow indicator tests fail intermittently on CI with 'Maximum recursive updates exceeded' #250

@johnleider

Description

@johnleider

Symptom

Two tests in `packages/0/src/components/Overflow/index.test.ts` fail intermittently on CI with:

```
Unknown Error: Maximum recursive updates exceeded in component .
This means you have a reactive effect that is mutating its own dependencies
and thus recursively triggering itself.
```

Affected tests (both under `describe('indicator')`):

  • `should render when overflowing and expose count + hidden`
  • `should not count disabled items as hidden`

A `[Vue warn]: Unhandled error during execution of app errorHandler` appears in stderr immediately before the recursion error.

Reproduction

Not reproducible locally:

  • `pnpm test:run packages/0/src/components/Overflow` — 16/16 pass
  • `pnpm test:coverage packages/0/src/components/Overflow` — 16/16 pass
  • `pnpm test:coverage` (full suite) — 5952/5952 pass, run 3x consecutively, all green

Fails in GitHub Actions CI under `Run tests with coverage` (`vitest run --coverage`). Confirmed pre-existing on master:

Likely causes (untriaged)

  • A reactive effect in `OverflowRoot` or `createOverflow` that converges in two ticks under normal timing but loops under CI's coverage instrumentation when scheduling differs.
  • Interaction with the test's `vi.stubGlobal('ResizeObserver', TestResizeObserver)` and the module-level `resizeObserverCallback` reference — if a re-mount captures a new callback while the old one is still scheduled, the reactive chain could re-enter.
  • The `triggerResize(120)` → `measure()` x3 → `nextTick()` flow may race against `OverflowRoot`'s own resize observer setup.

Environment

  • vitest `pool: 'vmThreads'`, coverage `provider: 'v8'`
  • happy-dom
  • Node 26+

Next steps

  • Reproduce by running the full coverage suite under GHA matrix locally (act).
  • Inspect `OverflowRoot.vue` and `createOverflow` for a watcher that mutates a ref it observes.
  • Consider isolating the resize-observer mock per-test instead of module-level so re-mounts can't share callbacks.

Filed from PR #247 review — the PR's only changes are to `createContext` / `useDate` throws and palette/adapter throws (V0Error class adoption) and do not touch Overflow source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions