Skip to content

fix(docs): remove dead docs breadcrumb segment filter#6427

Open
BABTUNA wants to merge 6 commits into
reflex-dev:mainfrom
BABTUNA:fix-docs-breadcrumb-dead-filter
Open

fix(docs): remove dead docs breadcrumb segment filter#6427
BABTUNA wants to merge 6 commits into
reflex-dev:mainfrom
BABTUNA:fix-docs-breadcrumb-dead-filter

Conversation

@BABTUNA

@BABTUNA BABTUNA commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Description

Follow-up to #6359.

breadcrumb(...) still had a hard-coded segment != "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_path

Validation run:

  • uv run --no-sync ruff check docs/app/reflex_docs/templates/docpage/docpage.py docs/app/tests/test_breadcrumb.py
  • uv run --no-sync pytest docs/app/tests/test_breadcrumb.py -q
  • uv run --no-sync pytest docs/app/tests/test_routes.py -q

@BABTUNA BABTUNA requested review from a team and Alek99 as code owners April 30, 2026 06:40
@greptile-apps

greptile-apps Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes a dead segment != "docs" condition from the breadcrumb segment filter in docpage.py, which was made obsolete after path normalization was moved earlier in the pipeline (follow-up to #6359). A targeted regression test is added to verify "docs" segments are now preserved correctly.

  • docpage.py: one-line change in the list comprehension — drops the segment != "docs" guard so all non-empty path segments are included uniformly.
  • test_breadcrumbs.py: adds test_breadcrumb_keeps_docs_segment_when_present_in_path, confirming that /docs/ai/integrations/ produces crumbs for /docs, /docs/ai, and /docs/ai/integrations.

Confidence Score: 5/5

Safe to merge — removes a now-dead special-case filter with no behavioral risk on normalized paths, and the change is covered by a new regression test.

The change is a trivial one-liner that deletes a guard condition that was already rendered inert by upstream path normalization. The new regression test directly exercises the removed branch, and the existing test suite continues to pass. No logic is restructured and no new code paths are introduced.

No files require special attention.

Important Files Changed

Filename Overview
docs/app/reflex_docs/templates/docpage/docpage.py Removes dead segment != "docs" guard from the breadcrumb segment list comprehension; updates the inline comment to match.
docs/app/tests/test_breadcrumbs.py Adds test_breadcrumb_keeps_docs_segment_when_present_in_path to assert that a path containing "docs" produces the correct crumbs, preventing regression of the removed filter.

Reviews (2): Last reviewed commit: "Merge branch 'main' into fix-docs-breadc..." | Re-trigger Greptile

@codspeed-hq

codspeed-hq Bot commented Apr 30, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 26 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing BABTUNA:fix-docs-breadcrumb-dead-filter (599abf2) with main (474f5b6)

Open in CodSpeed

Footnotes

  1. 8 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@adhami3310 adhami3310 added the documentation Improvements or additions to documentation label Apr 30, 2026
masenf
masenf previously approved these changes May 1, 2026
FarhanAliRaza
FarhanAliRaza previously approved these changes May 21, 2026
@masenf

masenf commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

@carlosabadia is this something we need still or did your recent breadcrumb changes also fix this?

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants