Skip to content

chore: remove unused select_radio_option_row helper - #108

Closed
elviskahoro wants to merge 1 commit into
LineIndent:mainfrom
elviskahoro:chore/remove-select-radio-option-row-helper
Closed

elviskahoro wants to merge 1 commit into
LineIndent:mainfrom
elviskahoro:chore/remove-select-radio-option-row-helper

Conversation

@elviskahoro

Copy link
Copy Markdown
Collaborator

Removes the unused select_radio_option_row helper from app/templates/compiler.py. Nothing calls it — 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 added a commit that referenced this pull request Oct 25, 2026
<!-- entire-trail-link-start -->
https://entire.io/gh/elviskahoro/buridan-ui/trails/5
<!-- entire-trail-link-end -->

## What

`pullfrog-approval` (Pullfrog's AI review verdict) is now a **required
check in both enforcement layers**:

- **GitHub side** — ruleset `main - PR requirements` plus classic branch
protection on `main`, both pinned to the Pullfrog app (id 1768019).
`enforce_admins` and the strict up-to-date policy are unchanged. This
blocks direct merges and gates **Trunk merge queue admission** (the
queue only admits PRs GitHub considers mergeable).
- **Trunk queue side** — added to `.trunk/trunk.yaml`
`merge.required_statuses`, so the queue also waits for a **fresh
Pullfrog verdict on the exact merge state it tests**, not just the PR
head at admission.

## Why it is safe to require during queue testing

The queue tests in **draft-PR mode**: trunk-io opens a draft PR from the
`trunk-merge/**` branch, and Pullfrog auto-reviews draft PRs
(`review.drafts` on; the trunk-io app is not in Pullfrog's bot-exclusion
list, which covers
Dependabot/Renovate/Greenkeeper/Snyk/`github-actions[bot]`/changesets).
So `pullfrog-approval` posts on the tested head and the queue
requirement is satisfiable.

The comment in `trunk.yaml` and the paragraph in `AGENTS.md` document
the load-bearing assumptions: if a queue entry ever stalls on a missing
`pullfrog-approval`, check (1) the queue is still in draft-PR mode, (2)
Pullfrog is still reviewing queue draft PRs, (3) the Pullfrog run itself
didn't fail or get cancelled — a failed run posts no check.

## Effects to know

- New PRs: Pullfrog auto-reviews on open and re-reviews on push, so the
check lands on every head automatically. Unresolved Pullfrog feedback
fails the check and blocks the merge — that is the point.
- Queue submissions: the queue now waits for Pullfrog's verdict on the
tested merge state before landing, adding one LLM review (typically a
few minutes, PR-size dependent) per queue test.
- Existing open PRs whose heads were last reviewed before the
approval-check toggle was enabled (e.g. #119, #118, #114, #113, #112,
#108, #107) show `pullfrog-approval` as *Expected — waiting for status*.
Unblock with a one-off `@pullfrog review` comment or a new push.
- If a Pullfrog run fails or is cancelled, no check posts on that head
and the merge/queue stays blocked until the next run reports (documented
Pullfrog behavior).
- A negative verdict on the tested merge state fails the check and
ejects the PR from the queue — address the feedback, push to the
original PR, and resubmit; the new submission opens a new draft PR,
which gets a fresh verdict. No human override exists short of editing
the config.

## Verification

- The GitHub-side gate is verified live on this PR: #126 sat `BLOCKED`
with all CI green while Pullfrog's review was running, cleared once
`pullfrog-approval: SUCCESS` posted, and blocked again on the new
merge-commit head until re-review — exactly the intended per-commit
gate. PR #125 also merged (13:56Z, after the rule went live) with
`pullfrog-approval: SUCCESS` among its checks.
- The queue-side requirement is verified by this PR's own queue run: the
queue reads `required_statuses` from `main`'s trunk.yaml, so #126 is
tested under the old three-check list while Pullfrog independently
auto-reviews the queue's draft PR. During Testing, `gh pr checks
<draft-pr>` will show whether `pullfrog-approval` posts on the
`trunk-merge/**` head. If it does not, the queue entry is cancelled
before landing and the `required_statuses` addition is reverted; if it
does, that evidence is the confirmation the new config is safe for
future submissions.
@elviskahoro

Copy link
Copy Markdown
Collaborator Author

/trunk merge

elviskahoro added a commit that referenced this pull request Nov 10, 2026
**Detail bug report:** [View on
Detail](https://app.detail.dev/org_d38a878f-9df9-4c4b-a96a-f5180b860085/bugs/bug_65717ebf-ad19-4757-8939-64203811d6eb)

## Bug

`navbar()` returns its own `rx.el.header(...)` — a `<header>` with the
implicit ARIA `banner` landmark and all the sticky styling baked in
(`sticky top-0 z-50 w-full h-13 bg-background flex items-center`). But
`docpage()` and `layout_decorator()` each wrapped that result in a
*second* `rx.el.header(...)`, so every docs page and every
landing/components/charts/blocks page rendered
`<header><header>…</header></header>`. This is invalid HTML — the spec
forbids `<header>` as a descendant of `<header>` — and produces a
duplicate `banner` landmark on each page, affecting 63 of 65 content
routes. `mainpage()` (the `/create` route) already used `navbar()`
directly and was correct.

## Fix

Removed the redundant outer wrappers so `navbar()` renders verbatim,
matching the existing pattern in `mainpage()`:

- `app/templates/docpage.py` — `rx.el.header(navbar(), …)` → `navbar()`
- `app/templates/layout.py` — `rx.el.header(navbar(…), …)` → `navbar(…)`

The wrapper added nothing the inner `<header>` doesn't already provide
(its classes are a strict subset), so dropping it loses no styling and
removes the invalid nesting.

## Testing

- **Unit tests, typecheck, lint, and format all pass.** Added
`tests/test_navbar_landmarks.py` (3 tests pinning one `<header>` per
page template, using the repo's recursive-tree-walk idiom); full suite
is 827 passed, `pyright` reports 0 errors, and `ruff check`/`format` are
clean.
- **W3C Nu Validator.** Reconstructed each page's rendered DOM from the
Reflex `.render()` tree (Reflex serializes to `jsx("tag", …)` which
React renders 1:1) and submitted it to the validator. The fixed
`docpage`, `layout_decorator` (both CTA modes), and `mainpage` produce
**no** `header must not appear as a descendant of the header element`
error; reverting the fix reintroduces that exact error on `docpage` and
`layout_decorator`.
- **axe-core landmark audit.** Ran `@axe-core/playwright` against the
live `reflex run` dev server (headless Chromium) on
`/docs/getting-started/introduction`, `/`, `/components`, `/charts`,
`/blocks`, and `/create`. All six render exactly one `<header>`, zero
nested headers, one implicit `banner` landmark, and no
`landmark-no-duplicate-banner` / `landmark-unique` violations. Reverting
the fix makes the five affected routes fail (2 headers, 2 banners, both
violations) while `/create` stays clean.
- **Visual/functional regression (Playwright).** On the same six routes,
verified the navbar stays `position: sticky` with its own sticky
classes, the "New components library" banner and `<footer>` render on
docs/layout pages, `<main>` renders everywhere, the search and "New
Project" controls are present, and the navbar stays pinned after
scrolling — no regression from dropping the wrapper.
- **Negative control.** Temporarily reverted both files and re-ran the
new unit tests; the `docpage` and `layout_decorator` tests fail (2
headers each) while the `navbar` root-cause test stays green, then
restored the fix.

There is no visible UI change (the navbar's box was unchanged), so no
screenshot is applicable.

Pre-existing and out of scope: the navbar's mobile `Select` nests a
`<button>` in a `<button>` and the docs `Accordion` nests `<h3>` in
`<h3>`, both of which emit React hydration warnings — these appear on
the untouched `/create` route too and are unrelated to this fix.

Closes #92

---
_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>
Co-authored-by: elvis kahoro <github@elvis.ai>
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