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>
elviskahoro pushed a commit that referenced this pull request Nov 10, 2026
…enu off lg instead of md (#177)

<!-- entire-trail-link-start -->
https://entire.io/gh/elviskahoro/buridan-ui/trails/28
<!-- entire-trail-link-end -->

**Detail bug report:** [View on
Detail](https://app.detail.dev/org_d38a878f-9df9-4c4b-a96a-f5180b860085/bugs/bug_fc4c9643-7635-4c54-a4f3-4ea1c702af39)

## Why

On every documentation page (`docpage()`), the left docs sidebar is the
only component that exposes the docs tree (Getting Started, Resources,
Utilities, Charts, Components). Its small-screen counterpart is the
navbar's `mobile_menu()` hamburger. The two were hidden on **disjoint**
Tailwind breakpoints — the sidebar wrapper is `hidden lg:flex` (visible
≥1024px) while the `mobile_menu()` wrapper was `flex md:hidden` (visible
<768px). Because Tailwind's `md` (768px) and `lg` (1024px) are distinct
breakpoints, every viewport from **768px to 1023px** showed *neither*
affordance, leaving tablet-width users with no way to browse the docs
structure (no prev/next, no breadcrumbs; the in-page TOC is `hidden
xl:block` and only links within the current page). The mismatch was
introduced in `6500d1e` ("add mobile navigation"): it added the
hamburger at `md:hidden` and relaxed the desktop navbar links from `lg`
to `md`, but left the docs sidebar at its pre-existing `lg` cutoff.

## Fix

Widen the mobile menu's range so it stays visible everywhere the sidebar
is hidden:

```python
rx.el.div(mobile_menu(), class_name="flex lg:hidden")
```

This makes the two affordances' cutoffs exactly complementary at `lg` —
the hamburger shows below 1024px and hides at/above it, the sidebar does
the inverse. The mobile-menu dropdown already carries the full
`SIDEBAR_SECTIONS` navigation, so it covers the tablet band without
changing the sidebar.

## Trade-offs

Chose widening the hamburger over raising the sidebar to `md:flex` (the
other obvious fix) because `mobile_menu()` already contains the full
docs-tree navigation and is covered by existing tests, so a one-class
change to its wrapper is the smaller, safer diff. A third option —
matching upstream's below-`xl` hamburger plus a breadcrumb trigger —
would diverge further from the current layout and is out of scope for
this fix.

## Test plan

Two invariant guards are now versioned in
`tests/test_nav_sidebar_responsive.py`: one asserts the two affordances'
responsive cutoffs stay in sync (the structural invariant the bug
violated), the other sweeps the full viewport range (320–1920px, densely
through 768–1023px and the `lg` boundary) and asserts at least one
affordance is displayed at every width. Both fail against the reverted
buggy class and pass with the fix. Routine checks — full `pytest` suite,
`pyright`, and `ruff` — pass clean on the changed files.

End-to-end (not versioned): booted the app with `reflex run --env prod
--frontend-only` and drove it in headless Chromium and Firefox across
375/767/768/900/1023/1024/1280/1440/1920px on
`/docs/getting-started/introduction`. At the previously-dead 768–1023px
band the "Menu" hamburger is now visible (`flex`) and the sidebar
hidden; at 1024px the sidebar shows and the hamburger hides — exact `lg`
handoff in both engines. At 900px clicking "Menu" opened the dropdown,
which listed all six `SIDEBAR_SECTIONS` groups plus the "Pages" group
(67 items), with `pypi 0.1.19` → external PyPI URL, `llms.txt` →
`/llms.txt`, and internal entries client-routed as before.

The Trunk orchestrator gate (`trunk check`) could not be run: the Trunk
CLI is not installable in this sandbox (network egress to `trunk.io` is
blocked and neither `npm` nor `bun` is available). Its constituent
checks — `ruff`, `pyright`, `tach` — were run directly and pass.

## Links

- Closes #154
- Related: #109 (the prior `mobile_menu()` fix to the same file)

---
_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>
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