Skip to content

chore: remove dashboard_components dead snippets - #109

Closed
elviskahoro wants to merge 1 commit into
LineIndent:mainfrom
elviskahoro:chore/remove-dead-dashboard-snippets
Closed

elviskahoro wants to merge 1 commit into
LineIndent:mainfrom
elviskahoro:chore/remove-dead-dashboard-snippets

Conversation

@elviskahoro

Copy link
Copy Markdown
Collaborator

Removes dead, unreferenced code snippets from the dashboard_components getting-started page — pure deletion, no behavior change.

Part of a series of independent cleanup PRs — each one is self-contained and can be reviewed/merged in any order.

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
elviskahoro pushed a commit that referenced this pull request Oct 25, 2026
…igation (#109)

**Detail bug report:** [View on
Detail](https://app.detail.dev/org_d38a878f-9df9-4c4b-a96a-f5180b860085/bugs/bug_4f483765-816a-4883-96a2-46199c39c793)

Closes #93

## Bug
- The mobile sidebar dropdown (`mobile_menu()` in
`app/templates/docsidebar.py`, rendered for `< md` viewports) routed
every `SIDEBAR_SECTIONS` entry through one generic `rx.el.a(...,
to=f"/{route['url']}")` branch with no per-route dispatch.
- For the external `pypi 0.1.19` entry this produced
`to="/https://pypi.org/project/buridan-create/"` — the leading `/`
turned the absolute URL into an in-app pathname — with no
`reload_document`, so react-router client-side routed it to an
unregistered path that the catch-all 404 route renders. Tapping the link
on mobile stranded users on the in-app 404 instead of reaching PyPI.
- The same branch also mis-rendered `llms.txt` (no `reload_document`),
where the desktop sidebar fetches the static asset via document
navigation.
- Root cause: the desktop `create_menu_item` was already fixed to
special-case external/`llms.txt` links, but that fix was never
propagated to `mobile_menu`.

## Fix
- Added `_mobile_menu_link(route)` in `app/templates/docsidebar.py`
mirroring the desktop `create_menu_item`'s three-way dispatch:
- `title.startswith("pypi")` → `external_link(...)`
(`reload_document=True`, raw external URL, no leading `/`).
- `url == "llms.txt"` → `rx.el.a(..., href=f"/{url}",
reload_document=True)` (real document fetch of the static asset).
- otherwise → `rx.el.a(..., to=f"/{url}")` (client-side routing,
unchanged).
- Wired it into `mobile_menu()`'s `SIDEBAR_SECTIONS` comprehension in
place of the inline generic anchor, so mobile and desktop now navigate
external and static-asset links identically.

## Testing
- Committed unit/render tests (`tests/test_mobile_sidebar.py`) pin the
three dispatch branches, assert that no external URL in
`SIDEBAR_SECTIONS` is ever client-routed to an in-app `/https://...`
path, and assert the mobile pypi/`llms.txt` entries produce
byte-identical navigation props to the desktop `create_menu_item` —
guarding against the mobile/desktop divergence recurring.
- Routine checks: `uv run pytest` (830 passed, no regressions), `ruff
format`/`ruff check`, and `uv run pyright` all pass on the changed
files.
- End-to-end (not versioned): booted the app with `reflex run --env
prod` and drove the mobile dropdown at a 400×800 viewport with a
headless Chromium. Clicking `pypi 0.1.19` performed a real document
navigation to `https://pypi.org/project/buridan-create/` (the browser
left the site, no in-app 404); clicking `llms.txt` fetched `/llms.txt`
as a real `text/plain` document (body begins `# buridan/ui`); internal
entries (`Introduction`, `Home`) navigated client-side as before.
Directly loading the old buggy in-app path `/https://pypi.org/...` still
returns the 404 page, confirming it is an unregistered route that the
fixed link no longer targets.

---
_Automatic Fixes PRs can be [configured
here](https://app.detail.dev/org_d38a878f-9df9-4c4b-a96a-f5180b860085/settings/repos/repo_04b9d58c-daa0-46b6-9560-7f39569ec6eb/bugs)._

---------

Co-authored-by: detail-app[bot] <180357370+detail-app[bot]@users.noreply.github.com>
elviskahoro added a commit that referenced this pull request Oct 25, 2026
<!-- entire-trail-link-start -->
https://entire.io/gh/elviskahoro/buridan-ui/trails/16
<!-- entire-trail-link-end -->

## Why
Fixed three critical documentation issues: (1) anatomy block generation
was silently failing with swallowed errors embedded in 37 component docs
due to a stale import path; (2) external tool links in TOC leaked source
indentation into query strings, violating RFC 3986; (3) mobile sidebar
routed external URLs through client-side routing, stranding users on
404s. Each issue included regression tests to prevent recurrence.

## Closes
- #87 (PR #103: anatomy generation)
- #94 (PR #110: TOC link encoding)  
- #93 (PR #109: mobile sidebar routing)

<!-- conductor-workspace-link -->

---

[Open workspace in
Conductor](https://app.conductor.build/elviskahoro-cloud/w/262)

---------

Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com>
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