Skip to content

Add omnibus developer feature gallery - #221

Merged
max-sixty merged 3 commits into
mainfrom
codex/feature-gallery
Sep 2, 2026
Merged

max-sixty merged 3 commits into
mainfrom
codex/feature-gallery

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner

Leaf developers need one synthetic surface for exercising features without presenting that surface as a user-facing example. This turns the former Button gallery into a developer-only omnibus gallery and makes that boundary explicit in the repository guidance.

  • Moves the gallery, seeded log, and prior version under examples/developer/, removes it from the public catalog, and keeps it available through scripts/preview.py feature-gallery.
  • Includes the developer gallery in the generated corpus and browser/content sweeps while keeping published-site routes limited to realistic user examples.
  • Requires every core Leaf feature to have a directly exercisable gallery specimen when it is added or materially changed.
  • Keeps the replay idempotence gate focused on authored state by excluding generated runtime chrome, including generated parents around authored thread widgets.

Tested with uv run pytest tests (801 passed), uv run pre-commit run --all-files, and the 25-case page-fixture accessibility, standalone-export, and seeded-log sweep.

This was written by Codex on behalf of max-sixty

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things on the corpus move.

The gallery lost two of the three page-sensitive contracts the guidance now claims for it. The new examples/CLAUDE.md says the feature gallery renders in both palettes, passes axe, and exports with its scripts gone. Only the first is true after the move. test_page_fixture_renders was widened to PAGE_FIXTURES, but test_examples_have_no_serious_wcag_a_or_aa_violations in tests/test_render_controls.py and test_an_exported_example_stands_on_its_own in tests/test_render_export.py still parametrize over EXAMPLES, which is the top-level glob the gallery just left. Collected on the merged tree:

test_page_fixture_renders                       12 cases, incl. [feature-gallery]
test_examples_have_no_serious_wcag_a_or_aa_…    11 cases, no feature-gallery
test_an_exported_example_stands_on_its_own      11 cases, no feature-gallery

button-gallery.html was in EXAMPLES before the move and got all three, so this is a net loss on exactly the page the PR designates as where a new core feature gets its specimen — and it lands where the miss is quietest, since the corpus tab that embeds the gallery keeps both sweeps green. tests/test_render_pages.py's seeded gate drops it the same way (seeded = [p for p in EXAMPLES if p.with_suffix(".jsonl").exists()]), and the gallery is one of only three pages that ship a log.

Both sweeps want PAGE_FIXTURES, which render_support already exports. Say the word and I'll push that commit.

skills/leaf/CLAUDE.md's shallowSigs paragraph is now half the rule. It states the exclusion as attribute-level — "shallowSigs excludes exactly those attributes", a widget's own data-lf-* stays visible — and this PR adds a second, element-level one: generated chrome is skipped entirely, and a generated parent contributes neither an in= id nor a sibling position. That is the half a widget author reasoning about the replay gate has to know, and it is the same file that says to keep standingState and shallowSigs aligned with the runtime's authored-state definitions.

Comment thread examples/CLAUDE.md Resolved

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Two things worth recording, neither a change request.

The sweeps this PR widens don't run on the PR. test_render_gate.py, test_render_controls.py, and test_render_export.py all carry pytestmark = pytest.mark.nightly, and ci.yaml runs bare uv run pytest tests on pull_request, which deselects them — so the green check here, and the 801-passing run in the description, both skip the three parametrizations the change is about. I ran them at b2e12d6 with --run-nightly: test_page_fixture_renders 12 passed, test_page_fixtures_have_no_serious_wcag_a_or_aa_violations 12, test_an_exported_page_fixture_stands_on_its_own 12, test_a_shipped_log_opens_its_example_on_a_live_thread 1, tests/test_site.py 20, plus the everyday suite at 795 passed / 6 skipped. feature-gallery is in each of the 12s.

This clears one of main's two live nightly reds. tests/test_render_gate.py::test_example_renders[button-gallery] fails at b9cfe18 on the lf-margin-options-* ids ("applyAction is relative — re-applying the standing log moved …"); I reproduced it on a clean checkout of that commit, so it is deterministic rather than a state race. Narrowing shallowSigs to authored id-bearing elements is what fixes it, and the same case passes here as test_page_fixture_renders[feature-gallery]. The other red on that run, test_render_drafts.py::test_a_comment_hidden_by_narrowing_is_revealed_in_the_open_panel[False], this PR does not touch.

The base merge resolved the empty probe collision the right way — #218 landed its own rewrite of that block after this branch's base, and taking main's version is correct; I checked it passes over feature-gallery too, so the PAGE_FIXTURES widening is all that block needed.

@max-sixty
max-sixty merged commit 8f55646 into main Sep 2, 2026
6 checks passed
@max-sixty
max-sixty deleted the codex/feature-gallery branch September 2, 2026 18:37
max-sixty added a commit that referenced this pull request Sep 3, 2026
PR #221 established a developer-only omnibus gallery, but the surface
still emphasized margin Buttons and omitted several core workflows. This
completes the gallery as the feature-indexed place where a Leaf
developer can exercise the product without turning synthetic coverage
into a public user example.

- Adds the main Asks panel, injected page chrome, sign-off, design
comments, typed host requests, live and snapshotted external data, and
every default-package presentation widget.
- Makes every section directly scannable: product names lead in bold,
concise descriptions state what each feature does, and eyebrows list
searchable UI and `lf-*` element names.
- Gives the new surfaces real browser journeys, preserves captured data
when examples are composed into the corpus, and avoids rebuilding
unchanged reaction entries during gallery repaint.
- Strengthens the repository guidance so every new or materially changed
core feature must update its focused gallery specimen.

Validated with `uv run pre-commit run --all-files`, `uv run pytest
tests` (813 passed), the Leaf render gate in both palettes, and
desktop/mobile browser inspection.

> _This was written by Codex on behalf of max-sixty_
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.

2 participants