Repository navigation
Add live status bars to the upload and publish pages - #11
Merged
Merged
Conversation
added 2 commits
September 21, 2026 12:16
Both pages previously just told the user to go check the Actions tab after submitting -- a repository_dispatch call returns no run id, so there was nothing to poll. Adds docs/js/workflow-status.js: WorkflowStatusBar attributes the run a dispatch just created by snapshotting existing run ids immediately beforehand and watching for one that wasn't in that snapshot (the only way to identify it, since the runs API never exposes a dispatch's client_payload back), then polls that run's jobs/steps until it finishes, rendering a progress bar + step list + link to the run the whole way. upload.html: one status bar per bootstrap-asset.yml submission. publish.html: one per publish-direct.yml dispatch (it can fire several per submit, one per checked asset/locale row) -- each request's run is attributed *before* the next request's dispatch fires, so two requests started close together can't both claim the same freshly-appeared run; polling each to completion then runs concurrently in the background rather than serializing the whole submission. Also names publish-direct.yml's two checkout steps (translations vs. translations-templates) -- both were relying on actions/checkout's own default step name before, which is identical for both and would have shown as two indistinguishable "Checkout" rows in the new step list. Verified the status bar's own logic (attribution, step rendering, success/failure/timeout paths) against mocked API responses in a Node harness, since neither browser tool in this session could reach a local static server to exercise it live in-browser. Claude-Session: https://claude.ai/code/session_01BXPXYXKZCgxnTSNDGCCGYq
The upload page's status bar previously had no label at all (upload.js passed null); the publish page's already showed "<asset> / <locale>" per row. Both now consistently show the asset id right above the bar -- for upload.html, existing-asset mode uses the real selected id, new-asset mode uses deriveAssetIdPreview() (a preview only: the real id is always derived server-side by bootstrap_asset.py and could in principle differ, same caveat as the on-page id preview elsewhere in this file). Also adds a small "Actions:" heading directly under the progress bar, right above the existing step-by-step list (previously just a bare list with no heading) -- applies to both pages, since they share the same _renderSteps in workflow-status.js. Claude-Session: https://claude.ai/code/session_01BXPXYXKZCgxnTSNDGCCGYq
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
upload.htmlandpublish.htmlpreviously just told the user to check the Actions tab after submitting. Addsdocs/js/workflow-status.js: a live status bar that finds the run a dispatch just created and polls its jobs/steps until it finishes, rendering a progress bar, step list, and a link to the run.POST /dispatches(repository_dispatch) returns no run id, and the runs API never exposes a dispatch'sclient_payloadback -- so a bar can't be told "watch run #12345" directly. It attributes its run by snapshotting the workflow's existing run ids immediately before dispatching, then polling until an id shows up that wasn't in that snapshot.upload.html: one status bar perbootstrap-asset.ymlsubmission.publish.html: one status bar perpublish-direct.ymldispatch (it fires one per checked asset/locale row). Each request's run is attributed before the next request's dispatch fires -- otherwise two requests started close together could both claim the same freshly-appeared run -- but polling each to completion runs concurrently in the background afterward, so submitting several rows isn't serialized end to end.publish-direct.yml's two checkout steps (translationsvs.translations-templates) -- both previously usedactions/checkout's own default step name, identical for both, which would have shown as two indistinguishable "Checkout" rows in the new step list.Test plan
listWorkflowRuns/getWorkflowRunJobsresponses in a Node harness (vm+ a minimal DOM stub) -- all three end states render correctly with correct colors/icons/messages.localhost). Recommend one real submission on each page before treating this as fully verified end-to-end.Claude-Session: https://claude.ai/code/session_01BXPXYXKZCgxnTSNDGCCGYq