Harden the analysis re-run trigger: no-JS fallback link, timestamp - #1062
Closed
skerbis wants to merge 1 commit into
Closed
Harden the analysis re-run trigger: no-JS fallback link, timestamp#1062skerbis wants to merge 1 commit into
skerbis wants to merge 1 commit into
Conversation
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>
This was referenced Sep 4, 2026
Member
Author
This was referenced Sep 4, 2026
Member
Author
|
Combined into #1068. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 forgottenassets:syncafter editingassets/rexstan-analysis.jsmeant 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
rex_url::backendPage()already returns a pre-escaped URL).php -l+ PHPStan on the changed files: 0 findings.🤖 Generated with Claude Code