fix: correctly parse and route absolute anchor URLs in Interactive Book #557
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.35) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 177 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.310
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #557"
general
weight: 0.35
magic-peach
Fixes #556
###changes made in this PR:
startsWith) with robustUriparsing and path normalization in [lib/ui/views/ib/ib_page_view.dart](cci:7://file:///Users/rajeevtiwari/Desktop/openSource/mobile-app/lib/ui/views/ib/ib_page_view.dart:0:0-0:0).Uri.decodeComponentextraction for internal Markdown anchor fragments (#) instead of incorrectly truncating the absolute URL string (href.substring(1)).isSameDocumentchecks and explicitly returning out of the logic blocks to satisfy static analysis and automated PR bot feedback.Why these changes were necessary:
The previous Interactive Book routing logic incorrectly assumed that any absolute URL corresponding to the current document could simply have its first character stripped (
href.substring(1)). This meant any internal same-page anchor link would be resolved to an invalid slug (e.g.,ttps://learn.circuitverse...) and fail to scroll. Furthermore, thestartsWithlogic suffered from prefix fallback errors (where/chapter-1could incorrectly flag/chapter-10as a self-link). By parsing the exact URI schemes, paths, and fragment identifiers, all Interactive Book navigation correctly scopes and scrolls precisely to specific headings.