Skip to content

Applier code-quality: hidden global mutation counter, initDoc return, duplicated scrub, pseudo-op #25

Closed

Description

@christian-byrne

Reviewed at 26995a3.

Minor cleanups surfaced during review; none change behavior:

  • Hidden global mutation counter (src/doc.ts:149): mset/mdel/apush increment a module-global mutations, so applying a transition also mutates process-global state and lets concurrent docs/tests perturb each other's counts. Thread it through the call or scope it per-doc.
  • initDoc mutates and returns the same doc (src/doc.ts:119): return void; callers already own the doc.
  • Duplicated link scrub (src/applier.ts:610): removeLink and applyDeleteNode both traverse every node's inputs/outputs; extract one scrubber with a predicate.
  • Pseudo-op fabrication (src/applier.ts:542): applyInputcountBump builds a synthetic SetWidgetOp just to derive two keys; build the widget target directly and call stampKey(op).

Activity

  1. coderabbitai commented on Aug 20, 2026

    @coderabbitai
    🔗 Related PRs

    Comfy-Org/ComfyUI_frontend#14585 - security: replace website v-html with safe rich text [open]
    Comfy-Org/ComfyUI_frontend#15092 - fix(layout): keep a node layout ref alive until its last holder releases [merged]
    Comfy-Org/ComfyUI_frontend#15405 - perf: retain offscreen Vue nodes with KeepAlive [open]
    Comfy-Org/ComfyUI_frontend#15406 - [DO NOT MERGE] preview: Team Plan V1 workspace settings prototype (billing mock harness) [open]
    Comfy-Org/workflow_templates#1161 - feat(site): highlight the API code blocks, add a TypeScript tab [merged]


    🧪 Issue enrichment is currently in open beta.

    You can configure auto-planning by selecting labels in the issue_enrichment configuration.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false
    

    💬 Have feedback or questions? Drop into our discord!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions