fix(seo): add canonical link to docs.html#156
Conversation
…ades) Revolut's Trading Account Statement has two XLSX formats: closed-positions summary (existing) and transaction log (Date/Ticker/Type/Quantity/Price per share/Total Amount/Currency/FX Rate). The transaction log is what users actually get from the Revolut app, and the parser was rejecting it entirely. - Add transaction-log detection in detectRevolutXlsx (both formats now detected) - Parse BUY-MARKET, BUY-LIMIT, SELL-MARKET, SELL-LIMIT as individual trades - Parse "CCY amount" strings (e.g. "EUR 15.61", "USD -217.14") - Parse ISO 8601 timestamps with ms/μs precision - Extract CASH TOP-UP / CASH WITHDRAWAL as cashTransactions - Infer open positions from unmatched buys (enables Modelo 720/D-6) - Update text-based detect() for transaction-log headers - 35 new tests (78 total), anonymized fixture from real user file
- Add Math.abs + isFinite guard on transaction-log quantity to prevent negative and Infinity propagation - Cap sell quantity at net position to prevent negative position state - Tighten hasTxnLogHeaders to require "price per share" column - Add symbol-based fallback in wash-sale homogeneousKey() for trades without ISINs (Revolut, Lightyear, etc.) - Add Revolut XLSX detection in CLI before eToro - Add 9 edge case tests (BUY-LIMIT, negative qty, sell overflow, Infinity, corrupted XLSX, empty sheet, wash-sale symbol fallback)
Address CodeRabbit nitpick: replace Number with Decimal.js for netQty, totalCost, and costPerUnit in open-position inference to prevent floating-point drift per project financial precision rules.
Google Search Console flagged docs.html as "Duplicada: el usuario no ha indicado ninguna versión canónica". Adding the canonical URL tells Google this is the authoritative version.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds Revolut transaction-log format XLSX parsing with multi-format detection alongside existing closed-positions support. Enhances wash-sale detection to use symbol-based grouping when ISIN is missing. Adds canonical link to docs page. ChangesRevolut Multi-Format XLSX Parsing
Wash-Sale Symbol Fallback
Canonical Link
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #156 +/- ##
==========================================
+ Coverage 97.61% 97.62% +0.01%
==========================================
Files 37 37
Lines 7380 7585 +205
Branches 1499 1551 +52
==========================================
+ Hits 7204 7405 +201
- Misses 175 179 +4
Partials 1 1
🚀 New features to boost your workflow:
|
Summary
<link rel="canonical">todocs.htmlpointing tohttps://declarenta.com/docs.htmlContext
The 3 "Página con redirección" entries are GitHub Pages mirror URLs redirecting to declarenta.com — expected behavior, no fix needed.
Summary by CodeRabbit
New Features
Tests