Skip to content

Conversation

@acelaya
Copy link
Member

@acelaya acelaya commented Dec 10, 2025

Part of #874

Replace the multiple boolean flags that determine the status of the visits and visits comparison reducers, with a single status discriminator prop that is less error prone and easier to reason about.

TODO

  • Fix cancelling visits loading.
    EDIT: This stopped working because of a race condition in which status is set to canceled, but in-flight requests end up setting it back to loading. Previously, loading and canceled statuses were handled by two different flags, which incidentally worked around this race condition.

@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 62.68657% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.83%. Comparing base (0012d20) to head (c3bca35).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/visits/helpers/VisitsLoadingFeedback.tsx 50.00% 0 Missing and 3 partials ⚠️
src/visits/reducers/nonOrphanVisits.ts 25.00% 2 Missing and 1 partial ⚠️
src/visits/reducers/orphanVisits.ts 25.00% 2 Missing and 1 partial ⚠️
...its/visits-comparison/ShortUrlVisitsComparison.tsx 75.00% 0 Missing and 2 partials ⚠️
src/visits/OrphanVisits.tsx 0.00% 0 Missing and 1 partial ⚠️
src/visits/ShortUrlVisitsHeader.tsx 0.00% 0 Missing and 1 partial ⚠️
src/visits/TagVisitsHeader.tsx 0.00% 0 Missing and 1 partial ⚠️
src/visits/VisitsStats.tsx 75.00% 0 Missing and 1 partial ⚠️
src/visits/reducers/common/createVisitsReducer.ts 90.90% 1 Missing ⚠️
src/visits/reducers/domainVisits.ts 50.00% 1 Missing ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #920      +/-   ##
==========================================
- Coverage   85.17%   84.83%   -0.35%     
==========================================
  Files         187      187              
  Lines        2807     2829      +22     
  Branches      361      379      +18     
==========================================
+ Hits         2391     2400       +9     
- Misses        120      124       +4     
- Partials      296      305       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@acelaya acelaya force-pushed the visits-redux-type branch 4 times, most recently from 1b61929 to c3bca35 Compare December 11, 2025 07:56
@acelaya acelaya merged commit f6979c1 into shlinkio:main Dec 11, 2025
6 checks passed
@acelaya acelaya deleted the visits-redux-type branch December 11, 2025 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant