fix(docs): remove dead docs breadcrumb segment filter#6427
fix(docs): remove dead docs breadcrumb segment filter#6427BABTUNA wants to merge 2 commits intoreflex-dev:mainfrom
Conversation
Greptile SummaryRemoves the hard-coded Confidence Score: 4/5Safe to merge; the only finding is a stale comment left over from the removed filter. Change is minimal and well-motivated. Routes confirmed to never carry a No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["breadcrumb(path, ...)"] --> B["path.split('/')"]
B --> C{"filter segments"}
C -- "Before (old)" --> D["segment and segment != 'docs'"]
C -- "After (new)" --> E["segment (non-empty only)"]
D --> F["capitalize → segments list\n(docs always excluded)"]
E --> G["capitalize → segments list\n(docs included if present)"]
F --> H["Build href + render breadcrumb items"]
G --> H
|
Merging this PR will not alter performance
Comparing Footnotes
|
All Submissions:
Type of change
Changes To Core Features:
Description
Follow-up to #6359.
breadcrumb(...)still had a hard-codedsegment != "docs"filter even though docs paths are normalized earlier. That condition is now dead and can hide a valid segment mapping if a docs-prefixed path is passed through.This PR removes that special-case filter so breadcrumb segments are derived uniformly from non-empty path segments.
Tests
Added regression test:
docs/app/tests/test_breadcrumb.py::test_breadcrumb_keeps_docs_segment_when_present_in_pathValidation run:
uv run --no-sync ruff check docs/app/reflex_docs/templates/docpage/docpage.py docs/app/tests/test_breadcrumb.pyuv run --no-sync pytest docs/app/tests/test_breadcrumb.py -quv run --no-sync pytest docs/app/tests/test_routes.py -q