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

Instagram / IGListKit / 26610259200
99%
master: 100%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 29 May 2026 12:26AM UTC
Jobs 1
Files 54
Run time 1min
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

29 May 2026 12:18AM UTC coverage: 98.752% (-0.06%) from 98.816%
26610259200

push

github

meta-codesync[bot]
Add IGListExperimentSkipNilIndexPathFiltering to opt into nil-index-path-aware visible cell filtering

Summary:
There's a subtle bug in `-[IGListAdapter visibleCellsForSectionController:]` and `-[IGListAdapter fullyVisibleCellsForSectionController:]`... both methods filter `[collectionView visibleCells]` by `[collectionView indexPathForCell:cell].section == section`, but `indexPathForCell:` is allowed to return `nil` for cells in transitional states — mid-`prepareForReuse`, mid-detach during a `performBatchUpdates`, or in flight between dequeue and final attachment. When that happens, sending `-section` to a `nil` `NSIndexPath` returns `0` in Objective-C, so any visible cell with a cleared index path is silently treated as belonging to **section 0**.

For most consumers this is harmless or invisible. But callers that walk these results and then read layout / window-relative geometry from each returned cell can end up touching cells whose model has been swapped out. We've seen this surface as crashes when a consumer triggers a layout pass on a cell whose backing data is mid-replacement (for example, text typesetting on an `NSAttributedString` that's being swapped out as the cell prepares for reuse). It's also a logical correctness issue: section 0 is the only section that can ever observe transitional cells from other sections leaking in.

The fix itself is essentially one line: skip cells where `indexPathForCell:` returned `nil` before doing the section comparison. The interesting question is how to roll it out.

Given how far-reaching this could be for code depending on IGListKit, I've introduced this as an opt-in experiment so we can effectively test this in Instagram and Threads before iterating or making an informed decision.

The fix is strictly subtractive — it can only narrow the result set, never expand it. Most consumers will just get more correct results. But these methods are called from a wide variety of places across multiple apps that de... (continued)

10 of 10 new or added lines in 1 file covered. (100.0%)

11 existing lines in 1 file now uncovered.

4512 of 4569 relevant lines covered (98.75%)

703.73 hits per line

Coverage Regressions

Lines Coverage ∆ File
11
98.87
-0.26% Source/IGListKit/IGListAdapter.m
Jobs
ID Job ID Ran Files Coverage
1 iOS - 26610259200.1 29 May 2026 12:26AM UTC 60
98.63
GitHub Action Run
Source Files on build 26610259200
  • Tree
  • List 54
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #26610259200
  • cc47ee42 on github
  • Prev Build on main (#25713764463)
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