Skip to content

Fix absent CRDT debug storage memoization - #16775

Closed
christian-byrne wants to merge 1 commit into
mainfrom
fix/memoize-absent-crdt-debug-storage
Closed

christian-byrne wants to merge 1 commit into
mainfrom
fix/memoize-absent-crdt-debug-storage

Conversation

@christian-byrne

Copy link
Copy Markdown
Contributor

Summary

Caches an absent CRDT debug storage value so the hot path reads localStorage only once.

Changes

  • What: track whether the enabled storage key has been read independently from its nullable value; cover the absent-value path.

Review Focus

Confirm explicit enabled/disabled values retain their existing cache behavior.

Evidence

  • pnpm test:unit src/workbench/extensions/agent/crdt/crdtDebugGate.test.ts — 16 passed.
  • pnpm exec oxfmt --check src/workbench/extensions/agent/crdt/crdtDebugGate.ts src/workbench/extensions/agent/crdt/crdtDebugGate.test.ts — passed.
  • targeted ESLint — passed.
  • pnpm typecheck — passed.
  • pre-push pnpm knip --cache — passed.

Follow-up to #16365 (comment)

@christian-byrne
christian-byrne requested a review from a team September 3, 2026 12:57
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 6743f7df-dc32-4112-8628-073975191750

📥 Commits

Reviewing files that changed from the base of the PR and between 8f3b156 and 34b0992.

📒 Files selected for processing (2)
  • src/workbench/extensions/agent/crdt/crdtDebugGate.test.ts
  • src/workbench/extensions/agent/crdt/crdtDebugGate.ts

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ❌ 1912 passed, 1 failed · 1 flaky

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 1891 / ❌ 1 / ⚠️ 1 / ⏭️ 4)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/03/2026, 12:59:25 PM UTC

Links

@christian-byrne

Copy link
Copy Markdown
Contributor Author

Closed as duplicate of #16774.

Full context for agent readers

A concurrent lane opened #16774 moments earlier with the same absent-storage memoization and regression coverage, plus the sibling clipboard fix. The overlapping implementation is equivalent, so this PR is redundant.

@github-actions github-actions Bot added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 3, 2026
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main   #16775      +/-   ##
==========================================
+ Coverage   81.11%   82.68%   +1.56%     
==========================================
  Files        2458     2040     -418     
  Lines      126457   118982    -7475     
  Branches    33692    31865    -1827     
==========================================
- Hits       102573    98375    -4198     
+ Misses      23369    20427    -2942     
+ Partials      515      180     -335     
Flag Coverage Δ
unit 77.08% <100.00%> (+<0.01%) ⬆️
website-unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...c/workbench/extensions/agent/crdt/crdtDebugGate.ts 97.56% <100.00%> (+0.09%) ⬆️

... and 418 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DrJKL DrJKL added agent Comfy Agent product, integration, tests or product documentation agent-crdt Agent document synchronization, graph projection or CRDT operations agent-test-unit Touches Agent-related unit/component tests or their support labels Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Comfy Agent product, integration, tests or product documentation agent-crdt Agent document synchronization, graph projection or CRDT operations agent-test-unit Touches Agent-related unit/component tests or their support risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants