• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 27608652545 / 6
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 16 Jun 2026 09:47AM UTC
Files 881
Run time 28s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Jun 2026 09:41AM UTC coverage: 54.835% (+1.3%) from 53.545%
27608652545.6

push

github

web-flow
fix(editableForm): stale closure and cache mutability issues DEV-2260 (#7139)

### 📣 Summary

Fixed two bugs in Form Builder: event listeners weren't cleaning up on
unmount (memory leak), and the react-query cache was exposed to direct
mutation from Backbone code.

### 💭 Notes

Changes here:

**jsapp/js/editorMixins/EditableForm.tsx**
- Added `appRef` to hold the SurveyApp instance
- The cleanup function was closing over `app=undefined` from the initial
render, so all the `.off()` calls were no-ops on unmount
- The ref gives cleanup access to whatever app instance is actually
alive when it runs
- Deep clone the asset from react-query before storing it in state
- The old stores.allAssets code had an explicit warning comment about
this: "Form Builder code is already changing the content of the object"
- After the refactor, we were handing the cache reference straight to
Backbone, which meant any push/splice on `survey.availableFiles` would
corrupt the cache
  - Restored the clone that was there before
- Updated cleanup to read from the ref
- Store the app in both state and ref when creating it

Joke from AI: The cleanup function was like trying to turn off lights in
a room after the door's been closed - it couldn't see in anymore. The
ref is the window.

### 👀 Preview steps

The bugs are not really testable/reproducible. We are making the code
more robust (to avoid hard to debug bugs in future) based on analysis
from greptile and verifying its findings by looking at the code.

5173 of 12142 branches covered (42.6%)

19891 of 36274 relevant lines covered (54.84%)

0.55 hits per line

Source Files on job 27608652545.6
  • Tree
  • List 881
  • Changed 22
  • Source Changed 0
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 27608652545
  • 5608a784 on github
  • Prev Job for on main (#27608641316.2)
  • Next Job for on main (#27623220260.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc