Skip to content

fix: scoped-count capability + single-day flat-list for location scope pages (#428)#430

Merged
chubes4 merged 1 commit into
mainfrom
scope-seo-subbugs
Jul 8, 2026
Merged

fix: scoped-count capability + single-day flat-list for location scope pages (#428)#430
chubes4 merged 1 commit into
mainfrom
scope-seo-subbugs

Conversation

@chubes4

@chubes4 chubes4 commented Jul 8, 2026

Copy link
Copy Markdown
Member

Closes #428 (substrate half).

What's fixed in this PR

1. Scoped-count capability for the substrate

The canonical event query ability (data-machine-events/query-events) now accepts an explicit, generic time_scope parameter (today, tonight, this-weekend, this-week). The value is resolved through the same ScopeResolver the calendar LIST uses, and the resulting date/time window flows into the existing UpcomingFilter date-range path. This lets callers request a scoped count without the substrate ever reading consumer query variables like event_scope.

  • inc/Abilities/EventDateQueryAbilities.php: adds time_scope to input schema and resolves it to date_start/date_end/time_start/time_end before building the query. Explicit date_start/date_end take precedence; bare requests remain unchanged.
  • inc/public-api.php: documents the new time_scope param in the data_machine_events_query_events() wrapper.

2. Single-day scopes render a flat list instead of a carousel

In inc/Blocks/Calendar/src/frontend.ts, single-day scopes (today, tonight) now skip the horizontal carousel and render a flat vertical list. Multi-day scopes (this-week, this-weekend) keep the carousel. This mirrors the existing month-grid carousel skip pattern and reads the server-emitted data-scope attribute the same way isMonthGridMode() reads data-display-mode.

What's intentionally NOT in this PR

The consumer wiring that reads event_scope in extrachill-events and passes time_scope into the query ability is a follow-up in the extrachill-events repo. That layer owns the event_scope query variable; this substrate change stays layer-pure and knows nothing about it.

Verification

  • php -l passes on inc/Abilities/EventDateQueryAbilities.php and inc/public-api.php.
  • npm run build in inc/Blocks/Calendar succeeded; frontend.js was regenerated (build artifacts are .gitignored, source change is the committed delta).
  • grep -rn \"event_scope\" inc/ returns nothing — no consumer query-var leakage into the substrate.

Files changed

  • inc/Abilities/EventDateQueryAbilities.php
  • inc/Blocks/Calendar/src/frontend.ts
  • inc/public-api.php

@homeboy-ci

homeboy-ci Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Homeboy Results — data-machine-events

Review audit

review audit — passed

  • audit — 2 finding(s)
  • Total: 2 finding(s)

Deep dive: homeboy review audit data-machine-events --changed-since a833819

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-events-review-audit-homeboy-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-events-review-audit-homeboy-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine-events/actions/runs/28954420952
Tooling versions
  • Homeboy CLI: homeboy 0.281.20+123145ee082b+b67c181
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: f89b4297
  • Action: Extra-Chill/homeboy-action@v2

@chubes4 chubes4 merged commit 5e6196a into main Jul 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant