GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — aggregator: bootstrap fragment shells with data-init, not data-on-load (#10605) by dezren39 · Pull Request #10608 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 16, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fixes #10605.

Why

pm-aggregator tests → browser acceptance (MOB-00) has been red on main since it was added. Run 43804024455 (workflow_dispatch, head 3fb67243f5bfa3c3bff06eba9f18e7800516344c), job browser acceptance (MOB-00):

Locator: locator('#queue-main article.card').filter({ hasText: 'Dispatch trial: doc/README.md starting point (#762)' })
Error: element(s) not found   at test/browser/mobile-work-view.spec.ts:66:22

The trace had no /frag/queue request and the retained error context still showed Loading queue….

Root cause: the shell placeholders bootstrap their fragment fetch with data-on-load, which is not a Datastar v1 attribute. The vendored src/assets/datastar.js is Datastar v1.0.0, where listeners are data-on:<event> and one-shot init is data-init (data-init already works in this app — the theme toggle at render.ts:580 uses it). load also never fires on a div. So /frag/* was only fetched after the freshness client dispatched dashrefresh; on a quiet stream the page sat on the skeleton forever.

What changed

  • src/render.ts — the queue, today, overview and board shell placeholders (and the three attention shell sections via attentionFragment(..., { initial: true })) now use data-init="@get('/frag/...')", keeping data-on:dashrefresh__window for refresh. attentionFragment gains an initial option so the shell and the fragment payload can differ.
  • src/server.ts — the four /frag/* payload wrappers drop the load attribute entirely. They are applied with mode outer, so the payload replaces the shell element; an init trigger inside the payload would fetch itself again on every patch. First paint is the shell's data-init, refresh is dashrefresh only.
  • src/freshness-delivery.ts — the freshness re-mount frame patches a skeleton, so it needs a trigger to re-fetch once: data-on-load → data-init. The /frag/* payload it lands carries no init, so this cannot loop.
  • Tests (test/boot.test.ts, test/frag-watchdog-1503.test.ts, test/freshness-delivery.test.ts) now pin data-init, assert shells carry no data-on-load, and assert /frag/* payloads carry neither data-init nor data-on-load (the no-loop property). The freshness test asserts the re-mount frame does carry data-init.

No dashboard redesign, no Datastar bundle upgrade, no workflow trigger change (dispatch-only by #6126).

Verification

cd pm-stack/aggregator && bun test (bun 1.4.4, with HOME pointed at an isolated temp dir and a free PM_AGG_FRESHNESS_PORT; see note below):

 2767 pass
 0 fail
 24300 expect() calls
Ran 2767 tests across 213 files. [25.35s]

bunx tsc --noEmit — clean (exit 0).

Browser (system Chromium via a temporary Playwright config; the 1.64 Playwright browser download is not installed here; temporary config/specs deleted before committing). With /freshness/stream blocked at the network layer:

✓ /queue hydrates with the freshness stream blocked, exactly once
✓ /today hydrates with the freshness stream blocked, exactly once
✓ / hydrates with the freshness stream blocked, exactly once
✓ /board is a full server render: no fragment fetch needed
4 passed (13.8s)

Each shell test asserts: the fragment paints (skeleton gone), exactly one /frag/* request on first paint, still exactly one after 2.5 s idle (no loop), and exactly one more after a dispatched dashrefresh (refresh path intact). The real MOB-00 spec (only its ORIGIN port changed, because another local aggregator instance holds 4797) passes:

✓ pmo_mob_03/04_mobile_queue_keyboard_and_viewport_contract (863ms)
1 passed (1.6s)

Note on the local suite: with the default HOME, /quota blocks ~10 s on the real opencode DB held by the running session, so test/boot.test.ts times out locally; this reproduces identically on unmodified b84c351bbe (git archive of the base commit), so it is a host artifact, not this change. Under an isolated HOME (the CI condition) the full suite is green. No proxy file or test was modified for that.

CI cannot be triggered for this PR by design: verification is a manual workflow_dispatch of pm-aggregator tests, where browser acceptance (MOB-00) and aggregator tests and typecheck should now pass. The fetched-vs-loop behaviour was verified locally as above.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
repo-worker-tmp-code-b
aggregator: bootstrap fragment shells with data-init, not data-on-load (
d3b1bb6
#10605)

The vendored Datastar bundle is v1.0.0, where event listeners are
`data-on:<event>` and one-shot initialization is `data-init`. The
fragment shells still carried the v0-era `data-on-load`, and `load`
never fires on a `div`, so `/frag/*` was only fetched after the
freshness client dispatched `dashrefresh`. On a quiet stream `/queue`
(the MOB-00 browser acceptance page) sat on "Loading queue…" forever.

Shell placeholders (queue, today, overview, board, the three attention
sections) now bootstrap with `data-init="@get('/frag/...')"` and keep
`data-on:dashrefresh__window` for refresh.

The `/frag/*` payloads are applied in `mode outer`, so they must NOT
carry an init trigger: the payload replaces the shell element and a
re-initialising element would fetch itself again on every patch. The
four `ssePatch` wrappers therefore keep only the dashrefresh hook, and
`attentionFragment` grows an `initial` option so the shell renders the
trigger while the fragment route does not. The freshness re-mount
frame keeps a `data-init` (it patches a skeleton that must re-fetch
once); the fragment it lands carries none, so it cannot loop.

Tests now pin the real attribute and the no-loop property: shells
carry `data-init` and no `data-on-load`; `/frag/*` payloads carry
neither; the freshness patch frame carries `data-init` once.
@dezren39
dezren39 requested a review from a team as a code owner November 16, 2026 04:50
@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 27 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7e8539b3-b6ae-4023-ae27-cf21097b2e6a
Commits

Reviewing files that changed from the base of the PR and between fb6d016 and d3b1bb6.

Files selected for processing: 6

  • pm-stack/aggregator/src/freshness-delivery.ts
  • pm-stack/aggregator/src/render.ts
  • pm-stack/aggregator/src/server.ts
  • pm-stack/aggregator/test/boot.test.ts
  • pm-stack/aggregator/test/frag-watchdog-1503.test.ts
  • pm-stack/aggregator/test/freshness-delivery.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T04:50:57.292484Z
We couldn’t complete this review. Comment @codex review to try again.
d3b1bb6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 16, 2026
pm-aggregator tests: browser acceptance (MOB-00) red on main — fragments never load (data-on-load is not a Datastar v1 attribute) #10605
Closed
@dezren39
dezren39 merged commit bcb467e into main Nov 16, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/17410-main-ci-10605 branch November 16, 2026 05:01
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

pm-aggregator tests: browser acceptance (MOB-00) red on main — fragments never load (data-on-load is not a Datastar v1 attribute)

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.