Skip to content

fix(barebuild-demo): retire stale "stub" framing + drive status options from data#260

Merged
avanelsas merged 1 commit into
mainfrom
fix/demo-write-side-transparency
Jun 3, 2026
Merged

fix(barebuild-demo): retire stale "stub" framing + drive status options from data#260
avanelsas merged 1 commit into
mainfrom
fix/demo-write-side-transparency

Conversation

@avanelsas

Copy link
Copy Markdown
Owner

Addresses the Hickey idiom review of the demo app. #1 and #3 are doc/comment changes; #2 is a small, e2e-verified behavioral change.

#1 — Transparency (significant)

The write-side is fully wired, so the "inert stubs" framing contradicted the behavior — attach-stubs! was a lying name.

  • Renamed attach-stubs!attach-write-handlers!.
  • Rewrote the write_side.cljs banner from a telemetry instrument ("fill these five inert stubs") to a description of the live handlers, with the five questions kept as answered notes pointing at write-side-design-notes.md (the telemetry phase is closed).
  • Updated the echoes in core.cljs, board.cljs, detail.cljs, settings.cljs, and the e2e spec's now-stale "ship unwired" comment.

#2 — Data > functions

The status taxonomy lived in view/statuses and was re-spelled as static <option>s in four <x-select>s, with a literal "keep them in sync" comment — the smell. (This reverses my own PR #259 #8 call to keep them static: that was right when the HTML was the only home; once view/statuses exists, the duplication is real debt.)

  • Each route now populates its status select from view/statuses on init via a new dom/fill-options!; index.html ships the selects empty (with a pointer comment).
  • Scoped to the status taxonomy only — settings/fields and detail/form-fields are each a route's intrinsic field list, not a shared value, so left as-is.
  • x-select re-syncs on slotchange, so populating after upgrade is safe.
  • Added an e2e assertion that the filter's options are data-driven — the status select was previously untested.

#3 — Read patterns (minor)

Documented the board-vs-detail asymmetry: board/on-data-state reads the broker's retained .state (filter-change events carry no payload); detail/on-data-state reads e.detail.state.data (only renders on load).

#4 — left as-is

el!/text-el! keep their ! — they build DOM (createElement + setAttribute); renaming is churn for a cosmetic point, per the reviewer.

Verification

  • clj-kondo --lint src — 0/0
  • clean shadow-cljs compile app — 0 warnings
  • Full Playwright e2e 10/10 (release build via bb serve), including the new status filter options are data-driven test.

🤖 Generated with Claude Code

…ns from data

Addresses the Hickey idiom review of the demo app.

#1 Transparency: the write-side is fully wired, so the "inert stubs" framing was
a lie. Renamed attach-stubs! → attach-write-handlers!, rewrote the write_side.cljs
banner to describe the live handlers (with the five telemetry questions kept as
ANSWERED notes pointing at write-side-design-notes.md), and updated the echoes in
core.cljs, board.cljs, detail.cljs, settings.cljs (+ the e2e spec's "ship unwired"
comment).

#2 Data > functions: the status taxonomy lived in view/statuses AND was re-spelled
as static <option>s in four <x-select>s ("keep in sync" comment = the smell). Now
each route populates its status select from view/statuses on init (dom/fill-options!);
index.html ships the selects empty. Scoped to the status taxonomy only (settings
fields / detail form-fields are each a route's intrinsic list, left as-is). Added an
e2e assertion that the filter's options come from the data (closing a coverage gap).

#3 Read patterns: documented why board/on-data-state reads the broker's retained
.state (filter-change events carry no payload) while detail/on-data-state reads
e.detail.state.data (only renders on load).

(#4 el!/text-el! `!` left as-is — they build DOM; defensible, per the reviewer.)

clj-kondo clean; clean shadow-cljs compile; full Playwright e2e 10/10 (release build
via bb serve), including the new status-filter test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@avanelsas avanelsas merged commit 87a31a2 into main Jun 3, 2026
2 checks passed
avanelsas added a commit that referenced this pull request Jun 10, 2026
Retire BareBuild entirely from the BareDOM repo. Removes the read-side
orchestration elements (barebuild-router / barebuild-route / barebuild-data),
the BareBuild CLI generator + project template, the Phase-4 demo app, all
BareBuild docs, and reverts the alpha (pre-release) dist-tag CI lane (#261).

Removed merged work: #252, #253, #256, #258, #259, #260, #261.
Preserved: #257 (unrelated x-form/x-select fix) and #263 (x-select .value),
which only happened to land in the same window.

The seam was clean (CI-enforced via the now-removed
scripts/check-barebuild-boundary.bb): no non-BareBuild component imported any
BareBuild code, so this is deletion + reference-block edits only.

Reference edits:
- registry.cljs / core.cljs: drop barebuild-registers
- shadow-cljs.edn / package.json: drop the barebuild-* ESM modules + exports
- public/index.html / README.md / docs/components.md: drop the Orchestration
  category (now empty)
- scripts/generate_types.bb / metadata.bb: type only x-* again
- .github/workflows/ci.yml: drop the boundary check + demo-app E2E job
- .github/workflows/release.yml + docs/RELEASING.md: revert the #261 alpha lane
- custom-elements.json: regenerated (no barebuild entries)
- CLAUDE.md / src/baredom/utils/dom.cljs: scrub barebuild from inline examples

Verified: clj-kondo 0/0, release lib 0 warnings, compile test 0 warnings,
npm test 5096 passing, require-style / du-discipline / method-api / bundle-size
guards all green.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.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