Skip to content

Track loading state conditions in Sentry spans to debug infinite skeletons #81683

Closed

Description

@youssef-lr

Coming from https://expensify.slack.com/archives/C05LX9D6E07/p1770251292175169

Problem

When users encounter infinite loading skeletons throughout the app, engineers debugging via Sentry struggle to identify the root cause because:

  • Spans lack visibility into which specific conditions are causing the loading state
  • Condition values at span creation/ending don't reflect changes during component re-renders
  • Multiple loading conditions make it unclear which one(s) are preventing content from appearing

Solution

Improve the custom hook useSkeletonSpan by:

  • Capturing all loading conditions as span attributes - Include every condition that determines whether a skeleton is shown.
  • Updating span attributes whenever any loading condition changes during re-renders.

This ensures engineers can trace the complete timeline of the skeleton and identify which condition(s) caused the infinite loading state.

Activity

  1. sosek108 commented on Feb 6, 2026

    @sosek108
    Contributor

    @youssef-lr
    cc: @adhorodyski @rlinoz

    Here is the PR with attributes. At this moment I've only created a space to pass "reason" attributes. There is a lot of places that use these components and our PR would grow by a lot. I propose baby steps to limit chances of any regression, conflict and uneasy reverts.

    The first step would be to merge this and decide how big would be next PRs with exact implementation. if you agree with me I'll prepare a list of components that needs attention. We could then mark priorities

  2. sosek108 commented on Feb 9, 2026

    @sosek108
    Contributor

    I've undrafted the PR

  3. moved this from CRITICAL to HIGH in [#whatsnext] #qualityon Feb 9, 2026
  4. 46 remaining items

  5. changed the title [-]Track loading state conditions in Sentry spans to debug infinite skeletons[/-] [+][Due for payment 2026-03-30] Track loading state conditions in Sentry spans to debug infinite skeletons[/+] on Mar 23, 2026
  6. melvin-bot commented on Mar 23, 2026

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  7. melvin-bot commented on Mar 23, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.41-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-03-30. 🎊

    For reference, here are some details about the assignees on this issue:

    • @sosek108 does not require payment (Contractor)
  8. melvin-bot commented on Mar 23, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  9. youssef-lr commented on Mar 23, 2026

    @youssef-lr
    ContributorAuthor

    No payment needed here.

  10. changed the title [-][Due for payment 2026-03-30] Track loading state conditions in Sentry spans to debug infinite skeletons[/-] [+]Track loading state conditions in Sentry spans to debug infinite skeletons[/+] on Mar 23, 2026
  11. suneox commented on Apr 3, 2026

    @suneox
    Contributor

    @youssef-lr Could you please update the payment summary for this issue since I reviewed this PR? Thanks!

    cc: @mallenexpensify

  12. mallenexpensify commented on Apr 6, 2026

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor+: @suneox due $75 via NewDot

    @suneox we had a bunch of small [NoQA] bugs we were paying $75 for C+ reviews, I'm assuming hit was one, comment and tag me if not and I'll reopen

  13. suneox commented on Apr 8, 2026

    @suneox
    Contributor

    Payment Summary

    Contributor+: @suneox due $75 via NewDot

    @suneox we had a bunch of small [NoQA] bugs we were paying $75 for C+ reviews, I'm assuming hit was one, comment and tag me if not and I'll reopen

    Yes, the current payment works for me. Thanks!

  14. trjExpensify commented on Apr 10, 2026

    @trjExpensify
    Contributor

    approved $75 for @suneox

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

Metadata

Metadata

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions