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

kobotoolbox / kpi / 25421334516

06 May 2026 07:05AM UTC coverage: 81.982%. Remained the same
25421334516

push

github

web-flow
feat(frontend): setup default invalidations DEV-2010 (#6985)

### 💭 Notes

A code change for future. An aftermath of #6936. Added default
invalidations for few orval generated API hooks.

Changes here:
- `survey-data.ts` → `useAssetsPairedDataDestroy` invalidates the paired
data list for the asset on settled
- `manage-projects-and-library-content.ts` → new file;
`useAssetsPartialUpdate` invalidates both the paginated assets list and
the specific asset item on settled

### 👀 Preview steps

Setup:

1. Use DevTools → **Network** tab
2. Open a project that has **Connect Projects** enabled

Test 1 → `useAssetsPairedDataDestroy` invalidates the paired-data list

1. Navigate to Project → Settings → Connect Projects
2. Make sure at least one source project is already attached
3. Clear the Network log
4. Click Remove on an attached source and confirm
5. 🟢 You should see a `DELETE
/api/v2/assets/<uid>/paired-data/<paired-uid>/` request complete with
`204`
6. 🟢 Immediately after, a `GET /api/v2/assets/<uid>/paired-data/`
request fires automatically — this is the invalidation refetch
7. 🟢 Notice the removed source disappears from the list without a manual
page reload

Test 2 → `useAssetsPartialUpdate` invalidates the asset list and item

1. Stay on the same Connect Projects panel
2. Clear the Network log
3. Toggle the Share data switch (on → off, or off → on).
4. 🟢 A `PATCH /api/v2/assets/<uid>/` request fires with `200`
5. 🟢 After it completes, two refetch requests fire:
- `GET /api/v2/assets/` (the paginated list — `invalidatePaginatedList`)
   - `GET /api/v2/assets/<uid>/` (the specific asset — `invalidateItem`)
6. 🟢 Notice the sharing state reflects the server response. Other parts
of the UI that depend on the asset would also pick up the refreshed data

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Paulo Amorim <pauloamorimbr@gmail.com>

9078 of 12214 branches covered (74.32%)

29911 of 36485 relevant lines covered (81.98%)

5.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

89.66
/kpi/utils/query_parser/query_parser.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc