Skip to content

Harden the analysis re-run trigger: no-JS fallback link, timestamp - #1062

Closed
skerbis wants to merge 1 commit into
feature/non-blocking-analysis-page-v2from
fix/analysis-toolbar-hardening
Closed

Harden the analysis re-run trigger: no-JS fallback link, timestamp#1062
skerbis wants to merge 1 commit into
feature/non-blocking-analysis-page-v2from
fix/analysis-toolbar-hardening

Conversation

@skerbis

@skerbis skerbis commented Sep 4, 2026

Copy link
Copy Markdown
Member

Summary

Stacked on #1061 (the non-blocking analysis page) — please review/merge that one first.

The trigger was only ever a JS-created <button>, with nothing server-rendered at all if JS never ran. During development, a forgotten assets:sync after editing assets/rexstan-analysis.js meant the button silently never appeared - reloading the page didn't help either, since nothing about the trigger was server-side to begin with.

The trigger is now a normal server-rendered link (?rerun=1), so it always renders and works even without JS - clicking it reloads the page, which starts the background run and shows the running state. JS still intercepts the same click to avoid the reload when it did load, and no longer auto-starts a run on the very first page view (previously silent/surprising) in favor of this always-visible link.

Also shows the timestamp the currently displayed result was generated at (RexStanRunStore::getCachedResultTimestamp()), so it's clear when what's on screen isn't from the just-finished run; updates to "just now" client-side once a poll completes.

Test plan

  • Verified the link renders correctly and isn't double-escaped (rex_url::backendPage() already returns a pre-escaped URL).
  • Verified the no-JS path: clicking reloads the page and starts a background run.
  • php -l + PHPStan on the changed files: 0 findings.

🤖 Generated with Claude Code

The trigger was only ever a JS-created <button>, with nothing
server-rendered at all if JS never ran. During development, a
forgotten `assets:sync` after editing assets/rexstan-analysis.js meant
the button silently never appeared - reloading the page didn't help
either, since nothing about the trigger was server-side.

The trigger is now a normal server-rendered link (?rerun=1), so it
always renders and works even without JS - clicking it reloads the
page, which starts the background run and shows the running state.
JS still intercepts the same click to avoid the reload when it did
load, and no longer auto-starts a run on the very first page view
(previously silent/surprising) in favor of this always-visible link.

Also shows the timestamp the currently displayed result was generated
at (RexStanRunStore::getCachedResultTimestamp()), so it's clear when
what's on screen isn't from the just-finished run; updated to "just
now" client-side once a poll completes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@skerbis

skerbis commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

Closing as part of flattening the stack into independent PRs — this and #1063/#1064 are being combined into one PR ("Harden, fix and animate the analysis re-run trigger"), based on #1067 instead of chained serially. Will link the replacement here once opened.

@skerbis

skerbis commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

Combined into #1068.

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